POST /v1/promotion_codes
A promotion code points to an underlying promotion. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
Servers
- https://api.stripe.com/
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
customer |
String | No |
The customer who can use this promotion code. If not set, all customers can use the promotion code. |
restrictions |
Object | No |
Settings that restrict the redemption of the promotion code. |
restrictions.minimum_amount_currency |
String | No | |
restrictions.currency_options |
Object | No | |
restrictions.currency_options.name |
Object | No | |
restrictions.currency_options.name.minimum_amount |
Integer | No | |
restrictions.first_time_transaction |
Boolean | No | |
restrictions.minimum_amount |
Integer | No | |
active |
Boolean | No |
Whether the promotion code is currently active. |
promotion |
Object | Yes |
The promotion referenced by this promotion code. |
promotion.coupon |
String | No | |
promotion.type |
String | Yes |
Valid values:
|
expand[] |
Array | No |
Specifies which fields in the response should be expanded. |
max_redemptions |
Integer | No |
A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a |
metadata |
Object | No |
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to |
code |
String | No |
The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), digits (0-9), and dashes (-). If left blank, we will generate one automatically. |
customer_account |
String | No |
The account representing the customer who can use this promotion code. If not set, all customers can use the promotion code. |
expires_at |
Integer | No |
The timestamp at which this promotion code will expire. If the coupon has specified a |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.