Skip to main content
POST
/
v1
/
pay
/
withdrawals
/
complete
Finalize a withdrawal
curl --request POST \
  --url https://api.onsi.com/v1/pay/withdrawals/complete \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "withdrawalIntentId": "wi_<id>"
}'
{
  "message": "<string>"
}
At this point you should’ve presented the withdrawal intent to the user, once they’ve confirmed the amount, fees, and destination bank account, you can proceed to complete the withdrawal. Once this request is complete the fund transfer will be initiated to the destination bank account, and any applicable fees will be deducted from the user’s balance.

Relevant Error Codes

The endpoint-specific error codes to pay attention to are: In rare cases, you may receive a Unprocessable Entity Error which indicates that On Demand Pay is temporarily unavailable.

Authorizations

x-api-key
string
header
required

Headers

x-idempotency-key
string

Unique key to ensure idempotency of the request

Body

application/json

Body

withdrawalIntentId
string
required

The unique identifier for a PayWithdrawalIntent, prefixed with wi_

Example:

"wi_<id>"

Response

201 - application/json

201

message
string
required