Refunds
- get/v1/refundsList refunds
- post/v1/refundsRefund a successful payment, in full or in part
- get/v1/refunds/{id}Retrieve a refund
List refunds
get/v1/refunds
Parameters
limitintegerin query1 to 100 · default 20
payment_intentstring (uuid)in querycurl https://sandbox.api.biftpay.com/v1/refunds \
-H "Authorization: Bearer bp_test_..."Responses
- 200Refunds, newest firstobject
Fields
object"list"requireddataarray of RefundrequiredFields of data
idstring (uuid)requiredobject"refund"requiredlivemodebooleanrequiredpayment_intentstring (uuid)requiredamountintegerrequiredMinor units (kobo, cents).
at least 0
currencyNGN | USDrequiredreasonstring | nullstatuspending | succeeded | failedrequiredfailure_codestring | nullcreated_atstring (date-time)requiredsucceeded_atstring (date-time) | nullfailed_atstring (date-time) | nullhas_morebooleanrequired
Refund a successful payment, in full or in part
post/v1/refunds
Sent back through the provider that charged the customer. The amount is held from
the merchant's balance (pending if not yet released, else available) into
refund_in_flight, then settled when the provider confirms or returned if it fails.
Processing fees aren't returned. Omit amount to refund what's left.
A payment with an open dispute can't be refunded (409 payment_disputed): the
chargeback already returns the money, so answer the dispute instead. What a lost
dispute returned counts towards the amount already refunded.
In test mode, amounts ending in 13 kobo are rejected and ending in 17 stay pending.
Parameters
Idempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
Body
payment_intentstring (uuid)requiredamountintegerDefaults to the full remaining amount.
at least 1
reasonrequested_by_customer | duplicate | fraudulentcurl -X POST https://sandbox.api.biftpay.com/v1/refunds \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"payment_intent": "…"
}'Responses
- 201CreatedRefund
Fields
idstring (uuid)requiredobject"refund"requiredlivemodebooleanrequiredpayment_intentstring (uuid)requiredamountintegerrequiredMinor units (kobo, cents).
at least 0
currencyNGN | USDrequiredreasonstring | nullstatuspending | succeeded | failedrequiredfailure_codestring | nullcreated_atstring (date-time)requiredsucceeded_atstring (date-time) | nullfailed_atstring (date-time) | null - 400Invalid request
- 404Not found, or not visible to this key
- 409The object is in a state that doesn't allow this
Retrieve a refund
get/v1/refunds/{id}
Parameters
idstring (uuid)in pathrequiredcurl https://sandbox.api.biftpay.com/v1/refunds/{id} \
-H "Authorization: Bearer bp_test_..."Responses
- 200The refundRefund
Fields
idstring (uuid)requiredobject"refund"requiredlivemodebooleanrequiredpayment_intentstring (uuid)requiredamountintegerrequiredMinor units (kobo, cents).
at least 0
currencyNGN | USDrequiredreasonstring | nullstatuspending | succeeded | failedrequiredfailure_codestring | nullcreated_atstring (date-time)requiredsucceeded_atstring (date-time) | nullfailed_atstring (date-time) | null - 404Not found, or not visible to this key