async-stripe icon indicating copy to clipboard operation
async-stripe copied to clipboard

add extra documentation about the trail end

Open BentEngbers opened this issue 1 year ago • 1 comments

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

BentEngbers avatar Sep 29 '23 16:09 BentEngbers

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.

arlyon avatar Oct 31 '23 15:10 arlyon