#Zakariya-update

1 messages · Page 1 of 1 (latest)

hazy steeple
#

hello @exotic sparrow, what specifically are you confused about?

exotic sparrow
# hazy steeple hello <@!835955095841669190>, what specifically are you confused about?

I made a MERN shopping app and I have previously integrated react-stripe-checkout in my app. It was the legacy version, now when I try to create a checkout from my cart I get a POST request error message in my console "This API is no longer supported in India" and I cannot complete a payment. Therefore I think it is best to migrate to the newer stripe implementation in my MERN app. But I have watched plenty of videos from the official YT channel of stripe but found none working and I am stuck with this for 4-5days now.

#

you can login with : id: david, pswd: 123456

#

currently the success page is not working due to a bug.

hazy steeple
#

India does not support the /v1/charges API any longer. So you should use the latest version of Checkout instead.

From the SO question, it's not clear to me how you're collecting the card details, but i'm guessing you're using the legacy version of Stripe Checkout to create a card token, then creating a charge with that token.

exotic sparrow
#

I have gone through each and every doc and after all the hit and trial I came here to ask.

hazy steeple
#

if you've tried going through that document, which section of the document are you having trouble with?

exotic sparrow
#

first in my cart page I am making a post request in useEffect hook to the server where the new implementation is to be done I am sending my cart products there afterwards I am stuck in the line_items: at first parameters were not given in the doc as in what all should be required for accepting a payment. If i correct that it says you need to create an account on stripe dashboard

#

None of this is mentioned in the doc one has to go very deep in the doc which is huge to go through.

#

If there was a simple integration of payment like if you click on the checkout button it takes you to the stripe hosted page, like for react-node implementation. In the YT videos from stripe team everything is split and quite complex to understand

river latch
#

Hi! I'm taking over this thread.

#

At a high level there are two main steps to use Checkout Sessions:

  1. Create a Checkout Session on your backend server
  2. Redirect your users to the Checkout Session url
    We have an interactive tutorial on how to do all of that: https://stripe.com/docs/checkout/quickstart
#

Can you clarify where you are stuck?

exotic sparrow
#

what exactly is "line_items"? @river latch

gaunt pelican
#

it's the details of the individual items you are selling, so that can be shown to the customer in the hosted Checkout page.

exotic sparrow
#

That I know, I am talking about the parameters, what exactly it needs , like If I have the products in my cart which user wants to buy so how or what are the things I need to provide in line_items?

#

And If the user is sent to the checkout page how, I am going to get the user address details>

gaunt pelican
#

I believe the docs cover this in detail, was there something more specific you have after reading them?
The line_items are what you sell, and the format of them is described in the docs and API reference. They use our concept of "Price" objects which is how you create the details of what you're selling in our API.