Skip to content

Search API reference

Find an endpoint or a guide of the Sovgate API reference and jump straight to it.

Create a coupon

Create a discount.

POST/v1/coupons

Create a discount.

Endpoint

http
POST /v1/coupons

Request body

NameTypeRequiredDescription
namestringRequiredShown on receipts and invoices.
discountobjectRequiredtype and its value, as on the coupon object.
durationenumRequiredonce, repeating or forever.
duration_monthsintegerOptionalRequired for repeating.
productsarray of stringsOptionalOnly these products. Default: every product.
max_redemptionsintegerOptionalUses in all.
redeem_bytimestampOptionalIts last moment.

Example request

bash
curl -X POST https://api.sovgate.com/v1/coupons \  -H "Authorization: Bearer sov_sk_test_your_key" \  -H "Idempotency-Key: dd751c3d-4b2a-4c1d-9e3f-2a77e5f47e6b" \  -H "Content-Type: application/json" \  -d '{  "name": "Launch 20% off",  "discount": {    "type": "percent",    "percent_bps": 2000  },  "duration": "repeating",  "duration_months": 3,  "max_redemptions": 100,  "redeem_by": "2026-12-31T23:59:59Z"}'

Example response

json
{  "id": "cpn_20b5e71de063737f5f3e2920",  "object": "coupon",  "livemode": false,  "name": "Launch 20% off",  "discount": {    "type": "percent",    "percent_bps": 2000  },  "duration": "repeating",  "duration_months": 3,  "products": null,  "max_redemptions": 100,  "redeem_by": "2026-12-31T23:59:59Z",  "times_redeemed": 12,  "status": "active",  "created": "2026-11-20T09:30:00Z"}