#svetidamir

1 messages ยท Page 1 of 1 (latest)

wintry sageBOT
lyric finch
#

hi! was there a specific part you're struggling with? which type of Stripe integration are you building/have built?

crude condor
#

Well I was writing a long message but I found it confusing, so I will try to explain it simple.

I have created a way to accept payments with the Token, and when a user enters his card details I create a token and create a cusomer and the a subscription based on that token.

Now with 3Ds as I understand I have to know the payment method and then create some Intent(I don't get this part) and then if the payment intent is success I get his ID as a token and use that token to subscribe the user to an item in Stripe.

lyric finch
#

well unfortunately Tokens are completely deprecated for a few years so you must have been using an old guide, so ultimately I think you'd need to throw out that code

#

it creates Subscriptions, and handles 3D Secure for you, and is really straightforward to implement

crude condor
#

oh, didn't know that. Was using code from our "Senior Developer", he told me that it is working perfectyl xD.

#

Thx for the help, I will write here if I get stuck, but as far as I see it is not that hard ๐Ÿ˜„

wintry sageBOT
crude condor
#

So I was going trough the integration that you send me and where do I get the user Credit Card info and create a customer for the subscription?

mellow breach
#

Hi! I'm taking over this thread.

crude condor
#

sure no problem,

so in the integration that karllekko send me the form is

<form action="/create-checkout-session" method="POST">
  <!-- Note: If using PHP set the action to /create-checkout-session.php -->

  <input type="hidden" name="priceId" value="price_G0FvDp6vZvdwRZ" />
  <button type="submit">Checkout</button>
</form>
mellow breach
#

You create a Checkout Session, and send the Checkout Session URL to your user. There they will enter their card information and the Subscription will be created when they submit the form.

crude condor
#

oooh, so I create a checkout session and redirect my user to my url where I ask for the credit card info and then accept the payment?

mellow breach
#

Yep

#

Checkout takes care of everything for you

crude condor
#

okay, so my checkout is in few steps.

First the user picks the product and picks the quantity, then the user creates an account and confirm his email. Now there is a screen where I say I confirmed his email, after that the payment window should show.

So basically I will create an checkout session when user press the I understand button on Email confirmed screen, and then it will take him to the checkout session.

Or

Should I create a checkout session in the beginning of the entire checkout(where he can chose the quantity and the product)

#

To be honest I'm asking what is a better practice in my case

mellow breach
crude condor
#

oh okay, I understand now. If I get confused along the implementation I will write in this chat ๐Ÿ˜„