41 releases (21 breaking)

0.34.1 Feb 16, 2024
0.33.1 Feb 16, 2024
0.26.0 Dec 1, 2023
0.25.2 Oct 5, 2023
0.13.0-rc3 Mar 23, 2021

#149 in Web programming

Download history 2691/week @ 2023-12-23 5359/week @ 2023-12-30 10602/week @ 2024-01-06 7561/week @ 2024-01-13 8276/week @ 2024-01-20 9059/week @ 2024-01-27 6883/week @ 2024-02-03 7833/week @ 2024-02-10 7094/week @ 2024-02-17 6840/week @ 2024-02-24 9019/week @ 2024-03-02 7359/week @ 2024-03-09 7290/week @ 2024-03-16 8563/week @ 2024-03-23 8772/week @ 2024-03-30 5660/week @ 2024-04-06

31,694 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.14", 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

The latest supported version of the Stripe API is 2020-08-27. 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.

  • 0.14 - stripe version 2020-08-27
  • 0.12 - stripe version 2019-09-09

MSRV

We currently have 1.68.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

~5–24MB
~362K SLoC