Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add extra documentation about the trail end #445

Open
BentEngbers opened this issue Sep 29, 2023 · 1 comment
Open

add extra documentation about the trail end #445

BentEngbers opened this issue Sep 29, 2023 · 1 comment

Comments

@BentEngbers
Copy link
Contributor

BentEngbers commented Sep 29, 2023

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.

  1. Add Documentation about this upper limit to the trail_end parameter in the checkout_session
  2. 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

@arlyon
Copy link
Owner

arlyon commented Oct 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants