Voucher

  • Name
    object
    Type
    string
    Description

    Type of object is always voucher.

    Allowed values: voucher 
  • Name
    id
    Type
    string
    Description

    Unique identifier for the voucher.

    Example: "vou_0SNlurA049MEWV0h2jfjkdiOdplN"
  • Name
    createdAt
    Type
    string
    Description

    Time when the voucher was created.

    Example: "2021-02-14T19:38:34Z"
  • Name
    name
    Type
    string
    Description

    The voucher's name.

    Example: "Monthly Basic 15%"
  • Name
    priceDiscount
    Type
    nullable object
    Description
    The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
    • Name
      amount
      Type
      integer
      Description

      The discount amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 1
    • Name
      currency
      Type
      string
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: "USD"
  • Name
    priceDiscountPercentage
    Type
    nullable number
    Description

    The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.

    Example: 30.12
    >= 1
    <= 100
  • Name
    recurrence
    Type
    object
    Description
    Details on whether and for how long the discounts applied via the voucher recur.
    • Name
      type
      Type
      string
      Description

      Whether and how the voucher discount recurs.

      Example: "once"
      Allowed values: once repeating forever 
    • Name
      durationInMonths
      Type
      nullable integer
      Description

      For how many months is the discount applied via the voucher. Only applicable when 'recurrence.type' is 'repeating'.

      >= 1
  • Name
    redemptions
    Type
    integer
    Description

    Number of times the voucher has been redeemed.

    Example: 2
  • Name
    retiredReason
    Type
    nullable string
    Description

    Label indicating the reason why the voucher is retired.

    Allowed values: manualAction expired maxRedemptionsReached unknown 
  • Name
    status
    Type
    string
    Description
    Allowed values: available retired 

Example

{
  "object": "voucher",
  "id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
  "createdAt": "2021-02-14T19:38:34.0Z",
  "name": "Monthly Basic 15%",
  "priceDiscount": {
    "amount": 999,
    "currency": "USD"
  },
  "priceDiscountPercentage": 30.12,
  "recurrence": {
    "type": "once",
    "durationInMonths": 1
  },
  "redemptions": 2,
  "retiredReason": null,
  "status": "available"
}