A buyer landing on your return_url is not proof of payment: the URL can be opened by anyone. Before you ship, unlock or mark an order paid, confirm the payment with KetaPay.

Fetch the session

When the buyer comes back, read checkout_session_id from the URL and fetch the session from your server.

What to check

Use the webhook too

escrow.funded reaches your server even if the buyer closes the tab before coming back. Handle both paths and make fulfilment idempotent: whichever arrives first marks the order paid, the second does nothing. See Webhooks.

Session statuses