Hello everyone,
I’m currently in the process of implementing Apple Pay on my company’s e-commerce website under a subscription model with recurring payments. I would appreciate some help in clarifying the following points:
Is the applicationPrimaryAccountNumber the DPAN and the merchantTokenIdentifier the MPAN? If not, which fields represent each one or how do I recognise them?
Is the onlinePaymentCryptogram used only for processing payments with the DPAN, or is it also involved when using the MPAN?
Is the onlinePaymentCryptogram single-use or does it have an expiration time? Or is it reusable with no limits?
According to Apple’s data policies, is it recommended for our servers to perform the payment token decryption (debundling), or should this only be handled by the payment gateway processor to stay compliant?
Below is the payment request I’m using for testing, along with the decrypted payment token returned for a test card:
Payment Request:
{
"countryCode": "US",
"currencyCode": "USD",
"merchantCapabilities": ["supports3DS", "supportsDebit", "supportsCredit"],
"supportedNetworks": ["visa", "masterCard", "amex", "discover"],
"requiredBillingContactFields": ["postalAddress", "name"],
"lineItems": [
{
"label": "Subtotal",
"amount": "9"
},
{
"label": "Taxes",
"amount": "1"
}
],
"total": {
"label": "Demo (Card is not charged)",
"amount": "10",
"type": "final",
"recurringPaymentIntervalUnit": "month"
},
"recurringPaymentRequest": {
"paymentDescription": "Recurring payment",
"regularBilling": {
"label": "Demo (Card is not charged)",
"amount": "10",
"type": "final",
"paymentTiming": "recurring",
"recurringPaymentIntervalUnit": "month"
},
"managementURL": "${window.location.origin}/api/managePaymentMethod"
}
}
Decrypted Payment Token:
{
"applicationPrimaryAccountNumber": "5204240494898922",
"applicationExpirationDate": "280630",
"currencyCode": "840",
"transactionAmount": 0,
"deviceManufacturerIdentifier": "050110030273",
"paymentDataType": "3DSecure",
"paymentData": {
"onlinePaymentCryptogram": "MCt5xR+VnQAAAAM/8mUjAAADFIA="
},
"merchantTokenIdentifier": "DM4MMC1US000000042e438d170774669844e732a41c28e97",
"merchantTokenMetadata": {
"cardMetadata": {
"longDescription": "Test Bank for MasterCard MTF",
"cardCountry": "US",
"shortDescription": "Test Bank 2",
"fpanSuffix": "0049"
},
"cardArt": [
{
"url": "https://nc-crt-smp-device-asset.apple.com:443/broker/v1/assets/174ce63257704d93b00aff8aa09ec0d5",
"name": "cardBackgroundCombined@2x.png",
"type": "image/png"
}
]
}
}
Thanks in advance for your help and guidance.
Apple Pay
RSS for tagDiscuss how to integrate Apple Pay into your app for secure and convenient payments.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
PLATFORM AND VERSION
iOS
Development environment: Xcode Version 16.2 (16C5032a), macOS 14.6.1
Run-time configuration: iOS 26
DESCRIPTION OF PROBLEM
We would like to seek clarification on how to determine whether a card used via Apple Pay is a credit or debit card before sending the transaction request.
Currently, we can retrieve the card type information (credit/debit) from the Apple Pay response payload, but this is only available after the payment has been processed.
However, we need to determine the card type in advance, as our system calculates and applies transaction fees based on the card type, which should be added to the total transaction amount before submission.
Could you please advise if there is any parameter, API field, or pre-authorization mechanism available to identify the card type prior to initiating the transaction request?
We would appreciate your guidance or any related documentation for implementing this.
STEPS TO REPRODUCE
Initiate Apple pay
Payment from Apple pay
Getting payload
we can retrieve the card type information (credit/debit) from the Apple Pay response payload, but this is only available after the payment has been processed.
We need to identify if there's any way to know the card user selected(whether it is credit/debit) before processing the payment.
We are developing a native iOS financial application called Tradu: Stocks, Forex, and CFDs (Apple ID: 6473443264), which embeds a WKWebView to render all user-facing logic. All user interactions—including authentication with MFA—occur inside this WKWebView.
To access native functionality, we use postMessage() to communicate between the web and native layers. This approach has worked successfully for biometric authentication, for example.
We are currently integrating Apple Pay In-App Provisioning and have a few questions regarding compliance with the documentation provided by our Issuer Host (Modulr). In the document titled Getting Started with Apple Pay: In-App Provisioning, Verification, Security, and Wallet Extensions (Version 4.0, February 2023), all examples are based on a fully native application.
We’ve managed to integrate most of the In-App Provisioning flow via postMessage() up to the point of passing encryptedData to the Payment View.
Apple Pay button inside WKWebView
In Section 7: Frontend Overview, the user initiates the provisioning by tapping a native PKPaymentButton (SwiftUI example).
In our case, this button is rendered inside the WKWebView, styled according to the Apple Style Guide.
While the document references this approach as a “raw mark text supplement,” is this method acceptable and compliant with Apple’s UX and technical guidelines?
MFA requirement before provisioning
In Section 4: Security Guidelines, it is stated that the user must have passed MFA at least once before starting the provisioning flow.
In our implementation, users must complete MFA on every login (including on recognized devices) before the provisioning UI becomes available.
Even though this is not tied specifically to “unrecognized devices,” is our MFA requirement sufficient to satisfy Section 4.2?
Summary:
Is using a web-rendered Apple Pay button inside WKWebView (instead of a native PKPaymentButton) considered compliant?
Is our MFA enforcement model (required on every login) aligned with the security requirements outlined in Section 4.2 of the Apple Pay In-App Provisioning documentation?
Hi,
For one of my projects, I am using the Web Drop-in component of Adyen PSP on a Salesforce B2B Commerce site. One of the payment methods is Apple Pay. The payment method is rendered, but the Apple Pay button is not clickable. We tried debugging it but could not identify the root cause. Could you advise how this issue can be fixed?
Thanks
Topic:
App & System Services
SubTopic:
Apple Pay
Hello,
We’re seeing an issue where the Apple Pay button is visible in Safari but not clickable for certain users, while it works normally for others. This happens on our site (https://store-qa2.enphase.com/
) as well as on other sites for the same affected users.
Currently, we display the Apple Pay button based on the following condition:
Boolean(window.ApplePaySession) && ApplePaySession.canMakePayments();
For affected users, the button shows up as expected, but it’s not interactive. All users (both affected and unaffected) are on the latest versions of Safari and macOS/iOS.
Could someone clarify what additional conditions Safari/Apple Pay requires for the button to be fully functional? And under what circumstances could it be visible but not clickable?
Topic:
App & System Services
SubTopic:
Apple Pay
Hey everyone, hoping someone here has run into this before.
I have a fully functional App Clip (com.didyoucatchit.app.Clip) linked to my main app (com.didyoucatchit.app). The Clip builds and runs perfectly, but I’m seeing issues trying to enable Apple Pay for it.
When I try to link my Merchant ID under the “On Demand Install Capable” capability in the Apple Developer portal, I get this error:
A relationship in the provided entity is not allowed for this request.
The relationship 'undefined' can not be included in a 'bundleIdCapabilities' request.
Here’s what I have already configured and confirmed:
App Clip capabilities in Xcode include:
Apple Pay Payment Processing
Associated Domains (appclips:app.didyoucatchit.com)
Provisioning profile includes:
Apple Pay Payment Processing
Associated Domains
In-App Purchase
On-Demand Install Capable
Entitlements file for the Clip:
<key>com.apple.developer.associated-domains</key>
<array>
<string>appclips:app.didyoucatchit.com</string>
</array>
<key>com.apple.developer.in-app-payments</key>
<array>
<string>merchant.com.didyoucatchit.app</string>
</array>
<key>com.apple.developer.parent-application-identifiers</key>
<array>
<string>$(AppIdentifierPrefix)com.didyoucatchit.app</string>
</array>
Merchant ID (merchant.com.didyoucatchit.app) is active and connected to Stripe
Stripe Apple Pay configuration matches the same merchant ID and certificate
Both provisioning profiles have been refreshed and downloaded
However:
The portal still throws the “relationship 'undefined'” error anytime I try to modify the Clip’s capabilities
In testing, Apple Pay doesn’t show up as a payment option in the Clip (using Stripe’s Payment Element integration)
Questions:
Is this a known issue with the Developer portal when linking App Clips to merchant IDs?
Is there a specific way to re-establish the parent–child relationship between the main app and the App Clip so the bundleIdCapabilities request includes the proper relationship JSON?
Are there any additional configuration steps required when using Stripe for Apple Pay inside an App Clip?
System Setup:
Xcode: 16.2 (build 16C5032a)
macOS: Sequoia 15.3.1
iOS: 18.5 (testing on physical device)
Merchant ID: merchant.com.didyoucatchit.app
Main App ID: com.didyoucatchit.app
App Clip ID: com.didyoucatchit.app.Clip
Any help or insight would be hugely appreciated
Thanks in advance!
Hello,
We are experiencing an issue with Apple Pay integration in our application. We are using WKWebView to handle various payment methods, but we are unable to complete payments via Apple Pay.
Upon debugging the WKWebView, we received the following error message: "400 No required SSL certificate was sent" when attempting to process the payment.
Currently, we are using a Let's Encrypt SSL certificate. Could you please confirm whether this certificate is suitable for Apple Pay, or if we should be using a different SSL certificate?
Topic:
App & System Services
SubTopic:
Apple Pay
Tags:
Apple Pay on the Web
Apple Pay
Tap to Pay on iPhone
we are currently using the requestAutomaticPassPresentationSuppression API in my app. to prevent the Wallet interface from appearing when an NFC/RF reader is detected during active app usage.
Recently, a new transit card supporting Express Mode (T-money Transit Card) was released in Korea, and we are seeing an increasing number of users enabling Express Mode.
However, this has introduced an issue where users are unable to use the BLE-based functionality we provide via our widget. Specifically, when the user taps our widget, it triggers a BLE signal broadcast for approximately 10 seconds. In this scenario, when the user brings their iPhone close to our reader, Express Mode is activated before the BLE interaction can be established. This prevents the BLE signal from being successfully received and processed.
We would like to ask:
Is it possible to suppress Express Mode behavior (similar to requestAutomaticPassPresentationSuppression) even when the app is launched via a widget interaction?
Alternatively, is there any way to delay or defer Express Mode activation temporarily when launching from a widget or during BLE communication?
We would appreciate any guidance or best practices you can share regarding this scenario.
Thank you.
Topic:
App & System Services
SubTopic:
Apple Pay
Hello we are trying to renew our certificates.
We are trying to extend the dates of verified domains following the docs https://developer.apple.com/documentation/applepayontheweb/maintaining-your-environment#Renew-Your-Domain-Verification
and configure our server with
https://developer.apple.com/documentation/ApplePayontheWeb/setting-up-your-server
We've downloaded the apple-developer-merchantid-domain-association.txt and update it on their respective locations, click 'ok' button but we get redirected to the main page of the information of the merchant, and it shows the domains without the extending period of time.
No popup showing what has failed or what could be the reason of this error, we only get a redirection to the main page.
Topic:
App & System Services
SubTopic:
Apple Pay
我是一个银行app开发人员,请问怎么将银行名称显示在苹果钱包“选取银行”列表中,实现用户点击跳转银行app进行免输卡号签约绑定,是否有详细接入步骤和文档?
Body:
Hello,
We are currently implementing iOS order verification and have encountered an issue. Some of the receipts we verify return with an empty in_app array, which makes it impossible to determine whether there is a valid in-app purchase.
Below is the code we’re using for verification and the result we receive:
Code Example:
public function iosVerifyReceipt($receipt, $password = '', $sandbox = false)
{
$url = $sandbox ? 'https://sandbox.itunes.apple.com/verifyReceipt' : 'https://buy.itunes.apple.com/verifyReceipt';
if (empty($password)) {
$data = json_encode(['receipt-data' => $receipt]);
} else {
$data = json_encode(['receipt-data' => $receipt, 'password' => $password]);
}
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
curl_close($ch);
$result = json_decode($result, true);
$result = $result ?? [];
$result['sandbox'] = $sandbox;
if ($result['status'] != 0) {
Log::warning('ios verify receipt failed', ['receipt' => $receipt, 'result' => $result, 'sandbox' => $sandbox]);
if ($result['status'] == 21007) {
return $this->iosVerifyReceipt($receipt, $password, true);
}
}
return $result;
}
// Order validation check
if (empty($result) || $result['status'] != 0) {
throw new BadRequestHttpException("Ios Order Verify Error");
}
$appItemId = $result['receipt']['app_item_id'] ?? "";
if ($appItemId != MY_APP_ID) {
throw new BadRequestHttpException("Ios Order Verify Error");
}
$inApp = array_filter($result['receipt']['in_app'] ?? [], function ($item) use ($transactionId, $order) {
return $item['transaction_id'] == $transactionId && $item['product_id'] == $order->getProductId();
});
if (empty($inApp)) {
throw new BadRequestHttpException("Ios Order Verify Error");
}
Array
(
[receipt] => Array
(
[receipt_type] => Production
[adam_id] => *
[app_item_id] => *
[bundle_id] => *
[application_version] => *
[download_id] => *
[version_external_identifier] => *
[receipt_creation_date] => 2025-02-11 04:06:47 Etc/GMT
[receipt_creation_date_ms] => *
[receipt_creation_date_pst] => 2025-02-10 20:06:47 America/Los_Angeles
[request_date] => 2025-02-11 15:54:56 Etc/GMT
[request_date_ms] => *
[request_date_pst] => 2025-02-11 07:54:56 America/Los_Angeles
[original_purchase_date] => 2025-02-11 04:02:41 Etc/GMT
[original_purchase_date_ms] => *
[original_purchase_date_pst] => 2025-02-10 20:02:41 America/Los_Angeles
[original_application_version] => 5511
[preorder_date] => 2025-01-17 21:12:28 Etc/GMT
[preorder_date_ms] => *
[preorder_date_pst] => 2025-01-17 13:12:28 America/Los_Angeles
[in_app] => Array
(
)
)
[environment] => Production
[status] => 0
[sandbox] =>
)
Problem Description:
• We are noticing that in some orders, the in_app array is returned as empty. This causes difficulty in verifying the presence of in-app purchases.
• Our validation logic assumes that if in_app is empty, the order is invalid, but we would like clarification on whether this is correct or if such a scenario is normal under certain conditions.
Actions Taken:
• We have reviewed Apple’s documentation and other related resources, but no clear explanation is given about when in_app might be empty.
• Can we safely rely on an empty in_app array to consider the order invalid, or should we investigate further for potential issues like delays or errors during the verification process?
We would appreciate your guidance on how to handle such cases. Thank you for your support!
Hello,
On my website, I have a button to make a payment via Apple Pay. When I click on it, the Touch ID window opens correctly. However, when I place my finger on the Touch ID, I get a payment error.
This issue only occurs in production mode. In sandbox mode, everything works perfectly.
Here is a log file :
log.txt
Thank you in advance for your help.
Hi there,
We build and operate apps for several PBS stations, and we're considering adding in-app donations with Apple Pay:
https://developer.apple.com/apple-pay/nonprofits/
I'm curious if any examples of this functionality in a live app. We'd love to take a look, and get a better idea of use-cases before we tackle that project. (Seems like it would be a very nice upgrade.)
Cheers,
Kevin
We have verified our domain but if the file is removed from the deployed site after verification will this impact using ApplePaySession.applePayCapabilities in real time?
We use that method from the JS api in our React app to determine whether or not to show the apple pay button.
When that function is called in the browser, do the apple servers ping the https://our.domain.com/.well-known/apple-developer-merchantid-domain-association URL at that time?
Or do they check for it periodically?
The reason for asking is that with our many environments we wonder if we can verify each environment's domain by adding the file once. The file will be wiped out by our CICD process as it goes up the environment stack through our development workflow.
Or do we need to maintain that file for each environment and add something to our build process?
Can i, personally, create .pkpass for other companies using my apple developer ID?
In order to create .pkpass, I need to create passTypIdentifier and teamIdentifier using apple developer ID
Is it okay to create those two identifiers and create coupons or membership cards for other companies?
I just wonder if it is against the law or developer guide.
Topic:
App & System Services
SubTopic:
Apple Pay
We are working with Saferpay. And integrating Applepay Server to Server. But we are having token generation issue. It does not give a valid test card information. We have created a tester account as India country. Is that an issue?
Topic:
App & System Services
SubTopic:
Apple Pay
I am writing regarding an issue I have encountered while attempting to complete a payment using test users created within the Sandbox environment of Apple Pay. The problem persists specifically when trying to make payments through the demo page at https://applepaydemo.apple.com/.
Problem Description:
When initiating a payment process with either of the following test user accounts.
The flow proceeds as follows:
The Apple Pay window appears correctly.
Processing begins but does not conclude successfully.
After processing concludes, there is no prompt for 'Pay with Touch ID'.
Additional Information:
Device & OS Version: MacOS 15.3.2
Browser & Version: Safari 18.3.1
Real Device or Simulator: Real device used
First Occurrence: Before January 1st, 2025
Custom Configurations or Backend Used: No custom configurations or backend modifications are being utilized during interaction with the demo page.
Could you please provide assistance in resolving this issue?
Hi, for iOS in-app push provisioning flow, and for a card that is in already in requiresActivation state, is it possible from our app UI to launch to the card's verification screen either as a in-app flow (like how in-app push provisioning flow is doing) or Apple Wallet?
So far the current process is that it will prompt user to provision the card again (only to show This Card is Already in Wallet error), or to open the card in tap-to-pay mode, or adding a new card flow in Apple Wallet.
Am I missing any PassKit SDK on this?
I am developing an app to add Discover cards to Apple Wallet. Unlike Visa, MasterCard, etc., Discover does not have APIs that return activationData, encryptedPassData and ephemeralPublicKey for a given card, so I have created a backend server to handle this. In my server, I am unsure how to generate the ephemeralPublicKey. Do I need to use the merchant certificate? If so, how do I use it to generate the ephemeralPublicKey?
I would appreciate it if someone could provide me with a step-by-step guide on how to generate ephemeralPublicKey for provisioning a card.
I am trying to play around on the Apple Pay demo page (https://applepaydemo.apple.com) and I am getting the following error response.
PaymentRequest AbortError: The operation was aborted.
I am using the Payment Request API