#arvindsinghu-trial-after-payment
1 messages · Page 1 of 1 (latest)
I tried this
subscription = stripe.Subscription.create(
customer=customer_id,
items=[{
'price': price_id,
}],
payment_behavior='default_incomplete',
expand=['latest_invoice.payment_intent'],
promotion_code=promo_id,
trial_from_plan='true',
)
but this don't create the client scerate
for the stripejs
this automatically creates a trial for the user
even without accepting the card details
Right, so when you're attempting to create a sub with trials then the initial invoice is generated for $0 which doesn't necessarily require a payment method
then how can I give the trial to the user and pass the details to the stripe js
to add the card
basically, I need a flow where i can give trial to the user, who are new but we still store the card
and if the user already used the free trial, I need to accept the card
You can start with this flow and accept the payment method (without needing to create a sub)
https://stripe.com/docs/payments/save-and-reuse
And once that's done, then create a subscription
if I save a card, will the 3d secure works
?
I mean, let's say i save a card, now the user wants to make the purchase.
How 3d secure will work
if it needs 3DS, then it will trigger it while you're saving the card
where it will trigger
When you try to confirm the SetupIntent, Stripe.js should automatically load the modal to route the customers through 3DS flow
https://stripe.com/docs/payments/save-and-reuse?platform=web#web-submit-payment-details
You can use the example cards here to test the flow
https://stripe.com/docs/payments/save-and-reuse?platform=web#web-test-the-integration