import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.paymentMethods.setMethodUnpaidHours("PROVIDER", {
hours: 2,
});
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->paymentMethods->setMethodUnpaidHours('PROVIDER', [
'hours' => 2,
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.paymentMethods.setMethodUnpaidHours("PROVIDER", hours=2)
curl --request PATCH \
--url https://api.shoply.gg/v1/stores/{storeId}/payment-methods/{provider}/unpaid-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"hours": 2
}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/payment-methods/{provider}/unpaid-hours"
payload := strings.NewReader("{\n \"hours\": 2\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.shoply.gg/v1/stores/{storeId}/payment-methods/{provider}/unpaid-hours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hours\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/payment-methods/{provider}/unpaid-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hours\": 2\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": [
{
"provider": "nmi",
"name": "NMI",
"kind": "fiat",
"blurb": "Accept cards through NMI, or a provider that resells it under its own name. Buyers enter their card in the gateway's own secure window.",
"tagline": "Accept cards on your checkout through your NMI gateway account.",
"accent": "#32165d",
"site": "https://docs.nmi.com/docs/getting-your-api-keys",
"callbackUrl": "http://localhost:8000/api/payments/nmi/callback/743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"returnOrigin": "",
"originHint": "",
"callbackHint": "",
"copies": [],
"authorizeUrl": "",
"connected": true,
"enabled": true,
"usable": true,
"ready": true,
"testMode": false,
"modes": [],
"mode": "",
"label": "",
"buyerLabel": "Credit/Debit Card (NMI)",
"defaultLabel": "Credit/Debit Card (NMI)",
"fields": [
{
"name": "public_key",
"label": "Public Security Key",
"placeholder": "With Tokenization and Checkout permissions",
"required": true,
"max": 255,
"secret": false,
"showCallback": false,
"mode": "",
"isSet": true,
"value": "checkout_public_kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"
},
{
"name": "security_key",
"label": "Private Security Key",
"placeholder": "With API and Query permissions",
"required": true,
"max": 255,
"secret": true,
"showCallback": false,
"mode": "",
"isSet": true,
"value": ""
}
],
"toggles": [
{
"name": "require_billing",
"label": "Require Billing Information",
"hint": "Ask card buyers for their name and billing address at checkout, and send it with the charge.",
"group": "Card Checks",
"needs": "",
"on": false
},
{
"name": "three_ds",
"label": "Check Cards With 3D Secure",
"hint": "The buyer's bank confirms the card is theirs before it is charged, most often without asking them anything.",
"group": "Card Checks",
"needs": "require_billing",
"on": false
}
],
"unpaidHours": 2,
"updatedAt": "2026-10-22T16:20:19.646Z"
},
{
"provider": "tagada",
"name": "Tagada",
"kind": "fiat",
"blurb": "Accept cards through your Tagada account. Buyers type their card on the checkout itself, and Tagada charges it through the processors you have connected there.",
"tagline": "Accept cards through the processors you connect in Tagada, on your own checkout.",
"accent": "#16191d",
"site": "https://app.tagada.io/",
"callbackUrl": "http://localhost:8000/api/payments/tagada/callback/743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"returnOrigin": "",
"originHint": "",
"callbackHint": "",
"copies": [],
"authorizeUrl": "",
"connected": true,
"enabled": true,
"usable": true,
"ready": true,
"testMode": false,
"modes": [],
"mode": "",
"label": "",
"buyerLabel": "Credit/Debit Card (Tagada)",
"defaultLabel": "Credit/Debit Card (Tagada)",
"fields": [
{
"name": "store_id",
"label": "Store ID",
"placeholder": "store_...",
"required": true,
"max": 255,
"secret": false,
"showCallback": false,
"mode": "",
"isSet": true,
"value": "store_northwind01"
},
{
"name": "api_key",
"label": "API Key",
"placeholder": "sk_crm_...",
"required": true,
"max": 255,
"secret": true,
"showCallback": false,
"mode": "",
"isSet": true,
"value": ""
}
],
"toggles": [],
"unpaidHours": null,
"updatedAt": "2026-10-22T16:20:19.559Z"
}
],
"meta": {
"order": [
"nmi",
"tagada"
],
"balance": {
"enabled": true,
"holders": 1
},
"unpaid": {
"hours": 24,
"presets": [
1,
2
],
"least": 1,
"most": 336
},
"routing": {
"providers": [
"nmi",
"tagada"
]
}
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Set a payment method's own time for an unpaid order
How long an order is kept unpaid once a payment has been opened on it with this method, from 1 hour to 14 days. Null gives it back the store’s time. Answers the list again, each method with its unpaidHours.
Needs the payments.write permission (Change Payment Methods).
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.paymentMethods.setMethodUnpaidHours("PROVIDER", {
hours: 2,
});
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->paymentMethods->setMethodUnpaidHours('PROVIDER', [
'hours' => 2,
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.paymentMethods.setMethodUnpaidHours("PROVIDER", hours=2)
curl --request PATCH \
--url https://api.shoply.gg/v1/stores/{storeId}/payment-methods/{provider}/unpaid-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"hours": 2
}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/payment-methods/{provider}/unpaid-hours"
payload := strings.NewReader("{\n \"hours\": 2\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.shoply.gg/v1/stores/{storeId}/payment-methods/{provider}/unpaid-hours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hours\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/payment-methods/{provider}/unpaid-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hours\": 2\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": [
{
"provider": "nmi",
"name": "NMI",
"kind": "fiat",
"blurb": "Accept cards through NMI, or a provider that resells it under its own name. Buyers enter their card in the gateway's own secure window.",
"tagline": "Accept cards on your checkout through your NMI gateway account.",
"accent": "#32165d",
"site": "https://docs.nmi.com/docs/getting-your-api-keys",
"callbackUrl": "http://localhost:8000/api/payments/nmi/callback/743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"returnOrigin": "",
"originHint": "",
"callbackHint": "",
"copies": [],
"authorizeUrl": "",
"connected": true,
"enabled": true,
"usable": true,
"ready": true,
"testMode": false,
"modes": [],
"mode": "",
"label": "",
"buyerLabel": "Credit/Debit Card (NMI)",
"defaultLabel": "Credit/Debit Card (NMI)",
"fields": [
{
"name": "public_key",
"label": "Public Security Key",
"placeholder": "With Tokenization and Checkout permissions",
"required": true,
"max": 255,
"secret": false,
"showCallback": false,
"mode": "",
"isSet": true,
"value": "checkout_public_kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"
},
{
"name": "security_key",
"label": "Private Security Key",
"placeholder": "With API and Query permissions",
"required": true,
"max": 255,
"secret": true,
"showCallback": false,
"mode": "",
"isSet": true,
"value": ""
}
],
"toggles": [
{
"name": "require_billing",
"label": "Require Billing Information",
"hint": "Ask card buyers for their name and billing address at checkout, and send it with the charge.",
"group": "Card Checks",
"needs": "",
"on": false
},
{
"name": "three_ds",
"label": "Check Cards With 3D Secure",
"hint": "The buyer's bank confirms the card is theirs before it is charged, most often without asking them anything.",
"group": "Card Checks",
"needs": "require_billing",
"on": false
}
],
"unpaidHours": 2,
"updatedAt": "2026-10-22T16:20:19.646Z"
},
{
"provider": "tagada",
"name": "Tagada",
"kind": "fiat",
"blurb": "Accept cards through your Tagada account. Buyers type their card on the checkout itself, and Tagada charges it through the processors you have connected there.",
"tagline": "Accept cards through the processors you connect in Tagada, on your own checkout.",
"accent": "#16191d",
"site": "https://app.tagada.io/",
"callbackUrl": "http://localhost:8000/api/payments/tagada/callback/743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"returnOrigin": "",
"originHint": "",
"callbackHint": "",
"copies": [],
"authorizeUrl": "",
"connected": true,
"enabled": true,
"usable": true,
"ready": true,
"testMode": false,
"modes": [],
"mode": "",
"label": "",
"buyerLabel": "Credit/Debit Card (Tagada)",
"defaultLabel": "Credit/Debit Card (Tagada)",
"fields": [
{
"name": "store_id",
"label": "Store ID",
"placeholder": "store_...",
"required": true,
"max": 255,
"secret": false,
"showCallback": false,
"mode": "",
"isSet": true,
"value": "store_northwind01"
},
{
"name": "api_key",
"label": "API Key",
"placeholder": "sk_crm_...",
"required": true,
"max": 255,
"secret": true,
"showCallback": false,
"mode": "",
"isSet": true,
"value": ""
}
],
"toggles": [],
"unpaidHours": null,
"updatedAt": "2026-10-22T16:20:19.559Z"
}
],
"meta": {
"order": [
"nmi",
"tagada"
],
"balance": {
"enabled": true,
"holders": 1
},
"unpaid": {
"hours": 24,
"presets": [
1,
2
],
"least": 1,
"most": 336
},
"routing": {
"providers": [
"nmi",
"tagada"
]
}
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Headers
A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
The payment method, by its name in "List payment methods".
Body
Hours, from 1 to 336, or null for the store's.
2

