46 releases (24 breaking)

0.37.1 May 24, 2024
0.36.0 Apr 30, 2024
0.34.1 Feb 16, 2024
0.26.0 Dec 1, 2023
0.13.0-rc3 Mar 23, 2021

#123 in Web programming

Download history 7312/week @ 2024-02-15 6889/week @ 2024-02-22 8365/week @ 2024-02-29 7550/week @ 2024-03-07 7441/week @ 2024-03-14 8784/week @ 2024-03-21 8084/week @ 2024-03-28 7414/week @ 2024-04-04 8163/week @ 2024-04-11 6950/week @ 2024-04-18 6989/week @ 2024-04-25 6863/week @ 2024-05-02 7797/week @ 2024-05-09 8739/week @ 2024-05-16 7723/week @ 2024-05-23 6703/week @ 2024-05-30

32,138 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

4.5MB
77K SLoC

async-stripe

CI async-stripe on crates.io async-stripe  on docs.rs

Convenient rust bindings and types for the Stripe HTTP API aiming to support the entire API surface. Not the case? Please open an issue. We update our definitions every week to ensure that we are up to date. Want to see a changelog of the Stripe API? Look no further.

Documentation

See the Rust API docs, the examples, or payments.rs.

Installation

async-stripe is compatible with the async-std and tokio runtimes and the native-tls and rustls backends. When adding the dependency, you must select a runtime feature.

[dependencies]
async-stripe = { version = "0.31", features = ["runtime-tokio-hyper"] }

Feature Flags

Runtimes

  • runtime-tokio-hyper
  • runtime-tokio-hyper-rustls
  • runtime-blocking
  • runtime-blocking-rustls
  • runtime-async-std-surf

API Features

Additionally, since this is a large library, it is possible to conditionally enable features as required to reduce compile times and final binary size. Refer to the Stripe API docs to determine which APIs are included as part of each feature flag.

# Example: Core-only (enough to create a `Charge` or `Card` or `Customer`)
async-stripe = { version = "*", default-features = false, features = ["runtime-async-std-surf"] }

# Example: Support for "Subscriptions" and "Invoices"
async-stripe = { version = "*", default-features = false, features = ["runtime-async-std-surf", "billing"] }

API Versions

This library always tracks the latest version of the stripe API.

https://github.com/arlyon/async-stripe/blob/f0fd7115aa3b7500134da10f848c8e93ba8eca2e/src/resources/generated/version.rs#L1-L3

If you want to find a version that matches the API you are on, you can easily navigate back through the git blame in that file. Set the corresponding crate version depending on which version of the Stripe API you are pinned to. If you don't see the specific version you are on, prefer the next available version.

MSRV

We currently have 1.74.0 pinned in CI, so any version of rustc newer than that should work. If this is not the case, please open an issue. As a policy, we permit MSRV increases in non-breaking releases. If you have a compelling usecase for bumping it, we are usually open to do so, as long as the rust version is not too new (generally 3 releases).

Contributing

See CONTRIBUTING.md for information on contributing to async-stripe.

License

This project started as a fork of stripe-rs. We would not be here without them! :)

Licensed under either of

at your option.

Dependencies

~6–26MB
~351K SLoC