Skip to content

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

POST/api/v1/payouts/quote

What each recipient will get and what will be deducted, without creating a payout. The body is the same as for POST /payouts.

Request body

FieldDescription
address_idstring · uuidid of the shop address to pay from. Specify it or address.
addressstringThe shop address itself instead of address_id.Limits: 1–128
chainstringPayout network; defaults to the address network. An EVM address may use another EVM network.Limits: 1–32
assetstringrequiredPayout asset: the network coin or a token from the network list in Networks and coins.Limits: 1–32
amountstringPayout amount with recipients by percent; omit it to pay out everything available. MAX also means everything available.
recipientsarray<object>requiredRecipients: up to 5, all by percent or all by amount.Limits: ≤ 5
recipients[].addressstringrequiredRecipient address.Limits: 1–128
recipients[].percentstring | numberShare in percent; shares add up to 100.
recipients[].amountstringAmount 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

JSON
{
  "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

400The request failed validation: VALIDATION_ERROR with fields and reasons in details; UNKNOWN_CHAIN, UNKNOWN_ASSET, CHAIN_DISABLED, INVALID_ADDRESS, IDEMPOTENCY_KEY_REQUIRED.
401No key or an invalid key: UNAUTHORIZED.
403The 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.
404Not found: NOT_FOUND. Another shop's record looks like a missing one.
422The payout cannot be executed: INSUFFICIENT_BALANCE, FUNDS_NOT_MATURE, BELOW_MINIMUM, COSTS_EXCEED_AMOUNT, PAYOUT_NOT_VIABLE.
429Too many requests: RATE_LIMITED. Retry later.
503Temporarily unavailable: CORE_UNAVAILABLE, RATE_UNAVAILABLE (no fresh rate) or NETWORK_FEE_TOO_HIGH (network gas above the cap). Retry later.

Create a payout

POST/api/v1/payouts

A 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

FieldDescription
Idempotency-KeystringrequiredIdempotency key: 8 to 128 printable ASCII characters, unique within the shop. A retry with the same key returns the previous result.

Request body

FieldDescription
address_idstring · uuidid of the shop address to pay from. Specify it or address.
addressstringThe shop address itself instead of address_id.Limits: 1–128
chainstringPayout network; defaults to the address network. An EVM address may use another EVM network.Limits: 1–32
assetstringrequiredPayout asset: the network coin or a token from the network list in Networks and coins.Limits: 1–32
amountstringPayout amount with recipients by percent; omit it to pay out everything available. MAX also means everything available.
recipientsarray<object>requiredRecipients: up to 5, all by percent or all by amount.Limits: ≤ 5
recipients[].addressstringrequiredRecipient address.Limits: 1–128
recipients[].percentstring | numberShare in percent; shares add up to 100.
recipients[].amountstringAmount 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

JSON
{
  "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

400The request failed validation: VALIDATION_ERROR with fields and reasons in details; UNKNOWN_CHAIN, UNKNOWN_ASSET, CHAIN_DISABLED, INVALID_ADDRESS, IDEMPOTENCY_KEY_REQUIRED.
401No key or an invalid key: UNAUTHORIZED.
403The 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.
404Not found: NOT_FOUND. Another shop's record looks like a missing one.
409Conflict: IDEMPOTENCY_CONFLICT — the key was used for another request; INVOICE_NOT_OPEN — the invoice is no longer open.
422The payout cannot be executed: INSUFFICIENT_BALANCE, FUNDS_NOT_MATURE, BELOW_MINIMUM, COSTS_EXCEED_AMOUNT, PAYOUT_NOT_VIABLE.
429Too many requests: RATE_LIMITED. Retry later.
503Temporarily unavailable: CORE_UNAVAILABLE, RATE_UNAVAILABLE (no fresh rate) or NETWORK_FEE_TOO_HIGH (network gas above the cap). Retry later.

List payouts

GET/api/v1/payouts

Shop payouts, by API and automatic, newest first.

Query parameters

FieldDescription
statusstringOnly payouts in this state.Values: pending, waiting_maturity, submitted, broadcast, confirmed, failed, partially_completed, rejected
chainstringOnly this network.
address_idstringOnly payouts from this shop address.
cursorstringnext_cursor of the previous page.
limitintegerPage 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

JSON
{
  "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

400The request failed validation: VALIDATION_ERROR with fields and reasons in details; UNKNOWN_CHAIN, UNKNOWN_ASSET, CHAIN_DISABLED, INVALID_ADDRESS, IDEMPOTENCY_KEY_REQUIRED.
401No key or an invalid key: UNAUTHORIZED.
403The 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

GET/api/v1/payouts/{id}

A payout by id, the same shape as in payout.* events.

Path parameters

FieldDescription
idstringrequiredPublic id.

Request example

curl -X GET "https://coinspay.app/api/v1/payouts/4f7c2a52-8a6e-4c1d-9a51-0e3b6f1d2c11" \
  -H "Authorization: Bearer cpk_…"

Response200

JSON
{
  "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

400The request failed validation: VALIDATION_ERROR with fields and reasons in details; UNKNOWN_CHAIN, UNKNOWN_ASSET, CHAIN_DISABLED, INVALID_ADDRESS, IDEMPOTENCY_KEY_REQUIRED.
401No key or an invalid key: UNAUTHORIZED.
403The 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.
404Not found: NOT_FOUND. Another shop's record looks like a missing one.