#saarthi_90619
1 messages · Page 1 of 1 (latest)
hi soma , i want to create the subscription with the trial period of 15 days , what is the step by step process ?
should i proceed it with thorugh payment intent creation first but the problem is in trial period i cant be able to charge the customer's money , but if i create the payment intent first , payment intent will charge the money from the customer ?
what is correct way can you please tell
Do you want to use Checkout Session or the Payment Element for this?
i think payment element must be most suitable
as an backend side , what steps should i use
Then you first create the Subscription with trial_period_days set https://stripe.com/docs/api/subscriptions/create?lang=java#create_subscription-trial_period_days
And then in the response you will get a pending_setup_intent to collect payment information https://stripe.com/docs/api/subscriptions/object?lang=java#subscription_object-pending_setup_intent
So there's no need to create a PaymentIntent.
but without payment method of the customer what should i pass in the parameter default_payment_method
hi @acoustic onyx u there
Step 1: create the subscription with a free trial and no default payment method
Step 2: collect the payment details with the Payment Element and pending_setup_intent
Step 3: when the customer submit the form, the new payment method will be automatically set on the subscription
ok so ,
1 --> i create the subscription with free trial with no default payment method
should i give client secret to the front end , so that they will use it to collect the payment method and associate it with customer
2 . save the subscripiton id on my backend related to customer
3 . front end side will collect the payment information , and pass in the pending setup intent to complete the payment .
should i give client secret to the front end , so that they will use it to collect the payment method and associate it with customer
Yes, thepending_setup_intent.client_secret
what parameter should i pass to generate the client secret in subscription create api