import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.paymentMethods.setUnpaidHours({
hours: 24,
});<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->paymentMethods->setUnpaidHours([
'hours' => 24,
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.paymentMethods.setUnpaidHours(hours=24)
curl --request PUT \
--url https://api.shoply.gg/v1/stores/{storeId}/payment-methods/unpaid-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"hours": 24
}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/payment-methods/unpaid-hours"
payload := strings.NewReader("{\n \"hours\": 24\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.shoply.gg/v1/stores/{storeId}/payment-methods/unpaid-hours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hours\": 24\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/payment-methods/unpaid-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hours\": 24\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": null,
"updatedAt": "2026-10-22T16:20:19.558Z"
},
{
"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 how long an unpaid order is kept
How long the store keeps an order nobody pays before it is cancelled, from 1 hour to 14 days. A method with a time of its own keeps its own. An order is never cancelled within an hour of a payment being opened on it. Answers the list again, with the store’s time in meta.unpaid.
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.setUnpaidHours({
hours: 24,
});<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->paymentMethods->setUnpaidHours([
'hours' => 24,
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.paymentMethods.setUnpaidHours(hours=24)
curl --request PUT \
--url https://api.shoply.gg/v1/stores/{storeId}/payment-methods/unpaid-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"hours": 24
}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/payment-methods/unpaid-hours"
payload := strings.NewReader("{\n \"hours\": 24\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.shoply.gg/v1/stores/{storeId}/payment-methods/unpaid-hours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hours\": 24\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/payment-methods/unpaid-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hours\": 24\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": null,
"updatedAt": "2026-10-22T16:20:19.558Z"
},
{
"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.
Body
Hours, from 1 to 336.
24

