async-stripe
async-stripe copied to clipboard
add extra documentation about the trail end
Is your feature request related to a problem? Please describe.
When creating a checkout session, the trial_end is limited by 730 days. Although the lower limit is documented (48 hours) the upper-limit is not. A quick search of the Stripe API did not show any documentation regarding this upper limit.
I get the following error from the api:
RequestError {
http_status: 400, error_type: InvalidRequest,
message: Some("The maximum number of trial period days is 730 (2 years).")
Describe the solution you'd like
There are two possible solutions.
- Add Documentation about this upper limit to the
trail_end
parameter in the checkout_session - Include a small piece of code to make sure that the
trail_end
conforms to the upper and lower limit.
I am willing to help with these solutions.
Describe alternatives you've considered
No response
Additional context
No response
We do not have a way of injecting the documentation at the moment. My suggestion would be to create an issue with stripes openapi repo to ask them to document this properly
https://github.com/stripe/openapi
That way all projects that depend on these can benefit from these changes.