2 · Build your catalog

Orders are built from products, so set up what you sell first.

Endpoints: Products · Taxes · Discounts · Fees · Groups · Units


Steps

  1. Optional: create groups and units to organise products: POST /product_groups, POST /product_units.
  2. Create the taxes, discounts and fees you'll use: POST /product_taxes, POST /product_discounts, POST /product_fees.
  3. Optional: preview a product's totals before saving it: POST /products/calculate.
  4. Create each product: POST /products. Set its type, price and currency, and attach a tax, fee or discount by ID.
flowchart LR
  GU["Groups & units
  (optional)"] --> Product
  TDF["Taxes, discounts
  & fees"] --> Product
  Product["Product
  POST /products"] --> Line["Used on
  order lines"]

Payment schedule

Instalment and subscription products set how often the customer is charged. There are two ways to say it:

  • collection_interval: a preset, such as MONTH or QUARTER. Send it on its own. BillPro fills in the other two fields.
  • scheduled_interval + scheduled_duration_unit: a number and a unit, such as 3 + MONTH for every 3 months. Send them only with collection_interval: CUSTOM, for a schedule the presets don't cover.

Orders only use the number and unit. They don't take collection_interval, and they don't copy the product's schedule. When you create an order, send the pair that matches the product:

collection_intervalscheduled_intervalscheduled_duration_unit
WEEK1WEEK
FORTNIGHT2WEEK
28DAYS28DAY
MONTH1MONTH
QUARTER3MONTH
YEAR1YEAR
CUSTOMthe product's scheduled_intervalthe product's scheduled_duration_unit

scheduled_duration_number is separate: it's how many payments an instalment plan has, not how often they happen.


Good to know

  • A product's type sets how it's paid: single_payment, instalment, subscription or metered.
  • Tax is included in the price, not added on top.
  • Only fixed-amount fees are supported right now.
  • To stop selling a product, set its product_status to inactive. It stays on existing orders.

Next

Continue to 3 · Create customers & orders.