stripe-node
stripe-node copied to clipboard
Why is `url` nullable for Checkout Session object?
Describe the bug
Correct me if I'm wrong, I haven't found anything in the doc that says that url
can be null.
Is it correct, that url
is null in typings?
/**
* The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you're using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.stripe.com.`
*/
url: string | null;
#Why is statu
To Reproduce
See this file
Expected behavior
I expect it will be a string
instead of string | null
, but probably I misunderstood sth
Code snippets
No response
OS
macOs
Node version
Node v14.19.0
Library version
stripe-node v9.12.0
API version
2020-08-27
Additional context
No response
Thanks for the report @tyndria - we're going to reach out to the product team and see if this is intentional and then get back to you!
today i fall in that bug, when i hit stripe.checkout.sessions.retrieve , the url is comming null, so i dont know what to do yet.
The docstring for that property has been improved since this was open and now also says
This value is only present when the session is active.
When a Session is not active (completed, expired, canceled, etc.) the url
property is null.