Skip to main content

A tool to generate multiple Stripe promotion codes in bulk

Project description

Stripe Bulk Promocode Generator

A Python tool to generate multiple Stripe promotion codes in bulk.

Usage

You can run the tool in 3 ways:

  1. Using uvx:

First install uvx, then run

uvx stripe-bulk-promocodes
  1. Using pip then the command line:
pip install stripe-bulk-promocode-generator
stripe-bulk-promocodes
  1. Using pip then within a Python script:
pip install stripe-bulk-promocode-generator
from stripe_bulk_promocode_generator.main import create_promotion_codes

create_promotion_codes(
    coupon_id="your_coupon_id",
    num_coupons=10,
    prefix="PROMO"  # optional
)

Configuration

The tool requires a Stripe secret key. You can provide it in two ways:

  1. Enter it when prompted
  2. Set it in a .env file:
STRIPE_SECRET_KEY=your_stripe_secret_key

Features

  • Generate multiple promotion codes at once
  • Optional prefix for promotion codes
  • Automatic expiration after 1 year
  • First-time transaction restriction
  • Single-use codes (max 1 redemption)
  • Saves codes to a text file

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stripe_bulk_promocode_generator-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file stripe_bulk_promocode_generator-0.1.0.tar.gz.

File metadata

File hashes

Hashes for stripe_bulk_promocode_generator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7cf381c0e602d1c4e6a68046f5037d54350655929544b14bcd9b3ea45d20edf5
MD5 c6b1e02f624e2592d7afc190d653a631
BLAKE2b-256 a4930309073e4eee741ebb6dbf9aa6cbb53d14d15e0d9f87292d7416390ab295

See more details on using hashes here.

File details

Details for the file stripe_bulk_promocode_generator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stripe_bulk_promocode_generator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed28aa34b1b7773bbb8e9d5427098abbb882e55b66566b09e47ab6d948beddfd
MD5 f55ce61b6caf04fe5db8ab0b8a3b0bc2
BLAKE2b-256 a5736082abf967a2782127f6197a89d52acc4e7a7af2e8a93b5237e32af2a696

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page