Test helpers
- post/v1/test_helpers/payment_intents/{id}/succeedSimulate a successful payment (test keys only)
- post/v1/test_helpers/balance/release_pendingMove all pending money to available now (test keys only)
- post/v1/test_helpers/settlements/runRun automatic settlement for this merchant now (test only)
- post/v1/test_helpers/virtual_accounts/{id}/simulate_transferPretend money arrived in a virtual account (test only)
Simulate a successful payment (test keys only)
post/v1/test_helpers/payment_intents/{id}/succeed
Moves the intent to successful and posts the capture to the ledger, as a real provider confirmation would. Returns 404 for live keys.
Parameters
idstring (uuid)in pathrequiredIdempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
curl -X POST https://sandbox.api.biftpay.com/v1/test_helpers/payment_intents/{id}/succeed \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)"Responses
- 200The successful payment intentPaymentIntent
Fields
idstring (uuid)requiredobject"payment_intent"requiredlivemodebooleanrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
currencyNGN | USDrequiredstatuscreated | processing | successful | failed | abandoned | canceledrequiredcreatednot paid yet;processingthe customer started paying (entered a card, or was given an account to transfer into);successfulthe money arrived;failedthe last try failed and the customer may try again;abandonedprocessing for 30 minutes with no money (the customer may still pay);canceledcanceled by the business. Money that arrives late always makes a paymentsuccessful.referencestring | nulldescriptionstring | nullcustomer_emailstring | nullbrandstring (uuid) | nullcustomerstring (uuid) | nullpayment_linkstring (uuid) | nullmetadataobjectrequiredup to 20 keys
feesobjectrequiredAn estimate (at the card price) until the payment succeeds; then final, at the price for the channel and provider that took it. fee + vat + net = amount.
Fields of fees
feeintegerrequiredMinor units (kobo, cents).
at least 0
vatintegerrequiredMinor units (kobo, cents).
at least 0
netintegerrequiredMinor units (kobo, cents).
at least 0
failure_codestring | nullcreated_atstring (date-time)requiredupdated_atstring (date-time)requiredpaid_atstring (date-time) | nullWhen the payment became successful.
canceled_atstring (date-time) | nullreturn_urlstring | nullWhere checkout sends the customer after paying.
client_secretstringOnly in the response that creates the payment. Give it to the customer's checkout page; it can act on this one payment only.
- 404Not found, or not visible to this key
- 409The object is in a state that doesn't allow this
Move all pending money to available now (test keys only)
post/v1/test_helpers/balance/release_pending
Skips the settlement delay for this merchant's captured test payments.
Parameters
Idempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
curl -X POST https://sandbox.api.biftpay.com/v1/test_helpers/balance/release_pending \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)"Responses
- 200How many payments were releasedobject
Fields
object"test_helper_result"requiredreleasedintegerrequired - 404Not found, or not visible to this key
Run automatic settlement for this merchant now (test only)
post/v1/test_helpers/settlements/run
Parameters
Idempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
curl -X POST https://sandbox.api.biftpay.com/v1/test_helpers/settlements/run \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)"Responses
- 200OKobject
Fields
object"test_helper_result"releasedintegerpayoutsarray of string (uuid)
Pretend money arrived in a virtual account (test only)
post/v1/test_helpers/virtual_accounts/{id}/simulate_transfer
Parameters
idstring (uuid)in pathrequiredIdempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
Body
amountintegerrequiredat least 1
curl -X POST https://sandbox.api.biftpay.com/v1/test_helpers/virtual_accounts/{id}/simulate_transfer \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"amount": 1
}'Responses
- 200OKobject
Fields
object"test_helper_result"webhookstringprovider_referencestring