#mad-dog_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/1374778401876869161
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mad-dog_api, 17 hours ago, 63 messages
- mad-dog_api, 1 day ago, 117 messages
Hi ๐
I'm looking at the request you shared. The Checkout session is created successfully.
This Checkout Session is being created by the Stripe Platform acct_1RRDK0B1YFysMDE9 for their Connected Account acct_1RP91vPUp2KLZelF. Because this is a Destination Charge, the Session is created on the Platform.
The Session is a Destination Charge because of this parameter being sent to the API
payment_intent_data: {
application_fee_amount: "14",
transfer_data: {
destination: "acct_1RRDK0B1YFysMDE9", // <- specifies the connect account as the destination
},
},
i get this error though
The specified Checkout Session could not be found. This error is usually caused by using the wrong API key or visiting an expired Checkout Session. Please make sure the Session is not expired and that the API keys used to initialize Stripe.js and create the Checkout Session are test mode keys from the same account.
What is the API request where you are getting that error?
What are you doing when you get that?
This is a successful request. WHERE is the error you shared occurring?
Are you trying to render the embedded checkout form?
missmatch
Ah yes, that is what I thought but I wanted to know when the error was generated
error generated from here
const { error } = await stripe.redirectToCheckout({
sessionId: response.data.session_id,
});
client side
the pk key was not matching the sk key
Okay yeah that is what I thought might be going on
That is just a different flavor of Checkout where you load the form in your website instead of sending users to the Stripe hosted site
where can i find this doc?
I want to flag that the method you are currently using stripe.redirectToCheckout has been deprecated since 2019 and we recommend using the approaches in the doc I provided above
instead of redirectToCheckout, what should i use?
You should use the methods we document here: https://docs.stripe.com/payments/accept-a-payment?platform=web
There are a set of tabs near the top of the doc. I recommend you either use the Stripe-hosted page or Embedded Form tabs to see how we recommend showing the Checkout page to your customers
The image is associated with the Stripe Product. You need to add an image to the Product object either in the Dashboard or using the API.
how to do it using api ?
You pass at least one image URL in the images parameter when updating the Product. Here's the API reference: https://docs.stripe.com/api/products/update?api-version=2025-04-30.basil#update_product-images
It should. I usually send local files from my laptop and that works too. But I recommend you test it out since you have the code right there.