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
customer_dataworks 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
- cURL
- TypeScript
- Go
- Python
- PHP
- Ruby
- Java
- C#
curl https://api.inttegro.com/customers/create \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Gloria Kesewaa",
"email_address": "[email protected]",
"phone_number": "+233544998605"
}'
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",
})
package main
import (
"context"
"log"
"os"
inttegro "github.com/zebodotdev/inttegro-sdk-go/v4"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := inttegro.CreateCustomerParams{
Name: "Gloria Kesewaa",
PhoneNumber: "+233544998605",
}
result, err := client.Customers.Create(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}
import os
import inttegro
client = inttegro.InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.customers.create(inttegro.customers.CreateRequest(
name="Gloria Kesewaa",
phone_number="+233544998605",
))
<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->customers->create([
'name' => 'Gloria Kesewaa',
'phone_number' => '+233544998605',
]);
require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.customers.create(
name: "Gloria Kesewaa",
phone_number: "+233544998605"
)
import com.inttegro.Client;
import com.inttegro.customers.CreateCustomerParams;
public class Example {
public static void main(String[] args) throws Exception {
var client = new Client(System.getenv("INTTEGRO_API_KEY"));
var params = CreateCustomerParams.builder()
.name("Gloria Kesewaa")
.phoneNumber("+233544998605")
.build();
var result = client.customers().create(params);
}
}
using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Customers.CreateAsync(new {
name = "Gloria Kesewaa",
phone_number = "+233544998605",
});
Store the returned customer.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
- cURL
- TypeScript
- Go
- Python
- PHP
- Ruby
- Java
- C#
curl https://api.inttegro.com/customers/lookup \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"customer_id": "cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn"}'
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",
})
package main
import (
"context"
"log"
"os"
inttegro "github.com/zebodotdev/inttegro-sdk-go/v4"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
result, err := client.Customers.Lookup(ctx, "cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn")
if err != nil {
log.Fatal(err)
}
_ = result
}
import os
import inttegro
client = inttegro.InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.customers.lookup("cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn")
<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->customers->lookup("cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn");
require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.customers.lookup(customer_id: "cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn")
import com.inttegro.Client;
public class Example {
public static void main(String[] args) throws Exception {
var client = new Client(System.getenv("INTTEGRO_API_KEY"));
var result = client.customers().lookup("cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn");
}
}
using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Customers.LookupAsync("cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn");
Attach customers to orders
Pass the customer ID in customer_data.customer_id 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.
{
"customer_data": {
"customer_id": "cu_ewoa27qe7aO4GZouasUSmVXILsmxjR0Hc6lCMBkn"
},
"line_items": [
{
"price_id": "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.
page_number is required, uses a 1-based index, and must be between 1 and 10. page_size is optional, accepts 1–256, and defaults to 256.
Page customers
- cURL
- TypeScript
- Go
- Python
- PHP
- Ruby
- Java
- C#
curl https://api.inttegro.com/customers/page \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page_number": 1,
"page_size": 50
}'
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,
})
package main
import (
"context"
"log"
"os"
inttegro "github.com/zebodotdev/inttegro-sdk-go/v4"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := inttegro.PageCustomersParams{
PageNumber: 1,
PageSize: 50,
}
result, err := client.Customers.Page(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}
import os
import inttegro
client = inttegro.InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.customers.page(inttegro.customers.PageRequest(
page_number=1,
page_size=50,
))
<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->customers->page([
'page_number' => 1,
'page_size' => 50,
]);
require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.customers.page(
page_number: 1,
page_size: 50
)
import com.inttegro.Client;
import com.inttegro.customers.PageCustomersParams;
public class Example {
public static void main(String[] args) throws Exception {
var client = new Client(System.getenv("INTTEGRO_API_KEY"));
var params = PageCustomersParams.builder()
.pageNumber(1)
.pageSize(50)
.build();
var result = client.customers().page(params);
}
}
using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Customers.PageAsync(new {
page_number = 1,
page_size = 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