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.
Apple Pay
RSS for tagDiscuss how to integrate Apple Pay into your app for secure and convenient payments.
Post
Replies
Boosts
Views
Activity
For American Express cards, as of June 2024, no test cards from https://developer.apple.com/apple-pay/sandbox-testing/ can be added to the Sandbox Apple wallet and got this error. has reached out to Apple Pay Support.
The device region, test account, app store settings are all pointing to United States as region.
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?
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!!
Hi,
I am integrating the HCE-based API into our SDK.
Ideal flow
It is bit tricky to support card change (step 3 below) after field-detect/double click due to NFC action sheet. Ideally, the flow is:
User double-click.
App launch
"Hold near Reader" NFC instruction
(optional) User change card
User tap device to POS reader
payment succeed.
Approach A
If I follow the code snippet in CardSession, where it calls startEmulation after readerDetected, I could change card before that. However, the "Hold near Reader" NFC instruction is shown very late, during tap.
User double-click
App launch
(optional)User change card
User tap device to POS reader
"Hold near Reader" NFC instruction
payment succeed.
Approach B
If I call startEmulation after sessionStarted, I could show "Hold near Reader" NFC. However, I could not provide the optional capability to change card anymore.
User double-click
App launch
"Hold near Reader" NFC instruction
User tap device to POS reader
payment succeed.
Neither approach A or B provide optimal approach shown in Ideal flow.
Is this expected from CardSession that there is no option to startEmulation without the action sheet?
Is there a plan to improve startEmulation so that it could show "Hold near Reader" without the action sheet?
Thank you.
Hi,
I'm adding deferredPaymentRequest container to get MPan, but payment is now cancelled by Webkit, no other explanation
What is the next step to get mpan ?
Regards,
Louis
"deferredPaymentRequest": {
"deferredBilling": {
"label": "Deferred Payment",
"amount": "1.99",
"type": "final",
"paymentTiming": "deferred",
"deferredPaymentDate": "2024-06-1",
},
"managementURL": 'https://.../apmsim/pay/appleManagement',
"paymentDescription": "this is a paymentDescription",
}
I'm trying to upload my app with Tap to Pay on iPhone functionality. However, I'm getting error message "Profile doesn't include com.apple.developer.proximity-reader.payment.acceptance entitlement." I've confirmed many times that I have the distribution profile with this capability. Any idea what might be the issue? The development environment works perfectly.
There is coming vawe of SoftPOS class app, turning iPhone into regular payment terminal. so far Apple picks country by country, where the service is available. As for today limited number of regions, where Tap on Mobile is possible to use at all.
Beeing preparing for that vawe we are considering possibly integration scenario and found the following obstacle:
Originally it was possible to integrate as app to app, means Tap on Mobile to other apps, where both apps are installed separately on iPhone. But now Apple does not allowe to make integration as app to app, but only integration is possible by embedded libraries (special libraries are embedded in master app, and on the iPhone there is only one app, which covers also Tap on Mobile features).
1/ Do you know, what is the reason for such restriction to have only embedded libraries method to integrate (although originally it was possible to integrate as app to app, means Tap on Mobile to other app)?
2/ Do you think, Apple release again first integration as app to app, as they allowed originally?
Hello team ,
We have created a sandbox tester and added all the setting as per the guidelines but the sandbox tester account is blocked from adding the test card . All the test cards show as invalid card .
We are not able to able to add wallet from iCloud .
We are not able to sign into iTunes with the sandbox tester account .
Please help on how to resolve this .
Thanks in Advance
I have a Developer account with a Developer Role, although apparently without the stated ability to create my own Sandbox ID. So, our company's Administrator is trying to create one for me.
But each time he enters a new icloud.com address to create one, he gets the error,
"Your Apple ID or password was entered incorrectly."
(The example at the above link uses icloud.com, and that seems the natural place to do this. I'm assuming that since you can't actually create an icloud.com email without an Apple ID, that this sandbox creation process should be ok with the email not existing yet.)
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
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
});
};
does anyone have an example of the decrypted payload for an interac payment would look like? Couldnt find an example within the apple documentation
We are getting this error when processing our registration.
Payment Services Exception Domain check failed with the following errors. No domains were registered.\nDomain verification failed for pspId=1A014B2EC09DB380EE1D51FE4D116C801F62F29D74F2D93269FE554CA2E34656 domain=patient.moolah.cc url=/.well-known/apple-developer-merchantid-domain-association errorMessage=com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 4559 path $", "statusCode": "400"}
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?
Is it possible to use the deep link for the payment? As if I want to pay. I just click on the payment button and it will kick me out from my existing app and run the payment solution app like Paytm, GPay, PhonePe, etc and the user will make the payment and redirect to their previous app and get the payment status
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.
Hello everyone!
In our application, we have login via phone number (with an SMS code as a password) and the ability to add a bank card to Apple Wallet.
When logging in via phone number, upon receiving the SMS code, it automatically suggests filling in the input field. However, the field itself is not of type .oneTimePassword, and the SMS does not contain @domain, #code at the end (please look at the screenshot).
So, when adding a card to Apple Wallet, PKAddPaymentPassViewController is launched, where entering the code from the SMS is also required to activate the card. However, no autocomplete prompt for the SMS password appears when displaying this field.
Does anyone have information on why this is happening and how it can be implemented?
We couldn't find a descriptive reply for the following and we wanted to get additional feedback.
We've received a notification about using ApplePayRecurringPaymentRequest in Apple Pay JavaScript for recurring, installment and unscheduled payments.
On the page (https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrecurringpaymentrequest) we found a new object (see whole object below) and there are some questions about using and filling the parameters. I hope you will help us for making understanding.
The ApplePayRecurringPaymentRequest should be sent only in initial operation?
A phrase "required" is meant the parameter is mandatory?
Where can we take the lenth for each field?
Parameter regularBilling is applied for recurring, installment and unscheduled payments?
Parameter trialBilling is applied only for recurring payments?
If we sent the regularBilling or trialBilling Apple Pay will authorize a payment automatically without merchant's actions?
In which cases do we have to fill ApplePayLineItemType with value “pending”?
Parameter amount is whole sum of all payments or current only?
Parameter paymentTiming with value:
9.1 "immediate" - when does payment occur when the transaction is complete and sequent payments will occur only after merchant's actions?
9.2. "recurring" - what the different with "immediate"?
9.3. "deferred" - who and how will provide these payments in the future?
9.4. "automaticReload" - when should we use this value? (in description it's not clear)
If merchant can't provide recurringPaymentStartDate and recurringPaymentEndDate can we leave them blank or not send?
If merchant can't provide recurringPaymentIntervalCount can we leave them blank or not send?
Could you describe the usecase with using deferredPaymentDate?
Could you describe the usecase with using automaticReloadPaymentThresholdAmount?
Is billingAgreement mandatory parameter?
Can billingAgreement contain URL on agreement?
Is managementURL mandatory parameter?
What actions can user make on page via managementURL? And which cases are mandatory?
Is tokenNotificationURL mandatory parameter?
In which cases will we receive a request via tokenNotificationURL?
What kind of params specification should be in tokenNotificationURL (names, lenth, type, mandatory)?
dictionary ApplePayRecurringPaymentRequest
{required DOMString paymentDescription;
required ApplePayLineItem regularBilling;
dictionary ApplePayLineItem
Unknown macro: { ApplePayLineItemType type; DOMString label; DOMString amount; ApplePayPaymentTiming paymentTiming; Date recurringPaymentStartDate; ApplePayRecurringPaymentDateUnit recurringPaymentIntervalUnit; unsigned long recurringPaymentIntervalCount; Date recurringPaymentEndDate; Date deferredPaymentDate; DOMString automaticReloadPaymentThresholdAmount; };
ApplePayLineItem trialBilling;
dictionary ApplePayLineItem;
DOMString billingAgreement;
required DOMString managementURL;
DOMString tokenNotificationURL;};
no any exception message, the pay bottomsheet is disappear after i click 'pay btn'
my app is a flutter app, who can help me?