Payments
Start a hosted checkout
POST/api/v1/checkout/sessions
Called from the merchant's server with its secret key. The key decides test or live. Returns a FastPay link to send the payer to. Repeating a reference with the same amount, currency and email returns the original checkout (200) instead of creating a second.
Authorization
Bearer sk_test_… or sk_live_…Body parameters#
amount_minorintegerRequiredAt least 1.
currencystringRequiredExactly 3 characters.
emailstringRequiredUp to 254 characters.
callback_urlstringOptionalWhere the payer is sent after paying, with reference and status appended. Up to 2000 characters.
descriptionstringOptionalUp to 200 characters.
expires_in_minutesintegerOptionalFrom 5 to 10080.
first_namestringOptionalUp to 100 characters.
last_namestringOptionalUp to 100 characters.
metadataobjectOptionalYour own key-value pairs; every value is text.
phonestringOptionalUp to 30 characters.
referencestringOptionalYour own order reference. Generated when omitted. Up to 100 characters.
Responses#
- 200The existing checkout for this reference
- 201Checkout created
- 401The secret key is missing, invalid or revoked.
- 403The key is not allowed to do this, or the request came from an address that is not on its allowlist.
- 409The request clashes with the current state, such as a reference reused with different details.
- 422A field is missing or not valid.