Methods
Payouts
Withdrawal from a shop address to your wallets. Automatic payouts by the rule run by themselves; here are payouts on request.
Quote a payout
/api/v1/payouts/quoteWhat each recipient will get and what will be deducted, without creating a payout. The body is the same as for POST /payouts.
Request body
| Field | Description |
|---|---|
address_idstring · uuid | id of the shop address to pay from. Specify it or address. |
addressstring | The shop address itself instead of address_id.Limits: 1–128 |
chainstring | Payout network; defaults to the address network. An EVM address may use another EVM network.Limits: 1–32 |
assetstringrequired | Payout asset: the network coin or a token from the network list in Networks and coins.Limits: 1–32 |
amountstring | Payout amount with recipients by percent; omit it to pay out everything available. MAX also means everything available. |
recipientsarray<object>required | Recipients: up to 5, all by percent or all by amount.Limits: ≤ 5 |
recipients[].addressstringrequired | Recipient address.Limits: 1–128 |
recipients[].percentstring | number | Share in percent; shares add up to 100. |
recipients[].amountstring | Amount for the recipient; MAX only with a single recipient. Deductions are taken from it. |
Request example
curl -X POST "https://coinspay.app/api/v1/payouts/quote" \
-H "Authorization: Bearer cpk_…" \
-H "Content-Type: application/json" \
-d '{"address_id":"6f1c2b0e-4d8a-4c3e-9b21-7a5d0e3f8c42","asset":"USDT","amount":"50","recipients":[{"address":"TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8","percent":"100","amount":"50"}]}'Response200
{
"quote": {
"chain": "tron",
"asset": "USDT",
"decimals": 6,
"amount": "120",
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"address_id": "1b2c3d4e-5f60-4718-8293-a4b5c6d7e8f9",
"recipients": [
{
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"percent": null,
"requested": null,
"amount": null
}
]
}
}Payout quote — All fields are in the Objects section
Errors
| 400 | The request failed validation: VALIDATION_ERROR with fields and reasons in details; UNKNOWN_CHAIN, UNKNOWN_ASSET, CHAIN_DISABLED, INVALID_ADDRESS, IDEMPOTENCY_KEY_REQUIRED. |
| 401 | No key or an invalid key: UNAUTHORIZED. |
| 403 | The shop is disabled: SHOP_DISABLED; the request came from an address outside the key's IP allowlist: IP_NOT_ALLOWED, the address is in details.ip; a test key called a method without test mode: TEST_MODE_UNSUPPORTED; an invoices-only key called a method that needs full access: KEY_ACCESS_DENIED. |
| 404 | Not found: NOT_FOUND. Another shop's record looks like a missing one. |
| 422 | The payout cannot be executed: INSUFFICIENT_BALANCE, FUNDS_NOT_MATURE, BELOW_MINIMUM, COSTS_EXCEED_AMOUNT, PAYOUT_NOT_VIABLE. |
| 429 | Too many requests: RATE_LIMITED. Retry later. |
| 503 | Temporarily unavailable: CORE_UNAVAILABLE, RATE_UNAVAILABLE (no fresh rate) or NETWORK_FEE_TOO_HIGH (network gas above the cap). Retry later. |
Create a payout
/api/v1/payoutsA payout from a shop address. The Idempotency-Key header is required: a retry with the same key and body returns the same payout (200), with another body — 409 IDEMPOTENCY_CONFLICT. A payout that cannot be executed is refused at once and not stored: 422 with the reason.
Headers
| Field | Description |
|---|---|
Idempotency-Keystringrequired | Idempotency key: 8 to 128 printable ASCII characters, unique within the shop. A retry with the same key returns the previous result. |
Request body
| Field | Description |
|---|---|
address_idstring · uuid | id of the shop address to pay from. Specify it or address. |
addressstring | The shop address itself instead of address_id.Limits: 1–128 |
chainstring | Payout network; defaults to the address network. An EVM address may use another EVM network.Limits: 1–32 |
assetstringrequired | Payout asset: the network coin or a token from the network list in Networks and coins.Limits: 1–32 |
amountstring | Payout amount with recipients by percent; omit it to pay out everything available. MAX also means everything available. |
recipientsarray<object>required | Recipients: up to 5, all by percent or all by amount.Limits: ≤ 5 |
recipients[].addressstringrequired | Recipient address.Limits: 1–128 |
recipients[].percentstring | number | Share in percent; shares add up to 100. |
recipients[].amountstring | Amount for the recipient; MAX only with a single recipient. Deductions are taken from it. |
Request example
curl -X POST "https://coinspay.app/api/v1/payouts" \
-H "Authorization: Bearer cpk_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{"address_id":"6f1c2b0e-4d8a-4c3e-9b21-7a5d0e3f8c42","asset":"USDT","amount":"50","recipients":[{"address":"TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8","percent":"100","amount":"50"}]}'Response201
{
"payout": {
"id": "6f1c2b0e-4d8a-4c3e-9b21-7a5d0e3f8c42",
"status": "confirmed",
"origin": "api",
"chain": "tron",
"asset": "USDT",
"decimals": 6,
"amount": "120",
"amount_base": "120000000",
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"address_id": "1b2c3d4e-5f60-4718-8293-a4b5c6d7e8f9",
"deposit_id": null,
"recipients": [
{
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"percent": null,
"requested": null,
"amount": null,
"sent": null,
"tx_hash": null,
"status": null
}
],
"error": {
"code": "string",
"message": null
},
"created_at": "2026-10-16T09:12:44.512Z",
"submitted_at": null,
"completed_at": null
}
}Payout — All fields are in the Objects section
Errors
| 400 | The request failed validation: VALIDATION_ERROR with fields and reasons in details; UNKNOWN_CHAIN, UNKNOWN_ASSET, CHAIN_DISABLED, INVALID_ADDRESS, IDEMPOTENCY_KEY_REQUIRED. |
| 401 | No key or an invalid key: UNAUTHORIZED. |
| 403 | The shop is disabled: SHOP_DISABLED; the request came from an address outside the key's IP allowlist: IP_NOT_ALLOWED, the address is in details.ip; a test key called a method without test mode: TEST_MODE_UNSUPPORTED; an invoices-only key called a method that needs full access: KEY_ACCESS_DENIED. |
| 404 | Not found: NOT_FOUND. Another shop's record looks like a missing one. |
| 409 | Conflict: IDEMPOTENCY_CONFLICT — the key was used for another request; INVOICE_NOT_OPEN — the invoice is no longer open. |
| 422 | The payout cannot be executed: INSUFFICIENT_BALANCE, FUNDS_NOT_MATURE, BELOW_MINIMUM, COSTS_EXCEED_AMOUNT, PAYOUT_NOT_VIABLE. |
| 429 | Too many requests: RATE_LIMITED. Retry later. |
| 503 | Temporarily unavailable: CORE_UNAVAILABLE, RATE_UNAVAILABLE (no fresh rate) or NETWORK_FEE_TOO_HIGH (network gas above the cap). Retry later. |
List payouts
/api/v1/payoutsShop payouts, by API and automatic, newest first.
Query parameters
| Field | Description |
|---|---|
statusstring | Only payouts in this state.Values: pending, waiting_maturity, submitted, broadcast, confirmed, failed, partially_completed, rejected |
chainstring | Only this network. |
address_idstring | Only payouts from this shop address. |
cursorstring | next_cursor of the previous page. |
limitinteger | Page size: 1 to 100, 50 by default. |
Request example
curl -X GET "https://coinspay.app/api/v1/payouts?limit=20" \
-H "Authorization: Bearer cpk_…"Response200
{
"payouts": [
{
"id": "6f1c2b0e-4d8a-4c3e-9b21-7a5d0e3f8c42",
"status": "confirmed",
"origin": "api",
"chain": "tron",
"asset": "USDT",
"decimals": 6,
"amount": "120",
"amount_base": "120000000",
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"address_id": "1b2c3d4e-5f60-4718-8293-a4b5c6d7e8f9",
"deposit_id": null,
"recipients": [
{
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"percent": null,
"requested": null,
"amount": null,
"sent": null,
"tx_hash": null,
"status": null
}
],
"error": {
"code": "string",
"message": null
},
"created_at": "2026-10-16T09:12:44.512Z",
"submitted_at": null,
"completed_at": null
}
],
"next_cursor": null
}Payout — All fields are in the Objects section
Errors
| 400 | The request failed validation: VALIDATION_ERROR with fields and reasons in details; UNKNOWN_CHAIN, UNKNOWN_ASSET, CHAIN_DISABLED, INVALID_ADDRESS, IDEMPOTENCY_KEY_REQUIRED. |
| 401 | No key or an invalid key: UNAUTHORIZED. |
| 403 | The shop is disabled: SHOP_DISABLED; the request came from an address outside the key's IP allowlist: IP_NOT_ALLOWED, the address is in details.ip; a test key called a method without test mode: TEST_MODE_UNSUPPORTED; an invoices-only key called a method that needs full access: KEY_ACCESS_DENIED. |
Get a payout
/api/v1/payouts/{id}A payout by id, the same shape as in payout.* events.
Path parameters
| Field | Description |
|---|---|
idstringrequired | Public id. |
Request example
curl -X GET "https://coinspay.app/api/v1/payouts/4f7c2a52-8a6e-4c1d-9a51-0e3b6f1d2c11" \
-H "Authorization: Bearer cpk_…"Response200
{
"payout": {
"id": "6f1c2b0e-4d8a-4c3e-9b21-7a5d0e3f8c42",
"status": "confirmed",
"origin": "api",
"chain": "tron",
"asset": "USDT",
"decimals": 6,
"amount": "120",
"amount_base": "120000000",
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"address_id": "1b2c3d4e-5f60-4718-8293-a4b5c6d7e8f9",
"deposit_id": null,
"recipients": [
{
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"percent": null,
"requested": null,
"amount": null,
"sent": null,
"tx_hash": null,
"status": null
}
],
"error": {
"code": "string",
"message": null
},
"created_at": "2026-10-16T09:12:44.512Z",
"submitted_at": null,
"completed_at": null
}
}Payout — All fields are in the Objects section
Errors
| 400 | The request failed validation: VALIDATION_ERROR with fields and reasons in details; UNKNOWN_CHAIN, UNKNOWN_ASSET, CHAIN_DISABLED, INVALID_ADDRESS, IDEMPOTENCY_KEY_REQUIRED. |
| 401 | No key or an invalid key: UNAUTHORIZED. |
| 403 | The shop is disabled: SHOP_DISABLED; the request came from an address outside the key's IP allowlist: IP_NOT_ALLOWED, the address is in details.ip; a test key called a method without test mode: TEST_MODE_UNSUPPORTED; an invoices-only key called a method that needs full access: KEY_ACCESS_DENIED. |
| 404 | Not found: NOT_FOUND. Another shop's record looks like a missing one. |