List dedicated virtual accounts
get/v1/virtual_accounts
Parameters
customerstring (uuid)in queryOnly this customer's
Responses
- 200OKobject
Show the fields
object"list"dataarray of VirtualAccountFields of data
idstring (uuid)object"virtual_account"livemodebooleancustomerstring (uuid)brandstring (uuid) | nullaccount_numberstringbank_namestringaccount_namestringcurrencyNGN | USDstatusactive | closedcan_simulatebooleanTest mode: whether POST /v1/test_helpers/virtual_accounts/{id}/simulate_transfer works for it (only some providers' test banks).
created_atstring (date-time)has_moreboolean
curl https://sandbox.api.biftpay.com/v1/virtual_accounts \
-H "Authorization: Bearer bp_test_..."{
"object": "list",
"data": [
{
"id": "…",
"object": "virtual_account",
"livemode": true,
"customer": "…",
"account_number": "…",
"bank_name": "…",
"account_name": "…",
"currency": "NGN",
"status": "active",
"can_simulate": true,
"created_at": "…"
}
]
}Give a customer a permanent account number
post/v1/virtual_accounts
Returns the customer's existing active account if there is one. Every transfer into it becomes a successful payment.
Parameters
Idempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
Body
customerstring (uuid)customer_emailstring (email)customer_namestringbrandstring (uuid)holderobject or objectWho the account is for: a person, as their BVN records them; or a business, with the BVN of its owner or a director. Required by providers that check it against the BVN register: the account is refused if the details don't match, and a business account may need the provider to have checked the business first. Passed to the provider; the BVN is never stored.
Responses
- 201OKVirtualAccount
Show the fields
idstring (uuid)object"virtual_account"livemodebooleancustomerstring (uuid)brandstring (uuid) | nullaccount_numberstringbank_namestringaccount_namestringcurrencyNGN | USDstatusactive | closedcan_simulatebooleanTest mode: whether POST /v1/test_helpers/virtual_accounts/{id}/simulate_transfer works for it (only some providers' test banks).
created_atstring (date-time) - 400Invalid request
- 409The object is in a state that doesn't allow this
- 422Idempotency-Key reused with a different request
curl -X POST https://sandbox.api.biftpay.com/v1/virtual_accounts \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'{
"id": "…",
"object": "virtual_account",
"livemode": true,
"customer": "…",
"account_number": "…",
"bank_name": "…",
"account_name": "…",
"currency": "NGN",
"status": "active",
"can_simulate": true,
"created_at": "…"
}Close a virtual account
post/v1/virtual_accounts/{id}/close
Parameters
idstring (uuid)in pathrequiredIdempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
Responses
- 200OKVirtualAccount
Show the fields
idstring (uuid)object"virtual_account"livemodebooleancustomerstring (uuid)brandstring (uuid) | nullaccount_numberstringbank_namestringaccount_namestringcurrencyNGN | USDstatusactive | closedcan_simulatebooleanTest mode: whether POST /v1/test_helpers/virtual_accounts/{id}/simulate_transfer works for it (only some providers' test banks).
created_atstring (date-time) - 404Not found, or not visible to this key
curl -X POST https://sandbox.api.biftpay.com/v1/virtual_accounts/{id}/close \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)"{
"id": "…",
"object": "virtual_account",
"livemode": true,
"customer": "…",
"account_number": "…",
"bank_name": "…",
"account_name": "…",
"currency": "NGN",
"status": "active",
"can_simulate": true,
"created_at": "…"
}