I'm trying to use the simulator from Xcode to emulate an iPhone. I have created a sandbox account and logged in but pressing the Apple Pay button doesn't do anything. I have also tried the demo website for Apple Pay and that doesn't work either.
Does the simulator work at all for Apple Pay on the Web?
Apple Pay
RSS for tagProvide 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
162 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi,
I was implementing Apple pay button by checking active wallet and at least one cards active.
I am using applePayCapabilities as per DOCS but i am still getting the same type of response with apple pay wallet enabled and without apple pay wallet enabled on different devices as
Loading the Apple Pay SDK:
script.src = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js";
script.crossOrigin = "anonymous";
document.head.appendChild(script);
script.onload = function() {
console.log("Apple Pay SDK loaded successfully");
// Initialize Apple Pay or perform actions that require the SDK here
};
script.onerror = function() {
console.error("Error loading Apple Pay SDK");
};
Calling applePayCapabilities method:
window.ApplePaySession.applePayCapabilities("merchant.com.example").then(r => console.log(r))
Output:
{paymentCredentialStatus: "paymentCredentialsAvailable"}
Image attachments of applePayCapabilities:
Devices Config Used:-
Chip - Apple M3 Pro
macOs - Sequoia 15.0.1
memory - 36 GB
Safari Version - 18.0.1
Good day,
I'm attempting to check whether Apple Pay is available using the ApplePay JS API. Prior to upgrading to Safari 18.0+, I was using window.ApplePaySession.canMakePayments to show/hide the Apple Pay option.
I've noticed with the new Safari version, the preferred method of checking the availability of Apple Pay is by using the applePayCapabilities method.
When logging and inspecting the window object in Safari 18.0.1, this method seems to be missing from the ApplePaySession object.
Additionally, my conditional code which is dependent on applePayCapabilities does not execute:
if (typeof window !== 'undefined' && window.ApplePaySession) {
// Safari version 17 and lower
if (window.ApplePaySession.canMakePayments) {
// set Apple Pay available
}
/**
* On Safari version 18 and higher, we must check whether a user has a card saved in their wallet.
* If this is the case, Apple Pay must be presented as the primary payment method. In our case,
* this means selecting Apple Pay as the default payment method.
*/
if (window.ApplePaySession.applePayCapabilities) {
const merchantIdentifier = '***';
const promise = window.ApplePaySession.applePayCapabilities(
merchantIdentifier
);
promise.then(capabilities => {
switch (capabilities.paymentCredentialStatus) {
case ApplePayCapabilities.CREDENTIALS_AVAILABLE:
// set Apple Pay as available and default
break;
case ApplePayCapabilities.UNSUPPORTED:
// not available
break;
default:
// set Apple Pay as available only
}
});
}
}
I feel I'm missing something very simple here, help would be greatly appreciated!
Hi, I recently saw that ApplePay is supported on other browsers and also on computers other than Mac, but on my site I have ApplePay integrated and it doesn't work, do I have to do anything to have it activated on my portal?
I integrated it with Apple Pay API JS
I have a company with 100 merchants now if I want to create Apple Pay for each merchants do I have to have 100 developer accounts or is it possible to to create different merchant ids in one developer account ….i dont want to publish each merchants apps ,itll be purly for web based apple payment
I'm trying to enable merchant tokens in my test environment. I'm using the demo code below:
{
...
"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"
},
...
}
I'm able to see the recurring prompts in the payment sheet, but after processing I do not see the merchant token anywhere. I'm looking in the paymentData object and I do not see the merchantTokenIdentifier. I've tried using the Visa, Mastercard, Amex, and Discover test cards, but still no luck. I seen similar threads on these forums, but never with an answer.
Has anybody been able to test merchant tokens in sandbox?
Hi team, just a few general questions about Apple Pay:
If user removes card from wallet, then re-adds it, will it preserve its Merchant Token (MPAN) or will a new one be generated?
Is the DPAN the same as applicationPrimaryAccountNumber in this page: https://developer.apple.com/documentation/passkit_apple_pay_and_wallet/apple_pay/payment_token_format_reference
Can a user have the same card active simultaneously in two devices?
Thank you
Hi team @ Apple,
Is an MPAN always provided with an ApplePayPaymentToken?
I heard there are old devices that will provide only a DPAN. Is this correct, and do we need to support the case where only a DPAN is present?
I.e. what percentage of devices doesn't support MPAN?
Thanks
Hi Guys,
I have asp.net web application targeting framework 4.7.2 . The requirement is to integrate apple pay to the site as a payment method.
Can any one help me on the below queries.
As the development will be in visual studio, is it require to have a apple developer account. if yes, which subscription is required (individual/organization). I believe to obtain merchantID, payment processing certificate apple developer account is required but not sure like which subscription is required.
Is there any supporting document or code snippet to integrate apple pay in .net application.
Is it required to use browser safari or iphone or ipad for testing the apple pay? can the testing be done using chrome browser?
Is it a direct integration using c# code or do I need to use any third party payment gateway like stripe, authorize.
Thanks in Advance
Apple pay working as except with in a domain, when we tried to access in cross domain works with simulations wallet cards . when i try to using in real cards it fails.
did anyone encounter this issue? Thanks in advance for your help!
We have integrated Apple Pay in our web application via MasterCard Gateway. The testing is completed and now we need to move to production environment.
Can anyone guide what is the process to move to production environment?
Do we need to ask our client to create their own Apple Developer account to create merchant Ids and certificates?
Description
The Shortcut Automation Trigger Transaction frequently times out, ultimately causing the shortcut automation to fail. Please see the attached trace for details.
Additionally, the Trigger is activated even when the Transaction is declined.
Details
In the trace I see the error:
[WFWalletTransactionProvider observeForUpdatesWithInitialTransactionIfNeeded:transactionIdentifier:completion:]_block_invoke Hit timeout waiting for transaction with identifier: <private>, finishing.
Open bug report: FB14035016
In the case of YellowFlow with In-App verification, I understand we have to configure the Launch URL (deep linking) in the PNO portal to open the app from Wallet and proceed with In-App Verification. How do we identify or retrieve information about the card the user tries to verify from the wallet when the app is opened through deep linking?
I understand we can query for all secure passes and get the pass activation state to see if any of the passes require activation,
How can I verify this is the card the user is trying to activate from the wallet app?
What information can I receive from the PassKit SDK that I can send to the backend to identify, resolve, and activate the card?
Hello,
I have existing application that was created 2 years ago and we wanted to start developing wallet, but in order to do that I need to create new Identifiers with In-App Provisioning but unfortunately it is missing. Any idea on how to solve that?
Hi,
We have a bank app which can activate tokenized payment cards (in Requires Activation status) on Apple devices.
In my case some customers tried to activate their card token on their Apple Watch. Our card system gathered all the required card data with the PNO and sent them to our app. Our app called the PKPassLibrary.activate() method, but got back the Swedish localizedDescription "Oväntat fel" which means "Unexpected error" in English. We checked our card system logs and contacted our PNO, both found no issue and no explanation to the unexpected error. How can we identify the issue here? Can we somehow find a more detailed error log from Apple Server?
Best regards,
Adrian Lui
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.
I have an app that allows users to complete a video call and then bills them a per-minute charge for the length of the call. How can I automatically bill my app user using in-app purchase without prompting for approval?
I'm using Stripe on the web to complete an automatic purchase with the user's stored credit card. How do I accomplish the same thing on the web while on Apple device (or within my app) without prompting them for approval? They've already given approval by completing the call.
I am aware that I can create an in-app purchase product for the necessary "credits" but this will prompt them to complete the purchase which should instead be automatic. Thanks!
we want to get the last four digits of the real card number in apple Pay, and I found information about it in the document, link:
https://developer.apple.com/documentation/passkit_apple_pay_and_wallet/pksecureelementpass/3543366-primaryaccountnumbersuffix?language=objc
My question is how to use it,can you provide sample code? We are very anxious, thank you!
Hello:
After integrating the in app SDK, I was able to request product lists and initiate payments normally. However, when running on the emulator and using a sandbox account for payment, I did not receive any callback from the app after successful payment, and the payment would be automatically initiated again. What caused this problem? Is it a problem with the sandbox account or the simulator?
I hope to receive a reply as soon as possible.
Thank you very much!
We have a requirement to include Apple Pay In-App Provisioning in our Mobile Application and we have an API from Backend to get the tokenReferenceID for a given Card. I want to query the passes from Apple Wallet to see if there are any matches to the given tokenReferenceID before I can decide whether to show the “Add to Apple Wallet” button or not.
I went through all PassKit APIs but couldn’t find a way to query for passes with tokenReferenceID. We have primaryAccountIdentifier, deviceAccountIdentifier but which one should be used to match with tokenReferenceID?
Can someone please help me how to query the Wallet passes with tokenReferenceID using PassKit?