List withdrawals
Returns a paginated list of withdrawals for the merchant tied to your secret key. You can filter bystatus and control pagination with limit and offset.
curl -X GET \
"https://api.spacepay.co.uk/v1/external/secretkey-auth/withdrawals?status=completed&limit=50&offset=0"
\ -H "X-SpacePay-Secret-Key: sk_test_your_secret_key"
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"merchantId": "4e29f55d-d6a8-42d7-8230-cb8efeded39e",
"amountInCents": 5000,
"chainId": 84532,
"recipientAddress": "0xRecipientAddressHere",
"status": "completed",
"currency": "USD",
"orderId": "order_123",
"customMetadata": "{\"note\":\"payout for March\"}",
"errorMessage": null,
"receipt": {
"withdrawalId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"settledToken": {
"symbol": "ETH",
"decimals": 18,
"contractAddress": "0x0000000000000000000000000000000000000000"
},
"settledChain": {
"chainId": 84532,
"name": "Base Sepolia"
},
"settledAmountAsset": "1336164741602324",
"settledAmountUsd": "50.00",
"txHash": "0xda3be87732110de6c1354c83770aae630ede9ac308d9f7b399ecfba23d923384",
"txBlockNumber": 18500000,
"txTimestamp": "2025-10-10T21:50:00.000Z",
"txSenderAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"txGasUsed": 21000,
"txTotalCost": "441000000000000",
"txTotalCostUsdFractions": 118,
"txIsSponsored": false,
"processedBy": "cron",
"createdAt": "2025-10-10T21:50:05.000Z"
},
"createdAt": "2025-10-10T21:44:06.733Z",
"updatedAt": "2025-10-10T21:50:05.000Z"
}
],
"pagination": {
"total": 42,
"limit": 50,
"offset": 0,
"hasMore": false,
"totalPages": 1,
"currentPage": 1
}
}
Query Parameters
Filter by withdrawal status. Possible values:
pending, processing,
completed, failed, cancelled.Number of withdrawals to return. Minimum: 1, maximum: 1000.
Number of withdrawals to skip for pagination.
Response Fields
Array of withdrawal objects.
Show Withdrawal properties
Show Withdrawal properties
Unique withdrawal identifier.
ID of the merchant who created the withdrawal.
Withdrawal amount in USD cents.
EVM chain ID used for settlement.
Beneficiary wallet address.
Current withdrawal status:
pending, processing, completed, failed, or
cancelled.Withdrawal currency (
USD).Merchant’s order identifier, if provided.
Custom metadata, if provided.
Error description. Only present when
status is failed.On-chain settlement details. Only present for
completed withdrawals.Show Receipt properties
Show Receipt properties
Token used to settle the withdrawal.
Chain on which the withdrawal was settled.
Amount sent in the token’s smallest unit.
USD value of the settled amount.
Blockchain transaction hash.
Block number where the transaction was confirmed.
Timestamp of the on-chain transaction.
Whether the transaction gas was sponsored by SpacePay.
Internal processor that submitted the transaction.
Timestamp when the withdrawal was created.
Timestamp when the withdrawal was last updated.
Pagination metadata.
Show Pagination properties
Show Pagination properties
Error Responses
{
"error": {
"type": "authentication_error",
"message": "Invalid or missing X-SpacePay-Secret-Key header",
"code": "invalid_api_key"
}
}