Crate tiny_twilio_stripe

Crate tiny_twilio_stripe 

Source
Expand description

ยงtiny_twilio_stripe

tiny_twilio_stripe is an extensible Actix-Web backend for generating Twilio Video tokens, and optionally initiating Stripe Checkout sessions.

ยงโœ… Features

  • ๐ŸŽฅ Generate secure Twilio JWT tokens for video rooms
  • ๐Ÿ’ฐ Optional Stripe Checkout endpoint
  • ๐Ÿ” Rate limiting with actix-governor
  • ๐Ÿงช Environment file support (.env, .env.production, etc.)

ยง๐Ÿ”ง Configuration

Start the app like this:

cargo run -- .env.production

ยงRequired .env values (Twilio)

  • TWILIO_ACCOUNT_SID
  • TWILIO_API_KEY_SID
  • TWILIO_API_KEY_SECRET
  • TOKEN_EXPIRY=3600 (optional, default: 3600s)

ยงStripe Settings (only if --features stripe is enabled)

  • STRIPE_SECRET_KEY
  • STRIPE_SUCCESS_URL=https://your.site/success?room={room}&identity={identity}
  • STRIPE_CANCEL_URL=https://your.site/cancel
  • STRIPE_CURRENCY=eur
  • STRIPE_UNIT_AMOUNT=1000
  • STRIPE_PRODUCT_NAME=Private Video Call

ยงRate Limiting

  • GOVERNOR_BURST=5
  • GOVERNOR_PER_SECOND=2

ยงโœจ Feature Flags

  • stripe: Enables the /api/create-checkout-session endpoint.

ยง๐Ÿ“š Modules

  • twilio โ€” Twilio token generation
  • utils โ€” Environment loader

ยงStripe (conditionally included)

  • stripe โ€” Stripe Checkout handler (only with --features stripe)

ยง๐Ÿ“„ License

MIT License ยฉ Holger Trahe

Modulesยง

stripe
twilio
utils