#mad-dog_api

1 messages ยท Page 1 of 1 (latest)

noble parcelBOT
#

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

queen urchin
#

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
    },
  },
patent dew
#

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.

queen urchin
#

What is the API request where you are getting that error?

patent dew
queen urchin
#

What are you doing when you get that?

patent dew
#

req_ahaTtw6TXZYsIf

#

when i try to make a session checkout

queen urchin
#

This is a successful request. WHERE is the error you shared occurring?

patent dew
#

sorry

#

it was the public key on client issue

queen urchin
#

Are you trying to render the embedded checkout form?

patent dew
#

missmatch

queen urchin
#

Ah yes, that is what I thought but I wanted to know when the error was generated

patent dew
#

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

queen urchin
#

Okay yeah that is what I thought might be going on

patent dew
#

you said embedded checkout form

#

how its supposed to be done ?

queen urchin
#

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

patent dew
#

where can i find this doc?

queen urchin
#

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

patent dew
#

instead of redirectToCheckout, what should i use?

queen urchin
#

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

patent dew
#

ok

#

im getting this

#

how do i include an image ?

queen urchin
#

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.

patent dew
#

how to do it using api ?

queen urchin
patent dew
#

passing images like this would work?

queen urchin
#

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.