#Shayan-payment-element-subscription

1 messages ยท Page 1 of 1 (latest)

compact fjord
#

Hi there ๐Ÿ‘‹ when you start a subscription with a trial, the first invoice generated is a zero-dollar invoice and as such you won't be able to use it to initialize the Payment Element.

You can create and use a Setup Intent instead though:
https://stripe.com/docs/payments/save-and-reuse?platform=web

slate bane
#

So first I'll create a subscription with default_incomplete, then create payment intent and get client secret and then get card from user, but how will I attach that card with customer?

compact fjord
#

No, you won't create a Payment Intent (that would charge the customer again), you'd use a Setup Intent instead. You specify the customer when you create the Setup Intent and it will associate the payment method with the customer as part of it being completed.

slate bane
#

got it now, thanks a lot toby ๐Ÿ‘Œ ๐Ÿฅณ

compact fjord
#

Happy to help!