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's1234.
Keep your token secret and use it only from your server. See 1 · Authenticate.
Environments
| Environment | Base URL |
|---|---|
| Sandbox | https://test-api.bill.pro/api/v2 |
| Production | https://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
| Status | Meaning |
|---|---|
200 OK | The request worked. |
201 Created | The record was created. |
204 No Content | The request worked. There's no response body. |
401 Unauthorized | The token is missing or invalid. |
403 Forbidden | You don't have access to this profile, or this action isn't allowed. |
404 Not Found | The record doesn't exist, or belongs to another profile. |
409 Conflict | The record is in use, so it can't be deleted. |
422 Unprocessable Content | The 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:
- Authenticate
- Build your catalog
- Create customers & orders
- Collect payment
- Recurring billing & recovery
To find any endpoint, use search (⌘K).