#BRData
1 messages · Page 1 of 1 (latest)
Hello what is your weird error?
So I have implemented this:
My frontend is completely this: https://stripe.com/docs/payments/quickstart
The backend I changed from being a paymentintent to a direct charge as you can see above
Thank you for the info
This error is happening because you are creating the payment intent on your connected account but are initiating Stripe.js for your platform account. You will need to initiate Stripe.js for your connected account as well https://stripe.com/docs/connect/creating-a-payments-page?platform=web&ui=elements&destination-or-direct=direct-charges#add-stripe.js-and-elements-to-your-page
Basically you will want to set that same connected account ID in this parameter when initializing Stripe.js https://stripe.com/docs/js/initializing#init_stripe_js-options-stripeAccount
So i want it to be var stripe = Stripe('acct_xxxxx');
No
The first doc that I linked to shows it pretty well
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}'
});```
Sorry, thats what I saw in the link you sent me
You use your public key then specify the account ID
No worries, I get it can be hard to parse unless you've used it before
Ahh okay, so I need to send the account id to the frontend...
Is that a security issue?
Nope account IDs are safe to share. Other people can't do anything with them unless they have your login or secret key