Venflow API
V1Descuentos

Crear un Descuento

POST
/v1/discounts
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

Formatdouble
Range0.01 <= value
duration?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)

Range1 <= value <= 10000
namestring

Display name for the discount

Length1 <= length <= 255
percent_off?number

Percentage discount (0.01–100.00). Mutually exclusive with amount_off

Formatdouble
Range0.01 <= value <= 100

Response 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"
}