Manage customers
A customer record ties a person's identity—name, email, phone number—to their order history and saved payment methods. Attaching customers to orders gives you a reliable identity anchor for repeat purchases, fraud signals, customer service lookups, and personalized checkout experiences. This guide shows you how to create customers, look them up, and use customer IDs in orders.
An authenticated AI agent can create or update customer records after confirmation, look up customer details, page through customers, and use governed customer analytics for operational questions.
MCP tools: create_customer, update_customer, list_customers, get_customer or get_customer_analytics
Confirmed MCP actions require explicit form confirmation before Inttegro changes state.
Prerequisites
- Understanding of orders and how
customerDataworks in order creation
Create a customer
Create a customer record with the required name field. Email, phone, billing address, and shipping address are optional; include the contact data your own checkout flow needs.
Create customer
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.customers.create({
name: "Gloria Kesewaa",
phoneNumber: "+233544998605",
})
Store the returned id (cu_…) in your own database, associated with your user record. You'll pass it in future orders to link purchases to this customer.
Look up a customer
Retrieve a customer record by ID to verify their details, display order history context, or check which payment methods they have saved.
Lookup customer
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.customers.lookup({
customerId: "cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn",
})
Attach customers to orders
Pass the customer ID in customerId when creating an order. Inttegro links the order to that customer record and populates the order's customer object with their name, email, and phone—which appears on invoices, in the dashboard, and in order list responses.
Order with customer
{
customerId: "cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn",
lineItems: [
{
priceId: "pr_abc123",
quantity: 1,
},
],
}
Attaching a customer to an order is how repeat-purchase flows work. The customer's saved payment methods become available for selection at checkout—so returning customers don't need to re-enter their mobile money number or card details each time.
See Charge repeat customers for the complete saved-payment-method flow.
Page through customers
Retrieve paginated customer records for reporting, syncing, or building an admin view of your customer base.
pageNumber is
required, uses a 1-based index, and must be between 1 and 10.
pageSize is
optional, accepts 1–256, and defaults to 256.
Page customers
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.customers.page({
pageNumber: 1,
pageSize: 50,
})
Related resources
- Customers API — Full reference for create, lookup, and page endpoints
- Charge repeat customers — Tokenize payment methods and charge customers without re-entering details
- Accept a payment — Full order creation flow with customer data