Hi,
I'm trying to create merchant tokens in ApplePay sandbox environment, so then I can use them to invalidate token API call and lifecycle notifications testing.
When processing test payment I use Apple Pay payment request taken directly from Apple's demo website (I skipped non important part of JSON)
{
...
"recurringPaymentRequest": {
"paymentDescription": "A description of the recurring payment to display to the user in the payment sheet.",
"regularBilling": {
"label": "Recurring",
"amount": "4.99",
"paymentTiming": "recurring",
"recurringPaymentStartDate": "2023-08-11T11:20:32.369Z"
},
"trialBilling": {
"label": "7 Day Trial",
"amount": "0.00",
"paymentTiming": "recurring",
"recurringPaymentEndDate": "2023-08-11T11:20:32.369Z"
},
"billingAgreement": "A localized billing agreement displayed to the user in the payment sheet prior to the payment authorization.",
"managementURL": "https://applepaydemo.apple.com",
"tokenNotificationURL": "https://applepaydemo.apple.com"
},
...
}
Payment is successful, but merchantTokenIdentifier
in decrypted ApplePay token is always empty, regardless of test card used, I tried Visa, MasterCard, Amex.
Anyone have an idea what I'm missing and how to get that merchant token? Is it even possible to test merchant tokens (lifecycle notifications) in sandbox?
Hi @double_jay, @digidigo, @djejaquino,
If a payment network doesn't support MPAN for the transaction, it will fallback to DPAN. The intended use case for the Apple Pay sandbox environment is for provisioning cards on device, not for validating payment transactions. Please use your payment network's testing environment to perform end-to-end testing of merchant token-based payments. Just keep in mind, your implementation should support the handling of both MPAN and/or DPAN for Apple Pay transactions to prevent payment token decryption failures.
Cheers,
Paris X Pinkney | WWDR | DTS Engineer