Skip to main content
POST
Create a withdrawal

Authorizations

x-spacepay-secret-key
string
header
required

Secret key for authentication of external API.

Body

application/json
amountInCents
number
required

Withdrawal amount in cents (e.g., 100 = $1.00). Minimum: 100 cents, Maximum: 100000000 cents.

Required range: 100 <= x <= 100000000
Example:

100

chainId
string
required

CAIP-2 chain id (EVM)

Maximum string length: 41
Example:

"eip155:8453"

recipientAddress
string
required

Beneficiary address

orderId
string

Order ID from the merchant

Maximum string length: 255
Example:

"Order_1234567890"

customMetadata
string

Arbitrary metadata to attach to the withdrawal

Maximum string length: 2048
Example:

"{\"cartId\":\"abc123\",\"promo\":\"SUMMER24\"}"

currency
enum<string>

Currency of the withdrawal (defaults to USD)

Available options:
USD

Response

Withdrawal created successfully

id
string<uuid>
required

Withdrawal ID

merchantId
string<uuid>
required

Merchant ID

amountInCents
number
required

Withdrawal amount in USD cents

chainId
string
required

CAIP-2 chain id

Example:

"eip155:8453"

recipientAddress
string
required

Beneficiary address

status
enum<string>
required

Withdrawal status

Available options:
pending,
processing,
completed,
failed,
cancelled
currency
enum<string>
required

Currency of the withdrawal

Available options:
USD
orderId
string | null
required

Optional order ID

customMetadata
string | null
required

Optional custom metadata

errorMessage
string | null
required

Error message (if failed)

receipt
object | null
required

Withdrawal receipt

createdAt
string<date-time>
required

Created at

updatedAt
string<date-time>
required

Updated at