Create Withdrawal Intent
POST/api/funding-sources/:fundingSourceId/withdraw
Create a Withdrawal Intent for a given Funding Source.
For more information on Withdrawal Intents see the Card Funding guide
Request
Path Parameters
ID for the Funding Source.
- application/json
Body
required
Withdrawal amount in minor units.
Responses
- 200
- 403
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
- EVM Smart Contract Write
- Algorand Contract Call
- Simulator Call
Array [
Array [
]
]
Array [
]
Array [
]
Withdrawal amount in minor units.
ID of the Withdrawal Intent.
Creation date of the Withdrawal Intent.
Expiration date of the Withdrawal Intent.
The wallet address to which the funds will be sent.
execution
object
oneOf
The address of the smart contract
abi
object[]
The JSON ABI of the smart contract (contains only required details. more details here https://docs.soliditylang.org/en/v0.8.19/abi-spec.html#json)
Possible values: [function
]
The name of the function
inputs
object[]
The name of the parameter
The type of the parameter
Smart contract method
Smart contract call params. Keys are matching names and order defined in ABI
Application ID
Smart contract method
abi
object
The JSON ABI of the smart contract (contains only required details)
The name of the method
The description of the method
args
object[]
An array of argument objects
Name of the argument
Data type of the argument
Description of the argument
returns
object
The return value of the method
Type of the return value
args
object[]
Smart contract call params. Contents are matching names and order defined in ABI args array
Data type of the argument
Value of the argument
The payload
instructions should be send to this URL using an HTTP POST.
payload
object
The payload with the instructions for the deposit.
The simulated deposit amount in minor units of the funding source token.
The funding source to deposit funds to.
{
"amount": 300000000,
"id": "91ad6fea3b52ca58d60d7fd310f789ec",
"createdAt": "2023-08-14T12:32:54",
"expiresAt": "2023-08-14T12:32:54",
"walletAddress": "0xA3058369d6A481B1ff08F62B352409c3D709De9b",
"execution": {}
}
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": 403,
"statusName": "Forbidden",
"errorCode": "FORBIDDEN",
"reason": "Unauthorized"
}