I would like to create trial period to be used with stripe checkout session:
session = stripe.checkout.Session.create(
customer=customer.stripe_id,
payment_method_types=['card'],
line_items=[{
'price': "price_1HjynjHdAhQwSUAK",
'quantity': 1,
'tax_rates': ["txr_1Hkntg4yXtzmX", ],
},
mode='payment',
allow_promotion_codes=True,
success_url=request.build_absolute_uri(reverse('thanks')) + '?session_id=CHECKOUT_SESSION_ID}',
cancel_url=request.build_absolute_uri(reverse('index_payment')),
)
in the tripe.Subscription.create looks like we just need to add trial_end=1605387163, but it doesnt work in checkout session. I cant seem to find the way to do it even though I am pretty sure it is doable as displayed in this demo:

I appreciate if someone can help.