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
- Create the order. Its status is
draft, and nothing is collected yet. - Collect the first payment. See 4 · Collect payment.
- While payments are still due, the order is
active. BillPro collects each scheduled payment on its date. - 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.
Cancel or complete?
Both end an order, so no more payments are collected.
- Cancel an order that never took a payment:
draft,pendingorrejected. Use cancel to end a subscription too. - Complete any other live order:
active,failed,suspended,pausedorreview. Its scheduled payments are cancelled, and you can still refund the payments it took.
Order statuses
Preliminary statuses come before the first approved payment. Live statuses come after it.
| Icon | Status | Group | Meaning |
|---|---|---|---|
draft | Preliminary | A new order with no payment taken and no payment link sent. You can take a payment, send a link, or cancel it. | |
pending | Preliminary | A payment link was sent, and no payment or card registration has been approved yet. | |
rejected | Preliminary | A payment taken with a card on file or by phone was declined. You can try again, send a link, or cancel it. | |
cancelled | Preliminary | The order was cancelled. Nothing more is collected. | |
active | Live | The first payment or card registration was approved, and so was the latest payment. A pre-authorised single payment that isn't captured or reversed yet is also active. | |
paused | Live | A subscription that was paused. Nothing is collected until it resumes. | |
failed | Live | The latest payment was soft-declined, a temporary problem such as insufficient funds. It can be retried. | |
suspended | Live | The latest payment was hard-declined, a permanent problem such as a closed account. Replace the card to collect it. | |
review | Live | An instalment order that collected more than its value. Check it, refund the extra, then complete it. | |
complete | Live | Nothing more is due: the order was paid in full, a pre-authorised amount was captured or reversed, or it was completed. |
These match the statuses in the BillPro dashboard. For more on each one, see Order status in the guides.