Cancel a dynamic account
curl --request POST \
--url https://{host}/v1/virtual-accounts/{accountId}/cancel \
--header 'X-Api-Key: <api-key>'const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://{host}/v1/virtual-accounts/{accountId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/virtual-accounts/{accountId}/cancel"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_number": "<string>",
"account_name": "<string>",
"type": "static",
"purpose": "<string>",
"owner_type": "<string>",
"status": "<string>",
"fee_bearer": "business",
"settles_to": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name_status": "<string>",
"label": "Lekki branch",
"settlement_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_number": "<string>",
"account_name": "<string>"
},
"payment_terms": {
"reference": "INV-2026-0042",
"currency": "NGN",
"amount_minor": 2500000,
"fee_minor": 123,
"vat_minor": 123,
"charge_minor": 123,
"total_payable_minor": 123,
"settlement_minor": 123,
"expires_at": "2023-11-07T05:31:56Z",
"held_payments": 123,
"payer_name": "Adaeze Okafor",
"received_minor": 123,
"paid_at": "2023-11-07T05:31:56Z",
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"collection_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}Virtual accounts
Cancel a dynamic account
Cancels a dynamic account still waiting for its payment. A static account, or a dynamic one already paid, expired or cancelled, is 409.
Required permission: feature:VIRTUAL_ACCOUNTS, virtual-accounts:write, feature:DYNAMIC_VIRTUAL_ACCOUNTS
POST
/
v1
/
virtual-accounts
/
{accountId}
/
cancel
Cancel a dynamic account
curl --request POST \
--url https://{host}/v1/virtual-accounts/{accountId}/cancel \
--header 'X-Api-Key: <api-key>'const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://{host}/v1/virtual-accounts/{accountId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/virtual-accounts/{accountId}/cancel"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_number": "<string>",
"account_name": "<string>",
"type": "static",
"purpose": "<string>",
"owner_type": "<string>",
"status": "<string>",
"fee_bearer": "business",
"settles_to": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name_status": "<string>",
"label": "Lekki branch",
"settlement_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_number": "<string>",
"account_name": "<string>"
},
"payment_terms": {
"reference": "INV-2026-0042",
"currency": "NGN",
"amount_minor": 2500000,
"fee_minor": 123,
"vat_minor": 123,
"charge_minor": 123,
"total_payable_minor": 123,
"settlement_minor": 123,
"expires_at": "2023-11-07T05:31:56Z",
"held_payments": 123,
"payer_name": "Adaeze Okafor",
"received_minor": 123,
"paid_at": "2023-11-07T05:31:56Z",
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"collection_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}