Create a coupon
Creates a coupon. A coupon has either an amountOff and currency or percentOff. The coupon created will be automatically synchronized with Stripe if you have a connected stripe account. If you are not connected the endpoint will throw an error. In addition to Checkout Page rate limits, Stripe rate limits apply when creating coupons.
/v1/coupons/Authorization
api_key_auth API key authentication. Use "Bearer YOUR_API_KEY" format.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.checkoutpage.com/v1/coupons/" \ -H "Content-Type: application/json" \ -d '{ "label": "Free shipping within US", "code": "10Off", "duration": "once" }'{
"data": {
"id": "string",
"label": "Free shipping within US",
"code": "10Off",
"amountOff": 0,
"currency": "string",
"percentOff": 0,
"appliesToSetupFee": true,
"duration": "once",
"durationInMonths": 0,
"redeemBy": "2019-08-24T14:15:22Z",
"maxRedemptions": 0,
"timesRedeemed": 0,
"deleted": false,
"sellerId": "string",
"pageIds": [
"string"
],
"stripeCouponId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}