Create Order

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 can be set to 	  //invoice|installment_by_invoice|direct_debit|installments|billing_statement
  //your account has to be configured to support above payment methods
  "payment_method": "invoice",
  "currency": "EUR", //defult setting EUR (GBP|CHF|SEK can be enabled request)
  "gross_amount_cents": 1315,
  "external_reference_id": "order-id-123",
  "net_term": 30, // default setting 30, (14||45|60|90 can be enabled upon the request)
  "total_discount_cents": 15,
  "buyer": {
    //mandatory attributes
    //Following email addresses will trigger the test case on DEMO
    //[email protected] sets the order to status confirmed 
    //[email protected] sets the order to status pending
    //[email protected] sets the order to status declined
    "email": "[email protected]",
    "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 GmbH",
    "legal_form": "GmbH",
    "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"
    //To create order for payment method billing_statement the buyer uuid mus be added
    //For ivoice|direct_debit|installments|installment_by_invoice it is optional.
    // The buyer UUID is sent to the merchant via buyer webhook.
    //"uuid:"12345667-890a-bcde-f123-34567890abcd" 
  },
  "billing_address": {
    "country_code": "DE",
    "city": "Berlin",
    "zip_code": "10117",
    "address_line1": "Unter den Linden 16",
    "address_line2": "",
    "state": ""
  },
  "shipping_address": {
    "country_code": "DE",
    "city": "Berlin",
    "zip_code": "10117",
    "address_line1": "Unter den Linden 16",
    "address_line2": "",
    "state": ""
  },
  //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=b15bfa81-9a32-4d5b-98f1-520a84227ca1&session_token=5ac20573-350c-4dbd-87cf-354523091ee4",
        "state": "created",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjcmVhdGVkX2F0IjoiMjAyNS0wOC0xMyAxMjowNjowNiBVVEMiLCJleHAiOjE3NTU3Nzc5NjYsIm9yZGVyX2lkIjo2NDcyMCwic2Vzc2lvbiI6IjVkYWUwNTc3LWJkNDMtNDk0Ny1iYWNkLWZiNzRkY2ZiMDVhNiJ9.J9lPie_8brqqTNdwtj_MVgH3xF0NojKFThUHNzzldTA",
        "uuid": "fece9778-eb61-4d0a-a007-877dc21203e1"
    }
}

Order States

StateDescription
createdSuccessfully created in the system but didn't go through checkout Mondu Hosted Checkout page.
data_requiredOrder is created, but the buyer has to provide additional information in the Mondu Hosted Checkout page.
authorized)The buyer authorized the order in Mondu Hosted Checkout Page.
confirmedMondu has confirmed financing for this order. The order can be shipped.
pendingThe order was created and will be reviewed by Mondu in order to be confirmed or declined.
declinedThe order was declined
shippedThe invoice for this order has been submitted to Mondu with the amount equal to order amount.
partially_shippedThe invoice fort this order has been submitted to Mondu with the amount lower than order amount.
canceledThe order was cancelled by the merchant.
completeThe order was completely paid by the buyer to Mondu.
partially_completeAt least one invoice related to these order was completely paid by the buyer to Mondu.

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!