Mondu Hosted Checkout

The Mondu Hosted Checkout is a secure checkout page, hosted by Mondu.

The Mondu Hosted Checkout is the quickest and easiest way to integrate Mondu Payments in your checkout experience. Here, buyers are redirected to a beautiful checkout page that's hosted on Mondu's fast and secure servers. To customize the checkout experience, your brand logo can be displayed on the hosted checkout page.

Additional parameters

To trigger the hosted checkout, you'll need to add these parameters to the Create Order request:

  1. success_url (A URL to redirect buyers after a successful order from hosted checkout)
    E.g: https://shop.demo.mondu.ai/success
  2. cancel_url (A URL to redirect buyers after a canceled order from hosted checkout)
    E.g: https://shop.demo.mondu.ai/cancel
  3. declined_url (A URL to redirect buyers after a declined order from hosted checkout.)
    E.g: https://shop.demo.mondu.ai/declined
  4. state_flow with the value authorization_flow (the hosted checkout works by authorizing an order first)
  5. source with the value hosted (the hosted checkout works by authorizing an order first)

Here's an example response for a create orderrequest with these parameters

{
  //hosted checkout specific attributes
 "source": "hosted",
 "state_flow":"authorization_flow",
 "success_url": "http://shopdomain.com/success",
 "cancel_url": "http://shopdomain.com/cancel",
 "declined_url": "http://shopdomain.com/declined",
 "language": "en", //en|de|nl|fr

  //order specific attibutes
 "payment_method": "invoice", //invoice|installment_by_invoice|direct_debit|installments
 "currency": "GBP",
 "gross_amount_cents": 1315,
 "external_reference_id": "order-id-123",
 "net_term": 30, // 14|30|60|90
 "total_discount_cents": 15,

 "buyer": {
   //mandatory attributes
   "email": "[email protected]", //[email protected] triggers sets the order to status confirmed | [email protected] triggers sets the order to status pending
   "first_name": "joe",
   "last_name": "doe",
 
   //recommended to optimise ux in the mondu hosted checkout page
   "external_reference_id": "buyer-id-123",
   "company_name": "Mondu UK Ltd.",
   "legal_form":"ltd",
   "registration_id": "14681433", // company registration id
   "is_registered": true, // true if the company is registered

   //recommended to help mondu create better stats on buyer 
   "account_created_at": "2023-08-22T15:25:56.265Z",
   "account_updated_at": "2024-08-22T15:25:56.265Z"
 },

 "billing_address": {
   "country_code": "GB",
   "city": "London",
   "zip_code": "EC4N 6AF",
   "address_line1": "78 Cannon Street",
   "address_line2": "Cannon Place",
   "state": "London"
 },

 "shipping_address": {
   "country_code": "GB",
   "city": "London",
   "zip_code": "EC4N 6AF",
   "address_line1": "78 Cannon Street",
   "address_line2": "Cannon Place",
   "state": "London"
 },
  //prouct related attriburtes
 "lines": [
   {
     "tax_cents": 220,
      "shipping_price_cents": 100, 
       "line_items": [
       {
         "quantity": 10,
         "external_reference_id": "product-id-123",
         "title": "test product #1",
         "net_price_per_item_cents": 100,
         "item_type": "product|service"
       }
     ]
   }
 ]
{
    "order": {
        "external_reference_id": "order-id-123",
        "hosted_checkout_url": "https://pay.demo.mondu.ai/?session_uid=cf78da7b-d3f2-4882-8520-122d47a8cfe5&session_token=7ea84a74-9db0-4232-9d60-7268a3881027",
        "state": "created",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjcmVhdGVkX2F0IjoiMjAyNC0wOC0yMyAxMjo1NDoyNSBVVEMiLCJleHAiOjE3MjUxMDg4NjUsIm9yZGVyX2lkIjo0MjYyNSwic2Vzc2lvbiI6IjM1NDY2ZTc1LTcwZjctNGUzZC1hOTIyLTJiOTM5ZTM4YWEwMyJ9.wUn8pDC0DdlleLpm9HxMtz3guwb0lRN-rze9j_OT6KQ",
        "uuid": "d631326c-315e-4d04-b9a0-4da1e646fdfe"
    }
}

You'll receive a hosted_checkout_url. To use the hosted checkout, you'll need to redirect the buyer to this page.

The Mondu Hosted Checkout Flow

The following diagram shows you the payment flow between the participants in the Mondu Hosted Checkout:

  1. After the buyer has selected Mondu as payment method, you send the Create Order request with the above-mentioned parameters.
    The Mondu API responds with an order uuid and a hosted checkout URL
  2. As soon as the buyer is ready to pay the order, you redirect them to the Hosted Checkout.
  3. The Hosted Checkout shows an overview of the shipping address, the products and the chosen payment method.
The Mondu Hosted Checkout

The Mondu Hosted Checkout

After the buyer has chosen to pay with Mondu, they are redirected to one of the URLs which the merchant has sent in the create order request. The return-URL is chosen based on one of three events:

  • success_url - the buyer is redirected here after a successful Mondu payment
  • decline_url - if the buyer is redirected here, the order was declined by Mondu
  • cancel_url - if the buyer chosses to cancel the Mondu hosted checkout, they are redirected to this page.

Confirming the Order

After a successful payment, the order stays in the authorized status at Mondu. To confirm the order, you'll have to send a Confirm Order request.

Dealing with Authorized Orders

Orders in the authorized state should either be confirmed or cancelled, since every authorized order counts against Mondu's buyer limit. In the case a buyer has an authorized order, but there's a disruption to the checkout that necessitates a new checkout session for the buyer, you should cancel the authorized order and create a new one.


What’s Next