Orders

Create orders, then pause, resume, complete or cancel them.

An order links a customer to the products they buy, and sets how they pay.

Create every order with Create order. Its order_type sets how the customer pays: single_payment, instalment, subscription or metered. Each type needs different parameters. Create order lists them.

How an order moves

  1. Create the order. Its status is draft, and nothing is collected yet.
  2. Collect the first payment. See 4 · Collect payment.
  3. A scheduled order becomes active. BillPro collects each payment on its date.
  4. When nothing more is due, the order is complete.

You can pause, resume, complete or cancel an order. The order's available_actions shows which you can do now.

Order statuses

StatusMeaning
draftCreated, nothing collected yet. New orders start here.
pendingWaiting for the first payment.
registeredThe card is saved and the first payment is waiting.
activeCollecting payments on its schedule.
pausedPaused by the merchant. Payments restart when it's resumed.
failedA payment was declined but can be retried.
suspendedStopped after a failed payment, on an order that had already collected a payment.
rejectedDeclined because of a card problem. Retrying won't help.
reviewNeeds a manual check, for example after an overpayment.
completeNothing more is due.
cancelledCancelled. Nothing more is collected.