Is Shima Right for You?
Shima is a lightweight, high-performance Stripe API client library written in Rust. It is designed for developers who need a fast, type-safe, and minimal-dependency way to integrate Stripe payments into their Rust applications. With that being said, Shima is not suitable for all use cases. Here are some scenarios where Shima might be a good fit:
- You use Stripe for checkouts and customer management.
- You use Stripe for Subscriptions.
- You use Stripe for Webhooks regarding Subscriptions.
Benefits
- Shima compiles up to 10x faster than
async-stripe. - Fast
- Type-safe
- Minimal dependencies
- Easy to use
Getting Started
Add shima to your Cargo.toml file:
[]
= "0.1.0"
Usage
Generating a new shima client
// You can generate a client directly from your environment variables
// if you have `STRIPE_SECRET_KEY` set. This is preferred.
let client = from_env;
// Alternatively, you can load it from a string.
let client = new;
Creating a Stripe Customer
use ;
// Create a Customer in Stripe.
async
Purchasing Subscriptions / Checkout
use ;
// Create a Checkout Session for a Customer.
async
Manage Subscriptions / Customer Portal
use ;
// Let customers manage their subscriptions
async
Webhooks
todo!;