For the purposes of making test coupons call, you'll be using the coupons simulator in your Testing Pays account.
To open the simulator interface, login to your Testing Pays account and click "OPEN" on the "coupons" bookmark on your dashboard. You'll see the following sections in your simulator:
The simplest option is using cURL. To create a Stripe coupon, at minimum you need an id, duration and currency. Using cURL, you need to submit these parameters as you would with a form POST.
You can add more parameters to your coupons: max_redemptions, redeem_by, etc. this way you can limit how many times one can be redeemed and when your discount expired.
Next, your code needs to send the assembled request to the coupons simulator. The URL to POST to can be found under the "Integration" tab of the simulator - make sure to copy&paste this URL from your simulator as it contains your unique API_KEY.
The example shown below shows how to make a coupons request using cURL.
curl -X POST -u API_KEY: \
-d id=tp_1000 \
-d duration=once \
-d amount_off=25 \
-d currency=USD \
https://api.testingpays.com/API_KEY/stripe/v1/coupons
The simulator will send back a JSON object that contains information about the coupon - echoing back your call details along with the defaults
{
"id": "100",
"object": "coupon",
"amount_off": 25,
"created": 1550495718,
"currency": "usd",
"duration": "once",
"duration_in_months": null,
"livemode": false,
"max_redemptions": null,
"metadata": {},
"name": null,
"percent_off": null,
"redeem_by": null,
"times_redeemed": 0,
"valid": true
}