Skip to content
payrocdevelopers

Split a payment with multiple merchants

Split an Apple Pay payment between multiple merchants using the multi-merchant of record (MMoR) function by sending the multiTokenContexts array to Apple Pay and individual payment requests to our gateway.

Prerequisites: Add Apple Pay to your integration · Set up Apple Pay for a merchant

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

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

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.

Browse guides

Search documentation

API reference169
Guides118
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer