Creates new Order

The order entity is the core of the Mondu platform and holds the configuration of a purchase order, including buyer information, addresses and line items.

Order can be created thorough sending Create Order Request when the buyer clicks Pay with Mondu button in the checkout. The body of the request should hold the information about the buyer, addresses and line items.

Recommended body structure

{
  //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"
    }
}

Order States

StateDescription
createdSuccessfully created in the system but didn't go through checkout
data_requiredOrder is created, but needs more buyer data through widget interaction
pendingThe order was created and will be reviewed by Mondu in order to be approved or declined.
declinedNo financing is offered for this order
authorized(optional) only possible when state_flow:authorization_flow is sent at order creation (e.g. when using hosted checkout) Needs merchant-side order confirmation
confirmedMondu has confirmed financing for this order
partially_shippedPartially shipped by the merchant
shippedFully shipped by the merchant
canceledThe order was canceled by the merchant
completeShipped and successfully paid by the buyer

What should be implemented next?

Webhooks

To receive updates about the order status change, please register for order webhooks.

Confirm Order
When the order was successfully placed in the shop system and the shop system received the order/authorized webhook trigger Confirm Order Request to change the status of the order in Mondu system form authorized to confirmed.

Create Invoice
The invoice can be created only if the state of order is set to **confirmed**. This happens when the order was successfully created in Mondu system and the buyer authorized the financing attempt through an interaction with Mondu Widget.

The Create Invoice Request should be triggered when the state of order in your System is set to "shipped". It can happen either in the Shop System or in ERP.

Adjust Order
Order can be adjusted through Adjust Order Request in case the buyer asked to change the original order or costs related to the order changed before the products were shipped to the buyer. The information about the buyer cannot be changed.
The addition of products or the increase order related costs may trigger another round of risk assessment. In this case the status of the order will be set to pending until Mondu will review adjusted order. You will be updated about the change of the status of the order through webhooks.

Cancel Order
If the order was canceled, trigger Cancel Order Request.

API Reference

Language
Credentials
Header
Click Try It! to start a request and see the response here!