Payment links
- get/v1/payment_linksList payment links
- post/v1/payment_linksCreate a payment link
- post/v1/payment_links/{id}/activateActivate a payment link
- post/v1/payment_links/{id}/deactivateDeactivate a payment link
List payment links
get/v1/payment_links
curl https://sandbox.api.biftpay.com/v1/payment_links \
-H "Authorization: Bearer bp_test_..."Responses
- 200OKobject
Fields
object"list"requireddataarray of PaymentLinkrequiredFields of data
idstring (uuid)requiredobject"payment_link"requiredlivemodebooleanrequiredbrandstring (uuid) | nullslugstringrequiredUnique within the merchant and mode.
pathstringrequiredWhere customers pay, on the checkout site:
/pay/<handle>/<slug>(live) or/pay/test/<handle>/<slug>(test). Links made before merchant handles keep/pay/<slug>.titlestringrequireddescriptionstring | nullamountinteger | nullmin_amountinteger | nullmax_amountinteger | nullcurrencyNGN | USDrequiredstatusactive | inactiverequiredcreated_atstring (date-time)requiredhas_moreboolean
Create a payment link
post/v1/payment_links
Set amount for a fixed price, or leave it out to let the customer enter any amount (optionally within min_amount and max_amount; a payment must still cover its processing fee). Customers open the link's path on the checkout site (checkout API /checkout/v1/merchants/{handle}/links/{slug}). slug is optional and only has to be unique within your account.
Parameters
Idempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
Body
titlestringrequiredup to 120 characters
descriptionstringup to 500 characters
amountintegerat least 1
min_amountintegerat least 1
max_amountintegerat least 1
currencyNGN | USDbrandstring (uuid)slugstringcurl -X POST https://sandbox.api.biftpay.com/v1/payment_links \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"title": "…"
}'Responses
- 201OKPaymentLink
Fields
idstring (uuid)requiredobject"payment_link"requiredlivemodebooleanrequiredbrandstring (uuid) | nullslugstringrequiredUnique within the merchant and mode.
pathstringrequiredWhere customers pay, on the checkout site:
/pay/<handle>/<slug>(live) or/pay/test/<handle>/<slug>(test). Links made before merchant handles keep/pay/<slug>.titlestringrequireddescriptionstring | nullamountinteger | nullmin_amountinteger | nullmax_amountinteger | nullcurrencyNGN | USDrequiredstatusactive | inactiverequiredcreated_atstring (date-time)required - 400Invalid request
- 409The object is in a state that doesn't allow this
Activate a payment link
post/v1/payment_links/{id}/activate
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/payment_links/{id}/activate \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)"Responses
- 200OKPaymentLink
Fields
idstring (uuid)requiredobject"payment_link"requiredlivemodebooleanrequiredbrandstring (uuid) | nullslugstringrequiredUnique within the merchant and mode.
pathstringrequiredWhere customers pay, on the checkout site:
/pay/<handle>/<slug>(live) or/pay/test/<handle>/<slug>(test). Links made before merchant handles keep/pay/<slug>.titlestringrequireddescriptionstring | nullamountinteger | nullmin_amountinteger | nullmax_amountinteger | nullcurrencyNGN | USDrequiredstatusactive | inactiverequiredcreated_atstring (date-time)required - 404Not found, or not visible to this key
Deactivate a payment link
post/v1/payment_links/{id}/deactivate
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/payment_links/{id}/deactivate \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)"Responses
- 200OKPaymentLink
Fields
idstring (uuid)requiredobject"payment_link"requiredlivemodebooleanrequiredbrandstring (uuid) | nullslugstringrequiredUnique within the merchant and mode.
pathstringrequiredWhere customers pay, on the checkout site:
/pay/<handle>/<slug>(live) or/pay/test/<handle>/<slug>(test). Links made before merchant handles keep/pay/<slug>.titlestringrequireddescriptionstring | nullamountinteger | nullmin_amountinteger | nullmax_amountinteger | nullcurrencyNGN | USDrequiredstatusactive | inactiverequiredcreated_atstring (date-time)required - 404Not found, or not visible to this key