Customers API
22 PracBill API endpoints for customers. Base URL https://billing.pracbill.com.au/api.
Create a customer
POST /{api_key}/customer/add
Request body
| Field | Type | Description |
|---|---|---|
company | string | Company Name |
name | string | first name |
surname | string | last name |
email | string | customer email address |
mobile | string | mobile phone contact number |
phone | string | primary contact number |
full_address | string | full address string ( Address will be looked up using Google ) |
web_password | string | plain text password for customer portal access |
dob | string | customer date of birth |
abn | number | abn for business |
paymethod | string | the payment method to use ( Invoice, Credit Card, Direct Debit ) |
ctgid | integer | call rates id for this customer, only need if custom rates are required for this customer |
price_book_id | integer | price book id for this customer. only need if custom prices are required for this customer |
expected_revenue | integer | monthly expected revenue |
minimum_spend | integer | minimum spend requirements |
credit_limit | number | the total credit limit we should apply to this customer |
terms | integer | the number of days before an invoice is due |
billinggroup | string | the billing group |
reseller_cid | integer | the reseller ( customer id ) that referred this customer |
trading_name | string | Company Trading Name |
agreement_start | string | When does the current agreement start |
agreement_end | string | When does the current agreement end |
currency | string | The Specific currency to use for this customer, not required if they are using the department default |
do_not_send_invoice | boolean | set to true to not email invoices to customer |
bank_name | string | the name on the bank account |
bank_number | number | the account number on the bank account |
bank_bsb | number | the 6 digit bsb on the bank account |
Responses
200— Request received successfully
Authenticate a customer
POST /{api_key}/customer/authenticate/
Request body
| Field | Type | Description |
|---|---|---|
email required | string | |
password required | string |
Responses
200— Authentication result
Returns the current customer balance.
GET /{api_key}/customer/balance/{cid}
Responses
200— Request received successfully
Log external payment
POST /{api_key}/customer/external-payment/{cid}
Log a payment transaction that was processed by an external party or ecommerce solution. Bypasses all credit card validation and authorization since the payment was already processed externally. Requires a transaction_id for refund tracking.
Request body
| Field | Type | Description |
|---|---|---|
amount required | number | Payment amount (must be between 0.01 and 99,999,999.99) |
transaction_id required | string | External transaction reference ID (max 255 characters). Used for refund tracking and duplicate detection. |
gateway_name | string | Gateway name for the payment type field (alphanumeric and underscores only). If not specified, uses the department's configured credit card gateway. |
description | string | Payment description (max 500 characters) |
payment_date | string | When the payment was processed. Defaults to current time. |
invoice_ids | array of integer | Specific invoice IDs to apply payment to. If omitted, payment is auto-distributed across unpaid invoices. |
gateway_data | object | Flexible object for storing external gateway metadata. Reserved keys (processed, message, transaction_id, external) are stripped automatically. |
Responses
200— Payment logged successfully or duplicate detected
Get paginated list of customers
GET /{api_key}/customer/get/page/{page_number}
Responses
200— Customers retrieved successfully
Get service type pricing for a customer (includes price book adjustments if customer has a price book assigned)
GET /{api_key}/customer/get/servicePricing/{cid}
Responses
200— Request received successfully
Get specific service type pricing for a customer
GET /{api_key}/customer/get/servicePricing/{cid}/{esid}
Responses
200— Request received successfully
Get all services assigned to a customer
GET /{api_key}/customer/get/services/{cid}
Responses
200— Customer services retrieved successfully
Get customer statement as an inline PDF (default), or as structured JSON when format=json is passed.
GET /{api_key}/customer/get/statement/{cid}
Responses
200— Inline PDF statement, or the JSON statement when format=json (JSON errors also return 200 with success=false).
Get customer statement from a specific date as an inline PDF (default), or as structured JSON when format=json is passed.
GET /{api_key}/customer/get/statement/{cid}/{date_from}
Responses
200— Inline PDF statement, or the JSON statement when format=json (JSON errors also return 200 with success=false).
Get a specific customer with full details
GET /{api_key}/customer/get/{cid}
Responses
200— Customer retrieved successfully
Get all active customers (no pagination)
GET /{api_key}/customer/getAll
Responses
200— All customers retrieved successfully
Get credit management status for a customer. Credit management prevents automatic late fees and card charges.
GET /{api_key}/customer/getCreditManagementStatus/{cid}
Responses
200— Request received successfully
Get customer management status
GET /{api_key}/customer/getManagementStatus/{cid}
Responses
200— Management status retrieved successfully
Add a charge item directly to a customer
POST /{api_key}/customer/item/add
Request body
| Field | Type | Description |
|---|---|---|
charge_date | string | Date of the charge (YYYY-MM-DD or DD/MM/YYYY format). Defaults to today if not provided |
cid required | integer | Customer ID (required) |
quantity | number | Quantity of items. Defaults to 1 if not provided |
pid required | integer | Product ID (required) |
taxrate_id | integer | Tax rate ID. Auto-populated from product if not provided |
inc_tax_amount | number | Amount including tax. Auto-populated from product if not provided |
description | string | Description of the charge. Auto-populated from product if not provided |
source | string | Source of the charge |
Responses
200— Request received successfully
Update a customer charge item
POST /{api_key}/customer/item/update/{id}
Request body
| Field | Type | Description |
|---|---|---|
charge_date | string | Date of the charge (YYYY-MM-DD or DD/MM/YYYY format) |
cid | integer | Customer ID |
quantity | number | Quantity of items |
pid | integer | Product ID. If changed, tax rates will be recalculated |
taxrate_id | integer | Tax rate ID |
inc_tax_amount | number | Amount including tax |
description | string | Description of the charge |
source | string | Source of the charge |
Responses
200— Request received successfully
Perform a payment on a customer's account. For the request body either a payment_token or all the card fields are required. The payment_token is not available on all payment gateways, **Payment Token is currently only supported on: Till Payments**
POST /{api_key}/customer/payment/{cid}
Request body
| Field | Type | Description |
|---|---|---|
amount required | number | the decimal number of the amount to charge, if you are storing a card details only, you can leave this empty, null or 0 |
bank_on_file | boolean | force use of the bank details on file ( rqeuires department to have a default direct deposit gateway set ) |
card_on_file | boolean | force use of the card details on file ( requires department to have a default credit card gateway set ) |
payment_token | string | a payment/card token to perform the transaction against |
cc_name | string | the card holders name |
cc_number | number | the card number |
cc_expmonth | number | the 2 digit of the expiry month |
cc_expyear | number | the 2 digit expiry of the year |
cc_ccv | number | the card's ccv |
store_card | boolean | Store this card on file for the customer |
Responses
200— Request received successfully
Get the Customer's Current Payment Details
GET /{api_key}/customer/paymentDetails/{cid}
Responses
200— Request received successfully
Search customers by field
GET /{api_key}/customer/search/{field}/{value}
Responses
200— Search results retrieved successfully
Set credit management status for a customer
GET /{api_key}/customer/setCreditManagementStatus/{cid}/{status}
Responses
200— Status updated successfully
Set customer management status
POST /{api_key}/customer/setManagementStatus/{cid}/{status}
Responses
200— Management status updated successfully
Update a customers details
POST /{api_key}/customer/update/{cid}
Request body
| Field | Type | Description |
|---|---|---|
company | string | Company Name |
name | string | first name |
surname | string | last name |
email | string | customer email address |
mobile | string | mobile phone contact number |
phone | string | primary contact number |
full_address | string | full address string ( Address will be looked up using Google ) |
web_password | string | plain text password for customer portal access |
dob | string | customer date of birth |
abn | number | abn for business |
paymethod | string | the payment method to use ( Invoice, Credit Card, Direct Debit ) |
ctgid | integer | call rates id for this customer, only need if custom rates are required for this customer |
price_book_id | integer | price book id for this customer. only need if custom prices are required for this customer |
expected_revenue | integer | monthly expected revenue |
minimum_spend | integer | minimum spend requirements |
credit_limit | number | the total credit limit we should apply to this customer |
terms | integer | the number of days before an invoice is due |
billinggroup | string | the billing group |
reseller_cid | integer | the reseller ( customer id ) that referred this customer |
trading_name | string | Company Trading Name |
agreement_start | string | When does the current agreement start |
agreement_end | string | When does the current agreement end |
currency | string | The Specific currency to use for this customer, not required if they are using the department default |
do_not_send_invoice | boolean | set to true to not email invoices to customer |
bank_name | string | the name on the bank account |
bank_number | number | the account number on the bank account |
bank_bsb | number | the 6 digit bsb on the bank account |
Responses
200— Request received successfully