Create Withdrawal Intent
Create a Withdrawal Intent for a given Funding Source.
For more information on Withdrawal Intents see the Card Funding guide
Path Parameters
- fundingSourceId string required
ID for the Funding Source.
Example: 2be03cd65da12fe29b8910af7b4b85e7
- application/json
Request Body required
- amount number required
Withdrawal amount in minor units.
- 200
- 403
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
- amount number
Withdrawal amount in minor units.
- id string
ID of the Withdrawal Intent.
- createdAt string
Creation date of the Withdrawal Intent.
- expiresAt string
Expiration date of the Withdrawal Intent.
- walletAddress string
The wallet address to which the funds will be sent.
execution object
contractAddress stringThe address of smart contract to invoke.
method stringThe contract function to call.
abi object[]
The JSON ABI of the function being executed (contains only required details. more details here https://docs.soliditylang.org/en/v0.8.19/abi-spec.html#json)
Array [name stringPossible values: [
withdraw
]The name of the function
type stringPossible values: [
function
]input object[]output object[]]params object
amount numberWithdrawal amount in minor units.
expiryDate numberThe unix timestamp when the signature expires.
nonce numberUnique identifier of current Withdrawal Intent.
signature stringThe signed withdrawal approval.
{
"amount": 300000000,
"id": "91ad6fea3b52ca58d60d7fd310f789ec",
"createdAt": "2023-08-14T12:32:54",
"expiresAt": "2023-08-14T12:32:54",
"walletAddress": "0xA3058369d6A481B1ff08F62B352409c3D709De9b",
"execution": {
"contractAddress": "0xEe076427B04DDD26729889C869d3aE524A6362fD",
"method": "withdraw",
"abi": [
{
"name": "withdraw",
"type": "function",
"input": [],
"output": []
}
],
"params": {
"amount": 300000000,
"expiryDate": 12345,
"nonce": 1,
"signature": "0x30450221..."
}
}
}
FORBIDDEN Insufficient permissions to perform the action.
INSUFFICIENT_BALANCE Withdrawal amount exceeds funding source balance.
TOO_MANY_PENDING_WITHDRAWALS Maximum amount of intents exceeded (10).
FUNDING_STRATEGY_NOT_SUPPORTED Funding strategy is not supported.
- application/json
- Schema
- Example (from schema)
Schema
- statusCode integer required
- statusName string required
- errorCode string required
- reason string
{
"statusCode": 403,
"statusName": "Forbidden",
"errorCode": "FORBIDDEN",
"reason": "Unauthorized"
}