#chooke

1 messages · Page 1 of 1 (latest)

stiff plinth
#

For Subscription with trial your will still collect payment info beforehand. Do you use Checkout or Elements?

rose matrix
#

elements

#

when the trial ends

stiff plinth
#

I think the Sub will generate an pending_setup_intent because it is treated as a Sub which doesn't require payment immediately. But let's try that

rose matrix
#

yes, i already have that done , but how do i charge them when the trial end , since this method activates the subscription without providing a payment method

stiff plinth
#

It's the flexibility. You would need to collect their payment method (via the pending_setup_intent probably) but it's up to you where and when to do that

limber shaleBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

bright tree
#

Hi @rose matrix do you have a follow-up question?

rose matrix
#

yes pls ,

#

so i could not understand what Orakaro meant by pending_setup_intent,
so my current problem is
how to deal with subscription having a trial period , i can currently create a customer and create a subscription for that cusomter then activate it by collecting the payment info during the payment using element , its all working ok
but when i have a trial period , the subscription is activated immediately , and i dont get a chance to collect the payment info , so when the trial ends i can charge them off-session

bright tree
#

So you want to collect the payment details before creating a subscription?

rose matrix
#

yes

bright tree
#

You can use SetupIntent to collect a payment method and use it in a subscription

rose matrix
#

i tried to do that ,but i couldn’t understand and got confused , so to create a SetupIntent i pass the customerID and type off-session
which returns a client secret , which then i can pass to the front end and use it with stripe sdk confirmSetupIntent , but im not sure about the next step

bright tree
#

Once the SetupIntent succeeded, a payment method is created and attached to the customer. The next step is to use the collected payment method to create a subscription.

rose matrix
#

ohh i just noticed that , so i just need to pass the default_payment_method when creating the subscription

#

thank you so much i will try it out