Apple Pay

RSS for tag

Provide a fast, easy, and secure way for users to buy goods and services in your app or on your website using Apple Pay.

Posts under Apple Pay tag

183 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Which validation url should we use, startSession or paymentSession? How to use the correct one?
Issue Description In our Apple Pay integration process, the validation URL returned from the onvalidatemerchant callback is: https://apple-pay-gateway.apple.com/paymentservices/startSession However, according to Apple’s official documentation (reference link), the correct validation URL is: https://apple-pay-gateway.apple.com/paymentservices/paymentSession We are seeking clarification and assistance regarding the following issues: Issue 1 Will continuing to use the startSession URL cause problems or errors? Are there functional differences between the two URLs (startSession and paymentSession)? Does Apple still officially support startSession, or are we required to switch to paymentSession? Issue 2 We occasionally experience the following 400 error, even though the URL we use for validation is the one returned from the onvalidatemerchant callback: 400: { "statusMessage": "Payment Services Exception merchantId=*** not registered for domain=***.com", "statusCode": "400" } We have verified the following: Our Merchant ID and certificates are valid. All Apple Pay configuration details, including merchant domain verification and placement of the .well-known/apple-developer-merchantid-domain-association file, have been correctly set up and verified. However, we still encounter the error intermittently. Questions: If we need to transition to using paymentSession, how should we do this? Could this error be related to the use of startSession? If not, how should we troubleshoot further? Support Needed Confirmation and clarification on the proper usage and differences between the two URLs: startSession and paymentSession. Guidance on how we can investigate and resolve the 400 error to ensure that the Apple Pay validation process works consistently. We appreciate your assistance and support!
0
1
225
Jan ’25
Apple Pay bricht mit einem "AbortError" ab, wenn sich der Dialog für den Fingeprint-Sensor öffnet.
Wie finde ich die Ursache für den "AbortError" von Apple heraus, der nur in der Produktivumgebung auftritt. In der Testumgebung funktionert Apple Pay fehlerfrei. Es geht um eine Webintegration von Apple Pay mit dem apple pay SDK eine Version vor 1.2.0. Der Fehler tritt auf, wenn ich vom PaymentRequest object die Methode show() aufrufe. Es öffnet sich der Apple Pay Dilaog mit dem Fingerprint-Icon, doch nach einer Sekunde kommt direkt ein Ausrufzeichen und der Apple Dialog schließt sich wieder. Ich weiß, dass unsere Integration zu Apple Pay in der Produktivumgebung bei mehreren Kunden funktionerte. Das aktuelle Problem ist, dass die Fehlermeldung von Apple namens "AbortError" keinen Hinweis auf die Ursache liefert. Das ist startk verbesserungswürdig. Ein Betroffener Kunde ist z.B. der Kunde mit der Merchant ID ...(ist es sicher in diesem Forum eine merchantID zu posten?) Hier kann ich das Problem "AbortError" mit meine iPhone 16.7.8 jederzeit reproduzieren. Wo finde ich Support für Apple Pay?
1
0
155
Jan ’25
Receiving 401 since Friday 24th Jan 2025 from https://apple-pay-gateway-cert.apple.com/paymentservices/registerMerchant
we are experiencing an issue when making an HTTP call to: "https://apple-pay-gateway-cert.apple.com/paymentservices/registerMerchant". The response we are receiving back is HTTP Status Code 401 Unauthorized. We noticed the issues started around "Jan 24, 2025 at 9:51:46.327 am" and is still carrying on. Some other examples of when the calls failed: Jan 27, 2025 at 3:04:31.387 pm Jan 27, 2025 at 9:46:04.068 am Jan 27, 2025 at 3:36 pm All of the above dates and times are UK GMT +0 times. As the problem is around HTTP status code of 401 Unauthorised its tough to show what's actually happening. Like I stated above everything was working correctly before the 24th of Jan and nothing has changed or been modified on our side. I have even tried to do the following: Use the first set of Certs to perform a test Still returns 401 Delete a Cert and re generating them from scratch to perform a test with those set of Certs Still returns 401 I have just tried to process another HTTP call to the paymentservices/registerMerchant and I could inspect the headers of the request and im hoping this helps in your investigation. Headers: x-keystone-correlationid = 8f9a3c16-f78f-4f9b-9484-63190ef14a77 Date = Tue, 28 Jan 2025 10:00:43 GMT x-envoy-upstream-service-time = 4 x-apay-service-response-details = via_upstream We also found an article that has us a bit worried about this issue. Article here: https://developer.apple.com/news/?id=2x8awlvm States that Apple/Apple Pay will be making some changes to the ciphers in the coming months. With this article and the issues we seeing on Sandbox Environment we are worried that come the 4th of February as stated in the article that our Production Environment will be effected and we will stop being able to use Apple Pay so that gives us about a week to fix any issues/change code that might come out of it. Please could you come back with some information around the Article posted and if our Production Environment would be impacted.
1
0
316
Jan ’25
Apple Pay Test Environment - The Right Way
Hi team, We were wondering what's the correct way of configuring a test environment with Apple Pay. Not sure if this is explicitly mentioned in the documentation, but in order to avoid having the same certificates shared between test and production, should we have a different merchant identifier (and pair of certificates) for test purposes only? The above is the main question. However, two follow up questions: Do you know if payment processors usually allow the merchant ID to be configured, so that only payments generated with the prod certificates can be accepted? Is there any risk of someone getting hold of the certificates generated for the test environment (which are usually less safe than production) and using that to process payments in production?
2
0
280
2w
recurringPaymentRequest and Authorize.net
I am seeking clarification on recurringPaymentRequestwith Apple Pay. I am using the Apple Pay JS API to make a recurring payment request. My Payment processor is Authorize.net. The initial payment processes fine via the token. My question is, how can my web application process the subsequent payment? Authorize.net doesn't allow me to set up an ARB (Automated Recurring Billing) profile for Apple Pay tokens, unlike Credit Cards. How would I go about obtaining another token for the customer? I cannot find good documentation on the recurring billing setup with Apple Pay and Authorize.net anywhere. Thank you in advance for any guidance you can give me regarding recurring billing with Apple Pay. I created an endpoint for the tokenNotificationURL but I do not believe this endpoint receives POSTs when a recurring billing event occurs, and only other lifecycle events are logged. https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentrequest/3955946-recurringpaymentrequest/
0
0
195
Jan ’25
Wallet Extension show tips "Cannot Add Card"
When integrating the Wallet Extension, after clicking my app icon from the "From Apps on Your iPhone" list, I encountered the message: "Cannot Add Card. '***' is not responding. Wait a few minutes and try again. If the problem continues, contact the card issuer's customer service" instead of the configured login page appearing as expected. What could be causing this issue, and how should I resolve it?
1
2
267
Jan ’25
In App Provisioning PKErrorHTTPResponseStatusCodeKey=500
Hello, we are developing in app provisioning of our American Express network cards. After clicking add to apple wallet in our app, I launch the PKAddPaymentPassViewController and click next. It loads for a few seconds and then I get: [<private>] ProvisioningOperationComposer: Step '<private>' failed with error Error Domain=PKProvisioningErrorDomain Code=5 UserInfo={PKErrorHTTPResponseStatusCodeKey=500} Does anyone have any insight on what this error means?
0
0
227
Jan ’25
Error Domain=PKPassKitErrorDomain Code=2
This error occurs in Apple Pay Wallet In-App Provisioning Flow for Credit / Debit Cards When the data received from the PNO (Visa) is passed to PKAddPaymentPassRequest this error is seen in addPaymentPassViewController, in the finalize stage. Docs provide no clue as to what could be wrong. iOS 18.2.1 XCode 15.2 Error description mentions "unsupportedVersionError" Is the pass version not supported? Is the wallet version not supported? Is it an app implementation error or error in the data received from the PNO?
1
2
286
Jan ’25
Apple Pay Integration Issue: Payment Sheet Closing Immediately After Merchant Validation
I am facing an issue while integrating Apple Pay in my React.js application. The onvalidatemerchant callback works perfectly, and the merchant validation is successfully completed. However, after the Apple Pay session is validated, the payment sheet appears briefly and then closes immediately without triggering the onpaymentauthorized event. I have provided the relevant code snippets and API implementation below. I would greatly appreciate your insights on resolving this issue. import React, { useEffect, useRef, useState } from "react"; // Relevant imports const ApplePayButton = ({ paymentType, handlePayment, cartSummary }) => { const [applePaySession, setApplePaySession] = useState(null); const cartSummaryRef = useRef(cartSummary); useEffect(() => { cartSummaryRef.current = cartSummary; }, [cartSummary]); const setupApplePaySession = async () => { if (!window.ApplePaySession || !ApplePaySession.canMakePayments()) { console.log("Apple Pay is not supported on this device/browser."); return; } const paymentRequest = { countryCode: "US", currencyCode: "USD", merchantCapabilities: ["supports3DS"], supportedNetworks: ["visa", "masterCard", "amex"], total: { label: "Total", amount: `${cartSummaryRef.current?.total?.amount || "10.00"}`, }, requiredBillingContactFields: ["postalAddress", "email", "phone", "name"], }; const session = new ApplePaySession(6, paymentRequest); setApplePaySession(session); session.onvalidatemerchant = async (event) => { try { const response = await createAndValidateApplePaySession({ validation_url: event.validationURL, provider: "APPLE_PAY", }); if (response?.status && response?.data?.applePaySession) { const merchantSession = JSON.parse( response.data.applePaySession.session_details ); session.completeMerchantValidation(merchantSession); } else { console.error("Merchant validation failed: Invalid response."); } } catch (error) { console.error(`Merchant validation error: ${JSON.stringify(error)}`); } }; session.onpaymentauthorized = (event) => { console.log("Payment authorized:", event.payment); }; session.oncancel = () => { console.log("Payment cancelled."); }; session.onerror = (event) => { console.error(`Apple Pay error: ${JSON.stringify(event)}`); }; session.begin(); }; return ( <> {paymentType === "APPLE_PAY" && ( )} </> ); }; export default ApplePayButton; createAndValidateApplePaySession = async (data) => { const { validation_url } = data; const apiUrl = ${this.finixUrl}/apple_pay_sessions; const base64Credentials = Buffer.from(this.credentials).toString("base64"); const body = { validation_url, merchant_identity: process.env.FINIX_APPLE_PAY_MERCHANT_ID, domain: process.env.FINIX_APPLE_PAY_DOMAIN, display_name: process.env.FINIX_APPLE_PAY_DISPLAY_NAME, }; const requestData = { url: apiUrl, data: body, headers: { "Content-Type": "application/json", Authorization: Basic ${base64Credentials}, }, }; try { const response = await axios.post(requestData.url, requestData.data, { headers: requestData.headers, }); return response?.data; } catch (error) { console.error("Merchant validation failed:", error); return error; } }; Current Behavior: Apple Pay button renders successfully. Clicking the button triggers the setupApplePaySession function. The merchant validation completes successfully via the onvalidatemerchant callback, and a valid merchant session is received from the API. The Apple Pay sheet appears briefly and then closes immediately. The onpaymentauthorized callback is never triggered. Expected Behavior: The payment sheet should remain open after merchant validation, allowing the user to select a payment method and authorize the payment. The onpaymentauthorized callback should then be triggered to handle the payment token.
2
1
349
4w
Unable to push provision any cards to Apple Pay from our app
We have recently begun testing in our production environment and have been unable to push provision any cards, receiving a 500 error: default 11:15:59.136742-0300 PassbookUIService Response: https://pr-pod9-smp-device.apple.com:443/broker/v4/devices/SEID_NUMBER/cards 500 Time profile: 0.486102 seconds { x-conversation-id = "52463d9f488e428f829633a1518ea72d" Vary = "accept-language" Content-Type = "application/json" x-pod = "pr-pod9" x-keystone-correlationid = "058F11DE-839F-47AC-A623-741BF32CEA80" Date = "Thu, 16 Jan 2025 14:15:58 GMT" x-apay-service-response-details = "via_upstream" Content-Length = "81" x-envoy-upstream-service-time = "172" x-pod-region = "paymentpass.com.apple" } { statusCode = 500; statusMessage = "Broker Service Response exception"; } In 05/2024 we received an e-mail from applepayentitlementsapple.com confirming the granting of in-app provisioning entitlements for our production apps. We've already sent a feedback on Feedback Assistant. Here is the code to track: FB16344669. Also, we sent another e-mail to applepayentitlementsapple.com, Case-ID: 11317916, but we haven't received a reply yet. Can you help us? We are concerned, since our pre-certification starts on January 27th. Thanks in advance.
1
0
333
Jan ’25
[Apple Pay]how to update multiTokenContexts when PKPaymentRequestShippingContactUpdate method trigger
multiTokenContexts is defined as follows (https://developer.apple.com/documentation/passkit/pkpaymentrequest/multitokencontexts) You can assign a value when initializing PKPaymentRequest (https://developer.apple.com/documentation/passkit/pkpaymentrequest). However, in actual usage scenarios, when the Apple Pay address changes and PKPaymentRequestShippingContactUpdate (https://developer.apple.com/documentation/passkit/pkpaymentrequestshippingcontactupdate) is triggered, how to update multiTokenContexts? The documentation and code do not provide updates for this parameter. In contrast, Apple Pay on the Web provides newMultiTokenContexts as an update when ApplePayShippingContactUpdate (https://developer.apple.com/documentation/apple_pay_on_the_web/applepayshippingcontactupdate) is triggered. Has anyone encountered this problem? Would you happen to have any solutions? Thank you.
2
0
314
Jan ’25
[Apple Pay]how to update multiTokenContexts when PKPaymentRequestShippingContactUpdate method trigger
multiTokenContexts is defined as follows (https://developer.apple.com/documentation/passkit/pkpaymentrequest/multitokencontexts) You can assign a value when initializing PKPaymentRequest (https://developer.apple.com/documentation/passkit/pkpaymentrequest). However, in actual usage scenarios, when the Apple Pay address changes and PKPaymentRequestShippingContactUpdate (https://developer.apple.com/documentation/passkit/pkpaymentrequestshippingcontactupdate) is triggered, how to update multiTokenContexts? The documentation and code do not provide updates for this parameter. In contrast, Apple Pay on the Web provides newMultiTokenContexts as an update when ApplePayShippingContactUpdate (https://developer.apple.com/documentation/apple_pay_on_the_web/applepayshippingcontactupdate) is triggered. Has anyone encountered this problem? Would you happen to have any solutions? Thank you.
0
0
316
Jan ’25
Payment Services Exception when trying to create an Apple Pay Session
I'm trying to create an Apple Pay session for my website. I'm starting with curl for now, just to get proof of concept. curl --cert cert.pem --pass {passphrase} --header "Content-Type: application/json" --request POST --data '{"merchantIdentifier":"{merchantIdentifier}","displayName":"testDisplayName", "initiative": "web", "initiativeContext": "{domain}"}' https://apple-pay-gateway.apple.com/paymentservices/paymentSession This is the response I get back { "statusMessage": "Payment Services Exception merchantId={VERY-LONG-ID} not registered for domain={domain}", "statusCode": "400" } I'm not sure why this is happening. {domain} is in the form of sub.site.tld with no protocol, such as https, which matches what I see in the list of the domains in the merchant identity dashboard. The {merchantIdentifier} also matches what I see in the top right, but the merchantId in the response is something I don't recognize. It's a long string of characters that appears to be hexadecimal. I added the apple-developer-merchantid-domain-association file to my .well-known directory and the dashboard does report that the domain is verified. I am making the request from the web server that the domain resolves to, if that matters. I can't think of any reason this would be happening. I'm not sure where the long merchantId in the response is coming from. Does it matter that it doesn't match what I supplied in the request? As far as I can tell, I am using the correct merchantIdentifier. It matches the dashboard and the CN field of the certificate. I found this other post that seems to have a similar error: https://forums.developer.apple.com/forums/thread/671227 The main difference is a 417 status code instead of the 400 I got. But the problem here was that there was no payment processing certificate and I do have one of those. I haven't checked with my processor to verify that the certificate is published, but I will do that soon. I wouldn't expect that to matter. Maybe it does? What other reason could I be getting this error? Could it be a problem with my merchant identity certificate? It took a lot of effort to make it work. But I suspect it's fine, otherwise I wouldn't be getting a response from Apple at all. I can't think of any other possible problems.
1
0
286
Jan ’25
Credit card ICC Public Key Certificate retrieval
Hello! I have a requirement to read the ICC Public Key Certificate from an EMV credit card to implement a payment validation flow. Aa far as I understand, I can't use Core NFC for that task since it is not supposed to be used for reading sensitive credit card data and it might be rejected by Apple. I'm trying to use Tap To Pay as it seems to offer some general card details. Since Apple's documentation on this side is pretty limited, I'm struggling to understand what is a PaymentCardReader.Token and how can I create one? Can anyone please help me with setting up Tap to Pay?
1
0
321
Jan ’25
Authorizing Apple Pay via non-Safari browser fails to decode merchant session.
When attempting to authorize an Apple Payment on an iOS 18 device using the scannable code in a non-Safari browser (i.e. Chrome), the payment sheet displays briefly, then dismisses. This same exact implementation of Apple Pay on the Web works flawlessly in Safari, so this feels like a bug given that the merchant session works fine in Safari. The following errors were found in my iOS device logs: (PassbookUIService) Codable: Failed to decode Merchant Session Created: Error Domain=NSCocoaErrorDomain Code=4864 UserInfo={NSDebugDescription=<private>, NSCodingPath=<private>} (PassbookUIService) Session 29592: Fatal Error: Failed to decode merchant session created`
4
1
406
Jan ’25
Applepay merchant validation failing with error request failed with status code 417
I am implementing apple pay and the merchant validation is failing with error (error request failed with status code 417). I am using react js in the frontend and node js in backend, this is my code const httpsAgent = new https.Agent({ rejectUnauthorized: false, cert: fs.readFileSync( path.join(__dirname, "../../../certificates/merchant_id_prod.pem") ), key: fs.readFileSync( path.join(__dirname, "../../../certificates/merchant_id_prod.key") ), }); const data = { merchantIdentifier: "merchantId", displayName: "Check", initiative: "web", initiativeContext: "domain.com", }; const response = await axios.post(validationURL, data, { httpsAgent });
0
0
208
Jan ’25
In-App Provisioning Error
We have implemented In-App Provisioning, but when I start the tokenization process, I receive an error before the terms and conditions. We are testing with a version of the app on TestFlight. The error message is: Could not add card. Try again later or contact your card issuer for more information. Could you please help me?
0
1
275
Jan ’25
Can Apple Pay Transactions Be Integrated into a Third-Party Expense Management App?
Hello, I am developing a mobile application focused on helping users centralize and analyze their expenses. The app's key feature is to track transactions made through Apple Pay, providing users with a consolidated view of their spending across all linked bank cards or accounts. I have a few specific questions regarding the feasibility of this integration: Does Apple provide any official APIs or tools to access Apple Pay transaction data for third-party applications? Are there restrictions or guidelines for apps that aim to use Apple Pay to support expense tracking? What would be the best way to initiate a partnership or obtain further support from Apple for such a project? Your insights or direction on how to proceed would be greatly appreciated. Thank you for your time and guidance! Best regards, Amine
1
0
244
Jan ’25
Don't get the completed shipping contact after authorizaiton
We have get the response from Apple pay after the the customer doing the face ID & touch ID authorization. But the shiping contact is not complete, for examble: ` { "addressLines": [ "1************ kwy" ], "administrativeArea": "FL", "country": "", "countryCode": "", "emailAddress": "S*********le.com", "familyName": "******i", "givenName": "******m", "locality": "*******s", "phoneNumber": "+*******79", "phoneticFamilyName": "", "phoneticGivenName": "", "postalCode": "*****3", "subAdministrativeArea": "", "subLocality": "" },` as the documents said, it should be the completed shipping contact, but the country & countrycode is null https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypayment/1916097-shippingcontact
1
0
320
Dec ’24