Skip to content
FFastPay Docs

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.

AuthorizationBearer sk_test_… or sk_live_…

Body parameters#

  • amount_minorintegerRequired

    At least 1.

  • currencystringRequired

    Exactly 3 characters.

  • emailstringRequired

    Up to 254 characters.

  • callback_urlstringOptional

    Where the payer is sent after paying, with reference and status appended. Up to 2000 characters.

  • descriptionstringOptional

    Up to 200 characters.

  • expires_in_minutesintegerOptional

    From 5 to 10080.

  • first_namestringOptional

    Up to 100 characters.

  • last_namestringOptional

    Up to 100 characters.

  • metadataobjectOptional

    Your own key-value pairs; every value is text.

  • phonestringOptional

    Up to 30 characters.

  • referencestringOptional

    Your 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.