Create a coupon

🚧 Beta: This endpoint may not be available yet and may change without notice.
Contact support to request access.

Create a multiple-use coupon. Use scope_type for a school-wide coupon, pricing_plan_id to restrict it to one price (schools not using the new payments experience), or product_type + product_id to restrict it to one product (schools using the new payments experience). Exactly one of the three must be set.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Creates a new coupon.

Provide exactly one scoping shape: scope_type (school-wide, any school), pricing_plan_id (schools not using the new payments experience only), or product_type + product_id (schools using the new payments experience only). Two or more shapes returns 422. Partial pairs (product_type XOR product_id) return 422.

string
required
string
required

On schools using the new payments experience, maximum length is 40 characters.

date-time | null

On schools using the new payments experience, this field is required, must be a future date, and must be within 5 years from now.

integer | null

On schools using the new payments experience, this field is required and must be at least 1.

integer | null

On schools using the new payments experience, exactly one of discount_percent or discount_amount is required, and the minimum is 1. When discount_amount is set, discount_currency is required.

string | null

On schools using the new payments experience, required when discount_amount is set; not allowed when discount_percent is set.

number | null
0 to 1

On schools using the new payments experience, exactly one of discount_percent or discount_amount is required, and the minimum is 0.01%. discount_percent and discount_currency cannot be provided together.

integer | null

Required when duration_kind is "repeating". Must be blank when duration_kind is not "repeating". Minimum value is 1.

integer | null

Only supported on schools not using the new payments experience. Sending this field on schools using the new payments experience returns 422. Mutually exclusive with scope_type and product_type + product_id.

string | null
enum

Only supported on schools using the new payments experience. Sending this field otherwise returns 422. Must be paired with product_id. Mutually exclusive with scope_type and pricing_plan_id.

integer | null

Only supported on schools using the new payments experience. Must be paired with product_type.

string
enum
required

On schools using the new payments experience, when set to "repeating", discount_in_months is required.

Allowed:
string | null
enum

Available on all schools. Mutually exclusive with pricing_plan_id and product_type + product_id.

Allowed:
boolean
string
enum
Allowed:
Headers
string
required

Generated Admin API key

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json