API Reference

Customers

A customer represents a person or business you bill. Attach customers to checkout sessions, invoices, and payment links to reuse their details and build a payment history.

Customers are lightweight — you can pass `customer_email` on every checkout session without creating one, but doing so gives you a reusable record, unlocks the customer portal, and lets you associate multiple invoices or recurring templates with the same person.

The customer object

idstring

Unique identifier, prefixed with `cus_`.

objectstring

Always `"customer"`.

livemodeboolean

True if created with a live-mode key.

emailstring

Customer email. Used for receipts and portal magic links.

first_namestring

Given name.

last_namestring

Family name.

phonestringnullable

Phone number in any format you prefer to store.

company_namestringnullable

Business name shown on invoices.

notesstringnullable

Free-form internal notes. Never shown to the customer.

metadataobjectnullable

Up to 20 key/value pairs for your bookkeeping.

stripe_customer_idstringnullable

The Stripe Customer id provisioned for this record on your connected account. Managed by LuniPay — do not mutate.

createdinteger

Creation timestamp (unix).

updatedinteger

Last-updated timestamp (unix).

{
  "id": "cus_01JRZK2Q4T9ZS0VCNA3HX7W9EY",
  "object": "customer",
  "livemode": false,
  "email": "ada@example.com",
  "first_name": "Ada",
  "last_name": "Lovelace",
  "phone": "+18765551234",
  "company_name": "Analytical Engines Ltd.",
  "notes": "VIP — priority support",
  "metadata": {
    "internal_id": "ACCT-42"
  },
  "stripe_customer_id": "cus_Pxxxxxxxxxxxx",
  "created": 1713100800,
  "updated": 1713100800
}

Endpoints