Balance
- get/v1/balanceRetrieve balances
- get/v1/balance_transactionsEvery movement on the merchant's balances, newest first
- get/v1/balance_transactions/exportThe statement as CSV (up to 20,000 lines; narrow the dates for more)
- get/v1/reserveYour rolling reserve - terms, what's held, and when it's released
- get/v1/fxBiftpay's dollar rate, the dollars available to convert, and (with usd_amount) the naira they'd give
- get/v1/fx/conversionsYour dollar-to-naira conversions, newest first
- post/v1/fx/conversionsConvert dollars to naira at the rate you were shown
Retrieve balances
get/v1/balance
Read straight from the ledger. One entry per currency in each bucket. Each brand
holds its own money; without brand this is the whole business (the sum of its brands).
Parameters
brandstring (uuid)in queryOne brand's own money (default: the whole business)
curl https://sandbox.api.biftpay.com/v1/balance \
-H "Authorization: Bearer bp_test_..."Responses
- 200Current balancesBalance
Fields
object"balance"requiredlivemodebooleanrequiredbrandstring (uuid) | nullThe brand asked for; null for the whole business
pendingarray of BalanceAmountrequiredCaptured, not yet settleable.
Fields of pending
currencyNGN | USDrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
availablearray of BalanceAmountrequiredCan be paid out.
Fields of available
currencyNGN | USDrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
reservearray of BalanceAmountrequiredRolling reserve held against chargebacks.
Fields of reserve
currencyNGN | USDrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
payout_in_flightarray of BalanceAmountrequiredSent to a bank, not yet confirmed.
Fields of payout_in_flight
currencyNGN | USDrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
refund_in_flightarray of BalanceAmountBeing refunded to customers, not yet confirmed by the provider.
Fields of refund_in_flight
currencyNGN | USDrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
dispute_holdarray of BalanceAmountHeld while a dispute is decided.
Fields of dispute_hold
currencyNGN | USDrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
- 400Invalid request
- 401Missing or invalid API key
Every movement on the merchant's balances, newest first
get/v1/balance_transactions
One row per ledger line on the merchant's accounts. amount is signed in the
merchant's terms: positive adds to bucket, negative takes from it; balance_after
is that bucket's balance after the line. Payment lines carry gross and fee
(fee plus VAT). Lines of one entry share type and created_at. Paginate with
starting_after=<id>.
Parameters
limitintegerin query1 to 100 · default 20
starting_afterstringin querybrandstring (uuid)in queryOne brand's own money (default: the whole business)
currencyNGN | USDin querybucketavailable | pending | reserve | payout_in_flight | refund_in_flight | dispute_holdin querytypestringin queryComma-separated: payments, releases, payouts, refunds, disputes, conversions (corrections included).
fromstring (date)in queryInclusive, Lagos time
tostring (date)in queryInclusive, Lagos time
curl https://sandbox.api.biftpay.com/v1/balance_transactions \
-H "Authorization: Bearer bp_test_..."Responses
- 200A page of balance transactionsBalanceTransactionList
Fields
object"list"requireddataarray of BalanceTransactionrequiredFields of data
idstringrequiredobject"balance_transaction"requiredtypestringrequirede.g. charge.capture, charge.release, payout.hold, payout.settle, refund.hold
descriptionstringrequiredbucketpending | available | reserve | payout_in_flight | refund_in_flight | dispute_holdrequiredamountintegerrequiredSigned; positive adds to the bucket.
balance_afterintegerrequiredThe bucket's balance after this line.
grossintegerPayments only: what the customer paid.
feeintegerPayments only: Biftpay's fee plus VAT, taken from gross.
currencyNGN | USDrequiredsource_idstring | nullThe payment, payout or refund that caused it.
created_atstring (date-time)requiredhas_morebooleanrequired - 400Invalid request
- 401Missing or invalid API key
The statement as CSV (up to 20,000 lines; narrow the dates for more)
get/v1/balance_transactions/export
Same filters as the list. The CSV comes in data, for a dashboard to save as file_name.
Parameters
brandstring (uuid)in queryOne brand's own money (default: the whole business)
currencyNGN | USDin querybucketavailable | pending | reserve | payout_in_flight | refund_in_flight | dispute_holdin querytypestringin queryComma-separated: payments, releases, payouts, refunds, disputes, conversions (corrections included).
fromstring (date)in queryInclusive, Lagos time
tostring (date)in queryInclusive, Lagos time
curl https://sandbox.api.biftpay.com/v1/balance_transactions/export \
-H "Authorization: Bearer bp_test_..."Responses
- 200The statementobject
Fields
object"statement_export"requiredfile_namestringrequiredcontent_type"text/csv"requiredrowsintegerrequiredtruncatedbooleanrequiredMore lines matched than one export holds.
datastringrequiredCSV text
- 400Invalid request
- 401Missing or invalid API key
Your rolling reserve - terms, what's held, and when it's released
get/v1/reserve
A rolling reserve holds a share of each payment for a set time against chargebacks.
terms is null when none applies. Held money is released to available automatically,
on the dates in releases (Lagos days).
curl https://sandbox.api.biftpay.com/v1/reserve \
-H "Authorization: Bearer bp_test_..."Responses
- 200OKobject
Fields
object"reserve"requiredlivemodebooleanrequiredtermsobject | nullrequiredFields of terms
percent_bpsintegerrequireddaysintegerrequiredreasonstring | nullrequiredreason_textstring | nullrequiredThe reason in plain words.
notestring | nullrequiredsincestring (date-time) | nullrequiredheldarray of objectrequiredFields of held
currencystringrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
paymentsintegerrequirednext_release_atstring (date-time) | nullrequiredreleasesarray of objectrequiredFields of releases
datestring (date)requiredcurrencystringrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
Biftpay's dollar rate, the dollars available to convert, and (with usd_amount) the naira they'd give
get/v1/fx
Parameters
brandstring (uuid)in queryusd_amountintegerin queryCents.
at least 1
curl https://sandbox.api.biftpay.com/v1/fx \
-H "Authorization: Bearer bp_test_..."Responses
- 200OKFxPreview
Fields
object"fx_preview"requiredrateFxRate or nullrequiredusd_availableintegerrequiredmin_usdintegerrequiredmax_usdintegerrequiredThe most that can convert now (balance, maximum and today's cap).
daily_cap_usdinteger | nullrequiredconverted_today_usdintegerrequiredblockedconversions_paused | no_rate | rate_stale | balance_below_minimum | daily_cap_reached | nullrequiredusd_amountintegerngn_amountintegerThe naira usd_amount gives at this rate (rounded down).
Your dollar-to-naira conversions, newest first
get/v1/fx/conversions
curl https://sandbox.api.biftpay.com/v1/fx/conversions \
-H "Authorization: Bearer bp_test_..."Responses
- 200OKobject
Fields
object"list"requireddataarray of FxConversionrequiredFields of data
idstring (uuid)requiredobject"fx_conversion"requiredlivemodebooleanrequiredusd_amountintegerrequiredratestringrequiredngn_amountintegerrequiredbrandstring | nullrequiredsourcemerchant | auto | staffrequiredpayoutstring | nullrequiredcreated_atstring (date-time)requiredhas_morebooleanrequired
Convert dollars to naira at the rate you were shown
post/v1/fx/conversions
rate_id is the rate from GET /v1/fx. If Biftpay has published a new rate since, nothing
converts and the error says the new rate (rate_changed). Naira is rounded down to the kobo.
Parameters
Idempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
Body
usd_amountintegerrequiredCents.
at least 1
rate_idstring (uuid)requiredbrandstring (uuid)curl -X POST https://sandbox.api.biftpay.com/v1/fx/conversions \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"usd_amount": 1,
"rate_id": "…"
}'Responses
- 201ConvertedFxConversion
Fields
idstring (uuid)requiredobject"fx_conversion"requiredlivemodebooleanrequiredusd_amountintegerrequiredratestringrequiredngn_amountintegerrequiredbrandstring | nullrequiredsourcemerchant | auto | staffrequiredpayoutstring | nullrequiredcreated_atstring (date-time)required - 400Invalid request
- 409The object is in a state that doesn't allow this