Hosted checkout explained: payment sessions from start to finish
How a ManaraCore payment session works, from the server call that creates it to the webhook that confirms it.
How a ManaraCore payment session works, from the server call that creates it to the webhook that confirms it.
A hosted checkout keeps card data off your servers. Your backend creates a payment session, the customer pays on the ManaraCore payment page, and you are told the result. Here is each step.
From your server, call POST /api/payments/sessions with your merchant token as a bearer token. Send the amount, currency, your own order reference, the customer's contact details, and where to send the customer and the result:
{
"amount": 49.99,
"currency": "USD",
"merchantReferenceId": "ORDER-1042",
"customerEmail": "customer@example.com",
"returnUrl": "https://shop.example.com/payment/success",
"cancelUrl": "https://shop.example.com/payment/cancel",
"webhookUrl": "https://shop.example.com/webhooks/payments"
}
The response contains a paymentSessionId, a hostedPaymentUrl, an iframeUrl and the payment methods available for this payment.
Either redirect to hostedPaymentUrl or embed iframeUrl in your checkout page. The customer picks a method and pays with the provider.
When the provider reports the payment, ManaraCore updates the session and calls your webhookUrl. Mark the order as paid from the webhook, not from the return URL: customers close tabs, and a return visit is not proof of payment.
The Payment playground lets you run a full session end to end before you write any integration code.
Generate an API key, send one GET request and read live exchange rates for any base currency.