POST
/
api
/
v1
/
discounts
Create Discount
curl --request POST \
  --url https://app.flowglad.com/api/v1/discounts \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "discount": {
    "name": "<string>",
    "code": "<string>",
    "amount": 123,
    "amountType": "percent",
    "active": true,
    "duration": "<string>",
    "numberOfPayments": null
  }
}'
{
  "discount": {
    "id": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "createdByCommit": "<string>",
    "updatedByCommit": "<string>",
    "livemode": true,
    "organizationId": "<string>",
    "name": "<string>",
    "code": "<any>",
    "amount": "<any>",
    "amountType": "percent",
    "active": true,
    "duration": "<string>",
    "numberOfPayments": null
  }
}

Authorizations

Authorization
string
header
required

Body

application/json
discount
object
required

A discount record, which describes a discount that can be applied to purchases or subscriptions. Discounts can be one-time, have a fixed number of payments, or be applied indefinitely. A one-time discount that will only be applied once to a purchase or subscription.

Response

Successful response

discount
object
required

A discount record, which describes a discount that can be applied to purchases or subscriptions. Discounts can be one-time, have a fixed number of payments, or be applied indefinitely. A discount that will be applied indefinitely over the lifetime of a subscription.