Create order

Creates an order for a customer. The new order's status is draft. No payment is taken yet: to collect it, see 4 · Collect payment.

To take the payment in a form on your own website, send create_checkout: true with redirect_success_url and redirect_failed_url. The order is created as pending, and the response adds checkout and customer_portal_url. See Host a checkout on your website.

order_type sets how the customer pays. Each parameter says which order types it applies to. There's a request example for each type.

What comes from the product:

  • Each line takes the product's price, tax, fee and discount, unless you send them.
  • The payment schedule doesn't. For an instalment or subscription, always send start_date, scheduled_interval and scheduled_duration_unit, and for an instalment scheduled_duration_number. Without them you get 422.
  • Orders don't take collection_interval. Turn the product's interval into scheduled_interval and scheduled_duration_unit: see 2 · Build your catalog for the full list.
  • The deposit doesn't either. To take one, send collect_initial_payment: true with the amount in initial_payment_amount.
  • The product's lock_price and lock_payment_config apply in the dashboard only. The API accepts other values.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required
≥ 1

Your merchant profile ID. Required in every request.

Find it in the BillPro dashboard address, after /profiles/. For example, in /profiles/1234/orders the profile ID is 1234.

Body Params
order
object
required
Responses

Language
Credentials
Bearer
API token
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json