Skip to main content
POST
/
api
/
v1
/
agents
/
withdraw
curl --request POST \ --url https://pulsarpay.io/api/v1/agents/withdraw \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: <idempotency-key>' \ --header 'x-agent-key: <x-agent-key>' \ --data ' { "amount": 10, "currency": "USD", "walletAddress": "your-paypal-id@example.com" } '
{ "success": true, "payoutId": "cmoqbpavp00071ry1t2iyr1hw", "breakdown": { "grossAmount": 10, "platformFeeRate": "3%", "platformFee": 0.3, "netAmount": 9.7, "currency": "USD", "walletAddress": "your-paypal-id@example.com", "network": "PAYPAL" } }

Headers

x-agent-key
string
required

The unique API key of the agent. Used to verify the balance ownership.

Idempotency-Key
string
required

A unique UUID v4 string to ensure the withdrawal is only processed once, preventing double payouts on network retries.

Body

application/json
amount
number
required

The amount to withdraw in the specified currency. Minimum is 1.00.

Required range: x >= 1
Example:

10

currency
enum<string>
required

The currency to withdraw. Use USDC to send to a Solana wallet, or USD to send to a PayPal account.

Available options:
USDC,
USD
Example:

"USD"

walletAddress
string
required

Destination address. For USDC withdrawals, provide a Solana wallet address. For USD withdrawals, provide a PayPal ID or email.

Example:

"your-paypal-id@example.com"

Response

Withdrawal request accepted and processed.

success
boolean

Confirms the withdrawal was successfully broadcasted to the network.

Example:

true

payoutId
string

Internal tracking ID for the withdrawal transaction.

Example:

"cmoqbpavp00071ry1t2iyr1hw"

breakdown
object

Detailed breakdown of the payout amounts and destination.