Post not yet marked as solved
We have multiple domains that were about to expire and we've verified them without any issue but the Verify button is still present and active and the expiration date hasn't changed:
Found only one post related to our situation:
https://developer.apple.com/forums/thread/672279
Will removing and then adding them again fix this? We have multiple domains in this situation.
Post not yet marked as solved
Our apple pay integration with the gateway "Checkout.com" is succeeding from Checkout side & the amount is captured (withdrawn from bank account) and confirmed yet on the apple pay popup it fails with a "Payment not completed" error message. Any idea how to resolve this? This is on multiple devices (iPhones, MacBooks)
-The request in the headers is a success (200)
Post not yet marked as solved
I know Apple Pay recently added some new token types for unscheduled card on file use cases.
In my app, I attain the token from Apple Pay, and then I submit that token to my gateway for full payment anywhere from 1-12 hours later-- after the user had used up the service. The final payment is based on a usage of the service.
Do I need to use the ApplePayDeferredPaymentRequest token type for this kind of use case?
Post not yet marked as solved
By mistake i have added funds to apple developer account. How to bring back
Post not yet marked as solved
I am currently in the process of integrating Apple Pay into my website using the JavaScript SDK and have encountered a specific issue that I am unable to resolve.
I have successfully implemented the merchant validation part of the process; the merchant is being validated without any issues. However, I am facing a challenge with the onpaymentauthorized event, which is not being triggered. Instead, the session is getting canceled after the successful merchant validation.
Here are the details of the implementation:
SDK Used: Apple Pay JS SDK
Current Behavior: The merchant validation process completes successfully. However, the onpaymentauthorized event handler is not invoked, and the session is canceled.
Expected Behavior: After merchant validation, the onpaymentauthorized event should be triggered to complete the payment process.
I have checked the following:
The paymentRequest object configuration.
Browser compatibility (testing on supported browsers).
Network stability and configurations.
User interaction with the Apple Pay payment sheet.
Despite these checks, the issue persists. I would greatly appreciate any guidance or suggestions you could provide on what might be causing this issue and how to resolve it.
If there are any logs, code snippets, or additional information you require, please let me know, and I will provide them promptly.
Thanks
Post not yet marked as solved
Hello!
I am working on developing a POC for Apple Pay on the Web for my website. When I go to request an Apple Pay Payment Session, I am getting the following error in my logs:
apple pay javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I know it has something to do with the certificates, but I am not sure what I am doing wrong. I am not seeing a great deal of documentation on Apple's developer site. I am using a sandbox account to test with test cards, and using the test endpoint url. Is there a way to get a test Payment Session locally without verifying my websites domain?
I can provide more info if needed. Thanks!
Post not yet marked as solved
I tried to screen record the Apple Pay payment process but after merchant validation the payment authorization option disappears (not asking for touch id or password).
I could find anything related to this issue in apple pay docs or forums.
Can someone help or anyone else faced the same issue do let me know.
Post not yet marked as solved
https://applepaydemo.apple.com/payment-request-api
using this code can anyone help me to configure and code setup for apple pay web
Post not yet marked as solved
If the customer closes Apple payment sheet before validation is complete, the error appears.
It's not a big deal, but we are improving our performance, so I need to fix this annoying log:
My code to validate merchant works and is this (I'm using braintree with apple pay):
// Validate merchant
session.onvalidatemerchant = async event => {
// Do request
const response = await getApplePay()
console.log(response)
if (response.success) {
instance.performValidation({
validationURL: event.validationURL,
displayName: 'Bucked Up'
}, (err, merchantSession) => {
if (err) {
setLoadingApple(false)
session.abort()
return
} else if(merchantSession) {
session.completeMerchantValidation(response.data)
setLoadingApple(false)
}
})
} else {
setLoadingApple(false)
session.abort()
}
}
Post not yet marked as solved
Hi Team
I am trying to integrate apple pay into my system but session.completeMerchantValidation() is failing
Error
For generating merchant session I am using this url
https://apple-pay-gateway-cert.apple.com/paymentservices/paymentSession
In response i am getting merchant session but after passing that merchant session I am getting error as mentioned above in the image
I am stuck since 2 weeks but not getting any solution, your quick response will clear my blocker
Regards
Rutvij Doshi
Post not yet marked as solved
I have troubles sometimes (with slow internet connections) when the customers clicks on my Buy Now button, i got the error "Must crerate a new ApplePaySession from a user gesture hanlder..."
I removed some logics to shipping to nt make this too long, but essentially my code is:
export default function ApplePayButton({setLoadingApple}) {
// Effects
React.useEffect(() => {
// listen click
const button = document.querySelector('apple-pay-button')
if(button){
button.addEventListener('click', startApplePaySession)
}
return () => {
button.removeEventListener('click', startApplePaySession)
}
}, [])
// Methods
const selectStep = step => {
// Check if step is available
if (state.steps.allowed >= step) {
dispatch({
type: 'UPDATE_STEPS',
data: {
...state.steps,
current: step
}
})
}
}
const startApplePaySession = () => {
const apple = window.buckedup.payment_extensions.find(extension => extension.code === 'apple_pay')
if (window.ApplePaySession && apple) {
setLoadingApple(true)
let clientToken
if (window.braintree_config) {
const {
token
} = window.braintree_config
clientToken = token
}
window.braintree.client.create({
authorization: clientToken
}, (clientErr, clientInstance) => {
if (clientErr) {
setLoadingApple(false)
console.error('Error creating client:', clientErr)
return
}
window.braintree.applePay.create({
client: clientInstance
}, (applePayErr, applePayInstance) => {
if (applePayErr) {
setLoadingApple(false)
console.error('Error creating applePayInstance:', applePayErr)
return
}
const amount = state.totals.amount_due.amount
const appleSession = window.ApplePaySession
// Build request object
const request = applePayInstance.createPaymentRequest({
'countryCode': 'US',
'currencyCode': 'USD',
'merchantCapabilities': [
'supports3DS',
'supportsDebit',
'supportsCredit'
],
'shippingMethods': [],
'shippingType': 'shipping',
'supportedNetworks': [
'visa',
'masterCard',
'amex',
'discover'
],
'requiredBillingContactFields': [
'postalAddress',
'name'
],
'requiredShippingContactFields': [
'postalAddress',
'name',
'phone',
'email'
],
'total': {
'label': 'Bucked Up',
'amount': amount,
'type': 'final'
}
})
// Define ApplePayPaymentRequest
const session = new appleSession(3, request)
// Validate merchant
session.onvalidatemerchant = async event => {
// Do request
const response = await getApplePay()
applePayInstance.performValidation({
validationURL: event.validationURL,
displayName: 'Bucked Up'
}, (err, merchantSession) => {
if (err) {
setLoadingApple(false)
return
}
session.completeMerchantValidation(response.data)
setLoadingApple(false)
})
}
// Validate payment method
session.onpaymentmethodselected = async event => {
// Update totals
const totals = await postApplePayment()
const update = {
'newTotal': {
'label': 'Bucked Up',
'amount': totals.data.amount_owed
}
}
session.completePaymentMethodSelection(update)
}
// Request to track shipping user data
session.onshippingcontactselected = async event => {
// Extract user available
const dataShipping = event.shippingContact
let body
// Do first request to checkout endpoint
const responseData = await shippingService(body)
if (responseData.success) {
// Get Shipping methods
const body = {
combined_shipments: true
}
const responseMethods = await getMethods(body)
if (responseMethods.success) {
const methods = responseMethods.data.shipments
// Do request to update totals
const responseTotals = await postApplePayment()
const update = {
'newTotal': {
'label': 'Bucked Up',
'amount': responseTotals.data.amount_owed
},
'newShippingMethods': mappedMethods
}
session.completeShippingContactSelection(update)
}
}
}
// Authorize purchase
session.onpaymentauthorized = async (event) => {
applePayInstance.tokenize({
token: event.payment.token
}, async (tokenizeErr, payload) => {
if (tokenizeErr) {
console.error('Error tokenizing Apple Pay:', tokenizeErr)
session.completePayment(appleSession.STATUS_FAILURE)
return
}
const nonce = payload.nonce
const billing = event.payment.billingContact
const shipping = event.payment.shippingContact
const body = {
shipping,
billing
}
const response = await patchApplePayment(body)
if (response.success) {
// Process payment
const bodyBraintree = {
apple_pay: true,
payment_method_nonce: nonce
}
const responseBraintree = await postBraintree(bodyBraintree)
if (responseBraintree.success) {
// Define ApplePayPaymentAuthorizationResult
const result = {
'status': appleSession.STATUS_SUCCESS
}
session.completePayment(result)
location.href = `${API_URL}checkout/thank-you`
}
}
})
}
session.oncancel = (event) => {
console.log(event, 'session cancel')
setLoadingApple(false)
selectStep(1)
}
session.begin()
}
)
})
}
}
return (
<apple-pay-button buttonstyle='black' locale='en' type='plane' />
)
}
Post not yet marked as solved
How can I access Apple Pay sandbox transaction history?
Post not yet marked as solved
Hi,
I was wondering if it's possible to use our API (backend app) in between my website (frontend app) and Apple servers.
This means having a website (frontend app) with all the logic to present the Apple Pay button and handle ApplePaySession events, on the click to pay it communicates with our API (backend app), and that will communicate with Apple servers. Receiving the response and send it back to the front-end website.
With Merchant Identity Certificate set up for the API, and assuming that for the Domain validation, we need only the API domain as well.
As an example let's say that the website runs on https://website.example.com and the API on https://api.example.com, both as HTTPS. So the flow would be:
Website (frontend app) <-> API (backend app) <-> Apple server
Is this implementation possible?
Thanks!
Post not yet marked as solved
During the period from 2023/10/16 19:07 to 21:03, when I called the validationURL, I received an error message stating "certificate has expired."
I verified that my merchant identity certificate is not set to expire until 2024.
Additionally, validation has been successful at other times. What could be the issue?
Post not yet marked as solved
ApplePay.tsx
Sometimes when we load the Apple sheet for the first time, the onshippingcontactselected is not called at all, although there is a default address selected, when we try again it works.
In some cases as well the Apple sheet freezes, all the buttons become un clickable.
There are no errors.
I'm testing on Mac version 11.5.2.
please see the attached the code.
Post not yet marked as solved
Hi,
the certificate apple-pay-gateway.apple.com (https://developer.apple.com/documentation/apple_pay_on_the_web/setting_up_your_server) used for payments has expired :
Server Key and Certificate #1
Subject apple-pay-gateway.apple.com
Fingerprint SHA256: 19a1e3eeb0b13c3aefe03d4c02de6befb4200430ead97ee4150b3e0eaad89ec6
Pin SHA256: 38yRXBg6sU+IsJldFjKUj6TwTqkbVymXhyvMBWxMtV0=
Common names apple-pay-gateway.apple.com
Alternative names cn-apple-pay-gateway-tj-pod2.apple.com apple-pay-gateway-nc-pod1.apple.com apple-pay-gateway-nc-pod4.apple.com apple-pay-gateway-sh-pod2.apple.com cn-apple-pay-gateway-pr-pod3.apple.com apple-pay-gateway-pr-pod3.apple.com apple-pay-gateway-nc.apple.com apple-pay-gateway-tj-pod1.apple.com apple-pay-gateway-tj-pod2.apple.com apple-pay-gateway-pr-pod5.apple.com cn-apple-pay-gateway-nc-pod4.apple.com cn-apple-pay-gateway-pr-pod1.apple.com cn-apple-pay-gateway-sh-pod3.apple.com cn-apple-pay-gateway.apple.com cn-apple-pay-gateway-tj-pod3.apple.com apple-pay-gateway-nc-pod2.apple.com apple-pay-gateway-pr-pod1.apple.com apple-pay-gateway-pr-pod4.apple.com apple-pay-gateway-sh-pod3.apple.com cn-apple-pay-gateway-sh-pod1.apple.com cn-apple-pay-gateway-nc-pod3.apple.com cn-apple-pay-gateway-pr-pod2.apple.com apple-pay-gateway-nc-pod3.apple.com apple-pay-gateway-pr-pod.apple.com apple-pay-gateway-nc-pod5.apple.com apple-pay-gateway-tj-pod3.apple.com cn-apple-pay-gateway-pr-pod4.apple.com apple-pay-gateway-sh-pod1.apple.com cn-apple-pay-gateway-nc-pod5.apple.com apple-pay-gateway-pr-pod2.apple.com cn-apple-pay-gateway-sh-pod.apple.com cn-apple-pay-gateway-nc-pod1.apple.com apple-pay-gateway.apple.com cn-apple-pay-gateway-nc-pod2.apple.com cn-apple-pay-gateway-sh-pod2.apple.com apple-pay-gateway-pr.apple.com cn-apple-pay-gateway-tj-pod1.apple.com apple-pay-gateway-nc-pod.apple.com
Serial Number 0b2ffee60fc2a32e5046bf43075c1f89
Valid from Tue, 18 Jul 2023 10:53:06 UTC
Valid until Mon, 16 Oct 2023 11:03:06 UTC (expired 38 minutes and 13 seconds ago) EXPIRED
Trusted : No NOT TRUSTED
Post not yet marked as solved
Hi,
I am currently integrating Apple Pay into a subscription web app. Our payment processor is NMI. Everything is working for individual charges. However, I am unable to get recurring payments to work. I tried to re-charge the initial token but NMI returns "DO NOT HONOR". How do I get access to a rechargeable token?
The .onpaymentmethodselected event listener is only returning PaymentMethod: {type: "Credit"}. No token there.
I tried to utilize tokenNotificationURL but it seems like the webhook is never being triggered. I setup a custom endpoint on my node.js server and I utilzed Ngrok to tunnel to my localhost. I also tried webhook.site but none of these solutions received anything from apple pay. I also changed the recurring payment interval to "minute" to test if the token would become chargeable again after 60 seconds - which didn't work either.
How do I get access to a token that I can re-charge on a monthly basis?
Post not yet marked as solved
Trying to use Apple Pay with the Payment Request API, created a merchant validation with the following details:
URL: https://apple-pay-gateway.apple.com/paymentservices/startSession
Body: {"merchantIdentifier":"merchant.xxxxxxxxxxxxx","domainName":"labs.xxxxxxxx.com","displayName":"Mxxxxx"}
The response is:
cURL error 56: OpenSSL SSL_read: OpenSSL/1.1.1p: error:1409445C:SSL routines:ssl3_read_bytes:tlsv13 alert certificate required, errno 0
Any ideas why this could be?
Post not yet marked as solved
As per Requesting an Apple Pay Payment Session, i have got a session from Apple's Server, i am passing the same in the completeMerchantValidation function, still the Payment Sheet keeps on processing. After timeout interval it gets closed automatically.
I am using Sandbox Account and Production Environment.
What could be the reason for this?
Post not yet marked as solved
Hello everyone,
I would like to register a merchant with a merchant identifier, calling https://apple-pay-gateway-cert.apple.com/paymentservices/registerMerchant, but I am getting a 401 error.
The payment processing certificate and the merchant identity certificate (with name merchant.com.identity.us.test) have already been defined on the apple account account.
I am executing this post request:
curl -v --cert-type P12 --cert keystore.p12:passwordForMyKeystore -d '{"domainNames":["my-test-domain.com","my-live-test-domain.com"], "partnerMerchantName":"TESTMERCH1", "partnerInternalMerchantIdentifier":"test-merch-partner", "encryptTo":"merchant.com.identity.us.test"}' -H "Content-Type: application/json" -X POST https://apple-pay-gateway-cert.apple.com/paymentservices/registerMerchant
The keystore.p12 I am using in the above post request, has been created with the identity certificate (merchant.com.identity.us.test) and with the private key created when generating the CSR.
The response I am getting is this one:
* ALPN: server accepted http/1.1
* Server certificate:
* subject: CN=apple-pay-gateway-cert.apple.com; O=Apple Inc.; L=Cupertino; ST=California; C=US; serialNumber=C0806592; jurisdictionStateOrProvinceName=California; jurisdictionCountryName=US; businessCategory=Private Organization
* start date: Jul 17 17:32:39 2023 GMT
* expire date: Oct 15 17:42:39 2023 GMT
* subjectAltName: host "apple-pay-gateway-cert.apple.com" matched cert's "apple-pay-gateway-cert.apple.com"
* issuer: C=US; O=Apple Inc.; CN=Apple Public EV Server RSA CA 1 - G1
* SSL certificate verify ok.
* using HTTP/1.1
> POST /paymentservices/registerMerchant HTTP/1.1
> Host: apple-pay-gateway-cert.apple.com
> User-Agent: curl/8.1.2
> Accept: */*
> Content-Type: application/json
> Content-Length: 304
>
< HTTP/1.1 401 Unauthorized
< x-keystone-correlationid: cdcf1cc6-1f6f-4b92-bd6c-245a602bcaa3
< content-type: application/json
< content-length: 87
< date: Thu, 05 Oct 2023 08:28:18 GMT
< x-envoy-upstream-service-time: 14
< x-apay-service-response-details: via_upstream
<
{
"statusMessage": "Payment Services Exception Unauthorized",
"statusCode": "401"
* Connection #0 to host apple-pay-gateway-cert.apple.com left intact
}
Have I done anything wrong in generating the Keystore?
Kind regards,
Antonio.