Skip to content
Payments docs are in beta — the OpenAPI contract is the source of truth.API reference
VortexPayments
Esc
↑↓navigate↵open⌘Jpreview

POST /v1/coupons

POST/v1/coupons
Authorization
x-api-keyAPI key · headerrequired
or
AuthorizationBearer token · headerrequired
Query parameters
environmentstring
Allowed:sandboxproduction
merchantAccountIdstring
min length 1
Header parameters
Idempotency-Keystring

Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.

min length 1
Request body
requiredapplication/json
Any of:
object
environmentstring | null
Show properties
Any of:
string
string
null
null
merchantAccountIdstring | null
Show properties
Any of:
string
string
null
null
codestringrequired
min length 1
namestringrequired
min length 1
durationstringrequired
Show properties
Any of:
string
string
couponIdstring | null
Show properties
Any of:
string
string
null
null
descriptionstring | null
Show properties
Any of:
string
string
null
null
reusableboolean | null
Show properties
Any of:
boolean
boolean
null
null
metadataobject | null
Show properties
Any of:
object
object
null
null
discountTypestringrequired
Show properties
Any of:
string
string
amountnumberrequired
currencystringrequired
min length 1
object
environmentstring | null
Show properties
Any of:
string
string
null
null
merchantAccountIdstring | null
Show properties
Any of:
string
string
null
null
codestringrequired
min length 1
namestringrequired
min length 1
durationstringrequired
Show properties
Any of:
string
string
couponIdstring | null
Show properties
Any of:
string
string
null
null
descriptionstring | null
Show properties
Any of:
string
string
null
null
reusableboolean | null
Show properties
Any of:
boolean
boolean
null
null
metadataobject | null
Show properties
Any of:
object
object
null
null
discountTypestringrequired
Show properties
Any of:
string
string
percentagenumberrequired
Responses
201

Success

dataobjectrequired
Show properties
couponIdstringrequired
min length 1
codestringrequired
min length 1
namestringrequired
min length 1
statusstringrequired
Allowed:activeterminated
discountTypestringrequired
Allowed:fixed_amountpercentage
durationstringrequired
Allowed:oncerepeatingforever
reusablebooleanrequired
targetsobjectrequired
Show properties
priceIdsstring[] | null
Show properties
Any of:
string[]
Array of string
string
null
null
meterIdsstring[] | null
Show properties
Any of:
string[]
Array of string
string
null
null
metadataobjectrequired
createdAtstringrequired
min length 1
descriptionstring | null
Show properties
Any of:
string
string
null
null
amountnumber | null
Show properties
Any of:
number
number
null
null
currencystring | null
Show properties
Any of:
string
string
null
null
percentagenumber | null
Show properties
Any of:
number
number
null
null
durationInBillingPeriodsnumber | null
Show properties
Any of:
number
number
null
null
expiresAtstring | null
Show properties
Any of:
string
string
null
null
terminatedAtstring | null
Show properties
Any of:
string
string
null
null
requestIdstringrequired
min length 1
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl "https://api.vortex.nyc/v1/coupons?environment=...&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'
Response
{
  "data": {
    "couponId": "string",
    "code": "string",
    "name": "string",
    "status": "active",
    "discountType": "fixed_amount",
    "duration": "once",
    "reusable": true,
    "targets": {
      "priceIds": [
        "string"
      ],
      "meterIds": [
        "string"
      ]
    },
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "createdAt": "string",
    "description": "string",
    "amount": 0,
    "currency": "string",
    "percentage": 0,
    "durationInBillingPeriods": 0,
    "expiresAt": "string",
    "terminatedAt": "string"
  },
  "requestId": "string"
}

Was this page helpful?