Introduction

Use the BillPro API to manage your products, customers, orders and payments from your own systems.

It's a JSON API over HTTPS. Almost every endpoint starts with /api/v2/profiles/{profile_id}, so each request works on one merchant profile.

flowchart TB

  Auth["Authenticate
  (API token)"]
  ProfileID["Find your profile_id
  in the dashboard address"]

  Customers["Customers
  create / list"]
  Products["Products
  create / price calculate"]
  Orders["Create order
  POST /orders"]
  Collect["Collect payment
  checkout · card · payment link"]
  Live["Live order"]
  Scheduled["Scheduled payments
  retry · skip · merge · execute"]
  Payments["Payments
  capture · refund · reverse"]

  Auth --> ProfileID
  ProfileID --> Customers
  ProfileID --> Products
  Customers --> Orders
  Products --> Orders
  Orders --> Collect --> Live
  Live --> Scheduled
  Live --> Payments

Before you start

You need two things:

  • An API token. In the BillPro dashboard, open the profile menu, go to Users, select your integration user and copy the token from API Token. The section only appears when the user has API Access, which only Admin users can have. To turn it on, contact BillPro.
  • Your profile ID. It's in the dashboard address, after /profiles/. In /profiles/1234/orders, it's 1234.

Keep your token secret and use it only from your server. See 1 · Authenticate.


Environments

EnvironmentBase URL
Sandboxhttps://test-api.bill.pro/api/v2
Productionhttps://api.bill.pro/api/v2

Examples and Try It in these docs use the sandbox. Switch the host to production when you go live.


Make your first request

Send these headers with every request:

     --header 'Authorization: Bearer {api_token}' \
     --header 'Content-Type: application/json' \
     --header 'Accept: application/json'

For example, list your orders:

curl --request GET \
     --url 'https://test-api.bill.pro/api/v2/profiles/{profile_id}/orders' \
     --header 'Authorization: Bearer {api_token}' \
     --header 'Accept: application/json'

Response codes

StatusMeaning
200 OKThe request worked.
201 CreatedThe record was created.
204 No ContentThe request worked. There's no response body.
401 UnauthorizedThe token is missing or invalid.
403 ForbiddenYou don't have access to this profile, or this action isn't allowed.
404 Not FoundThe record doesn't exist, or belongs to another profile.
409 ConflictThe record is in use, so it can't be deleted.
422 Unprocessable ContentThe request has invalid data. The response lists what's wrong.

Error responses include an error message.


Next steps

Follow the journey in the Overview, one stage at a time:

  1. Authenticate
  2. Build your catalog
  3. Create customers & orders
  4. Collect payment
  5. Recurring billing & recovery

To find any endpoint, use search (⌘K).