Billing & invoices

Let your bot answer “have you received my payment?”, “what do I owe?” and “can I have a copy of my last invoice number?” from your live billing data — after the customer has proved who they are. This guide covers the invoice and balance data the bot reads, how to return it from your own system, and which accounting, payment and subscription connectors provide it with no code.
9 min readhttps://www.siluxchat.comcurl · Python · PHP · Node.js

Overview

Billing questions are among the most frequent a support team receives, and among the most sensitive. Silux Chat handles them in three stages: the customer is verified with a one-time code, the bot reads that customer’s invoices (and balance, where your system holds one), and it answers only from what came back. It never estimates an amount, never invents a due date and never tells a customer a payment “has gone through” unless your system says so.

  • Read-only. The bot reads invoices and balances. It cannot take payments, issue refunds, change a payment method or alter an invoice — none of the billing connectors request write access.
  • Verified customers only. Invoice and balance calls are blocked in code until identity verification has succeeded in that conversation. There is no prompt or setting that bypasses it.
  • One standard shape. Whether the data comes from Xero, Stripe, your own database or the live demo, the bot receives the same core fields per invoice: invoice, date, amount, status.

What customers ask, and what the bot does

Customer asksBot readsTypical answer
“Is invoice INV-7790 paid?”invoices → match invoice“INV-7790 for £29.95, dated 1 September, is showing as unpaid.”
“What do I owe?”account-summary (balance) and unpaid invoices“Your balance due is £29.95, which is invoice INV-7790.”
“Have you had my payment?”the most recent invoices and their status“Your September invoice (£19.95) is marked paid.”
“Why is my bill higher?”invoice amounts over timeCompares amounts it can see; anything it cannot see is passed to your team.
“Can I pay by card here?”nothing — no payment capabilityPoints to your payment page or team, from your knowledge base.

The bot never guesses a figure

If the invoice call fails, returns nothing, or the customer is not verified, the bot says it cannot see that information rather than quoting a number from its training or your website. Unanswered billing questions can be handed to your team as a support ticket.

Two ways to connect billing

1. A ready-made connector

If your invoices live in Xero, QuickBooks, Sage, FreeAgent, Stripe, Chargebee, Recurly or one of the other supported systems, connect it in Dashboard → Integrations → Connectors. Paste a read-only key (or sign in where the vendor supports OAuth), and the platform tests it with a real call before your bot uses it.

No code on your side. See the list below.

2. Account Connect on your own system

If billing lives in your own platform, implement the five Account Connect endpoints. Two of them carry billing: POST /invoices returns the list of invoices and POST /account-summary can carry the balance.

Typical build time is under an hour with the reference code.

How a connector call flows

  1. 1
    The customer passes verification. The platform stores a session for 30 minutes holding the customer record your vendor returned (vendor ID, name, email, phone, postcode).
  2. 2
    The bot calls POST https://www.siluxchat.com/api/connect/{connection_id}/invoices with that session token. The request carries a per-connection access key that the platform generates and holds — you never call this endpoint yourself.
  3. 3
    The platform calls the vendor’s documented invoices endpoint for that customer ID with your stored, encrypted credentials, and maps each row into the standard shape. Amounts reported in minor units (pence or cents) are converted to pounds, and dates are normalised to YYYY-MM-DD.
  4. 4
    A safety net removes any row that names a different customer’s email address, whatever the vendor search returned. The bot then answers from the remaining rows.
POSThttps://www.siluxchat.com/api/connect/{connection_id}/invoicesPer-connection key (platform-held)

Called by the bot after verification. Shown so you know exactly what it sees.

Response — invoices found
{
  "success": true,
  "invoices": [
    { "invoice": "INV-0042", "date": "2026-09-01", "amount": "120.00", "status": "PAID" },
    { "invoice": "INV-0051", "date": "2026-09-15", "amount": "80.00", "status": "AUTHORISED" }
  ]
}

The invoice shape

