#k__adam

1 messages · Page 1 of 1 (latest)

naive bearBOT
merry sinew
#

What are you trying to do specifically?

muted iris
#

For now just creating a simple application,

  1. user logins in to a page.
  2. Users sees 2 plans Annual, Yearly (getting this from stripe end point),
  3. users clicks on any of the plan.
  4. user is taken to the stripe checkout out page.
  5. user enters card details.
  6. on success user is redirected back to "payment succesful" page.

When the payment is successful in the stripe dashboard, under "customers" I see the customer created as a "guest".

merry sinew
#

So you would want to detect if you already have a Customer ID at Stripe for your customer. If not, pass customer_creation: 'always' to ensure a persistent Customer object is created: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer_creation

From there, just store it in your database alongside relevant customer information and you can use it to interact with the Customer on Stripe's side after the payment

muted iris
#

This is exactly what i wanted, thank you so much @merry sinew