ProductAttributeInput

  • The charge's name, unique within the product. With productAttributeId, a new name renames the attribute.

  • How one charge is priced. pricingType picks one of 15 types: recurring fees, usage (per unit, tiered, in credits or at cost plus), one-time fees and seats. Money is in minor units (cents for USD). The pricing is stored as you send it and returned as sent, plus chargeType and pricingModel, which Spondo Billing sets from pricingType.

    A fixed fee per unit, billed every period: unitPrice × the quantity (1 on a plan, the line's quantity on an order).

    Example: a platform fee of 9900 (USD 99.00) billed Monthly in Advance charges USD 99.00 at the start of each month. On an order line with quantity 3 it charges USD 297.00.

    • 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
    • Set by Spondo Billing from pricingType: the kind of charge. Returned, never sent.

    • One price point per currency. An order uses the one in its currency, else the first. unitPrice is the fee per unit per period.

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

  • Whether the charge is offered. Default true for a new attribute; left out, an existing attribute keeps its value.

  • Replaces the attribute's credit benefits. Left out, an existing attribute keeps them; [] or null removes them.

    Properties: 12
  • The attribute to update. Leave it out to match by name, or to add a new attribute.

  • Your tax code for the charge, such as a Stripe Tax code. Left out, an existing attribute keeps it.