Finfort BNPL Engine Developers Swagger UI ↗

Hosted checkout

Let us host the customer's side. You create a session for a purchase and send the customer to our page; they enter their details, see the plan and total cost, accept the terms and pay. You never handle their phone number or payment, and your API key never leaves your server.

The flow#

  1. Your server creates a session for the purchase and gets back a url.
  2. You redirect the customer to that URL.
  3. They complete (or leave) the checkout on our page.
  4. You learn how it ended from a checkout.* webhook, or by reading the session. The customer is sent back to your returnUrl if you gave one.

Create a session#

POST /v1/checkout-sessions (or bnpl.checkout.sessions.create in the SDK):

{
  "merchantReference": "order_1001",
  "amount": 2400000,
  "currency": "UGX",
  "description": "Entebbe → Dubai · 27 Oct",
  "merchantEligible": true,
  "customer": { "externalRef": "user_42", "fullName": "Amara Okonkwo", "phone": "0700123456" },
  "returnUrl": "https://shop.example/orders/1001",
  "expiresInMinutes": 30
}
Field
merchantReference Your id for the purchase; it becomes the plan's merchantReference. One session per reference.
description What they are buying, shown at the top of the page.
merchantEligible Your own rule, exactly as for eligibility.
customer Optional. Pre-fills their details so they only confirm. externalRef becomes the customer's id in your account, so the plan lines up with your own user.
returnUrl Optional. http/https only. Where "Back to …" sends the customer.
expiresInMinutes How long the link works. Default 30, at most 1440.
{
  "id": "cs_…",
  "url": "https://pay.example.com/pay/cs_…",
  "status": "OPEN",
  "merchantReference": "order_1001",
  "amount": 2400000,
  "currency": "UGX",
  "expiresAt": "2026-10-16T09:30:00.000Z",
  "transactionId": null,
  "declineReasons": []
}

Creating a session is idempotent on merchantReference: asking again returns the same session (a lapsed, unused one is reopened). GET /v1/checkout-sessions/{id} reads it back.

What the customer sees#

  1. Details — name, MoMo number, optional email (pre-filled if you supplied them).
  2. Choose a plan — every window for your plan, with what they pay today, the weekly amount and the total.
  3. Review — every instalment with its date, the total cost and the fee, what happens if a payment is missed, the refund trigger, and a terms checkbox. The pay button stays disabled until it is ticked.
  4. Approve the payment on their phone (a mobile-money prompt), then a confirmation with the schedule.

The page is built mobile-first, with labelled fields, native controls that work from the keyboard, and focus moved to the heading of each new step.

How a session ends#

status
OPEN Waiting for the customer.
PROCESSING They pressed pay; the plan is being created.
COMPLETED The plan started and the downpayment was taken. transactionId is set.
DECLINED The customer or purchase wasn't eligible. declineReasons has the exact reasons.
FAILED Offered, but the downpayment couldn't be taken. transactionId is set (the plan is FAILED).
EXPIRED The link lapsed unused.

A finished session stays as it ended. For a new attempt (after a decline or failure) create a new session with a new merchantReference.

Webhooks#

Event When data
checkout.completed A plan started sessionId, merchantReference, transactionId
checkout.declined Not eligible sessionId, merchantReference, reasons
checkout.failed Downpayment failed sessionId, merchantReference, transactionId

The ordinary plan events (transaction.created, downpayment.settled, …) fire as well.

Don't trust your returnUrl's query string. We append checkout_session and status so your page can react, but a customer can edit a URL. Confirm with the webhook or GET /v1/checkout-sessions/{id} before fulfilling an order.

Privacy: what the customer is told#

The page has no login, so it only ever says what is safe. If a purchase is declined because of the purchase ("outside the amounts we can offer"), the customer is told so. If it is because of them (over their limit, in arrears, blocked), the page says only that Pay later isn't available right now — it never reveals another person's credit position. You get the precise reasons in the checkout.declined webhook.

Edge cases#

  • Double-clicks and two tabs can't start two plans: the second is told the payment is being processed.
  • A lost response is harmless: if the customer refreshes, they see how it ended.
  • A suspended merchant's checkout pages stop working immediately.