Payments
Create, read, check, cancel and list payments.
POST
/api/pay/v1/payments Your Tocler Pay merchant keypayments:create Create a payment. Answers 201 with the payment. The same reference + coin + amount returns the same waiting payment; another coin for the same reference cancels the waiting one. While a payment for the reference is confirming / in review, or after it was paid → 409.
- Idempotency-KeystringheaderStrongly advised — 1–64 letters, digits,
_ - : . - amount_usdstringbodyrequired"25.00" — at least 0.50.
- coinstringbodyrequiredA key from GET /v1/coins.
- referencestringbodyrequiredYour order / invoice id (1–64: letters, digits,
. _ : -). A reference can be paid once. - address_modestringbody
toclerorown— needed when the key has both. - payeestringbodyOwn mode: a sub-account whose own addresses are used.
- metadataobjectbodyUp to 20 keys (letters, digits,
_ -); values text ≤ 500, number or true / false. Never secrets.
Errors
400invalid_request— A field is missing or wrong — see error.field.400amount_too_small— Under $0.50.400amount_over_key_limit— Over the key’s most per payment.400daily_limit_reached— The key’s 24-hour limit is used up.401unauthorized— No key, a wrong key, or a revoked / expired key (key_revoked, key_expired).403missing_scope— The key lacks the scope this call needs.403coin_not_allowed— The key may not use that coin.409reference_paid— That reference was already paid.409payment_in_progress— A payment for the reference is confirming or in review.409coin_unavailable— The coin is off or has no ready address.409idempotency_mismatch— The same Idempotency-Key with another body.429rate_limited— Too many requests — slow down and try again.
curl -X POST 'https://api.tocler.com/api/pay/v1/payments' \
-H 'Authorization: Bearer tp_live_…' \
-H 'Content-Type: application/json' \
-d '{
"amount_usd": "25.00",
"coin": "usdt_tron",
"reference": "order-1001",
"address_mode": "own",
"metadata": {
"cart": "c-9"
}
}'{
"amount_usd": "25.00",
"coin": "usdt_tron",
"reference": "order-1001",
"address_mode": "own",
"metadata": {
"cart": "c-9"
}
}{
"id": "TCP-7KQ2M9XA",
"object": "payment",
"status": "pending",
"reference": "order-1001",
"amount_usd": "25.00",
"coin": {
"key": "usdt_tron",
"symbol": "USDT",
"name": "Tether USD (TRC-20)",
"token_contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
},
"network": {
"key": "tron",
"name": "TRON"
},
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"amount": "25.0013",
"amount_units": "25001300",
"price_usd": "1",
"confirmations": {
"current": 0,
"needed": 20
},
"transaction": null,
"address_mode": "own",
"payee": null,
"metadata": {
"cart": "c-9"
},
"review_reason": null,
"expires_at": "2026-11-02T10:30:00.000Z",
"created_at": "2026-11-02T10:00:00.000Z",
"updated_at": "2026-11-02T10:00:00.000Z",
"paid_at": null,
"events": [
{
"type": "created",
"at": "2026-11-02T10:00:00.000Z",
"message": "Waiting for 25.0013 USDT."
}
]
} | status | Meaning |
|---|---|
| pending | Waiting for the transfer. |
| confirming | Seen on the chain; waiting for confirmations.needed. |
| paid | All 5 checks passed — deliver. |
| expired | The timer ended with nothing received. |
| review | Something odd (late, after a cancel, not the exact amount) — Tocler decides. |
| refused | Refused after review. |
| cancelled | Cancelled by you, by another coin chosen, or when the order closed. |
GET
/api/pay/v1/payments/{id} Your Tocler Pay merchant keypayments:read One payment. Always read the payment back before delivering — never act on a webhook alone.
- idstringpathrequiredThe payment id, e.g. TCP-7KQ2M9XA.
Errors
401unauthorized— No key, a wrong key, or a revoked / expired key (key_revoked, key_expired).403missing_scope— The key lacks the scope this call needs.404not_found— No such object, or it belongs to another merchant.
curl -X GET 'https://api.tocler.com/api/pay/v1/payments/{id}' \
-H 'Authorization: Bearer tp_live_…'{
"id": "TCP-7KQ2M9XA",
"object": "payment",
"status": "pending",
"reference": "order-1001",
"amount_usd": "25.00",
"coin": {
"key": "usdt_tron",
"symbol": "USDT",
"name": "Tether USD (TRC-20)",
"token_contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
},
"network": {
"key": "tron",
"name": "TRON"
},
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"amount": "25.0013",
"amount_units": "25001300",
"price_usd": "1",
"confirmations": {
"current": 0,
"needed": 20
},
"transaction": null,
"address_mode": "own",
"payee": null,
"metadata": {
"cart": "c-9"
},
"review_reason": null,
"expires_at": "2026-11-02T10:30:00.000Z",
"created_at": "2026-11-02T10:00:00.000Z",
"updated_at": "2026-11-02T10:00:00.000Z",
"paid_at": null,
"events": [
{
"type": "created",
"at": "2026-11-02T10:00:00.000Z",
"message": "Waiting for 25.0013 USDT."
}
]
} POST
/api/pay/v1/payments/{id}/check Your Tocler Pay merchant keypayments:read Ask the blockchain now, then answer the payment — for a “I have paid” button. At most once every 10 seconds per payment.
- idstringpathrequiredThe payment id.
Errors
401unauthorized— No key, a wrong key, or a revoked / expired key (key_revoked, key_expired).403missing_scope— The key lacks the scope this call needs.404not_found— No such object, or it belongs to another merchant.429rate_limited— Too many requests — slow down and try again.
curl -X POST 'https://api.tocler.com/api/pay/v1/payments/{id}/check' \
-H 'Authorization: Bearer tp_live_…'{
"id": "TCP-7KQ2M9XA",
"object": "payment",
"status": "pending",
"reference": "order-1001",
"amount_usd": "25.00",
"coin": {
"key": "usdt_tron",
"symbol": "USDT",
"name": "Tether USD (TRC-20)",
"token_contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
},
"network": {
"key": "tron",
"name": "TRON"
},
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"amount": "25.0013",
"amount_units": "25001300",
"price_usd": "1",
"confirmations": {
"current": 0,
"needed": 20
},
"transaction": null,
"address_mode": "own",
"payee": null,
"metadata": {
"cart": "c-9"
},
"review_reason": null,
"expires_at": "2026-11-02T10:30:00.000Z",
"created_at": "2026-11-02T10:00:00.000Z",
"updated_at": "2026-11-02T10:00:00.000Z",
"paid_at": null,
"events": [
{
"type": "created",
"at": "2026-11-02T10:00:00.000Z",
"message": "Waiting for 25.0013 USDT."
}
]
} POST
/api/pay/v1/payments/{id}/cancel Your Tocler Pay merchant keypayments:cancel Cancel a pending payment. A transfer that still arrives goes to review.
- idstringpathrequiredThe payment id.
Errors
401unauthorized— No key, a wrong key, or a revoked / expired key (key_revoked, key_expired).403missing_scope— The key lacks the scope this call needs.404not_found— No such object, or it belongs to another merchant.409not_cancellable— Only a pending payment can be cancelled.
curl -X POST 'https://api.tocler.com/api/pay/v1/payments/{id}/cancel' \
-H 'Authorization: Bearer tp_live_…'{ "id": "TCP-7KQ2M9XA", "object": "payment", "status": "cancelled", "…": "…" } GET
/api/pay/v1/payments Your Tocler Pay merchant keypayments:read List payments, newest first.
- referencestringqueryExactly this reference.
- reference_prefixstringqueryReferences starting with this.
- statusstringqueryOne status.
- limitintegerqueryUp to 100.
- created_beforestringqueryPaging: pass next_created_before from the last answer.
Errors
400invalid_request— A field is missing or wrong — see error.field.401unauthorized— No key, a wrong key, or a revoked / expired key (key_revoked, key_expired).403missing_scope— The key lacks the scope this call needs.
curl -X GET 'https://api.tocler.com/api/pay/v1/payments' \
-H 'Authorization: Bearer tp_live_…'{
"object": "list",
"data": [
{
"id": "TCP-7KQ2M9XA",
"object": "payment",
"status": "paid"
}
],
"has_more": false,
"next_created_before": null
} Was this page helpful?