Account lookups

account-summary is how the bot answers “what’s on my account?” for a verified customer: plan, status, contract dates and balance, read live from your system and nothing more.
9 min readhttps://www.siluxchat.comcurl · Python · PHP · Node.js

Overview

After verification the bot holds a session_token. It posts that token to account-summary, and your system returns an overview of the account the session belongs to. The bot never supplies an account number of its own, so it can only ever read the verified customer’s own record.

Customer asksAnswered from
“What plan am I on?”account.plan
“When does my contract end?”account.contract_end
“How much do I pay a month?”account.monthly_price
“Do I owe anything?”account.balance_due
“Is my account active?”account.status

The endpoint

POST{base}/account-summaryX-API-Key + session_token

Request body: {"session_token": "…"}. Reply: {"success": true, "account": { … }}.

Against the live demo
# export SESSION=<session_token from verify-otp>
# See Testing with the live demo for the full script.
: "${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\"}"
Test Customer (200)
{
  "success": true,
  "account": {
    "account_number": "C1001",
    "status": "active",
    "plan": "Business Phone Line — 12 months",
    "monthly_price": "£19.95",
    "contract_end": "2027-03-31",
    "balance_due": "£0.00",
    "name": "Test Customer"
  }
}
Jane Demo (200)
{
  "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"
  }
}

Both responses were captured from the live demo.

Recommended fields

The account object is free-form: return whatever a customer should be able to see on your own “My Account” page, and the bot reads it. These names are recognised easily and read naturally:

FieldExampleMeaning
account_numberC1001The reference the customer quotes to your team
nameJane SmithAccount holder
statusactiveactive, suspended, closed, in arrears …
planBusiness Line — 12 monthsProduct, tariff or membership
monthly_price£19.95Include the currency symbol
contract_start / contract_end2027-03-31ISO dates (YYYY-MM-DD)
balance_due£0.00What is owed now
next_payment_date2026-10-01When the next payment is taken
payment_methodDirect Debit ending 4821Last four digits at most
services[{"name":"Broadband","status":"active"}]Short list of products on the account

Currency and dates

Send money as display strings with the symbol (£19.95) and dates as YYYY-MM-DD. The bot formats dates for the customer, but it should never have to guess a currency.

Shaping your response

  • Keep it compact. The bot reads roughly the first 2,000 characters of each response. Put the fields customers ask about first and leave out internal flags, audit data and long histories.
  • Use plain words. "status": "active" beats "st": 3. The bot explains what it can read, not what it must decode.
  • Include the answer, not the ingredients. Return balance_due rather than every transaction for the bot to add up.
  • Extra data is fine. If you hold bookings or subscriptions but not in a connector, a short upcoming_bookings or subscriptions array here lets the bot answer those questions too.
  • Respond quickly. Aim for under a second or two; the platform waits up to 15 seconds before treating the call as failed.
Building the account object
def account_for(customer_id: str) -> dict:
    c = db.customers.get(customer_id)          # YOUR database
    return {
        "account_number": c.number,
        "name": c.full_name,
        "status": c.status,                     # "active", "suspended", ...
        "plan": c.plan_name,
        "monthly_price": f"£{c.monthly_price:.2f}",
        "contract_end": c.contract_end.isoformat(),
        "balance_due": f"£{c.balance:.2f}",
    }

The complete endpoint, including session checks, is in Build your own Account Connect endpoints.

What never to return

The bot can repeat anything you send it

Treat the response as something the customer may read in full. Never include:
  • Passwords, PINs, security questions or their answers.
  • Full card numbers or bank account numbers — the last four digits at most.
  • Other customers’ data, including other people on a shared or business account the verified person should not see.
  • Internal notes, fraud or credit flags, staff comments or risk scores.
  • Clinical, legal-case or other special-category details.
  • Anything you would not show on your own “My Account” page.

Account lookups on connectors

When a connector verifies your customers, Silux Chat builds account-summary for you at https://www.siluxchat.com/api/connect/{connection_id}/account-summary:

What goes into it

  • The customer record found during verification: id, name, email, phone, postcode.
  • If the connector supports balance (for example accounting software), the balance from the vendor.
  • If the connector supports account, the extra account fields it maps.
  • Nothing else — each connector maps only the standard fields listed on its page.
Example connector account-summary (illustrative)
{
  "success": true,
  "account": {
    "id": "207119551",
    "name": "Jane Smith",
    "email": "jane@example.com",
    "phone": "+447700900123",
    "postcode": "SW1A 1AA",
    "balance": "120.00"
  }
}

During a connection test

When the dashboard tests the chain with the test customer, no customer data is read and the reply confirms only that the credentials work:

Test session reply
{
  "success": true,
  "test": true,
  "account": {"connector": "shopify", "credentials": "working"}
}

How the bot answers

The bot answers from the returned data only, in your brand’s tone, and quotes values exactly:

Illustrative conversation (Jane Demo)
Customer: Do I owe you anything?
Bot:      Thanks, Jane — you're verified. Your account C1002 shows £29.95 due.
          You're on the Unlimited Calls Bundle (24 months) at £29.95 a month,
          with your contract running until 15 January 2028.
  • If a field is missing, the bot says it can’t see that detail rather than guessing.
  • If your system is unreachable, it says it can’t check accounts right now and, where set up, offers to raise a ticket for your team.
  • It never reveals account data to anyone who has not verified in the current conversation.

Errors

StatusBodyMeaningWhat the bot does
200{"success": true, "account": {…}}SuccessAnswers from the data
401{"detail":{"success":false,"message":"Session expired — please verify again."}}Session unknown or expiredAsks the customer to verify again
401{"detail":{"success":false,"message":"Missing or wrong X-API-Key"}}Key mismatchCannot check accounts; your dashboard shows the failure
5xx / timeout—Your system failedSays it can’t check right now — never “no account”
A made-up session token (returns 401)
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":"nope"}'

See the error reference for everything else.

Get help

Want a second opinion on which account fields to expose? Email support@siluxcall.co.uk with an anonymised sample response and we will review it with you.

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