We would appreciate it if you could provide the detailed flow of recurring payments and the unsubscribe process using the Apple Pay JS API, specifically in cases where the PSP decrypts the Apple Pay token before sending it to the payment gateway.
Thank you very much for your kind assistance.
Apple Pay on the Web
RSS for tagApple Pay on the Web allows you to accept Apple Pay on your website using JavaScript-based APIs.
Posts under Apple Pay on the Web tag
151 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
We would like to confirm the unsubscribe flow related to recurring payment processing.
When a user unsubscribes, does your system send any notification to us?
If no notification is provided, we will not be able to detect the unsubscribe event and will continue to send recurring payment requests to the gateway periodically. Would this cause any issues?
We would appreciate it if you could share the specific unsubscribe flow with us.
Thank you in advance for your support.
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
To perform the integration, it must be done under the same domain that has been validated. Is it not possible to do it in a local environment?
Could that be the reason why I can't display the button or complete the validation with the API?
Hi, I’ve been trying to integrate Apple Pay, but for some reason, the payment button is not showing up.
The project is built with Laravel 11 and Vue. I imported the script as follows:
<script crossorigin crossorigin
src="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js"
></script>
Then I added the following the steps:
<style>
apple-pay-button {{
--apple-pay-button-width: --apple-pay-button-width: 150px;;
--apple-pay-button-height: --apple-pay-button-height: 30px;;
--apple-pay-button-border-radius: --apple-pay-button-border-radius: 3px;;
--apple-pay-button-padding: --apple-pay-button-padding: 0px 0px;;
--apple-pay-button-box-sizing: border-box;
}
</style>
<apple-pay-button buttonstyle="black" type="plain" locale="en-US"></apple-pay-button>
I followed all the steps from the official Apple Pay demo:
https://applepaydemo.apple.com/
I also configured the Content Security Policy (CSP) to allow all necessary resources. However, when I test my integration, the button doesn’t appear. I’ve checked the console, but there are no errors.
At the same time, I have my certificate imported into the Keychain, and I’ve completed the entire process of creating both the certificate and the private key. However, when I try to validate the session using the certificate and key with Apple’s API, I get an error:
400 The SSL certificate error
https://apple-pay-gateway-cert.apple.com/paymentservices/
We are attempting to integrate the Apple Pay service into our website and have successfully verified our domain with Apple manually. However, we consistently receive an 'ApplePay reverify failed' email a month before the expiration time. Upon checking, we updated the SSL certificate for the domain before receiving the email, and the link still works fine in the browser. We would greatly appreciate any feedback from someone who can help us with this issue.
Hi,
We're experiencing an issue with verifying our domain for Apple Pay on the web. It's currently stuck in the "Pending" state despite meeting the listed requirements. The domain in question has been verified once successfully but one month later when we renewed the SSL, we were unable to verify the domain again. Please note that the new certificate's CA chain has been changed.
A) The "apple-developer-merchantid-domain-association.txt" file is publicly accessible at the following location:
/.well-known/apple-developer-merchantid-domain-association.txt
B) We've also ensured that the following IP ranges are whitelisted:
17.32.139.128/27
17.32.139.160/27
17.140.126.0/27
17.140.126.32/27
17.179.144.128/27
17.179.144.160/27
17.179.144.192/27
17.179.144.224/27
17.253.0.0/16
17.23.4.96/27
17.132.108.64/26
17.23.24.32/27
17.23.19.0/27
17.157.40.128/27
17.157.44.128/27
17.157.32.0/27
C) Our servers support TLS 1.2 already.
D) "ECDHE-RSA-AES128-GCM-SHA256" cipher suite has been used, so we believe all necessary criteria are satisfied.
However, when we attempt to verify the domain, we receive the following error message:
"Domain verification failed. Review your TLS Certificate configuration to confirm that the certificate is accessible and a supported TLS Cipher Suite is used."
Could you please advise why the verification is failing, or let us know if there's anything we might have missed?
Best regards,
Mehdi
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?
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.
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
Hi,
I'm inquiring about becoming a Payment Service Provider (PSP) by Apple, in order to recieve encrypted tokens from our merchants and decrypt them on our payment gateway PCI Complient server.
I've gone through your developers api documents and could not find follow through process.
What I understand that -
Organization must be enrolled in the Apple Developer program ($99/year): https://developer.apple.com/programs/enroll/
Create your unique Apple Pay merchant ID
Sign in the Apple Developer and fill out the submission form (https://developer.apple.com/contact/request/apple-pay-web-merchant-registration-api) to request access to the API
Set up your Payment Processing Certificate and Merchant Identity Certificate
But the above steps does not talk about -
How we need to decrypt apple pay token on our server
Validate/Authenticate the token
Send response back to merchant
Any additional steps that I missed ?
You help is much appreciated.
Thanks
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags:
Apple Pay on the Web
Apple Pay
Tap to Pay on iPhone
Hello -- We're preparing to roll out Apple Pay on website in the next week but encountered some issues during testing.
While we successfully processed transactions using a VISA card, we ran into errors when testing with other card brands. Has anyone come across this issue before?
I have a question regarding the file apple-developer-merchantid-domain-association.txt.
I understand that this file is used during API access for Apple Pay Web payments. However, is it necessary for our company to access this file during the payment process?
Also, this domain validation file is expected to be placed in the publicly accessible “.well-known” folder on our web server. Is it acceptable for this file to remain readable by third parties on the Internet, including Apple’s servers, without posing any security risks?
Since this file is generated during domain registration on the Apple Developer site and is unique to our domain, we believe there should be no security concerns even if accessed by third parties. However, are there any specific security requirements for this domain validation file?
Please note that the domain validation has already been successfully completed.
We appreciate your time and look forward to your guidance.
Best regards,
Hi Team,
I have merchant session object -
{"epochTimestamp":1748333121032,"expiresAt":1748336721032,"merchantSessionIdentifier":"SSH7CCD205FEEDD45AD84B77374D098B335_916523AAED1343F5BC5815E12BEE9250AFFDC1A17C46B0DE5A943F0F94927C24","nonce":"2d18eab4","merchantIdentifier":"8535F497EC92999BAD63C6F213F0F32DEEB5DBF8A0A91007F6C1128537B6FB19","domainName":"f7071159c1tst-store.occa.ocs.oraclecloud.com","displayName":"DDF Test","signature":"308006092a864886f70d010702a0803080020101310d300b0609608648016503040201308006092a864886f70d0107010000a080308203e43082038ba003020102020859d8a1bcaaf4e3cd300a06082a8648ce3d040302307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3231303432303139333730305a170d3236303431393139333635395a30623128302606035504030c1f6563632d736d702d62726f6b65722d7369676e5f5543342d53414e44424f5831143012060355040b0c0b694f532053797374656d7331133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d030107034200048230fdabc39cf75e202c50d99b4512e637e2a901dd6cb3e0b1cd4b526798f8cf4ebde81a25a8c21e4c33ddce8e2a96c2f6afa1930345c4e87a4426ce951b1295a38202113082020d300c0603551d130101ff04023000301f0603551d2304183016801423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b304506082b0601050507010104393037303506082b060105050730018629687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65616963613330323082011d0603551d2004820114308201103082010c06092a864886f7636405013081fe3081c306082b060105050702023081b60c81b352656c69616e6365206f6e207468697320636572746966696361746520627920616e7920706172747920617373756d657320616363657074616e6365206f6620746865207468656e206170706c696361626c65207374616e64617264207465726d7320616e6420636f6e646974696f6e73206f66207573652c20636572746966696361746520706f6c69637920616e642063657274696669636174696f6e2070726163746963652073746174656d656e74732e303606082b06010505070201162a687474703a2f2f7777772e6170706c652e636f6d2f6365727469666963617465617574686f726974792f30340603551d1f042d302b3029a027a0258623687474703a2f2f63726c2e6170706c652e636f6d2f6170706c6561696361332e63726c301d0603551d0e041604140224300b9aeeed463197a4a65a299e4271821c45300e0603551d0f0101ff040403020780300f06092a864886f76364061d04020500300a06082a8648ce3d0403020347003044022074a1b324db4249430dd3274c5074c4808d9a1f480e3a85c5c1362566325fbca3022069369053abf50b5a52f9f6004dc58aad6c50a7d608683790e0a73ad01e4ad981308202ee30820275a0030201020208496d2fbf3a98da97300a06082a8648ce3d0403023067311b301906035504030c124170706c6520526f6f74204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3134303530363233343633305a170d3239303530363233343633305a307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004f017118419d76485d51a5e25810776e880a2efde7bae4de08dfc4b93e13356d5665b35ae22d097760d224e7bba08fd7617ce88cb76bb6670bec8e82984ff5445a381f73081f4304606082b06010505070101043a3038303606082b06010505073001862a687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65726f6f7463616733301d0603551d0e0416041423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b300f0603551d130101ff040530030101ff301f0603551d23041830168014bbb0dea15833889aa48a99debebdebafdacb24ab30370603551d1f0430302e302ca02aa0288626687474703a2f2f63726c2e6170706c652e636f6d2f6170706c65726f6f74636167332e63726c300e0603551d0f0101ff0404030201063010060a2a864886f7636406020e04020500300a06082a8648ce3d040302036700306402303acf7283511699b186fb35c356ca62bff417edd90f754da28ebef19c815e42b789f898f79b599f98d5410d8f9de9c2fe0230322dd54421b0a305776c5df3383b9067fd177c2c216d964fc6726982126f54f87a7d1b99cb9b0989216106990f09921d00003182018930820185020101308186307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553020859d8a1bcaaf4e3cd300b0609608648016503040201a08193301806092a864886f70d010903310b06092a864886f70d010701301c06092a864886f70d010905310f170d3235303532373038303532315a302806092a864886f70d010934311b3019300b0609608648016503040201a10a06082a8648ce3d040302302f06092a864886f70d01090431220420c11c8025910403d6691af195664f47b606df9ccb351237d0de4e7c31e8a5067b300a06082a8648ce3d04030204483046022100ea8d2bb74b4960f17e4e45b99fec3f0539565fd3169091c6b39fbfb3e11a952a022100a4a4a3ff6d91caf8fa7d9b18179e0cc2156c90d4f719ae52734b4799c2b1beea000000000000","operationalAnalyticsIdentifier":"DDF Test:8535F497EC92999BAD63C6F213F0F32DEEB5DBF8A0A91007F6C1128537B6FB19","retries":0,"pspId":"8535F497EC92999BAD63C6F213F0F32DEEB5DBF8A0A91007F6C1128537B6FB19"}
After sending this to session.compleMerchant I am getting the invalid access error.
Regards,
Varsha
When I use my iPhone to scan the apple pay QR code in chrome, the url is https://applepaydemo.apple.com/apple-pay-js-api, I keep geting the "Service Unavailable" error.
Wonder know if you guys meet this error as well? Btw, the QR code feature needs IOS 18.
Hi Apple Developer Community and Support,
We are implementing Apple Pay on the Web and are encountering a persistent issue with merchant validation when the ApplePaySession is initiated from a JavaScript application running within a cross-origin iframe.
Our Setup:
Top-Level Domain: https://application.my.com/ (where the Apple Pay button is displayed, and the iframe is embedded)
iFrame Content Origin: https://cashier.my.com/ (Our custom JavaScript application that handles the Apple Pay integration and directly calls our Payment Service Provider's (PSP) API for merchant validation).
iFrame allow attribute: The iframe correctly includes allow="payment *".
The Problem:
When a user clicks the Apple Pay button, the ApplePaySession is successfully created and the Apple Pay sheet opens in Safari iOS. This suggests the browser recognizes the allow="payment *" attribute and allows the API calls.
However, during the session.onvalidatemerchant callback, our JavaScript code makes a direct API call to our PSP (Nuvei)'s endpoint.
This call consistently fails with an "Invalid domain name!" error, and the Apple Pay sheet then shows "Payment Not Completed."
PSP's Diagnosis:
Our PSP (Nuvei) has investigated and stated that for this specific endpoint (getAppleValidationApiFlow.do), "there is no explicit way to pass domain to the endpoint and domain for which session is issued is based on 'Referer' header."
Our Question for Apple:
Given that Safari 17+ now supports allow="payment" for cross-origin iframes to enable Apple Pay APIs, we have the following questions:
What is Apple's official guidance or expectation regarding the Referer header for ApplePaySession.onvalidatemerchant calls when the ApplePaySession is instantiated from a cross-origin iframe?
Is it expected that the Referer header for calls originating from the iFrame will always be the iFrame's origin?
Does Apple's merchant validation process (when the PSP calls apple-pay-gateway.apple.com/paymentservices/startSession) itself rely on or interpret the Referer from the initial client-to-PSP call?
Are there recommended best practices or standard approaches for PSP integrations in this cross-origin iFrame scenario to ensure the Referer validation (or equivalent domain validation) is correctly satisfied?
We're trying to understand if our PSP's specific reliance on the Referer for this validation is a standard requirement implicitly set by Apple for this flow, or if there are other architectural approaches that should allow this scenario to work seamlessly.
Thank you for any insights or guidance you can provide.
Hi!!! I can't publish the app as I have a paid membership through Stripe.
I have a wordpress site and have a paid membership to access the content...
The app is geared by a third party service and I can't put any code into it...
What can I do? There is an idea that in the application to display a link to the site where to place the payment for membership...
Please advise, I'm not the first to face this....
Topic:
Community
SubTopic:
Apple Developers
Tags:
Apple Pay on the Web
Apple Pay
Tap to Pay on iPhone
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 Team,
when launching an ApplePay session from a 3rd party browser where we get the QR code popup - is it possible to affect the popup's language?
We are setting the button's language via locale parameter, but when the QR code pop's up it does not respect this setting (seems like it respects browser language).
Button in Arabic
Corresponding popup
Browser language Arabic
Coresponding popup
I was unable to find anything in the documentation - could you please either point me to the relevant documentation or confirm/deny that it is possible to request a language for the popup via tjr javascript API?
Kind regards
Tomas
During our Apple Pay integration testing, we encountered an issue that we're unsure how to resolve. Below are the steps we followed:
Created an Apple Pay sandbox test account for Raul and added a test card, following the documentation here: https://developer.apple.com/apple-pay/sandbox-testing/
Opened the Golfmanager platform and initiated a booking.
For payment, selected Apple Pay as the method.
Raul clicked the Apple Pay button on the Golfmanager UI.
He scanned the QR code using his iPhone, logged in with the test account.
Apple Pay began validating our merchant identity and retrieved the wallet token to proceed with payment.
The Apple Pay payment sheet appeared on Raul's iPhone, showing the card details and the amount requested by Golfmanager.
Suddenly, the Apple Pay sheet closed unexpectedly, and we have no insight into what went wrong or what might be missing on our end.
Here is the video: https://drive.google.com/file/d/1r-73edQ9eBZzXi6HoSYYGjKO8LbxBrZi/view?usp=drive_web