WidgetCustomer account lookup

Customer account lookup

Show each customer's organizations, plan and billing next to their conversation.

The account lookup lets SI Desk ask your app who a customer is. The inbox then shows the customer's organizations, role, plan and projects in the Billing tab. With Chargebee connected, it also shows each organization's subscriptions, invoices and payments. The assistant can use the same facts once the customer's email is verified.

Set it up

  1. Add the endpoint below to your app.
  2. In Settings › Business › Signed-in customers, enter its address in Account lookup URL. The Identity secret signs every request.
  3. To show billing, enter your Chargebee Site and a Read-only API key in Settings › Business › Billing (Chargebee).

The endpoint

SI Desk calls your URL with the customer's email:

GET https://app.example.com/api/support/customer?email=jane@example.com
X-Support-Timestamp: 1762412345
X-Support-Signature: <signature>

Check the signature before you answer. It is the base64url HMAC-SHA256 of customer:<timestamp>:<email>, made with your identity secret. The email is lowercase. SI Desk signs every request at the moment it sends it, so you can reject any timestamp more than 5 minutes from your server's clock.

const crypto = require("node:crypto");

function validSupportRequest(email, timestamp, signature) {
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
  const expected = crypto
    .createHmac("sha256", process.env.SIDESK_IDENTITY_SECRET)
    .update(`customer:${timestamp}:${email.toLowerCase()}`)
    .digest("base64url");
  const given = Buffer.from(signature ?? "");
  return given.length === expected.length && crypto.timingSafeEqual(Buffer.from(expected), given);
}

The response

Return JSON in this shape. Return "user": null and an empty list when no account has the email.

{
  "user": { "userId": "u_1", "email": "jane@example.com", "fullName": "Jane Doe", "createdAt": "2026-01-05T10:00:00Z" },
  "organizations": [
    {
      "organizationId": "org_1",
      "name": "Acme",
      "role": "owner",
      "planTier": "pro",
      "subscriptionStatus": "active",
      "trialEndsAt": null,
      "currentPeriodEnd": "2026-12-01T00:00:00Z",
      "chargebeeCustomerId": "cb_123",
      "chargebeeSubscriptionId": "sub_123",
      "createdAt": "2026-01-05T10:00:00Z",
      "projectCount": 1,
      "projects": [{ "projectId": "p_1", "name": "Main site", "access": true }]
    }
  ]
}

SI Desk keeps each answer for 60 seconds.

Which organization the customer was in

If a conversation started on a page whose address contains /org/<id>/projects/<id>/, the Billing tab opens on that organization and project.

Without the lookup

With only Chargebee connected, the Billing tab shows the Chargebee customers that have the contact's email.