Every source is mapped to the same fields. The first two are required for a row to count; the others are shown when present. Many connectors add extra fields their vendor provides — currency, due or due_date, andoutstanding (the amount still owed on a part-paid invoice) are the most common. Each connector’s page lists exactly which fields it maps.

FieldRequiredMeaningExample
invoiceYesYour invoice number or reference, as the customer would see itINV-7790
dateYesIssue date, normalised to YYYY-MM-DD2026-09-01
amountRecommendedTotal including tax. Your own endpoint may include the currency symbol£29.95
statusRecommendedThe status word your system uses: paid, unpaid, overdue, part-paid, voidunpaid

Status words the bot reads well

Use plain words: paid, unpaid, overdue, part-paid, void, credit. Vendor terms such as Xero’s AUTHORISED (approved, awaiting payment) are passed through as-is; if your team uses internal codes, translate them before returning them from your own endpoint.

Invoices from your own system (Account Connect)

Your /invoices endpoint receives the session token your /verify-otp endpoint issued, looks up which customer it belongs to, and returns their invoices. Everything below runs against our public demo, which holds fictional customers only.

POST{your base}/invoicesX-API-Key: your key

Request body: {"session_token": "…"}. Return HTTP 200 with success: true, or HTTP 401 when the session is unknown or expired.

Read invoices for a verified customer (live demo)
# export SESSION=<the session_token returned by POST /verify-otp>
: "${SESSION:?export SESSION first}"
curl -s -X POST "https://www.siluxchat.com/api/account-connect-demo/v1/invoices" \
  -H "X-API-Key: demo-account-connect-key" \
  -H "Content-Type: application/json" \
  -d "{\"session_token\":\"$SESSION\"}"
Response — Test Customer (two paid invoices)
{
  "success": true,
  "invoices": [
    { "invoice": "INV-7781", "date": "2026-09-01", "amount": "£19.95", "status": "paid" },
    { "invoice": "INV-7702", "date": "2026-08-01", "amount": "£19.95", "status": "paid" }
  ]
}
Response — Jane Demo (one unpaid)
{
  "success": true,
  "invoices": [
    { "invoice": "INV-7790", "date": "2026-09-01", "amount": "£29.95", "status": "unpaid" }
  ]
}

The whole flow, copy and paste

This script verifies Jane Demo and reads her invoices and balance. It runs as written in any shell with curl and Python 3.

billing-demo.sh
BASE=https://www.siluxchat.com/api/account-connect-demo/v1
KEY=demo-account-connect-key

# 1. Identify Jane Demo (the demo never sends a text; the code is always 123456)
OTP=$(curl -s -X POST $BASE/verify-identity -H "X-API-Key: $KEY" -H 'Content-Type: application/json' \
  -d '{"full_name":"Jane Demo","postcode":"SW1A 1AA"}' | python3 -c 'import sys,json;print(json.load(sys.stdin)["otp_token"])')

# 2. Exchange the code for a session token
SESSION=$(curl -s -X POST $BASE/verify-otp -H "X-API-Key: $KEY" -H 'Content-Type: application/json' \
  -d "{\"otp_token\":\"$OTP\",\"otp_code\":\"123456\"}" | python3 -c 'import sys,json;print(json.load(sys.stdin)["session_token"])')

# 3. Read her invoices and her account balance
curl -s -X POST $BASE/invoices        -H "X-API-Key: $KEY" -H 'Content-Type: application/json' -d "{\"session_token\":\"$SESSION\"}"; echo
curl -s -X POST $BASE/account-summary -H "X-API-Key: $KEY" -H 'Content-Type: application/json' -d "{\"session_token\":\"$SESSION\"}"; echo

Recommendations for your implementation

  • Return the most recent invoices first and cap the list — the last 12 is plenty. The bot reads roughly the first 2,000 characters of a response, so a short list is read in full.
  • A customer with no invoices is a normal answer: return {"success": true, "invoices": []}, never an error.
  • Format amounts as the customer would see them (£29.95), including credit notes as negative amounts or with a status of credit.
  • Only return invoices belonging to the customer bound to the session token. Never accept a customer ID from the request body.

