Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Async (and blocking!) Rust bindings for the Stripe API

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

arlyon/async-stripe

Repository files navigation

CIasync-stripe on crates.ioasync-stripe  on docs.rs

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

Note

We are currently working on a major rewrite of the library in thenext branch. This rewrite aims to make the library more efficient and easier to use. Some lovely numbers from the rewrite:

  • A clean release build ofexamples/endpoints goes from ~4m to 50s withmin-ser enabled.
  • The actual time to build just the binary goes from 75s to 7s, making incremental builds for code depending on async-stripe much faster.
  • Stripped binary size of theexamples/endpoints binary went from ~70MB to ~20MB, with further reduction to ~13MB using a fat LTO build.

We are actively seeking testers to help us ensure the new version is stable and performant. If you are interested in trying out the new version, you can add the following to yourCargo.toml:

[dependencies]async-stripe = {git ="https://github.com/arlyon/async-stripe",branch ="next" }

Your feedback is invaluable to us, so please report any issues or suggestions you may have. We are still expecting a few breaking changes before RC. We recommendusing the in-progressMigration Guide when upgrading.

Documentation

See theRust API docs, theexamples, orpayments.rs.

Installation

async-stripe is compatible with theasync-std andtokio runtimes and thenative-tls andrustls 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 conditionallyenable features as required to reduce compile times and final binary size.Refer to theStripe API docs to determinewhich 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.

usecrate::ApiVersion;
pubconstVERSION:ApiVersion =ApiVersion::V2023_10_16;

If you want to find a versionthat 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 have1.82.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 asthe rust version is not too new (generally 3 releases).

Contributing

SeeCONTRIBUTING.md for information on contributing to async-stripe.

License

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

Licensed under either of

at your option.

About

Async (and blocking!) Rust bindings for the Stripe API

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

 

Languages


[8]ページ先頭

©2009-2025 Movatter.jp