Apple Pay on the Web

RSS for tag

Apple Pay on the Web allows you to accept Apple Pay on your website using JavaScript-based APIs.

Apple Pay on the Web Documentation

Posts under Apple Pay on the Web tag

125 Posts
Sort by:
Post not yet marked as solved
5 Replies
2.4k Views
Hi everyone, We are integrating Apple Pay on the Web, and we're trying to get the automatic renewal of the domain verification working according to the documentation: https://developer.apple.com/documentation/apple_pay_on_the_web/maintaining_your_environment Initially the domain verification is successful, but then the automatic renewal does not work. We keep getting the emails with the subject "Your domain will expire soon.", but they only say "We were unable to automatically to reverify your domain." without any further details. We confirmed that the site's SSL certificate has already been renewed by the time Apple attempted the renewal of verification, the certs are renewed 30 days before their expiry (using Let's Encrypt). So according to the docs, at least the renewal attempts 15, and then 7 days before the expiry should be successful. One example domain is this one: https://www.kayak.com/.well-known/apple-developer-merchantid-domain-association.txt, but we have the same issue for all our other domains as well. Does anyone have suggestions how to troubleshoot this further? (I tried creating a support ticket, but they basically replied that they're non-technical, and just linked me to the documentation. I've seen others complaining about this too, but couldn't find a conclusive solution, so I thought I'd signal boost and create a fresh topic to see if there are any more recent findings about this problem.) Thanks! Regards, Mark
Posted Last updated
.
Post not yet marked as solved
0 Replies
32 Views
Hi, We are integrating with Apple Pay via Stripe. Payment works as expected and is shown as successful in the Stripe dashboard. Our Frontend and Backend have verified the payment and decided it is successful as well. But the Apple Pay UI shows "Payment not completed". Any tips on how to troubleshoot this please? best, Chandru
Posted
by cmapigon.
Last updated
.
Post not yet marked as solved
1 Replies
53 Views
I want to integrate an apple pay account on the website, but on the point where I am validating merchant that return "false" responses . I already followed the documentation and tried many times but still did not resolve it. Please help me to resolve this issue. so that i can integrate apple pay for heartland. here i mentioned my block of code where i am verifying merchant, please help to fix this. server side code: (PHP): $merchantSession = fetchAppleMerchantSession($validationURL); echo json_encode($merchantSession); function fetchAppleMerchantSession($validationUrl){ $cert_url = base_path('cert/merchant.pem'); $cert_key = base_path('cert/merchant.key'); $data = [ 'merchantIdentifier' => 'domain.com', 'domainName' => 'domain.com', 'displayName' => 'Disp Name', 'initiative' => 'web', 'initiativeContext' => 'domain.com' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $validationUrl); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_CERTINFO, true); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); curl_setopt($ch, CURLOPT_SSLCERT, $cert_url); curl_setopt($ch, CURLOPT_SSLKEY, $cert_key); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $res = curl_exec($ch); curl_close($ch); $result = json_encode($res); return ['data' => $result, 'status' => false]; } client side code (JS): // Create Apple Pay session within the user gesture handler const session = new ApplePaySession(6, paymentRequest); // Handle merchant validation session.onvalidatemerchant = (event) => { console.log("event", {event, session}); const validationURL = event.validationURL; fetch('gp_applepay_validate.php', { // Replace with your server-side validation endpoint method: 'POST', headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Headers': "*" }, body: JSON.stringify({ validationURL }), }) .then((response) => { console.log("response.json()", response); return response.json(); }) .then((data) => { console.log("datappp", data); if (data.status) { event.completeMerchantValidation(data.data); } else { console.error('Merchant validation failed:', data.data); session.abort(); alert('Payment failed: ' + data.data); // Improve error message } }) .catch((error) => { console.error('Error during merchant validation:', error); session.abort(); alert('An error occurred during payment. Please try again later.'); // Generic error message for user }); };
Posted Last updated
.
Post not yet marked as solved
0 Replies
74 Views
does anyone have an example of the decrypted payload for an interac payment would look like? Couldnt find an example within the apple documentation
Posted
by Tivo12.
Last updated
.
Post not yet marked as solved
2 Replies
104 Views
Team, When I try using Apple pay for Japan, we are getting Payment Not Completed error for a merchant with Japanese character as the displayName at completeMerchantValidation. The same works well if the merchant has name in English. log from com.apple.passkit as explained in Apple Pay on the Web Debugging Guide 2024-04-30 12:12:21.441231+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Received <private> status: PKPaymentAuthorizationStatusSuccess 2024-04-30 12:12:21.441336+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Evaluating merchant session using PROD trust policy. 2024-04-30 12:12:21.448371+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStateClientCallback to PKPaymentAuthorizationStatePrepareTransactionDetails with param: <private> 2024-04-30 12:12:21.448393+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] State change: PKPaymentAuthorizationStatePrepareTransactionDetails 2024-04-30 12:12:21.448444+0530 0xb6bd16 Error 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] State change not implemented: PKPaymentAuthorizationStatePrepareTransactionDetails 2024-04-30 12:12:21.450878+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Performing request: POST <private> { 7 <private> fields } 500 bytes 2024-04-30 12:12:22.642216+0530 0xbaa237 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Task Completed: <private> 2024-04-30 12:12:22.642348+0530 0xbaa237 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Response: <private> 400 Time profile: 1.19145 seconds { 6 <private> fields } 232 bytes 2024-04-30 12:12:22.642571+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStatePrepareTransactionDetails to PKPaymentAuthorizationStateFatalError with param: <private> 2024-04-30 12:12:22.642617+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] State change: PKPaymentAuthorizationStateFatalError 2024-04-30 12:12:22.642757+0530 0xb6bd16 Error 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] Payment failed with fatal error <private> 2024-04-30 12:12:22.643288+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Analytics] subject: inApp event: <private> 2024-04-30 12:12:22.659154+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] glyphView - revealedErrorAction() 2024-04-30 12:12:24.633308+0530 0xb6bad7 Default 0x0 55529 0 Safari: (PassKitMacHelperTemp) [com.apple.passkit:Payment] Invalidate extension <private> identifier <private> 2024-04-30 12:12:24.653014+0530 0xb6bd16 Info 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Connections] PKInAppPaymentService:0x12bf1b660 (0x1290e2a80): Tearing down existing connection 2024-04-30 12:12:24.653173+0530 0xbaaa12 Info 0x0 68603 0 passd: [com.apple.passkit:Connections] PDXPCServiceListener 2 (0x127705150:55547): connection invalidated 2024-04-30 12:12:24.654891+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Analytics] subject: inApp event: <private> As we can see, com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] Payment failed with fatal error <private>, how do we debug this further?
Posted Last updated
.
Post not yet marked as solved
0 Replies
70 Views
Hi guys, I'm working on Apple Pay integrating it into web, but I'm having a problem the payment sheet is not showing on safari browser and iPhone devices (the apple pay button is showing but not clickable and no error logs) but it showing on iPad devices (the payment sheet is showing after the user clicks on the button). Is there anyone same as issue like this? Thank you for any help.
Posted
by jg_dev.
Last updated
.
Post not yet marked as solved
1 Replies
502 Views
Trying to get Apple Pay with PayPal to work in our Wordpress WooCommerce platform. We've done all of the registration, and have uploaded the apple-developer-merchantid-domain-association data file to .well-known but the file can not be read. It is 644 permission and we have removed the extension per Apple Support, but the link is still not readable and gives a 404 error. If I add a dat or txt extension, it is readable to a web browser, but Apple still doesn't see the file as it doesn't want the extension. I even tried an order with Apple Pay but it failed. PayPal is useless and just send us to Apple, and Apple doesn't seem to have much on it either. Searching the support files I only find 5 year old posts. Google Pay works without issue, *** do credit cards and PayPal. Just no Apple Pay. The instructions are pretty basic: Download and host live domain association file Host a domain association file for each high-level domain and subdomain that show the Apple Pay button. Download the domain association file for your live environment. Host the file on your live site for each domain and subdomain you want to register, at /.well-known/apple-developer-merchantid-domain-association. For example: https://example.com/.well-known/apple-developer-merchantid-domain-association https://subdomain.example.com/.well-known/apple-developer-merchantid-domain-association
Posted Last updated
.
Post not yet marked as solved
0 Replies
135 Views
I have been trying to enroll onto the program for sometime now but it doesn't go through. I provided every detail accurately but still haven't received any meaningful update. Is it normal that during the purchase we aren't asked to provide the CVV number of our credit card hence payment couldn't be processed or what? The email I received highlighted an enroll request and order. I have consistently sent so many messages but no replies. If the wait time is even a year, isn't it advisable to make it known to the people rather than making it seem an easy process of only two business days. The time I received has long elapsed and I don't how to go about it now. Nothing works.
Posted
by BVolta.
Last updated
.
Post not yet marked as solved
0 Replies
106 Views
My Merchant Domains' SSL certificate expires every 3 months, that means I need to verify Apple Pay Merchant Domains every 3 months at least. Need API(s) to automate the verification process after my domain's SSL certificate updates: API to download the apple-developer-merchantid-domain-association file to be uploaded to my domain. API to verify the domain.
Posted Last updated
.
Post not yet marked as solved
0 Replies
155 Views
We're currently evaluating Apple Pay as a payment method on our site. For Amex US credit card payments, we charge a payment fee. For other credit cards, there is no such fee. However, for Apple Pay it seems we cannot configure this. What we currently tried is to implement onpaymentmethodselected. However, only the card type is part of the event, not the card network. Example code: session.onpaymentmethodselected = event => { /* event.paymentMethod only contains {type: "credit"} */ console.log('onpaymentmethodselected', event.paymentMethod); /* event.paymentMethod.network is therefore undefined, if we could have here 'amex', 'mastercard' etc, we could implement the payment fee we currently have*/ console.log('onpaymentmethodselected', event.paymentMethod.network); session.completePaymentMethodSelection({}); }; Is there a way to access the network in this callback? Or is there another way to implement payment fees with certain networks used via Apple Pay?
Posted Last updated
.
Post not yet marked as solved
0 Replies
224 Views
Hello there, i'm new in trying to use the apple wallet API. we want to create passes to add identification credentials in the costumer's apple wallet. but we have doubts, for example: is it mandatory to pay the apple developer memebership to use the examples of apple wallet api? also, is there a way or an example of using this API in node.js? Thanks for your attention, i will be waiting for your answers.
Posted Last updated
.
Post not yet marked as solved
1 Replies
267 Views
I currently have two merchant id's configured in our production environment which are tied to separate certificates. The one below was recently created for our OlO integration which uses Spreedly. The other integration is with Worldpay directly. When attempting to validate the new merchant id for OlO, we get the following response. Request Body { "merchantIdentifier":"merchant.com.cbolo.prod", "displayName":"Cracker Barrel", "initiative":"web", "initiativeContext":"stage.crackerbarrel.com" } Response Body { "statusMessage": "Payment Services Exception merchantId=745C2D1BC1B86B0E3FF898001666D44AADE6EC457F128075A723DA511D0BA0B4 unauthorized to process transactions on behalf of merchantId=D276804A1BF06DADBAE2DC291266FB87C15C8E6702959025D56CF4694FAB56C4 reason=D276804A1BF06DADBAE2DC291266FB87C15C8E6702959025D56CF4694FAB56C4 never authorized mass enablement transactions to occur via 745C2D1BC1B86B0E3FF898001666D44AADE6EC457F128075A723DA511D0BA0B4", "statusCode": "400" } We have followed all the steps documented around verifying our domains and still we get this error. Has anyone had this issue and been able to resolve? We opened an Apple Support case 4 business days ago and have heard nothing back. Case: 102259384074.
Posted Last updated
.
Post not yet marked as solved
0 Replies
194 Views
I work on integrating online payment gateways. We are currently integrating Stripe and Adyen payment gateways. However, when integrating with Stripe, we use the certificate file provided by Stripe, and for Adyen, since there are not many payment transactions, we cannot create our own account, so we are using an account from a partner company. Therefore, we also have to use the Apple Pay certificate file from the partner company. In other words, the certificate files for Stripe and Adyen are different, but we want to get verification for the same domain. How can we set up to differentiate between Stripe and Adyen for the same domain with two different certificate files? The framework we are using is React.js for the frontend and Node.js for the backend.
Posted
by Sicpama.
Last updated
.
Post not yet marked as solved
0 Replies
249 Views
We were try to call Apple Pay startSession, but we are getting an following error, exception: Error: Error: socket hang up at SCAwsPay.validateSessiont (D:\projects\amazon_payment_nodejs\routes\controllers\secondaryControllers\SCAwsPay.js:158:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async D:\projects\amazon_payment_nodejs\routes\awsPay.js:56:18, const { merchantIdentifier, domainName, initiativeContext, initiative, displayName } = payload; const httpsAgent = new https.Agent({ rejectUnauthorized: false, cert: certificate, key: key, passphrase: 'team123' }); const headers = { 'Content-Type': 'application/json', }; let response = await axios.post("https://apple-pay-gateway.apple.com/paymentservices/startSession", { merchantIdentifier, domainName, displayName, }, { // headers, httpsAgent }); I kindly request your support in resolving this issue as soon as possible. Apple Pay is an essential feature for me, and I would greatly appreciate any guidance or solutions you can provide. Thank you for your attention to this matter. I look forward to your prompt response and assistance in resolving this issue.
Posted Last updated
.
Post not yet marked as solved
0 Replies
197 Views
I am seeking an assistance with an issue we've encountered during our efforts to integrate Apple Pay into our web application. We're using Angular on our client side. and our server side is powered by AEM(Adobe Experience Manager), which is based on Java. As part of our integration process, we're following the Apple Pay documentation. However, we've encountered a challenge during the merchant validation step. Our server-side implementation, responsible for validating the merchant identity and generating a session object for payment requests, is encountering an SSL handshake error. Here's the error message we're encountering: javax.net.ssl|FINE|01|main|2024-03-20 05:19:52.812 IST|SSLCipher.java:1817|KeyLimit read side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:52.813 IST|SSLCipher.java:1971|KeyLimit write side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:52.849 IST|SSLCipher.java:1817|KeyLimit read side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:52.850 IST|SSLCipher.java:1971|KeyLimit write side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:54.082 IST|Utilities.java:73|the previous server name in SNI (type=host_name (0), value=apple-pay-gateway-cert.apple.com) was replaced with (type=host_name (0), value=apple-pay-gateway-cert.apple.com) javax.net.ssl|FINE|01|main|2024-03-20 05:19:54.448 IST|SSLCipher.java:1817|KeyLimit read side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:54.448 IST|SSLCipher.java:1971|KeyLimit write side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|SEVERE|01|main|2024-03-20 05:19:54.453 IST|TransportContext.java:369|Fatal (CERTIFICATE_UNKNOWN): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ( "throwable" : { sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306) at sun.security.validator.Validator.validate(Validator.java:271) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:312) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:128) at sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1339) at sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1230) at sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1173) at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:376) at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:479) at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:457) at sun.security.ssl.TransportContext.dispatch(TransportContext.java:200) at sun.security.ssl.SSLTransport.decode(SSLTransport.java:155) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434) ... 24 more} } We've reviewed our server configuration and checked that the SSL/TLS settings are correctly configured. Additionally, we've ensured that the server's SSL certificate is valid and up-to-date.
Posted Last updated
.
Post not yet marked as solved
0 Replies
315 Views
I am working in India office and working on Apple Pay integration through Adyen; however, I am facing challenges in making the Apple Pay button show up, even with Mac/Safari. The Apple Pay button shows up for my US colleagues !! Is there any wholistic and recommended settings that make Apple Pay development feasible from India ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
340 Views
I want to create passes with Dynamic QR Codes which changes based on T-OTP. Google wallet do have this feature called RotatingBarCode, while there is nothing like this in Apple wallet. Can we do this by updating the passes? If yes, how? If apple wallet pass are getting updates using webServiceURL, how can we create the endpoint and what the body of get request will look like?
Posted Last updated
.
Post not yet marked as solved
0 Replies
260 Views
Case-ID: 6394971 Hi Apple Team, We are trying to implement “onvalidatemerchant” event, but we are facing below error. “System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host” below is the sample code what we trying. string validationUrl = https://apple-pay-gateway.apple.com/paymentservices/startSession; var sessionRequestBody = new ApplePaySessionRequest { merchantIdentifier = "merchant.com.onepay.onepaygo", displayName = "Apple Pay OnePay", Initiative = "web", initiativeContext = "portaldev.onepay.com" }; We are also added the merchant certificate. We have also tried other url: string validationUrl = https://apple-pay-gateway-cert.apple.com/paymentservices/startSession. Let me know if you need any other info.
Posted
by hkarer.
Last updated
.
Post not yet marked as solved
0 Replies
263 Views
Im encountering an issue with recurring payments using Apple Pay's tokenization system. The temporary token generated for a transaction isn't designed to be reused for recurring charges, which is causing problems for my merchant's monthly plan. Anyone find a workaround for this? is there a way to disable this temp token for my customers to buy a plan?
Posted Last updated
.