Balances and amounts due

A balance is a single figure, so it travels in the account summary rather than as a list. With your own system, add it to your/account-summary response under a clear name such as balance_due. With a connector that has the balancecapability (Stripe, Xero, QuickBooks, Sage and others), the platform reads the vendor’s balance and merges it into the account summary automatically.

Account summary with balance (live demo)
# export SESSION=<the session_token returned by POST /verify-otp>
: "${SESSION:?export SESSION first}"
curl -s -X POST "https://www.siluxchat.com/api/account-connect-demo/v1/account-summary" \
  -H "X-API-Key: demo-account-connect-key" \
  -H "Content-Type: application/json" \
  -d "{\"session_token\":\"$SESSION\"}"
Response — Jane Demo
{
  "success": true,
  "account": {
    "account_number": "C1002",
    "status": "active",
    "plan": "Unlimited Calls Bundle — 24 months",
    "monthly_price": "£29.95",
    "contract_end": "2028-01-15",
    "balance_due": "£29.95",
    "name": "Jane Demo"
  }
}

Through a connector, the merged summary carries the customer fields the vendor returned plus the vendor’s balance row, for example {"id": "cus_…", "name": "Jane Smith", "email": "jane@example.com", "balance": "12.50"}. See Account lookups for the full summary behaviour.

Unpaid and overdue invoices

The bot states the facts it can see — invoice, amount, date and status — and then follows your knowledge base for what to do next (your payment page, bank transfer instructions you publish, or a call-back). Keep payment instructions in your knowledge base, not in the invoice data, so they are consistent in every channel.

Billing connectors

Every connector below can read invoices, a balance, or both. Each page explains where to find the key in the vendor’s admin, the read-only permissions to grant and exactly which fields the bot sees. They are tested against each vendor’s documented API responses and again with a real call to your own account when you connect.

Errors and edge cases

SituationWhat the bot receivesWhat the customer hears
Customer not verified yetThe call is blocked before it is madeThe bot asks them to verify first.
No invoices on the account{"success": true, "invoices": []}“I can’t see any invoices on your account.”
Connector does not hold invoices{"success": true, "invoices": [], "message": "<Name> does not hold invoices"}Says it cannot see invoices, and offers your team.
Vendor unreachable or key revoked{"success": false, "system_error": true, "message": "We can't read invoices right now — our team has been told."}Says it cannot check right now — never “you have no invoices”.
Session expired (after 30 minutes)HTTP 401, “Session expired — please verify again.”The bot asks the customer to verify again.
Platform connection test{"success": true, "invoices": [], "test": true}Nobody — the test customer is never a real person.

A connection whose vendor starts refusing its key is marked as failing, and the daily health check emails the account owner once. Details and fixes are in Troubleshooting.

What never to return

Billing data minimisation

  • Full card numbers — the last four digits at most, and only if the customer would recognise them.
  • Bank account numbers, sort codes, IBANs or mandate references in full.
  • Payment tokens, customer IDs from your payment processor, or anything that could be used to charge the customer.
  • Another customer’s invoices — filter by the customer bound to the session token, always.
  • Internal notes, credit-control flags or collection status your customers would not see on their own statements.

The billing connectors only map the invoice fields listed on each connector’s page (number, date, amount, status and, for some vendors, currency, due date or amount outstanding) plus the balance, so card and bank details held by a vendor are never read in the first place. More in Security & data protection.

Get help

Unsure whether your billing system is covered, or want a second pair of eyes on your /invoices endpoint before you go live? Email support@siluxcall.co.uk with the name of the system you use and a sample (anonymised) response — our integration team will help you connect it.

Need help with your integration?

Our integration team can review your endpoints, help you choose the right connector and check a test run with you. Tell us which system you use and what you would like the bot to answer.

support@siluxcall.co.uk