V1Descuentos
Crear un Descuento
Api-Key<token>
Tu clave API privada (comienza con pvk_)
In: header
Organization<token>
Tu ID de organización
In: header
amount_off?number
Fixed amount discount in USD (e.g. 20.00 = $20 off). Mutually exclusive with percent_off
Format
doubleRange
0.01 <= valueduration?string
How long the discount applies: once, forever, or repeating
Value in
"once" | "forever" | "repeating"duration_periods?integer
Number of billing cycles the discount applies (required when duration is repeating, max 10000)
Range
1 <= value <= 10000namestring
Display name for the discount
Length
1 <= length <= 255percent_off?number
Percentage discount (0.01–100.00). Mutually exclusive with amount_off
Format
doubleRange
0.01 <= value <= 100Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.venflow.app/v1/discounts" \ -H "Content-Type: application/json" \ -d '{ "name": "10% de descuento", "percent_off": 10, "duration": "once" }'{
"active": true,
"amount_off": 0,
"created": 0.1,
"duration": "once",
"duration_periods": 0,
"id": "string",
"livemode": true,
"name": "string",
"object": "discount",
"percent_off": 0
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}