#matthias-adenin-purse_api
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/1357341803417833484
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hey there sorry for the delay
Do you have examples of the errors your encountering?
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.
req_qKdHyu4dAHXdQB?t=1743687334
Here's what I have in preview mode in f12 from the hostel form
hosted
That payment intent was creating using completely different accounts, so this is expected
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yes I might think the same
Thats the creation request, its using a connect pattern, with a different platform & connected account
But I dont know how to create the payment intent using the connected account
You already did that though
Using the Stripe-Account header/request option
You did this
Yes I did this I added stripe-account in header
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
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 ?
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