Created
November 11, 2021 05:31
-
-
Save felipeclopes/81bbbd5be86f4fdf4cfdc89de166025c to your computer and use it in GitHub Desktop.
Create Promotional Codes on Coupons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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