Create Coupon

POST /self/{shopId}/coupons

Path parameters

Body

  • name string Required

    Minimum length is 1.

  • note string | null

    Maximum length is 1024.

  • discount number(double) Required
  • isFixed boolean Required
  • startDate string(date-time) | null
  • endDate string(date-time) | null
  • restrictToProducts array[integer(int64)] | null
  • restrictToGateways array[integer(int32)] | null

    " The list of supported payment gateways. CoinbaseCommerce = 0 Stripe = 1 PayPal = 2 CashApp = 3 PayPalFf = 4 VirtualPayments = 5 Square = 6

    "

    Values are 0, 1, 2, 3, 4, 6, 7, 8, or 9.

  • maxUses integer(int32) | null

Body

  • name string Required

    Minimum length is 1.

  • note string | null

    Maximum length is 1024.

  • discount number(double) Required
  • isFixed boolean Required
  • startDate string(date-time) | null
  • endDate string(date-time) | null
  • restrictToProducts array[integer(int64)] | null
  • restrictToGateways array[integer(int32)] | null

    " The list of supported payment gateways. CoinbaseCommerce = 0 Stripe = 1 PayPal = 2 CashApp = 3 PayPalFf = 4 VirtualPayments = 5 Square = 6

    "

    Values are 0, 1, 2, 3, 4, 6, 7, 8, or 9.

  • maxUses integer(int32) | null

Body

  • name string Required

    Minimum length is 1.

  • note string | null

    Maximum length is 1024.

  • discount number(double) Required
  • isFixed boolean Required
  • startDate string(date-time) | null
  • endDate string(date-time) | null
  • restrictToProducts array[integer(int64)] | null
  • restrictToGateways array[integer(int32)] | null

    " The list of supported payment gateways. CoinbaseCommerce = 0 Stripe = 1 PayPal = 2 CashApp = 3 PayPalFf = 4 VirtualPayments = 5 Square = 6

    "

    Values are 0, 1, 2, 3, 4, 6, 7, 8, or 9.

  • maxUses integer(int32) | null

Responses

POST /self/{shopId}/coupons
curl \
 --request POST 'https://dev.sellpass.io/self/{shopId}/coupons' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","note":"string","discount":42.0,"isFixed":true,"startDate":"2025-05-04T09:42:00Z","endDate":"2025-05-04T09:42:00Z","restrictToProducts":[42],"restrictToGateways":[0],"maxUses":42}'
curl \
 --request POST 'https://dev.sellpass.io/self/{shopId}/coupons' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: text/json"
curl \
 --request POST 'https://dev.sellpass.io/self/{shopId}/coupons' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/*+json"
Request examples
{
  "name": "string",
  "note": "string",
  "discount": 42.0,
  "isFixed": true,
  "startDate": "2025-05-04T09:42:00Z",
  "endDate": "2025-05-04T09:42:00Z",
  "restrictToProducts": [
    42
  ],
  "restrictToGateways": [
    0
  ],
  "maxUses": 42
}
Request examples
{
  "name": "string",
  "note": "string",
  "discount": 42.0,
  "isFixed": true,
  "startDate": "2025-05-04T09:42:00Z",
  "endDate": "2025-05-04T09:42:00Z",
  "restrictToProducts": [
    42
  ],
  "restrictToGateways": [
    0
  ],
  "maxUses": 42
}
Request examples
{
  "name": "string",
  "note": "string",
  "discount": 42.0,
  "isFixed": true,
  "startDate": "2025-05-04T09:42:00Z",
  "endDate": "2025-05-04T09:42:00Z",
  "restrictToProducts": [
    42
  ],
  "restrictToGateways": [
    0
  ],
  "maxUses": 42
}