Marketplace setup

Learn about the specifics of marketplace use cases on Mondu's API.

This guide explains how to implement and test Mondu's payment methods in a marketplace context. At Mondu, marketplaces function as a parent entity that manages multiple merchant accounts (“vendors”) under it.

Prerequisites

Before implementation, ensure:

  • You provided to Mondu a unique vendor_external_reference_id for each vendor on your marketplace
  • Mondu has provided you with API credentials with marketplace permissions

Implementation

Order Creation

The vendor_external_reference_id must be included in all order creation requests to identify which vendor account is processing the transaction. Please take a look at the payload example.


Single Vendor Orders

For orders where all items belong to one vendor, include the vendor_external_reference_id at the root level of your API request payload.


Multi-Vendor Orders

For orders containing items from multiple vendors, attach the vendor_external_reference_id to each line item instead of the root level.

Important: The API enforces mutual exclusivity—include vendor_external_reference_id either at the root level OR within lines, never both. Requests violating this rule will be rejected.


Invoice Creation

Invoices must be created separately for each vendor, even when the original order contained items from multiple vendors.

Implementation Steps:

  • Identify all unique vendors from the order's line items
  • Create individual invoice requests for each vendor
  • Include only the line items belonging to that specific vendor in each invoice

Example:

For a multi-vendor order with vendors A and B, you must submit:

  • Invoice 1: Contains only vendor ID-1 line items
  • Invoice 2: Contains only vendor ID-2 line items