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
- You send a request to the Apple Pay JS API that contains the amount for each merchant.
- Apple returns a cryptogram after your customer authorizes the total amount.
- 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
- Integrate with Apple Pay.
- Set up Apple Pay for each merchant and store their merchant identifier.
You must use Apple Pay JS API version 14 or later.
Integration steps
- Update your Apple Pay integration.
- 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
multiTokenContexts example
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 theexternalIdentifierthat 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.