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.

Posts under Apple Pay on the Web tag

100 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Gathering Required Information for Troubleshooting Apple Pay In-App Provisioning or In-App Verification Issues
Hi, You're here because you've had issues with your implementation of Wallet Extensions for Apple Pay In-App Provisioning or In-App Verification. To prevent sending sensitive credentials in plain text, create a new report in Feedback Assistant to share the details requested below with the appropriate log profiles installed. Gathering Required Information for Troubleshooting Apple Pay In-App Provisioning or In-App Verification Issues While troubleshooting Apple Pay In-App Provisioning or In-App Verification, it is essential that the issuer is able to collect logs on their device and check those logs for error message. This is also essential when reporting issues to Apple. To gather the required data for your own debugging as well as reporting issues, please perform the following steps on the test device: Install the Apple Pay and Wallet profiles on your iOS or watchOS device. If the issue occurs on Mac, continue to Step 2. Reproduce the issue and make a note of the timestamp when the issue occurred, while optionally capturing screenshots or video. Gather a sysdiagnose on the same iOS or watchOS device, or on macOS. Create a Feedback Assistant report with the following information: The bundle IDs App bundle ID Non-UI app extension bundle ID (if applicable) UI app extension bundle ID (if applicable) The serial number of the device. For iOS and watchOS: Open Settings > General > About > Serial Number (tap and hold to copy). For macOS: Open the Apple () menu > About This Mac > Serial Number. The SEID (Secure Element Identifier) of the device, represented as a HEX encoded string. For iOS and watchOS: Open Settings > General > About > SEID (tap and hold to copy). For macOS: Open the Apple () menu > About This Mac > System Report > NVMExpress > Serial Number. The sysdiagnose gathered after reproducing the issue. The timestamp (including timezone) of when the issue was reproduced. The type of provisioning failure (e.g., error at Terms & Conditions, error when adding a card, etc.) The issuer/network/country of the provisioned card (e.g., Mastercard – US) Last 4 digits of the FPAN Last 4 digits of the DPAN (if available) Was this test initiated from the Issuer App? (e.g., yes or no) The type of environment (e.g., sandbox or production) Screenshots or videos of errors and unexpected behaviors (optional). Important: From the logs gathered above, you should be able to determine the cause of the failure from PassbookUIService, PassKit or PassKitCore, and by filtering for your SEID or bundle ID of your app or app extensions in the Console app. Submitting your feedback Before you submit to Feedback Assistant, please confirm the requested information above is included in your feedback. Failure to provide the requested information will only delay my investigation into the reported issue within your Apple Pay client. After your submission to Feedback Assistant is complete, please respond in your existing Developer Forums post with the Feedback ID. Once received, I can begin my investigation and determine if this issue is caused by an error within your client, a configuration issue within your developer account, or an underlying system bug. Cheers, Paris X Pinkney |  WWDR | DTS Engineer
0
0
163
Aug ’24
Gathering Required Information for Troubleshooting Apple Pay on the Web Merchant Issues
Hi, To ensure the issue is not caused by an error within your app or web service request, please review the Apple Pay Merchant Integration Guide. Additionally, please review the following technotes on Apple Pay: TN3173: Troubleshooting issues with your Apple Pay merchant identifier configuration TN3174: Diagnosing issues with the Apple Pay payment sheet on your website TN3175: Diagnosing issues with displaying the Apple Pay button on your website TN3176: Troubleshooting Apple Pay payment processing issues If the resources above don’t help identify the cause of the error, please provide more information about your app or web services to get started. To prevent sending sensitive credentials in plain text, create a report in Feedback Assistant to share the details requested below. Additionally, if the error is something we need to investigate further, the appropriate engineering teams also have access to the same information and can communicate with you directly within Feedback Assistant for more information, as needed. Please follow the instructions below to submit your report. For issues occurring with your native app or web service, perform the following steps: Install the Apple Pay profile on your iOS or watchOS device. If the issue occurs on Mac, continue to Step 2. Reproduce the issue and make a note of the timestamp when the issue occurred, while optionally capturing screenshots or video. Gather a sysdiagnose on the same iOS or watchOS device, or on macOS. Create a Feedback Assistant report with the following information: The serial number of the device. For iOS and watchOS: Open Settings > General > About > Serial Number (tap and hold to copy). For macOS: Open the Apple () menu > About This Mac > Serial Number. The SEID (Secure Element Identifier) of the device, represented as a HEX encoded string. For iOS and watchOS: open Settings > General > About > SEID (tap and hold to copy). For macOS: Open the Apple () menu > About This Mac > System Report > NVMExpress > Serial Number. The sysdiagnose gathered after reproducing the issue. The timestamp of when the issue was reproduced. Screenshots or videos of errors and unexpected behaviors (optional). Important: From the logs gathered above, you should be able to determine the cause of the failure from PassbookUIService, PassKit or PassKitCore, and by filtering for your SEID or merchant domain in the Safari Web Inspector. See Inspecting Safari on macOS to learn more. Submitting your feedback Before you submit to Feedback Assistant, please confirm the requested information above is included in your feedback. Failure to provide the requested information will only delay my investigation into the reported issue within your Apple Pay website. After your submission to Feedback Assistant is complete, please respond in your existing Developer Forums post with the Feedback ID. Once received, I can begin my investigation and determine if this issue is caused by an error within your web implementation, a configuration issue within your developer account, or an underlying system bug. Cheers, Paris X Pinkney |  WWDR | DTS Engineer
0
0
92
Aug ’24
Apple Pay ios 18 Scannable Code returns Service Unavailable
I have a working Apple Pay transaction page that works on Safari. But with the new ios 18 update and Apple Pay JS library. I see that a pop up sheet with the scannable code is shown on chrome browser. I tried that. Upon scanning the code with iPhone 15 pro max. The apple pay payment sheet is shown on the phone but with an error Service Unavailable. What do I have to do to make it work? What went wrong? I checked the logs and have no clue of what is failing.
1
1
101
1d
Add website icon to Apple Pay payment sheet
https://developer.apple.com/design/human-interface-guidelines/apple-pay#Displaying-a-website-icon This tells us to: If your website supports Apple Pay, provide an icon in the following sizes for use in the summary view and the payment sheet: But doesn’t tell us how to do that. Please advise what steps we need to take to make this happen. I've seen from both Stack Overflow and a developer support email that this is supposed to come from standard website "favicons", but I have these in place, and still no icon is appearing on the payment sheet. So, I guess I need a very detailed answer to exactly what name/size/shape is required. I have the following HTML in my page <head>, and the images referenced are found and do load when accessed directly: <link rel="apple-touch-icon" sizes="120x120" href="/payment/htdocs/images/logo--azmvdnow-blue-60x60@2x.png" /> <link rel="apple-touch-icon" sizes="180x180" href="/payment/htdocs/images/logo--azmvdnow-blue-60x60@3x.png" /> (An earlier, unanswered question that seems to be asking the same thing: https://developer.apple.com/forums/thread/723419 )
1
0
217
2w
Will changing organization affect our Apple Pay Certificates?
We are going through the process of changing the name of our organization in the Apple Developer Program due to a organization legal entity change. We provide Apple Pay mass enablement certificates to our clients (Apple Pay Merchant Identity and Apple Pay Payment Processing). Since the organization name is embedded into the certificate as part of the Subject, my question is: Will changing the organization name invalidate the existing certificates in any way? Or cause issues when renewing the certificates?
3
0
328
3w
Apple Pay button not appearing
On an older iPhone I'm testing with (6s, iOS 12.5.7), connected to the same Sandbox Apple ID that I'm using on multiple other devices, the Apple Pay button is not appearing. Neither on my web application, whatever version I set in the PaymentRequest, nor on the official demo site. Further, 2 sandbox cards that were added fine to these other devices are failing to add on this one. Same cards and CVV codes are getting errors. At least "Invalid Card" on one of them. Although the other failed several times, then just worked this time when I tried it again :confused: But on this phone, I have two cards successfully added, so the button should be appearing. On the demo site, whether I select Apple Pay JS API or Payment Request API, the button does not appear.
1
0
397
Aug ’24
Issue in the payment processing after the merchant validation
session.onvalidatemerchant = function(event) { const validationURL = event.validationURL; console.log("Validation URL:", validationURL); document.getElementById('methodapplepay').value = "validate"; document.getElementById('validationURL').value = validationURL; $.ajax({ url: 'ajax/processInternalDonate.php', type: 'POST', data: $("#payment_form").serialize(), success: function(dataValidate) { dataValidate = JSON.parse(dataValidate); session.completeMerchantValidation(dataValidate); }, error: function(xhr, status, error) { console.error('Merchant validation failed:', error); session.abort(); } }); }; session.onpaymentauthorized = function(event) { var payment = event.payment; $.ajax({ url: 'ajax/processInternalDonate.php', type: 'POST', data: {pay_mode:"pay_mode",method:"process_payment",payment:JSON.stringify(payment)}, success: function(dataprocess) { if (dataprocess.success) { session.completePayment(ApplePaySession.STATUS_SUCCESS); } else { session.completePayment(ApplePaySession.STATUS_FAILURE); } }, error: function(xhr, status, error) { console.error('Payment processing failed:', error); session.completePayment(ApplePaySession.STATUS_FAILURE); } }); }; from this above two session methods for the first method I got the merchant validation response from the API calling from that method but for the session.onpaymentauthorized when the second API is calling then I got the message payment not processed on my apple pay popup upon autorisation from my phone so I want that you provide me the correct backend flow for this API calling so we get the amount charged and I also got the payment object from event.object on logging in my console.
0
0
289
Aug ’24
Getting an MPAN, merchant token or merchantTokenIdentifier
We are trying to retrieve merchant tokens from ApplePay. We used the javascript codes from Apple Pay demo site to request for a recurring payment from the frontend. "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 was successful, but merchantTokenIdentifier is not shown in the in decrypted ApplePay token, regardless of test card used. We tried Visa and MasterCard.
0
0
230
Aug ’24
Payment not completed error
I am using a sandbox account, and I set United States in the region column (Settings>General>Language & Region>Region to US). I added test cards like (American Express and Visa) and the cards added successfully. But I am trying to pay then I get an error like "Payment Not Completed". Note: I am trying from India. Please let me know what exactly i am doing mistake here Following code i am using. function onApplePayButtonClicked() { if (!ApplePaySession) { return; } // Define ApplePayPaymentRequest const request = { "countryCode": "US", "currencyCode": "USD", "merchantCapabilities": [ "supports3DS" ], "supportedNetworks": [ "visa", "masterCard", "amex", "discover" ], "total": { "label": "Demo (Card is not charged.)", "type": "final", "amount": "1.99" } }; // Create ApplePaySession const session = new ApplePaySession(3, request); session.onvalidatemerchant = event => { // Call your own server to request a new merchant session. var merchantSession = merchantValidation(event.validationURL); session.completeMerchantValidation(merchantSession); }; session.onpaymentmethodselected = event => { // Define ApplePayPaymentMethodUpdate based on the selected payment method. // No updates or errors are needed, pass an empty object. const update = {}; session.completePaymentMethodSelection(update); }; session.onshippingmethodselected = event => { // Define ApplePayShippingMethodUpdate based on the selected shipping method. // No updates or errors are needed, pass an empty object. const update = {}; session.completeShippingMethodSelection(update); }; session.onshippingcontactselected = event => { // Define ApplePayShippingContactUpdate based on the selected shipping contact. const update = {}; session.completeShippingContactSelection(update); }; session.onpaymentauthorized = event => { // Define ApplePayPaymentAuthorizationResult const result = { "status": ApplePaySession.STATUS_SUCCESS }; session.completePayment(result); }; session.oncouponcodechanged = event => { // Define ApplePayCouponCodeUpdate const newTotal = calculateNewTotal(event.couponCode); const newLineItems = calculateNewLineItems(event.couponCode); const newShippingMethods = calculateNewShippingMethods(event.couponCode); const errors = calculateErrors(event.couponCode); session.completeCouponCodeChange({ newTotal: newTotal, newLineItems: newLineItems, newShippingMethods: newShippingMethods, errors: errors, }); }; session.oncancel = event => { // Payment canceled by WebKit }; session.begin(); }
0
0
292
Aug ’24
How to Adding credit or debit cards from a card issuer’s website
Hi, I understand that it's possible to add a virtual debit or credit card from a mobile app into the iOS Wallet using PassKit from the Apple SDK. However, I haven't come across documentation on how to achieve this directly from a web app. I found this article on Apple's support site (https://support.apple.com/en-gb/guide/security/secdc2567239/web), which mentions adding cards from a card issuer’s website, but it doesn’t provide details on the process. Could you please confirm if it's possible to add a card directly from a web app without using a mobile app? If so, could you guide me to the relevant documentation? Thanks in advance!
1
0
257
Aug ’24
Apple pay certificates Error "SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca, errno 0"
Hello everyone, **I created a certificat using openssl using the steps below ** Generate a Certificate Signing Request (ecccertreq.csr) Generate key pair in a key file Code openssl ecparam -genkey -name prime256v1 -out ecckey.key Generate CSR from key pair in key file Code openssl req -new -sha256 -key ecckey.key -out ecccertreq.csr -subj '/O=Nahdi Merchant Identity' Upload the Payment Processing Certificate CSR Download the Apple signed Payment Processing Certificate The certificate file (apple_pay.cer) appears in my Downloads folder Generate the .p12 file (ecckeystore.p12) Convert apple_pay.cer to PEM Code openssl x509 -inform DER -in apple_pay.cer -out apple_pay.pem Import merchant certificate and private key to generate .p12 Code openssl pkcs12 -export -out ecckeystore.p12 -inkey ecckey.key -in apple_pay.pem But I am getting this error when testing using the curl_test.php file and also when trying to make a payment on our website, we already have a working certificat for another merchant id and we don't get the same error Verbose info: cURL Error 56 - OpenSSL SSL_read: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca, errno 0 Verbose information * Trying 17.141.128.71:443... * TCP_NODELAY set * Connected to apple-pay-gateway.apple.com (17.141.128.71) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 * ALPN, server accepted to use http/1.1 * Server certificate: * subject: businessCategory=Private Organization; jurisdictionC=US; jurisdictionST=California; serialNumber=C0806592; C=US; ST=California; L=Cupertino; O=Apple Inc.; CN=apple-pay-gateway.apple.com * start date: Jul 24 19:05:42 2024 GMT * expire date: Oct 22 19:15:42 2024 GMT * subjectAltName: host &quot;apple-pay-gateway.apple.com&quot; matched cert&#039;s &quot;apple-pay-gateway.apple.com&quot; * issuer: C=US; O=Apple Inc.; CN=Apple Public EV Server RSA CA 1 - G1 * SSL certificate verify ok. &gt; POST /paymentservices/paymentSession HTTP/1.1 Host: apple-pay-gateway.apple.com Accept: */* Content-Length: 131 Content-Type: application/x-www-form-urlencoded * upload completely sent off: 131 out of 131 bytes * OpenSSL SSL_read: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca, errno 0 * Closing connection 0 code-block
1
0
393
Aug ’24
apple pay sheet shippingContact display issue
when i integrate apple pay to our website, i pass `ApplePayPaymentRequest ` like this: const paymentRequest = { countryCode, currencyCode, merchantCapabilities, supportedNetworks, total: { label: "Demo (Card is not charged)", amount: totalAmount, type: "final", }, requiredBillingContactFields: [ "postalAddress", ], requiredShippingContactFields: [ "postalAddress", ], shippingContact: { addressLines: ['402 Vinnie Brooks Suite 707'], administrativeArea: "NB", country: "Canada", countryCode: "CA", emailAddress: "qqq@qq.com", familyName: "gfhh", givenName: "dfg", locality: "W*********h", phoneNumber: "6******7", postalCode: "M*****4", }, }; but when apple pay sheet show, the shippingContact dispaly like this (it just show user name, not show the details): should i do what in order to display the details of the shippingContact, please help me. Thanks.
1
0
371
Aug ’24
Apple pay web authentication failed (SSL connection)
I have setup the server settings TLS, HTTPS I have performed the following steps but not working for me: 1. I have validated my domain 2. Generate Certificate Signing Request (CSR) using keychain. It created public and private key in MAC keychain 3. Uploaded CSR (from point 2) to apple Pay Merchant Identity Certificate. It gave me merchant_id.cer 4. Generated .p12 with merchant_id.cer, public and private key using keychain Now I am using this .p12 to create the ApplePaySession (paymentSession) using server side code in C# but getting error from apple side. Exception: The SSL connection could not be established Inner Exception: Authentication failed, The credentials supplied to the package were not recognized at System.Net.SSPIWrapper.AcquireCredentialsHandle Sample Code: var request = new MerchantSessionRequest() { DisplayName = "StoreName", Initiative = "web", InitiativeContext = "applepaypoc.xxxxxx.com", MerchantIdentifier = "merchant.com.xxxxxx.applepaypoc", }; string certPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot\\files", "NewP12.pfx"); X509Certificate2 certificate = new X509Certificate2(certPath, "xxxxx"); HttpClientHandler handler = new HttpClientHandler(); handler.ClientCertificates.Add(certificate); handler.SslProtocols = System.Security.Authentication.SslProtocols.Tls12; var resCode = string.Empty; using (HttpClient client = new HttpClient(handler)) { try { HttpResponseMessage response = await client.PostAsJsonAsync(request.ValidationURL, validationPayload); response.EnsureSuccessStatusCode(); resCode = response.StatusCode.ToString(); string responseBody = await response.Content.ReadAsStringAsync(); return responseBody; } catch (HttpRequestException e) { return $"resCode = {resCode} ///// Response Message: {e.Message} ///// Response Inner Exception: {e.InnerException.Message}"; } } **Ref: ** https://developer.apple.com/documentation/technotes/tn3103-apple-pay-on-the-web-troubleshooting-guide https://tech.justeattakeaway.com/2016/10/10/bringing-apple-pay-to-the-web/
2
0
538
Jul ’24
Payment Services Exception
调用 API 时,返回以下错误:Apple Pay 处理证书、Apple Pay 商家身份证书和商家域均已设置 { “statusMessage”: “支付服务异常 merchantId=1A9569E9792DB13B9BEE22EDB30515DE75D512B91A2C86C54D4065AD1ECC712E 未经授权代表 merchantId=4D08091EACD9C0D2E25CB94895D1B0DAE73970D6A517EF2988D6D929D1336DA1 reason=4D08091EACD9C0D2E25CB94895D1B0DAE73970D6A517EF2988D6D929D1336DA1 不是 WWDR 的注册商家,也没有通过 Mass Enabling 获得适当授权。 “状态代码”: “417” 连接到主机的 #0 apple-pay-gateway.apple.com 完好无损 }
0
0
262
Jul ’24
Need Apple Pay test cards for failed cases (insufficient balance, etc.) on sandbox environment
I am currently testing Apple Pay integration on my sandbox environment and I am in need of test cards for failed cases such as insufficient balance. Does anyone have access to or know where I can find Apple Pay test cards specifically for scenarios where transactions fail due to reasons like insufficient balance? Any help or guidance on this matter would be greatly appreciated. Thank you.
0
0
396
Jul ’24
Apple pay - determine active card
The documentation states canMakePaymentsWithActiveCard is deprecated but will continue to work on Safari browsers. The suggested method to use applePayCapabilities is in Beta. This is confusing for a developer! which method should be used. I do not want to use a 'Beta' version in a Production environment. On the other hand, I also don't want to use a method which is deprecated. Any help or guidance would be welcome. Thank you
1
0
443
Jul ’24