UsageBracketedPrepaidCredits

Usage paid for in credits, where the credits a signal uses depend on its size. The signal's quantity (see pricingInput) falls into one of creditBrackets, and the signal uses that bracket's creditCost, whatever its quantity within the bracket. Credits come from the charge's credits currency, and overage is billed, as for UsagePrepaidCredits.

Example: document_uploaded with pricingInput.path pages, and brackets of up to 10 pages for 1 credit, up to 50 pages for 3 credits and above that 8 credits. A 12-page document uses 3 credits; a 120-page one uses 8.

  • The pricing type. It decides the charge's other fields and how it bills.

  • How often the charge is billed: every 1, 3, 6 or 12 months, or with Custom every billingFrequencyCustomMonths months. Amounts (the price, credit benefits) are per billing period: a quarterly fee is charged once a quarter.

    values
    MonthlyQuarterlySemi-AnnuallyAnnualCustom
  • With billingFrequency: Custom, the length of the billing period in months.

  • When each period is billed. Advance: at the start of the period, for the period ahead. Arrears: at the end, for the period just ended. Usage charges, and the overage of seats that come with credits, are always billed in arrears. Default: Arrears for usage charges, Advance for the rest.

    values
    AdvanceArrears
  • Another name for creditBrackets. When you send both, brackets is used.

    Properties: 4
  • Set by Spondo Billing from pricingType: the kind of charge. Returned, never sent.

  • The brackets, told apart by upperBound and taken lowest first (an open last bracket is the highest): a signal falls into the first bracket whose upperBound its quantity doesn't exceed, or into the highest bracket when its quantity is above them all. With no brackets, signals use no credits.

    Properties: 4
  • The credits currency (cc_…) this charge spends. Left out or null: the first one this charge's own credit benefits name, else your default credits currency.

  • The signal event name this charge counts. Every signal sent with this eventName adds to the charge. Required unless the charge names a meterId.

  • A meter of the charge's product (mtr_…) to bill in place of eventName: each signal counts its quantity on the meter. Send eventName or meterId, not both. A charge on a meter takes no pricingInput: the meter says what each signal counts.

  • Price of each credit used beyond the customer's credits, in minor units (cents for USD) of the order's currency. Fractions are allowed.

  • Overage price per credit by currency (ISO 4217 code to minor units). Overrides overageUnitPrice in that currency.

    Properties: 1
  • Where a charge that counts signals reads each signal's quantity. Without it, a signal counts the number in data.quantity, else 1. There is no formula language: the quantity is one number read from the signal. It is read once, when the signal arrives, with the pricingInput of a charge on the customer's active orders that prices its event.

    Properties: 1
  • Set by Spondo Billing from pricingType: how the charge is priced. Returned, never sent.

  • What a usage charge bills for: activity (work done) or outcome (a result delivered, such as a resolved ticket). Both bill the same way; it labels the charge.

    values
    activityoutcome
Examples
{
  "pricingType": "UsageBracketedPrepaidCredits",
  "eventName": "document_uploaded",
  "pricingInput": {
    "path": "pages"
  },
  "billingFrequency": "Monthly",
  "billingType": "Arrears",
  "creditBrackets": [
    {
      "upperBound": 10,
      "creditCost": 1
    },
    {
      "upperBound": 50,
      "creditCost": 3
    },
    {
      "upperBound": null,
      "creditCost": 8
    }
  ]
}