I'm currently integrating Apple Pay with my payment provider, and I'm encountering a signature validation error during the payment flow.
Here's the setup:
I’ve verified that my Merchant Certificate is valid, and I'm able to initialize the Apple Pay session without any issues. Also this curl works fine
The Payment Processing Certificate was created by my PSP.
PSP claims that the payment token signature is invalid during the transaction phase, which prevents payment completion.
The parsed signature starts like this
0:d=0 hl=2 l=inf cons: SEQUENCE
2:d=1 hl=2 l= 9 prim: OBJECT :pkcs7-signedData
13:d=1 hl=2 l=inf cons: cont [ 0 ]
15:d=2 hl=2 l=inf cons: SEQUENCE
17:d=3 hl=2 l= 1 prim: INTEGER :01
20:d=3 hl=2 l= 13 cons: SET
22:d=4 hl=2 l= 11 cons: SEQUENCE
24:d=5 hl=2 l= 9 prim: OBJECT :sha256
35:d=3 hl=2 l=inf cons: SEQUENCE
37:d=4 hl=2 l= 9 prim: OBJECT :pkcs7-data
48:d=4 hl=2 l= 0 prim: EOC
50:d=3 hl=2 l=inf cons: cont [ 0 ]
52:d=4 hl=4 l= 995 cons: SEQUENCE
56:d=5 hl=4 l= 904 cons: SEQUENCE
60:d=6 hl=2 l= 3 cons: cont [ 0 ]
62:d=7 hl=2 l= 1 prim: INTEGER :02
65:d=6 hl=2 l= 8 prim: INTEGER :16634C8B0E305717
75:d=6 hl=2 l= 10 cons: SEQUENCE
77:d=7 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256
87:d=6 hl=2 l= 122 cons: SEQUENCE
89:d=7 hl=2 l= 46 cons: SET
91:d=8 hl=2 l= 44 cons: SEQUENCE
93:d=9 hl=2 l= 3 prim: OBJECT :commonName
98:d=9 hl=2 l= 37 prim: UTF8STRING :Apple Application Integration CA - G3
I'm looking for guidance on what could be causing this signature failure.
Does anyone know what else I can check regarding the merchant or payment processing certificates, private keys, or key usage that might cause Apple Pay signature validation to fail, even if the session initializes successfully? Domains are also verified.
Any help or suggestions would be greatly appreciated.
Apple Pay
RSS for tagDiscuss how to integrate Apple Pay into your app for secure and convenient payments.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
What am I missing in my checking for whether or not to offer Apple Pay on my website?
<script async crossorigin
src="https://applepay.cdn-apple.com/jsapi/v1.1.0/apple-pay-sdk.js"
></script>
...
<style>
apple-pay-button {
display: none;
}
</style>
...
<apple-pay-button buttonstyle="black" type="plain" locale="en-US" onclick="startApplePay('${APPLE_PAY_MERCHANT_ID}','${paymentForm.amount}');"></apple-pay-button>
So, the button is not displayed by default. I only change the style to displayed if:
window.onload = function() {
if (isApplePaySupported()) {
document.querySelector("apple-pay-button").style.display = "inline-block";
};
}
function isApplePaySupported() {
return (window.PaymentRequest &&
window.ApplePaySession &&
ApplePaySession.canMakePayments() &&
ApplePaySession.supportsVersion(applePayVersion));
}
Yet, once in a while a click comes through that tries to create a PaymentRequest with
const applePayMethod = {
"supportedMethods": "https://apple.com/apple-pay",
"data": {
"version": applePayVersion,
"merchantIdentifier": merchantIdentifier,
"merchantCapabilities": [
"supports3DS"
],
"supportedNetworks": [
"amex",
"discover",
"masterCard",
"visa"
],
"countryCode": "US"
}
};
and results in:
NotSupportedError, The payment method is not supported
What else might be "not supported" in the request for this particular user/device/wallet? In particular, that could be known immediately when the PaymentRequest is created, but before any payment instrument from the wallet is selected?
And, is there anything I could detect before showing the button?
Or, is it even possible for the button to be clicked by some kind of automation, even if it's not displayed?
Hello Apple Devs,
We’re currently trying to integrate Apple Pay on the web using Apple Pay JS. We've followed the official documentation closely, but we're running into a blocker during the merchantSession validation phase.
We successfully retrieved a merchantSession, which looks like this:
json
{
"displayName": "Our Name",
"domainName": "https://pay.ourdomain.co",
"epochTimestamp": ,
"expiresAt": ****************,
"merchantIdentifier": "",
"merchantSessionIdentifier": ",
"nonce": "",
"operationalAnalyticsIdentifier": our name "t:",
"pspId": "",
"retries": 0,
"signature": "*****************..."
}
Issue:
Shortly after initiating the session, we receive a cancel event with the following info:
ApplePayCancelEvent {
type: "cancel",
sessionError: {
code: "unknown",
info: {}
}
}
We're unsure what causes the cancellation. There are no clear error messages or hints in the logs to identify what went wrong.
What We’ve Checked:
The merchantSession is returned successfully from our backend.
The domainName matches our frontend domain (https://pay.durdomain.co).
The session hasn’t expired when tested.
We're using Apple Pay JS APIs as described in the documentation.
Help Needed:
What can trigger an ApplePayCancelEvent with an "unknown" error code?
Any insight or guidance would be deeply appreciated. Thanks in advance!
I am facing an issue with Apple Pay js while doing the integration
we are using reference
https://applepaydemo.apple.com/apple-pay-js-api
In this I can generate the merchantSession correctly
But when I pass that merchantSession in
session.completeMerchantValidation(merchantValidation) as per documentation
It is getting failed and also no appropriate error is being shown in the console
Hi Guys,
I am having an issue verifying a card when it is pending verification in the Apple Watch Wallet App and the iPhone Wallet.
When the user verifies the card in the wallets, they are redirected to verification in my APP. However, the problem is that I don't know which application is calling, whether it is the Apple Watch or the iPhone, because the URL sends me the same serialNumber from the PKPASS. It is impossible to know if the user wants to verify and activate the card on the watch or the iPhone.
Because I only receive the following information in the URL:
myapp://app-url?
passTypeldentifier=paymentpass.com.apple&action =verify&serialNumber=*****
The serialNumber is the same from the iPhone Wallet and the Watch Wallet.
func application(_ app: UIApplication, open url: URL, options:
[UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool
{
let source = options[.sourceApplication]
I try to retrieve the source, but it comes back null. It would be the only way to know the originating App.
Can someone help me solve this problem?
Topic:
App & System Services
SubTopic:
Apple Pay
Is there a way to allow ApplePay to make deferred payments to a suite of stores, or will each store need the user to initially approve a payment manually?
Topic:
App & System Services
SubTopic:
Apple Pay
Hello I'm getting an error when the Apple Pay sheet opens on a third party browser like Chrome when completeShippingMethodSelection is called
'DataCloneError: Failed to execute 'postMessage' on 'Window': #<Object> could not be cloned.'
I'm also seeing this warning when the apple pay sheet opens
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://applepay.cdn-apple.com') does not match the recipient window's origin
although I also see this warning on https://applepaydemo.apple.com/
Hi,
We are trying to make payment from ecomm merchant.
The last request during process is
{
"sessionData": {
"epochTimestamp": "1741082241",
"expiresAt": "1741092241",
"merchantSessionIdentifier": "SSH88312C485D_7E0DD10173",
"nonce": "3f6dc197",
"merchantIdentifier": "5F9BC6BAF8",
"domainName": "libertybank.ge",
"displayName": "Apple Pay Purchase",
"signature": "3080060000",
"operationalAnalyticsIdentifier": "Apple Pay Purchase:5F9BC6BAF8",
"retries": 0,
"pspId": "5F9BC6BAF8"
}
}
which is successfully validated
applePaySession.completeMerchantValidation(data.sessionData)
After this, the "oncancel" handler is triggered in applePay.
Please help us to understand what is wrong.
Please note the domain where the applepay button is located is at
txpg.libertypay.ge Which is successfully verified.
Hello everyone,
We're implementing Apple Pay on the web and are already live, processing transactions. However, we've noticed that occasionally the onlinePaymentCryptogram returned in the paymentData contains spaces, causing it to be rejected by acquirers.
Has anyone else encountered this issue? Any insights would be greatly appreciated.
Why did my sandbox test fail due to not being able to obtain the product list?
Topic:
App & System Services
SubTopic:
Apple Pay
Hi,
we are trying to verify our domain and we uploaded the file to our domain
{DOMAIN}/.well-known/apple-developer-merchantid-domain-association.txt and we can access it. But when we want verify the domain in your platform we can't do it and you see the message "Domain verification failed". How can we verified or if we need change something in our side to verify it?
thanks!
A team observed lots of timeouts from the Apple Pay session endpoint: https://apple-pay-gateway-cert.apple.com/paymentservices/paymentSession
Is it expected or some kind of an implementation issue from the caller side?
Thanks!
Topic:
App & System Services
SubTopic:
Apple Pay
We created apps for many credit unions in Canada. Some of those apps has the feature to directly add users' debit cards to Apple Wallet (which is called by Apple as "in-app provisioning"). The feature has been working fine for at least 6 years for many credit unions. Recently, after updating one of those existing apps, we found out that the in-app provisioning is no longer working. Found it very strange, as we didn't touch the code base related to this feature for a very long time. One thing we found out is that the option to add in-app provisioning entitlement is missing during generating "provisioning profile" for the app. Is this a misconfiguration by App? Or do we need to request for additional entitlement migration as mentioned in the page: https://developer.apple.com/help/account/reference/provisioning-with-managed-capabilities ? Apple, please help, it's rather urgent.
iOS 16 and earlier
On iOS 16 and earlier, Apple Pay on the Web required Safari—and all interactions with the Apple Pay API to come from the parent/top level page. In order to facilitate the Apple Pay button in an HTML inline frame (iframe), there will need to be cross frame communication between the child and parent pages. Cross frame communication should be secure and robust, therefore the use of postMessage for this purpose is recommended.
The expectation is for all communication with Apple Pay to occur from the parent page, so the iframe must relay all Apple Pay related events to the parent to handle. Some examples:
Apple Pay availability: The parent calls applePayCapabilities, then sends the message of the response to the iframe, which then uses the value to toggle the visibility of the Apple Pay button.
Apple Pay session: The iframe receives an onclick() event when the Apple Pay button is clicked and sends the message to the parent (providing details about the transaction). The parent create the payment request to obtain the session validation URL, and eventually receive session credentials and invokes completeMerchantValidation() to prevent the payment sheet. After the payment is authorized by the Payment Service Provider (PSP), the parent either:
Redirects the parent page to a payment success page; or
Sends a message to the iframe to complete the transaction flow itself.
iOS 17 and later
On IOS 17 and later, the iframe HTML element should include the allow="payment" attribute, which should facilitate the cross frame communications instead of needing a dedicated JavaScript library. This means all of the Apple Pay code/calls can reside in the iframe page—which is typically a hosted page from a Payment Service Provider (PSP), all the parent page—typically a merchant—has to do is add the attribute mentioned above to the iframe element.
Important: Regardless of the iOS version, the PSP/merchant always needs to make sure the parent page domain is the one registered in the Developer portal, and used in the request to generate a merchant session via ApplePaySession.
Cheers,
Paris X Pinkney | WWDR | DTS Engineer
Hello,
I'm experiencing an irregular issue with Apple Pay merchant domain verification. As you know, Apple requires domain verification every two months to maintain Apple Pay functionality.
The problem is that while the verification sometimes happens automatically without any issues, other times it fails to complete, even though the required file "apple-developer-merchantid-domain-association.txt" is correctly available on our server.
When automatic verification fails, the Apple Pay service becomes non-functional on our website, forcing us to perform a manual verification to restore the pending service.
Is it normal to encounter such inconsistent automatic verification processes?
What could be causing these intermittent verification failures, whereas manual verification always succeed? suggesting this might not be related to IP address restrictions described on the Apple documentation.
Thank you in advance,
What is the version policy for the Apple Pay SDK Javascript ?
The documentation refers to this link :
https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js
The future updates will overrride the file on that link ? Is there a way to be notified of any changes ?
We are using a previous version named v1 :
https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js
What are the risks not using changing to the lastesdt link ?
Thank you for your help.
So I'm wondering if Apple makes commission on those payments since they're made in the app. For example a user may pay another user to clean their car. This will be handled with Stripe Connect and their balance, payment history, etc will be displayed in the app.
Does Apple charge commission on that?
The section the app review guidelines that I'm refrencing is below, but I'm still a little confused.
3.1.3(e) Goods and Services Outside of the App: If your app enables people to purchase physical goods or services that will be consumed outside of the app, you must use purchase methods other than in-app purchase to collect those payments, such as Apple Pay or traditional credit card entry.
Topic:
App & System Services
SubTopic:
Apple Pay
https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentrequest/3955945-multitokencontexts
According to this document, I know that I can initialize a multiTokenContexts when initializing ApplePayPaymentRequest.
But I am now facing a tricky problem. If the user's order does not require multiTokenContexts, then I will not initialize this field when I first make ApplePayPaymentRequest. When the user is in the payment process, I may update multiTokenContexts. But this time, the update is not allowed, ApplePay will be cancelled and the payment will be closed.
For example, if the user's address in Apple Pay is different, I need to update multiTokenContexts to support the payment of goods to multiple merchants, which will generate an update of multiTokenContexts. MultiTokenContexts can be updated in the onshippingcontactselected method.
https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778009-onshippingcontactselected
My question is that from the beginning, there was no multiTokenContexts to update multiTokenContexts in onshippingcontactselected, which would cause the user to close the payment and need to manually click to pay again.
This user experience is not very friendly. Is there a better way for me to go from no multiTokenContexts to multiTokenContexts without interrupting the user's payment process?
We are on a .NET ecommerce site hosted on AWS on a windows 2012R2 server. We have apple pay for the web integrated on the site and the certificates (merchant id and apple pay) were set to expire shortly. We created a new merchant id and apple pay cert, however we are now stuck as the new merchant ID certificate doesn't appear to be working although the old one did. Note there have been no code changes. Basically the apple pay process is failing on the merchant validation.
Here are the steps we took:
Created a CSR in Keychain Access
Generated a Merchant ID cert in the Apple Developer account with that CSR.
Imported the Merchant ID cert back into Keychain Access and exported as a p12 file the cert and the private key used to generate the CSR.
Imported the p12 file into Windows 2012 R2.
I can see in our debugging that the new certificate is being loaded but a SSL/TSL connection couldn't be made. So it seems there is an issue with the cert.
Has anyone encountered this? I'm out of ideas at this point and under a lot of pressure from management to fix what was supposed to be a routine maintenance issue.
If anyone has any ideas, that would be greatly appreciated.
Dear Apple team and developers,
We integrated Apple Pay E-Commerce on our system and made successful transaction at January using following certificates.
Merchant Identity Certificate (generated from our Apple developer account)
Payment Processing Certificate (generated from our Apple developer account)
Payment Session Server Certificate (used following command and generated from apple-pay-gateway-cert.apple.com:443 test URL)
Command: openssl s_client -connect apple-pay-gateway-cert.apple.com:443 -key MIC_priv.key -cert MIC_merchant_id.pem -showcerts | openssl x509 -outform DER > apay_ident_trusted_cert_test.der
Root CA G3 (Downloaded “Apple Root CA – G3 Root” from https://www.apple.com/certificateauthority/ )
But at this month, we got new certificate problem (please check following) when we try to execute Apple Pay E-Commerce transaction.
Certificate 'C=US,O=Apple Inc.,OU=Apple Certification Authority,CN=Apple Application Integration CA - G3' is not valid Certificate.
What is this certificate? And Where can I download or generate this certificate from? Could you please advise/give us good information for this certificate problem?
Best Regards,
Bilguun Enkhbaatar
Topic:
App & System Services
SubTopic:
Apple Pay
Tags:
Developer Tools
Apple Pay on the Web
Apple Pay