Skip to main content
POST
/
payment-coupons
Create payment coupon
curl --request POST \
  --url https://app.dilli.studio/api/v1/payment-coupons \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "code": "<string>",
  "type": "amount",
  "value": 123
}
'
{
  "id": "<string>",
  "payment_link_id": "<string>",
  "code": "<string>",
  "type": "amount",
  "value": 123,
  "is_active": true,
  "payment_link": {
    "id": "<string>",
    "name": "<string>"
  },
  "max_redemptions": 123,
  "times_redeemed": 123,
  "expires_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z"
}
Use the API Playground below to send this request with your X-Api-Key. Supply a unique code, type (amount or percent), and value; optionally scope to a payment link.

Authorizations

X-Api-Key
string
header
required

Body

application/json
code
string
required
type
enum<string>
required
Available options:
amount,
percent
value
number<float>
required
max_redemptions
integer | null
is_active
boolean
expires_at
string<date-time> | null

Response

201 - application/json

Created

id
string
code
string
type
enum<string>
Available options:
amount,
percent
value
number<float>
is_active
boolean
max_redemptions
integer | null
times_redeemed
integer
expires_at
string<date-time> | null
created_at
string<date-time>