You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amount in inputs are currently represented as i64 in this crate, but based on the Stripe docs, amounts are always positive (for the ones I've noticed so far: payment intents and refunds).
Amounts should be represented as strictly u64 for payment intent & refund inputs (there might be other places were this also applies, but these are the two(2) I've noticed).
Code snippets
No response
OS
macos
Rust version
1.69
Library version
async-stripe 0.21.0
API version
2022-11-15
Additional context
No response
The text was updated successfully, but these errors were encountered:
Thanks for opening an issue (and sorry for the reply, I am only now clearing some of the backlog here).
This is a limitation of how stripe choose to expose their API, which is done using OpenAPI, and has no concept of strictly positive numbers or even of sized numbers, only 'integers'. OpenAPI does allow encoding ranges (minimum and maximum) but Stripe does not include that information.
If this is something that is important to you, I would consider opening an issue with stripe/openapi and ask if they can expose that. I am going to close this in the mean time.
Describe the bug
Amount in inputs are currently represented as
i64
in this crate, but based on the Stripe docs, amounts are always positive (for the ones I've noticed so far: payment intents and refunds).To Reproduce
See the stripe docs for payment intents and refunds.
Expected behavior
Amounts should be represented as strictly
u64
for payment intent & refund inputs (there might be other places were this also applies, but these are the two(2) I've noticed).Code snippets
No response
OS
macos
Rust version
1.69
Library version
async-stripe 0.21.0
API version
2022-11-15
Additional context
No response
The text was updated successfully, but these errors were encountered: