Skip to content

Instantly share code, notes, and snippets.

@felipeclopes
Created November 11, 2021 05:31
Show Gist options
  • Save felipeclopes/81bbbd5be86f4fdf4cfdc89de166025c to your computer and use it in GitHub Desktop.
Save felipeclopes/81bbbd5be86f4fdf4cfdc89de166025c to your computer and use it in GitHub Desktop.
Create Promotional Codes on Coupons
#!/bin/sh
a=0
while [ $a -lt <totalPromoCodes> ]
do
curl -s https://api.stripe.com/v1/promotion_codes \
-u <apiKey>: \
-d coupon=<code> \
-d max_redemptions=1 | jq ".code"
a=`expr $a + 1`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment