PaybytokenDocs
Customer Withdrawals
API reference · Customer Withdrawals

Customer withdrawals

Send an exact-asset customer balance to an external blockchain address.

Customer withdrawals debit a merchant-scoped customer's exact chain-and-asset balance. Discover the enabled assets and current fee policy before accepting a withdrawal request:

GET /api/v1/withdrawal-assets

Endpoints

MethodEndpointPurpose
POST/api/v1/customers/:customerId/withdrawalsReserve funds and start a withdrawal.
GET/api/v1/customers/:customerId/withdrawalsList a customer's withdrawals.
GET/api/v1/customers/:customerId/withdrawals/:withdrawalIdRetrieve one withdrawal.
curl https://api-prod.paybytoken.io/api/v1/customers/cus_123/withdrawals \
  -X POST \
  -H "Authorization: Bearer $PAYBYTOKEN_SECRET_KEY" \
  -H "Idempotency-Key: withdrawal:merchant_customer_8:1" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "base",
    "asset": "USDC",
    "amount": "10.15",
    "destination_address": "0x1111111111111111111111111111111111111111",
    "reference": "merchant_withdrawal_42"
  }'

The debit includes the withdrawal amount plus the quoted fee. Creation may return an asynchronous pending state; fulfill customer-facing status from signed customer_withdrawal.* events or an authenticated retrieval. Validate and confirm the chain and destination in the merchant product; blockchain settlement is generally irreversible.

On this page

API Workbench

Full Explorer

Open in new tab