Apple Pay

RSS for tag

Discuss how to integrate Apple Pay into your app for secure and convenient payments.

Apple Pay Documentation

Post

Replies

Boosts

Views

Activity

Shortcuts | Transaction Automation | IOS 18
Hello forum, Hope all is great! I have a shortcut automation which uses the transaction trigger. Since updating to ios 18 the transaction trigger does not work anymore. Whenever a transaction is done, the “Running your automation” notification does not show up and the automation does not work. To share with you the steps I’ve done so far: 1.Remove the automation and do it again 2.Remove the card from apple pay 3. Delete and install again the shortcut app 4. Turned on and off the phone I can confirm the automation works on my other iPhone with the latest version of IOS 17. Would really appreciate if anyone has any insights about that, or if this happened to you as well. Cheers! Dorin
0
0
23
5h
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
I am getting error while await applePayClient.PostAsJsonAsync(validationUrl, validationPayload) I am testing it on local machine. Am I even can test this on local machine or not? Error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. validationUrl: https://apple-pay-gateway.apple.com/paymentservices/startSession JS C# code: var applePayClientHandler = new HttpClientHandler { SslProtocols = System.Security.Authentication.SslProtocols.Tls12 | System.Security.Authentication.SslProtocols.Tls13 }; var applePayClient = new HttpClient(applePayClientHandler); var merchantId = "merchant.com.xxxxxx.sandbox"; var _displayName = "Sandbox"; var domainName = "xxxxxx.co"; var validationUrl = request.ValidationURL; var validationPayload = new { MerchantIdentifier = merchantId, DisplayName = _displayName, Initiative = "web", InitiativeContext = domainName }; try { var response = await applePayClient.PostAsJsonAsync(validationUrl, validationPayload); var merchantSession = await response.Content.ReadAsStringAsync(); return merchantSession; } catch (HttpRequestException httpEx) { // Log detailed HTTP request/response information Console.WriteLine($"HttpRequestException: {httpEx.Message}"); if (httpEx.InnerException != null) { Console.WriteLine($"InnerException: {httpEx.InnerException.Message}"); } throw; }
0
0
15
5h
Apple Pay 115% limit
Hi. About to start integrating Apple Pay for the first time. Other gateways I've integrated have a limit from the initial authorisation, above which you can't capture payment. E.g. customer authorizes £100, but then adds items to their order taking the value to £120. Is there such a limit with Apple Pay? Is there a workaround without having to contact the customer again. Jon
0
0
30
1d
Apple Pay - canMakePaymentsWithActiveCard
The documentation says that, when calling the method canMakePaymentsWithActiveCard, the method asynchronously contacts Apple pay servers. My question is, if I want to whitelist the Apple pay servers, should I be referring to this list? https://developer.apple.com/documentation/apple_pay_on_the_web/setting_up_your_server#3172426
1
0
41
4d
Potential Apple Pay Notification Delay in iOS 18 Developer Beta
Potential Apple Pay Notification Delay in iOS 18 Developer Beta Users are reporting a delay in receiving purchase notifications in Apple Wallet after using Apple Pay. Transactions are confirmed within the Wallet app, but the notification arrives hours later. As this issue is occurring on the iOS 18 developer beta, it's likely a software bug related to Apple Pay integration with Wallet. I have reported this to Feedback. Is anyone else having the same problem?
2
1
156
1w
Wallet Passes generate unreadable qrcode
Hi, I work in a ticketing company and we used Wallet passes. Everything works great but some venues report that some qrcodes are unreadable. I have one example. All information is present but the qrcode could not be read. We tested multiple readers. The information in the qrcode is only numeric, so ti is not an encoding issue. What can cause this issue ?
2
0
125
1w
Ios 18 dev beta 1 - applepay not working
Iphone 14 pro. After installing ios 18 dev beta 1, i cannot use anymore the applepay. When i put the iPhone near the pos, i double click the per button, i choose the credit card i want to use, but nothing happens. Tried to change credit card, remove card from. Wallet and re add, nothing worked. it is a known bug ? Anyone else ? Workaround? I'm living in Italy Fabrizio
8
3
337
1w
Wallet pass default localization rules
There must be some rules that determine which set of localized strings of an Apple Wallet pass (.pkpass) is used when the choice is not obvious. For instance, I made a pass with localization folders ko.lproj (Korean) pl.lproj (Polish) zh-Hans.lproj (Chinese). If any of these languages is in my iPhone's preferred languages (Settings... General... Language & Region), then it's easy: the first one on that list is used. But what if the list does not have any of them? When I try, it seems the Chinese localization is chosen by the Wallet app. Without the Chinese localization folder, it is Korean. If I also add ar.lproj (Arabic) then Arabic is chosen. I can't discern any system here. How does Wallet choose the default localization?
1
0
137
1w
Hide ApplePay button on non supporting devices
Hi, I'm adding ApplePay to our website. It works perfectly. However, I want to hide the ApplePay button on devices that do not have an Apple Wallet configured. I am using the following code to verify this as per ApplePay documentation. function ShowApplePayButton() { if (window.ApplePaySession) { if (ApplePaySession.canMakePayments()) { if (ApplePaySession.canMakePaymentsWithActiveCard('visa') || ApplePaySession.canMakePaymentsWithActiveCard('masterCard')) { return true; } } } return false; } This function always returns true from a Mac with no wallet configured. So the applePay button is visible on the Mac. When I click on the ApplePay button, there is no option to add or update the Wallet. This is my ApplePay sample code function onApplePay() { if (!ApplePaySession) { return; } var grandTotal = "10"; // Define ApplePayPaymentRequest const request = { countryCode: 'GB', currencyCode: 'GBP', merchantCapabilities: ['supports3DS'], supportedNetworks: ['masterCard', 'visa'], total: { label: 'Total', amount: grandTotal, type: 'final' }, requiredBillingContactFields: ["postalAddress", "name", "phone", "email"], requiredShippingContactFields: ["postalAddress", "name", "phone", "email"] }; // Create ApplePaySession const session = new ApplePaySession(3, request); session.onvalidatemerchant = async event => { // Call your own server to request a new merchant session. const merchantSession = await getAsync("/test/ValidateMerchant", "", "json") session.completeMerchantValidation(merchantSession); }; session.onpaymentmethodselected = event => { const update = { newTotal: { label: 'Total', amount: grandTotal, type: 'final' } } session.completePaymentMethodSelection(update); }; session.onshippingmethodselected = event => { const update = { newTotal: { label: 'Total', amount: grandTotal, type: 'final' } }; session.completeShippingMethodSelection(update); }; session.onshippingcontactselected = event => { }; session.onpaymentauthorized = event => { const result = { "status": ApplePaySession.STATUS_FAILURE }; const payment = event.payment; aj.post('/test/ProcessPayment', body, function (response) { if (response.approved) { session.completePayment(ApplePaySession.STATUS_SUCCESS); } else { session.completePayment(ApplePaySession.STATUS_FAILURE) } }, function (xhr, ajaxOptions, thrownError) { console.log(thrownError); }, true, 'json'); }; session.oncancel = event => { // Payment canceled by WebKit }; session.begin(); } Could you please suggest a workaround to resolve this issue?
2
1
110
1w
Intermittent merchant validation
Hello, I've recently created a merchant ID and added two domains to it. I placed the verification .txt files in the right place (under the .well-known dir) and both verified successfully and show as such in the merchant id setup page. I am intermittently getting the following error: { "statusMessage": "Payment Services Exception merchantId=XXXXX not registered for domain=my.domain.com", "statusCode": "400" } (merchantId and domain have been masked in the above error) -- What's odd is that this is intermittent -- It'll work fine, and then stop and start giving the above error, and then start working fine again, with no intervention from me. Some context: This is a single server application, so it's not like we've got a server out of sync somewhere. Thoughts? Any thoughts?
3
2
199
2w
Grace Period Not Working - App Store Server Notifications
I'm working in Apple's Sandbox environment to implement in-app purchase of an auto-renewable subscription. I followed the instructions at this link in order to Enable Billing Grace Period: https://developer.apple.com/help/app-store-connect/manage-subscriptions/enable-billing-grace-period-for-auto-renewable-subscriptions. However, when I receive an App Store Server Notification for when the user's billing method fails (DID_FAIL_TO_RENEW), it includes no information about the gracePeriodExpiresDate and we never get a GRACE_PERIOD_EXPIRED notification. Logs showing App Store Server Notification not reflecting Grace Period Enabled. I enabled grace period in App Store Connect like three weeks ago, so it's not a delay there. What can I do to test out Billing Grace Period? Is this just an Apple bug?
1
0
183
3w
Issues with Apple Pay Issuer integration
Hello, I am having issues with Apple Pay for issuers. I am not able to get passes from my Apple Watch. I am 100% sure that my Apple Watch is paired, and debug logs show that a remote pass library exists. The issue is that I have my card added on both my phone and watch, and I always get a blank passes array for my Apple Watch. This is the code I am using: let localPasses = PKPassLibrary().passes().compactMap { $0 as? PKSecureElementPass } let remotePasses = PKPassLibrary().remoteSecureElementPasses When the card is already added to my phone, when I tap the "Add to Apple Wallet" button on in-app provisioning, I still get a choice to add the card to either my phone or watch, which is not correct. I am getting the FPANID from the other pass in my wallet and setting it on PKAddPaymentPassRequestConfiguration.primaryAccountIdentifier, which according to the docs should be all that is required. Any help is appreciated! Thank you.
0
0
116
3w
Backend integration
Hello, I started to integrate App Store Server Notifications and App Store Server API, both sandbox, on backend and I have encountered the following problems: App Store Server Notifications: After a payment is done on mobile, apple sends a notification to our backend which contains a JWT, the problem is that JWT seems to be incomplete and I can't decode it to see the details. App Store Server API: After a payment is done on mobile, mobile sends to our backend the transaction id, we use that id to make a request to App Store Server API in order to receive details about the transaction, but again the JWT received seems to be incomplete having at the end 3 dots. Any idea why both of them are incomplete?
0
0
152
3w
How to Setup For Apple Pay Later for testers testing my code?
Hello! For Apple Pay, I'd like to disable the option for a customer selecting Apple Pay Later (tab). In Swift, very easily modify the PKPaymentRequest with: if #available(iOS 17.0, *) { paymentRequest.applePayLaterAvailability = .unavailable(.itemIneligible) } However, how can this be setup to test that it works? Very easily add sandbox account, and test cards, but not so easy to enable Apple Pay Later, or documented so the end user (tester) can test it. Anyone know how to go about setting this up? Thanks!!
0
0
203
4w