#leonardo89 - metered subscription

1 messages · Page 1 of 1 (latest)

karmic python
#

Hi there!

#

Can you share the link to the documentation page you mentioned?

steady mauve
#

yes

#

here they just attach the created payment method to the customer, just that

karmic python
steady mauve
#

ok so help me here,

#

first

#

1- create a customer

#

2- create a subscription with pending setup intent

#

and return to the client the client secret from subscription.pending_setup_intent

#

???

#

I dont understand, when i create the subscription the setup intent is created

karmic python
#

yes, that's exactly it! so what is your question exactly?

1- create a customer
2- create a subscription with pending setup intent
3- return to the client the client secret from subscription.pending_setup_intent

steady mauve
#

My question is if I need to create a setupintent and add to subscription.pending_setup_intent field???

#

or is created automatically

#

??

karmic python
#

No, the subscription automatically creates a SetupIntent for you in pending_setup_intent. Then you use the pending_setup_intent.client_secret on the frontend to collect the payment method.

steady mauve
#

mmm

#

and when the client confirms setup, all information is updated automatically??

#

I mean, the payment method is attached automatically, and the customer es updated whit the default payment method

#

??

#

and then the subscription object is updated automatically with this payment information??

karmic python
#

Yes, everything should be done automatically for you once the SetupIntent is successful.

steady mauve
#

perfect thank you very much