#matthias-adenin-purse_api

1 messages ยท Page 1 of 1 (latest)

fervent ploverBOT
#

๐Ÿ‘‹ 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/1357341803417833484

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

opaque jewel
#

hey there sorry for the delay

#

Do you have examples of the errors your encountering?

lament tangle
#

Yes

#

I encounter a 404

#

When trying to confirm payment

opaque jewel
#

If you're creating payment intents directly on connected accounts, you cannot use on_behalf_of -- the connected account is already the merchant of record using direct charges

#

Can you give me a request id? such as req_123

#

Please share some example requests and the code snippets that make these requests to help me understand. I think there's a misalignment here with what you're trying to do.

lament tangle
#

req_qKdHyu4dAHXdQB?t=1743687334

#

Here's what I have in preview mode in f12 from the hostel form

#

hosted

opaque jewel
#

That payment intent was creating using completely different accounts, so this is expected

lament tangle
#

Yes I might think the same

opaque jewel
#

Thats the creation request, its using a connect pattern, with a different platform & connected account

lament tangle
#

But I dont know how to create the payment intent using the connected account

opaque jewel
#

You already did that though

#

Using the Stripe-Account header/request option

#

You did this

lament tangle
#

Yes I did this I added stripe-account in header

opaque jewel
#

Ok, so then the confirm request needs to use the same pattern: making the request using the same platform and the same connected account in the header

lament tangle
#

Wait I think I found something

#

Because

#

In non hosted form workflow it works

#

And i just found this code

#

My hosted form is like this

#

const client_secret = 'pi_3R9nutClZwmeNsj01a6as1N0_secret_zmq2s4QgoEEr7oZRWmMkA9zS1'
var stripe = Stripe('pk_test_51QpBIoCXqXd7x3u5Tb4UBYGw0vU9eWTTJZj2HHQxOKHkL1NDuJnfPDGFeULMtPBoyEDB8FpNCuv99c4Zq4vE0Ffh00TPIxCXu6');
const elements = stripe.elements();
const style = {
base: {
iconColor: '#666ee8',
color: '#31325f',
fontWeight: 400,
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif',
fontSmoothing: 'antialiased',
fontSize: '15px',
'::placeholder': {
color: '#aab7c4',
},
':-webkit-autofill': {
color: '#666ee8',
},
},
};

const card = elements.create('card', {style, hidePostalCode: true});

#

Maybe i'm missing something ?

opaque jewel
#

Yes, two things:
1/ That PK is for the wrong platform, its not the same platform that created the payment intent
2/ Your Stripe('pk_test_123') initialization is missing the { stripeAccount: 'acct_123' } option

lament tangle
#

I found it !

#

Yes now it works perfectly !

opaque jewel
#

Excellent!

lament tangle
#

Thank you ๐Ÿ˜