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

FieldTypeDescription
companystringCompany Name
namestringfirst name
surnamestringlast name
emailstringcustomer email address
mobilestringmobile phone contact number
phonestringprimary contact number
full_addressstringfull address string ( Address will be looked up using Google )
web_passwordstringplain text password for customer portal access
dobstringcustomer date of birth
abnnumberabn for business
paymethodstringthe payment method to use ( Invoice, Credit Card, Direct Debit )
ctgidintegercall rates id for this customer, only need if custom rates are required for this customer
price_book_idintegerprice book id for this customer. only need if custom prices are required for this customer
expected_revenueintegermonthly expected revenue
minimum_spendintegerminimum spend requirements
credit_limitnumberthe total credit limit we should apply to this customer
termsintegerthe number of days before an invoice is due
billinggroupstringthe billing group
reseller_cidintegerthe reseller ( customer id ) that referred this customer
trading_namestringCompany Trading Name
agreement_startstringWhen does the current agreement start
agreement_endstringWhen does the current agreement end
currencystringThe Specific currency to use for this customer, not required if they are using the department default
do_not_send_invoicebooleanset to true to not email invoices to customer
customers_idstringyour own external identifier for this customer. Opaque to PracBill; not validated or checked for uniqueness. Send an empty string to clear it, omit the property to leave it unchanged. Can also be used in place of the customer id when retrieving a customer.
bank_namestringthe name on the bank account
bank_numbernumberthe account number on the bank account
bank_bsbnumberthe 6 digit bsb on the bank account

Responses

  • 200 — Request received successfully

Authenticate a customer

POST /{api_key}/customer/authenticate/

Request body

FieldTypeDescription
email requiredstring
password requiredstring

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

FieldTypeDescription
amount requirednumberPayment amount (must be between 0.01 and 99,999,999.99)
transaction_id requiredstringExternal transaction reference ID (max 255 characters). Used for refund tracking and duplicate detection.
gateway_namestringGateway name for the payment type field (alphanumeric and underscores only). If not specified, uses the department's configured credit card gateway.
descriptionstringPayment description (max 500 characters)
payment_datestringWhen the payment was processed. Defaults to current time.
invoice_idsarray of integerSpecific invoice IDs to apply payment to. If omitted, payment is auto-distributed across unpaid invoices.
gateway_dataobjectFlexible 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

FieldTypeDescription
charge_datestringDate of the charge (YYYY-MM-DD or DD/MM/YYYY format). Defaults to today if not provided
cid requiredintegerCustomer ID (required)
quantitynumberQuantity of items. Defaults to 1 if not provided
pid requiredintegerProduct ID (required)
taxrate_idintegerTax rate ID. Auto-populated from product if not provided
inc_tax_amountnumberAmount including tax. Auto-populated from product if not provided
descriptionstringDescription of the charge. Auto-populated from product if not provided
sourcestringSource of the charge

Responses

  • 200 — Request received successfully

Update a customer charge item

POST /{api_key}/customer/item/update/{id}

Request body

FieldTypeDescription
charge_datestringDate of the charge (YYYY-MM-DD or DD/MM/YYYY format)
cidintegerCustomer ID
quantitynumberQuantity of items
pidintegerProduct ID. If changed, tax rates will be recalculated
taxrate_idintegerTax rate ID
inc_tax_amountnumberAmount including tax
descriptionstringDescription of the charge
sourcestringSource 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

FieldTypeDescription
amount requirednumberthe 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_filebooleanforce use of the bank details on file ( rqeuires department to have a default direct deposit gateway set )
card_on_filebooleanforce use of the card details on file ( requires department to have a default credit card gateway set )
payment_tokenstringa payment/card token to perform the transaction against
cc_namestringthe card holders name
cc_numbernumberthe card number
cc_expmonthnumberthe 2 digit of the expiry month
cc_expyearnumberthe 2 digit expiry of the year
cc_ccvnumberthe card's ccv
store_cardbooleanStore 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

FieldTypeDescription
companystringCompany Name
namestringfirst name
surnamestringlast name
emailstringcustomer email address
mobilestringmobile phone contact number
phonestringprimary contact number
full_addressstringfull address string ( Address will be looked up using Google )
web_passwordstringplain text password for customer portal access
dobstringcustomer date of birth
abnnumberabn for business
paymethodstringthe payment method to use ( Invoice, Credit Card, Direct Debit )
ctgidintegercall rates id for this customer, only need if custom rates are required for this customer
price_book_idintegerprice book id for this customer. only need if custom prices are required for this customer
expected_revenueintegermonthly expected revenue
minimum_spendintegerminimum spend requirements
credit_limitnumberthe total credit limit we should apply to this customer
termsintegerthe number of days before an invoice is due
billinggroupstringthe billing group
reseller_cidintegerthe reseller ( customer id ) that referred this customer
trading_namestringCompany Trading Name
agreement_startstringWhen does the current agreement start
agreement_endstringWhen does the current agreement end
currencystringThe Specific currency to use for this customer, not required if they are using the department default
do_not_send_invoicebooleanset to true to not email invoices to customer
customers_idstringyour own external identifier for this customer. Opaque to PracBill; not validated or checked for uniqueness. Send an empty string to clear it, omit the property to leave it unchanged. Can also be used in place of the customer id when retrieving a customer.
bank_namestringthe name on the bank account
bank_numbernumberthe account number on the bank account
bank_bsbnumberthe 6 digit bsb on the bank account

Responses

  • 200 — Request received successfully

← All API groups