#Nadiya-Checkout

1 messages · Page 1 of 1 (latest)

sage harbor
#

Hi there, you mean you want to pre-populate the card details in Checkout page?

sour pendant
#

sorry, no! i'm using payment element. i would like to know if it is possible to create the customer and fill out the card details just like what we do in stripe checkout

sage harbor
#

You mean the last-4 digit or the full card number?

sour pendant
#

full card number

#

sorry, i don't meant fill out card number automatically

#

my current situation is like this

  • create customer first
  • create incomplete subscription object using the customer id from the above step and pass client secret to the front end
  • confirm payment intent
#

so, instead of creating customer first and do the remaining card details collections later, can't we collect them all at once?

sage harbor
#

OK, so the question about creating customer + confirming payment together, am I right?

sage harbor
#

I need to step away so I’m going to archive this thread. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

grand aurora
#

@sour pendant I reopened the thread.

sour pendant
#

thank you

grand aurora
#

If you are not using Checkout, then the recommended way to create a subscription is:

  • Create a customer and subscription on the backend
  • Use the payment_intent.client_secret of the subscription on the frontend to collect payment with Payment Elements
#

A subscription needs a customer, so you have to create the customer first and then the subscription.

sour pendant
#

we can create an empty (without any details) customer first, then update the customer info later (after confirming payment intent)?

grand aurora
#

Yes, that's possible.