Create a Wallet

POST/api/v1/wallet/sub-account

Creates a new wallet for a customer. This is asynchronous; wait for create-wallet.success webhook or query by ID.

Parameters

NameTypeRequiredDescription
subaccount_namestringYesUnique wallet name.
reserve_virtual_accountbooleanYesTrue to create a funding virtual account.
customer_idstringYesCustomer ID from create customer.
enable_interest_accrualbooleanNoTrue (default) to accrue interest; false otherwise.
1
Request Example
(cURL)
curl -X POST "https://api.piggyvest.business/api/v1/wallet/sub-account" \\
-H "Authorization: Bearer YOUR_SECRET_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"subaccount_name": "USER 2 WALLET",
"reserve_virtual_account": true,
"enable_interest_accrual": false,
"customer_id": "53252bce-976a-4ed4-a766-a1dd3a0d95eb"
}'
2
Success Response(200)
(JSON)
{
"status": true,
"message": "Your wallet creation is being processed and will be ready in a few minutes",
"data": {
"id": "023f843a-be7e-494a-bc5d-9f49f4cc640f"
}
}
3
Error Response(400)
(JSON)
{
"status": false,
"message": "An error occurred during wallet creation"
}