Biftpaydocs

Virtual accounts

List dedicated virtual accounts

get/v1/virtual_accounts

Parameters

customerstring (uuid)in query

Only this customer's

bash
curl https://sandbox.api.biftpay.com/v1/virtual_accounts \
  -H "Authorization: Bearer bp_test_..."

Responses

  • 200
    OKobject
    Fields
    object"list"required
    dataarray of VirtualAccountrequired
    Fields of data
    idstring (uuid)required
    object"virtual_account"required
    livemodebooleanrequired
    customerstring (uuid)required
    brandstring (uuid) | null
    account_numberstringrequired
    bank_namestringrequired
    account_namestringrequired
    currencyNGN | USDrequired
    statusactive | closedrequired
    created_atstring (date-time)required
    has_moreboolean

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)
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 '{}'

Responses

  • 201
    OKVirtualAccount
    Fields
    idstring (uuid)required
    object"virtual_account"required
    livemodebooleanrequired
    customerstring (uuid)required
    brandstring (uuid) | null
    account_numberstringrequired
    bank_namestringrequired
    account_namestringrequired
    currencyNGN | USDrequired
    statusactive | closedrequired
    created_atstring (date-time)required
  • 400
    Invalid request

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

bash
curl -X POST https://sandbox.api.biftpay.com/v1/virtual_accounts/{id}/close \
  -H "Authorization: Bearer bp_test_..." \
  -H "Idempotency-Key: $(uuidgen)"

Responses

  • 200
    OKVirtualAccount
    Fields
    idstring (uuid)required
    object"virtual_account"required
    livemodebooleanrequired
    customerstring (uuid)required
    brandstring (uuid) | null
    account_numberstringrequired
    bank_namestringrequired
    account_namestringrequired
    currencyNGN | USDrequired
    statusactive | closedrequired
    created_atstring (date-time)required
  • 404
    Not found, or not visible to this key