Customers
Manage the billable users of your app. Browse customers in the Dashboard > Commerce > Customers tab or via the SDK.
A customer is the entity in your app that gets charged — usually a user, an organization, or a project. You create one in Proyecta as soon as the corresponding entity exists in your own database, then store the returned id so you can reference it later.
The Customers tab
Section titled “The Customers tab”Open Dashboard > Commerce and switch to Customers to see every billable customer for the current app. Each row shows:
- Full name
- When they were created
A search box and filtering by email or creation date are available through the SDK; richer controls in the panel are coming.
import Proyecta from '@proyecta-ai/sdk';const proyecta = new Proyecta({ apiKey: process.env.PROYECTA_API_KEY });Create
Section titled “Create”const customer = await proyecta.commerce.customers.create({ email: 'alice@example.com', name: 'Alice Liddell', phone: '+14155551234', // E.164 format address: { line1: '123 Wonderland Ave', city: 'San Francisco', state: 'CA', postal_code: '94110', country: 'US', },});// Single customerconst customer = await proyecta.commerce.customers.get({ customerId: 'cus_123' });
// Paginateconst result = await proyecta.commerce.customers.list({ limit: '20' });for (const customer of result.data) { console.log(customer.name, customer.email);}Update
Section titled “Update”await proyecta.commerce.customers.update({ customerId: 'cus_123', email: 'new@example.com', address: { ... } });Common patterns
Section titled “Common patterns”Create a Proyecta customer when a user signs up
When a new user finishes signup, call proyecta.commerce.customers.createwith their email and name. Store the returned id on the user record asproyecta_customer_id.Build an admin customer browser
Build an admin page at /admin/customers that lists every Proyecta customerwith their email, name, created date, and a link to view their detail page.Use proyecta.commerce.customers.list to paginate through all customers.Should I create a Proyecta customer for every user, or only paying ones?
Create one for every user. It’s free, idempotent (calls with the same email return the same customer), and means you’re ready the moment a user upgrades — no scrambling to backfill.
Can a customer have multiple subscriptions?
Yes. Subscriptions belong to customers, not the other way around. Use commerce.checkout() to create a new subscription checkout session.
How do I see what a customer is subscribed to?
Today: through the embedded Stripe dashboard or by calling commerce.check() for each feature you care about. A subscription history view in the panel is on the roadmap.