Split a payment with multiple merchants

If you need to split an Apple Pay payment between multiple merchants or third parties, you can use the multi-merchant of record (MMoR) function within Apple Pay. With MMoR, the cardholder authorizes the total amount once, and then you send the separate amounts to each merchant or third party.

How it works

  1. You send a request to the Apple Pay JS API that contains the amount for each merchant.
  2. Apple returns a cryptogram after your customer authorizes the total amount.
  3. You send a payment request to our gateway for each merchant. Each payment request contains the same cryptogram and the amount that the merchant should receive.

Before you begin

You must use Apple Pay JS API version 14 or later.

Integration steps

  1. Update your Apple Pay integration.
  2. Send a payment request for each merchant.

Step 1. Update your Apple Pay integration

Update your Apple Pay integration to include the multiTokenContexts array in the ApplePayPaymentRequest. Each entry in the array represents a payment amount to each merchant.

If your request is successful and the customer authorizes the payment, Apple Pay returns a cryptogram that you need to include in each payment request to our gateway.

Request parameters

ParameterDescription
merchantIdentifierMerchant identifier that we assigned when you set up the merchant with Apple Pay.
externalIdentifierOrder ID for the payment. This value must match the value for orderId in the payment request.
merchantNameName of the merchant that you set up with Apple Pay.
amountAmount that each merchant receives from the total amount.

multiTokenContexts example

1"multiTokenContexts": [
2 { "merchantIdentifier": "PMID-101", "externalIdentifier": "ORDER-A1", "merchantName": "Merchant 1", "amount": "100.00" },
3 { "merchantIdentifier": "PMID-102", "externalIdentifier": "ORDER-B7", "merchantName": "Merchant 2", "amount": "25.00" },
4 { "merchantIdentifier": "PMID-103", "externalIdentifier": "ORDER-C3", "merchantName": "Merchant 3", "amount": "10.00" }
5]

Step 2. Send a payment request for each merchant

After you receive the cryptogram from the Apple Pay JS API, send a payment request to our Payments endpoint for each merchant.

In each payment request, include the same cryptogram in the encryptedData parameter, but adjust the following parameters for each merchant:

  • processingTerminalId – Unique identifier that we assigned to the merchant’s terminal.
  • order.orderId – Order ID that matches the externalIdentifier that you sent to the Apple Pay JS API.
  • order.amount – Amount that the merchant receives.

If your requests are successful, our gateway sends the amounts to each merchant.