#richard_20727
1 messages · Page 1 of 1 (latest)
Hello! What error are you seeing?
hey Karbi! Let me type it up real quick. But here is a link to the log: https://dashboard.stripe.com/test/logs/req_3dCLF2bg7ediVL?t=1696867467
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
and this was a link Rubeus gave me
https://stripe.com/docs/js/initializing#init_stripe_js-options-stripeAccount
And this is the error you're getting after changing your code to set stripeAccount?
In my JS i have:
const stripe = Stripe('<%= ENV['STRIPE_PUBLIC_KEY']%>');
and i've verified that that environment variable is correct with what's here: https://dashboard.stripe.com/test/apikeys
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Ah, so it looks like you haven't actually passed in /set the stripeAccount right?
Right now, you're only passing in the publishable key
i am in the paymentIntet creation
You also need to do it client-side though - otherwise we won't know which account to look at for the client-secret (like the error mentions)
and the PaymentIntent obj i'm trying to create looks like this:
Stripe::PaymentIntent.create(
{
amount: ,
currency: ,
description: ,
receipt_email: ,
application_fee_amount:,
},
{ stripe_account: stripe_account }
ok. so then i will pass that stripe_account as the option?
https://stripe.com/docs/js/initializing#init_stripe_js-options
Yup! It'll look somethign like this:
var stripe = Stripe('{{PLATFORM_PUBLISHABLE_KEY}}', {
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});