Quote

Quotes provide a preview of the invoices, including taxes and fees, that will occur when creating a subscription or add-on.

  • Name
    object
    Type
    string
    Description

    Type of object is always quote.

    Allowed values: quote 
  • Name
    id
    Type
    string
    Description

    Unique identifier for the quote.

    Example: "quo_0SNlurA049MEWV2X9NicYieFQ4Kc"
  • Name
    address
    Type
    nullable string
    Description

    The unique identifier for the address that the taxes were quoted for. Present when quoting local plans.

    Example: "adr_0SNlurA049MEWV5ELDmnaqVXgTFT"
  • Name
    createdAt
    Type
    string
    Description

    Time when the quote was created.

    Example: "2024-01-09T15:00:51Z"
  • Name
    discount
    Type
    Price
    Description
    The total discount applied. This is the sum of the discounts of each line item.
    Example: {"amount":100,"currency":"USD"}
    • Name
      amount
      Type
      integer
      Description

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

      Most currencies have two decimals, so USD 9.99 is 999. These currencies have a different number of decimals, e.g. JPY 28,500 is 28500:

      • 0 decimals: CLP, ISK, JPY, KRW
      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      Description

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

      Example: "USD"
  • Name
    expiredAt
    Type
    string
    Description

    The timestamp indicating when the quote expires. Set to 2 hours after the quote's creation time.

    Example: "2024-02-01T11:12:13Z"
  • Name
    fees
    Type
    array
    Description
    The fees for the quote.
    • Name
      amount
      Type
      Price
      Description
      The amount of the fee.
      Example: {"amount":100,"currency":"USD"}
      Optional: This property may not always be included.
    • Name
      name
      Type
      string
      Description

      The name of the fee.

      Optional: This property may not always be included.
      Example: "Recovery Fee"
    • Name
      type
      Type
      string
      Description

      The type of the fee.

      Optional: This property may not always be included.
      Allowed values: recoveryFee 
  • Name
    lineItems
    Type
    array
    Description
    The line items that make up the quote.
  • Name
    reason
    Type
    string
    Description

    The reason this quote was created. It can have one of the following values:

    • subscriptionCreation: The quote is for a new subscription.
    • subscriptionChange: The quote is for a subscription change (e.g. plan upgrade).
    • other: The quote is not related to a subscription but due an e.g. one-time addon.
    Allowed values: other subscriptionChange subscriptionCreation 
  • Name
    subtotal
    Type
    Price
    Description
    The total amount before any discounts, taxes or fees are applied.
    Example: {"amount":999,"currency":"USD"}
    • Name
      amount
      Type
      integer
      Description

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

      Most currencies have two decimals, so USD 9.99 is 999. These currencies have a different number of decimals, e.g. JPY 28,500 is 28500:

      • 0 decimals: CLP, ISK, JPY, KRW
      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      Description

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

      Example: "USD"
  • Name
    tax
    Type
    Price
    Description
    The total amount of taxes. This is the sum of the taxes of each line item.
    Example: {"amount":200,"currency":"USD"}
    • Name
      amount
      Type
      integer
      Description

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

      Most currencies have two decimals, so USD 9.99 is 999. These currencies have a different number of decimals, e.g. JPY 28,500 is 28500:

      • 0 decimals: CLP, ISK, JPY, KRW
      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      Description

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

      Example: "USD"
  • Name
    taxExemptionReason
    Type
    nullable string
    Description

    The reason for the taxes not being calculated, if any. It can have one of the following values:

    • calculationFailed: The tax calculation failed for an unspecified reason.
    • inclusiveTaxExceedsPrice: The calculated tax is too large to be included in the price.
    • fullyDiscounted: The quote is fully discounted due to a voucher or a free product.
    • userExempted: The user is marked as exempted from taxes.
    Example: "calculationFailed"
    Allowed values: calculationFailed fullyDiscounted inclusiveTaxExceedsPrice userExempted 
  • Name
    total
    Type
    Price
    Description
    The total amount after all discounts, taxes and fees are applied.
    Example: {"amount":1199,"currency":"USD"}
    • Name
      amount
      Type
      integer
      Description

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

      Most currencies have two decimals, so USD 9.99 is 999. These currencies have a different number of decimals, e.g. JPY 28,500 is 28500:

      • 0 decimals: CLP, ISK, JPY, KRW
      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      Description

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

      Example: "USD"
  • Name
    user
    Type
    string
    Description

    The unique identifier for the user that this quote belongs to.

    Example: "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
  • Name
    voucher
    Type
    nullable string
    Description

    The unique identifier for the voucher applied to the quote, if any.

    Example: "vou_0SNlurA049MEWV0h2jfjkdiOdplN"

Quote object

{
  "object": "quote",
  "id": "quo_0SNlurA049MEWV2X9NicYieFQ4Kc",
  "address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
  "createdAt": "2024-01-09T15:01:51.0Z",
  "discount": {
    "amount": 100,
    "currency": "USD"
  },
  "expiredAt": "2024-02-01T11:12:13.0Z",
  "fees": [
    {
      "amount": {
        "amount": 100,
        "currency": "USD"
      },
      "name": "Recovery Fee",
      "type": "recoveryFee"
    }
  ],
  "lineItems": [
    {
      "addon": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
      "creditedPlan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
      "discount": {
        "amount": 100,
        "currency": "USD"
      },
      "plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
      "subtotal": {
        "amount": 999,
        "currency": "USD"
      },
      "tax": {
        "amount": 200,
        "currency": "USD"
      },
      "taxes": [
        {
          "amount": {
            "amount": 200,
            "currency": "USD"
          },
          "inclusive": false,
          "jurisdiction": "Federal",
          "name": "Federal TRS Fund"
        }
      ],
      "total": {
        "amount": 1099,
        "currency": "USD"
      }
    }
  ],
  "reason": "other",
  "subtotal": {
    "amount": 999,
    "currency": "USD"
  },
  "tax": {
    "amount": 200,
    "currency": "USD"
  },
  "taxExemptionReason": "calculationFailed",
  "total": {
    "amount": 1199,
    "currency": "USD"
  },
  "user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
  "voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN"
}