#dmi_apple-pay-connect
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1386651863738355783
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
This Payment Intent was created on account acct_1PYlVyKs781xbNKt. But you attempted to cnfirm it on acct_16I1kqIcWSSPnlgr
You need to specify the Connected Account ID in your confirm request
u mean to use the Connected AccountID on the confirm payment call?
when I tried this code. It is not showing the apple pay, instead its show create link code?
const stripe = Stripe('pk_test....', {
stripeAccount: 'acct_', // Connected account ID
});
Is Apple Pay enabled for that account?
Yes on the platform account yes.
You need to properly configure Apple Pay on the Connected Account
If Apple Pay is not showing, then something is wrong with the account configuration
I am checking one second please
May I know which option I should check on conencted account?
Does it have an Apple Pay domain registered that corresponds to the domain where you are hosting the Express checkout element?
Since you are using Direct Charges, the Connected Account must have a registered domain for Apple Pay
where do I enable on connected account - https://dashboard.stripe.com/acct_16HxfvHozpwNUrbx/test/payment-links
Also, I can use the same domain right? Because connected account may not have themeself a domain or a website.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You can use the same domain, yes. As for enabling the domain, I'm not sure if you can do that via the Dashboard but you can use the API https://docs.stripe.com/api/payment_method_domains/create.
You would pass the Stripe Account ID to make sure this domain is created on the Connected Account
Thank you for the info. I will use that.. Also, on the JS code..
Do I still need to configure the connectedAccount right like below?
const stripe = Stripe('pk_test_AQULtZwJAkYxpKhnW3udzFW9', {
stripeAccount: 'acct_16HxfvHozpwNUrbx', // Connected account ID
});
You need to do it for each API request
As we document here: https://docs.stripe.com/connect/authentication
similar above or different way,, sorry!
Okay, I will follow the doc.. One more question.
Since I create a PaymentIntent on server side.. Do I need to use this JS code or I can pass the payment intent ID here?
const options = {
mode: 'payment',
amount: 100,
currency: 'usd',
};
const elements = stripe.elements(options);
or
const elements = stripe.elements({clientSecret: serverSide.ClientSecret})
The Express Checkout Element is designed to be created first without the Payment Intent.
But if you already have the Payment Intent client secret you can juse use that
can I have a sample code or documentation for this?
I tried using it but got some errors.
What is the exact error you received?
It does not load on mobile browser. unfortunately, I could not recall the error.. But Apple PayButton does not show up..
do you have a sample code.. This is the .js code I currently use - https://stage.dwcore.com/applepay.js
Unfortunately without the exact error, I cannot provide further guidance
so in iPhone testing this js code.. How do I capture any erros that might occured?
I'm not sure. I recommend testing it with a desktop Safari browser and reviewing the console
You mean using MAC with safari for Apple Pay testing.. Does mini-mac work too
As long as you have a saved payment method for that safari browser
Oh okay, got it.. If I have saved my cards with Safari.. then I can use it.. got it..
Is it okay to expose the connected account Id and Stripe key via JS file for security reason I am asking?
The stripe key is the Publishable Key, right? pk_?
Okay that's fine.
okay, thank you! appreciated your help on this matter.
Only accounts with the right permissions already enabled can use the Acount ID
Got it.. Thank you @frail lance
Happy to help ๐