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.2.0.tar.gz (3.0 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.2.0.tar.gz.

File metadata

File hashes

Hashes for stripe_bulk_promocode_generator-0.2.0.tar.gz
Algorithm Hash digest
SHA256 24e038e2f5d996b9ec533823a50cf70a1481f34fc3389b8d33804898fd98afc0
MD5 864a042a61fc0b4b1fd5400f589bb24d
BLAKE2b-256 2449e9e615de931f487bca4a6d3398538311fa06d5e70c61a30505e8ac60c8e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for stripe_bulk_promocode_generator-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc14f5b0ec21d863e84ae804f1ead5b112c91ddaadc2f9cf02704d87c256f392
MD5 a67a03df347539ecaa6bd8b948848ad1
BLAKE2b-256 4840b971c47d5f9f4bdae5361f7a09413309a875b825635f67aa77c35e99b3ba

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