#VmC-php-checkout
1 messages · Page 1 of 1 (latest)
Hello! You should be able to set subscription_data.trial_end when you create the Checkout Session (https://stripe.com/docs/api/checkout/sessions/create?event_types-payment_intent.payment_failed#create_checkout_session-subscription_data-trial_end)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
'subscription_data' => [
"trial_period_days" => 7
],
does this way work?
Do I have to pass an assoc array ?
Yes, that should work!
Perfect, thank you!
Small problem
It is in romanian but
The checkout is working fine, detects the trial period
It fails to display the days
Zile gratuite means "X days free"
But the X (number of days) is missing
even though in the right part, it says it expires on 13th of october which is today + 7 days free
Hmmm... let me check really quick on my end
Can you share your checkout session ID with me?
cs_live_a1JNR5oRH3CL5AmYggiWly4k3ZOgCoDhBqXczf2ygVBgppKyi0s1L1uEPA#fidkdWxOYHwnPyd1blppbHNgWjA0TkxhZnJGSVF2V39AQEBTQE5OSDZ8anN9UUkxREM0PUZBdDxDU1dnR0Y2fGRWX0pwT31ocldgQWFXX1JuSUJxMkdAQVZuVU5fS0FnUmM1UXRGYXN3N1xTNTV8MEhNTmpcPScpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl
here it adds 78 days
7* sorry :))
But on the main title the days that are free of charge are missing
Yeah this looks like a translation issue - I'd recommend writing into support (https://support.stripe.com/contact) and flagging it there so that they can let you know when it's fixed
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.
Yeah, but it's still something off about the translation (because it works when I try it with an english locale)
So that means the whole string is translated including the number ?
It doesn't come as an INT + STRING
I'm not deeply familiar with how these translations work ( I would've also assumed it did INT + STRING), but I think something about that code is broken and they'll need someone to take a look
Would you please be so kind
To give me a ScreenShot of the checkout page with trial days using the EN locale?
The support staff on the website requested this