#chooke
1 messages · Page 1 of 1 (latest)
For Subscription with trial your will still collect payment info beforehand. Do you use Checkout or Elements?
elements
so i talked to one of the dev before and he suggested me to do it this way
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
it works , but im not sure how to handle the trial, since i need to charge them for subscription off-session
when the trial ends
Yes it's the correct guide. On the step to create Subscription you simply specify the trial parameters like this https://stripe.com/docs/billing/subscriptions/trials
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
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
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
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
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Hi @rose matrix do you have a follow-up question?
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
So you want to collect the payment details before creating a subscription?
yes
You can use SetupIntent to collect a payment method and use it in a subscription
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
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.