API documentation
User
Tenant
Feature
Entitlement
User & permissions
Settings
- Settings
- Media
- Webhook
- Notification
Payment
- Payment Method
- Transaction
- SEPA XML
- Open Banking
- Bank Account Transaction
Customer
- Customer
- Customer Address
- Customer Email
- Customer Settings
- Customer Otp
Billing
- Invoice
- Invoice Position Item
- Billing Run
Dunning
- Dunning Document
- Dunning Rule
Subscription
- Subscription
- Subscription Item
- Subscription Measurement
- Billing Group
Offers
- Offer
- Offer Recipient
- Offer Template
Catalogue
- Unit
- Measurement
- Product
- Product Family
- Price Plan
- Coupon
Checkout
- Checkout Link
- Cart
Accounting
Coupon
Create a coupon
You can create a coupon, which can be used by customers to get a discount on their subscription. You can create a coupon with a fixed amount or a percentage. You can also set a maximum number of uses and a maximum number of uses per customer. You can also set an end date, after which the coupon is no longer valid.
The coupon code can be used in the checkout process, in the customer front, or via the API.
Required permissions:coupon:write
POST
/
coupons
curl -X POST \
/coupons \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"code": "10OFF",
"name": "10% off",
"percentage": "10",
"fixedAmount": [],
"frequencyInterval": "3",
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": [
"https:\/\/example.com\/"
],
"excludedFromPlans": [
"https:\/\/example.com\/"
],
"limitedToProducts": [
"https:\/\/example.com\/"
],
"excludedFromProducts": [
"https:\/\/example.com\/"
],
"isEnabled": "1"
}'
{
"id": "<string>",
"code": "10OFF",
"name": "10% off",
"type": "<any>",
"percentage": 10,
"fixedAmount": {},
"frequency": "<any>",
"frequencyInterval": 3,
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"originProduct": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"productFamilies": [
{
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"name": "Team Packages",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"type": "product",
"measurement": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"description": "The number of users.",
"aggregationType": "<any>",
"fairBilling": true,
"type": "<any>"
},
"invoiceVisibility": "always",
"costCentre": {
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"name": "Cost Centre",
"code": "CC",
"type": "KOST1",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"taxGroup": {
"id": "00000000-0000-0000-0000-000000000000",
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard"
},
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
},
"allowCheckout": true,
"status": "<any>",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>"
}
],
"excludedFromPlans": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"originProduct": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"productFamilies": [
{
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"name": "Team Packages",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"type": "product",
"measurement": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"description": "The number of users.",
"aggregationType": "<any>",
"fairBilling": true,
"type": "<any>"
},
"invoiceVisibility": "always",
"costCentre": {
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"name": "Cost Centre",
"code": "CC",
"type": "KOST1",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"taxGroup": {
"id": "00000000-0000-0000-0000-000000000000",
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard"
},
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
},
"allowCheckout": true,
"status": "<any>",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>"
}
],
"limitedToProducts": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"productFamilies": [
{
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"name": "Team Packages",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"type": "product",
"measurement": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"description": "The number of users.",
"aggregationType": "<any>",
"fairBilling": true,
"type": "<any>"
},
"invoiceVisibility": "always",
"costCentre": {
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"name": "Cost Centre",
"code": "CC",
"type": "KOST1",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"taxGroup": {
"id": "00000000-0000-0000-0000-000000000000",
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard"
},
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
}
],
"excludedFromProducts": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"productFamilies": [
{
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"name": "Team Packages",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"type": "product",
"measurement": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"description": "The number of users.",
"aggregationType": "<any>",
"fairBilling": true,
"type": "<any>"
},
"invoiceVisibility": "always",
"costCentre": {
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"name": "Cost Centre",
"code": "CC",
"type": "KOST1",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"taxGroup": {
"id": "00000000-0000-0000-0000-000000000000",
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard"
},
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
}
],
"isEnabled": true,
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"reedemptions": true
}
Authorizations
Value for the Authorization header parameter.
Body
The new Coupon resource
Response
201
application/json
Coupon resource created
Was this page helpful?
curl -X POST \
/coupons \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"code": "10OFF",
"name": "10% off",
"percentage": "10",
"fixedAmount": [],
"frequencyInterval": "3",
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": [
"https:\/\/example.com\/"
],
"excludedFromPlans": [
"https:\/\/example.com\/"
],
"limitedToProducts": [
"https:\/\/example.com\/"
],
"excludedFromProducts": [
"https:\/\/example.com\/"
],
"isEnabled": "1"
}'
{
"id": "<string>",
"code": "10OFF",
"name": "10% off",
"type": "<any>",
"percentage": 10,
"fixedAmount": {},
"frequency": "<any>",
"frequencyInterval": 3,
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"originProduct": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"productFamilies": [
{
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"name": "Team Packages",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"type": "product",
"measurement": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"description": "The number of users.",
"aggregationType": "<any>",
"fairBilling": true,
"type": "<any>"
},
"invoiceVisibility": "always",
"costCentre": {
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"name": "Cost Centre",
"code": "CC",
"type": "KOST1",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"taxGroup": {
"id": "00000000-0000-0000-0000-000000000000",
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard"
},
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
},
"allowCheckout": true,
"status": "<any>",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>"
}
],
"excludedFromPlans": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"originProduct": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"productFamilies": [
{
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"name": "Team Packages",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"type": "product",
"measurement": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"description": "The number of users.",
"aggregationType": "<any>",
"fairBilling": true,
"type": "<any>"
},
"invoiceVisibility": "always",
"costCentre": {
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"name": "Cost Centre",
"code": "CC",
"type": "KOST1",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"taxGroup": {
"id": "00000000-0000-0000-0000-000000000000",
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard"
},
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
},
"allowCheckout": true,
"status": "<any>",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>"
}
],
"limitedToProducts": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"productFamilies": [
{
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"name": "Team Packages",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"type": "product",
"measurement": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"description": "The number of users.",
"aggregationType": "<any>",
"fairBilling": true,
"type": "<any>"
},
"invoiceVisibility": "always",
"costCentre": {
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"name": "Cost Centre",
"code": "CC",
"type": "KOST1",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"taxGroup": {
"id": "00000000-0000-0000-0000-000000000000",
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard"
},
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
}
],
"excludedFromProducts": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"productFamilies": [
{
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"name": "Team Packages",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"type": "product",
"measurement": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"description": "The number of users.",
"aggregationType": "<any>",
"fairBilling": true,
"type": "<any>"
},
"invoiceVisibility": "always",
"costCentre": {
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"name": "Cost Centre",
"code": "CC",
"type": "KOST1",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"taxGroup": {
"id": "00000000-0000-0000-0000-000000000000",
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard"
},
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
}
],
"isEnabled": true,
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"reedemptions": true
}
Assistant
Responses are generated using AI and may contain mistakes.