List dedicated virtual accounts

get/v1/virtual_accounts

Parameters

customerstring (uuid)in query

Only this customer's

Responses

  • 200OKobject
    Show the fields
    object"list"
    dataarray of VirtualAccount
    Fields of data
    idstring (uuid)
    object"virtual_account"
    livemodeboolean
    customerstring (uuid)
    brandstring (uuid) | null
    account_numberstring
    bank_namestring
    account_namestring
    currencyNGN | USD
    statusactive | closed
    can_simulateboolean

    Test 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
bash
curl https://sandbox.api.biftpay.com/v1/virtual_accounts \
  -H "Authorization: Bearer bp_test_..."
response
{
  "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 headerrequired

A unique key per logical request, for example a UUID. Up to 255 characters.

up to 255 characters

Body

customerstring (uuid)
customer_emailstring (email)
customer_namestring
brandstring (uuid)
holderobject or object

Who 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"
    livemodeboolean
    customerstring (uuid)
    brandstring (uuid) | null
    account_numberstring
    bank_namestring
    account_namestring
    currencyNGN | USD
    statusactive | closed
    can_simulateboolean

    Test 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
bash
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 '{}'
response
{
  "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 pathrequired
Idempotency-Keystringin headerrequired

A 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"
    livemodeboolean
    customerstring (uuid)
    brandstring (uuid) | null
    account_numberstring
    bank_namestring
    account_namestring
    currencyNGN | USD
    statusactive | closed
    can_simulateboolean

    Test 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
bash
curl -X POST https://sandbox.api.biftpay.com/v1/virtual_accounts/{id}/close \
  -H "Authorization: Bearer bp_test_..." \
  -H "Idempotency-Key: $(uuidgen)"
response
{
  "id": "…",
  "object": "virtual_account",
  "livemode": true,
  "customer": "…",
  "account_number": "…",
  "bank_name": "…",
  "account_name": "…",
  "currency": "NGN",
  "status": "active",
  "can_simulate": true,
  "created_at": "…"
}