#Joel Pellaud

1 messages ยท Page 1 of 1 (latest)

wise shuttleBOT
crystal ermine
#

What do you mean by "using a connect account for a checkout"?

wicked oak
crystal ermine
#

Ah okie. In this guide you use your Platform's api key, with the Stripe Account header points to your Connected Account Id

wicked oak
#

Whenever I add the StripeAccount, I end up in the "Something went wrong" page instead of the usual Stripe checkout.
The console shows two errors related to the payment page, and related search results leads to api keys errors

crystal ermine
#

Let's zoom in the errored request. Do you have the request id? req_xxx

wicked oak
#

I have it

#

But I don't have access to the stripe account, so I don't know what I should ask for

crystal ermine
#

If you have the request id just paste here

#

it should be in the format req_xxx

wise shuttleBOT
simple spade
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

wicked oak
#

req_tLHBvR3oKgXFQn ?

simple spade
#

let me take a look

simple spade
#

I'm terribly sorry for the delay

wicked oak
#

So in

<script>
    var stripe = Stripe('@Model.StripePublicKey');

    stripe.redirectToCheckout({
        // Make the id field from the Checkout Session creation API response
        // available to this file, so you can provide it as parameter here
        // instead of the {{CHECKOUT_SESSION_ID}} placeholder.
        sessionId: '@Model.StripeSessionId'
    }).then(function (result) {
        // If `redirectToCheckout` fails due to a browser or network
        // error, display the localized error message to your customer
        // using `result.error.message`.
    });
</script>

I must update to something like var stripe = Stripe('@Model.StripePublicKey', new { stripeAccount: "acct_xxx"}); ?

simple spade
#

yes

#

but redirectToCheckout is deprecated

wicked oak
#

Can't find its replacement?

#

It looks like the server directly redirects to the checkout page now?

simple spade
#

you can send the url to the front end and do a redirection on the front-end if you prefer

wicked oak
#

I will check that, thank you for your time! ๐Ÿ™‚

simple spade
#

no worries

#

let me know if you need any more help

wicked oak
#

I might not be able to do the migration asap, in the meantime what is the exact syntax for the option part for the stripeAccount?

simple spade
#

var stripe = Stripe('@Model.StripePublicKey', { stripeAccount: "acct_xxx"})

#

you don't need the new

wicked oak
#

thank you, I'll try and come back if I get new issue

simple spade
#

sorry wrong thread

wicked oak
#

What is the difference?

#

oh

simple spade
#

my bad