Skip to content

Customers

Create and manage buyer profiles for repeat purchases, saved payment methods, and customer service.

Customers represent the people and businesses that buy from you. A customer record keeps a buyer’s name, contact details, addresses, and your own reference together, giving you a stable identity to use across purchases.

Use a customer when you expect a buyer to return, want to save a payment method, or need a consistent view of their account history. Attach the returned customer ID to future orders and payment methods so activity for the same buyer remains connected.

You can also provide customer details directly when you create an order. Inttegro creates a guest customer for that checkout; update the customer later if the buyer chooses to create an account or return for another purchase. See Manage customers for the complete integration flow.

The customer object

A customer object contains a buyer’s profile and current customer-held balances. Orders and payment methods are separate resources: use the customer ID to associate them with the same buyer.

Properties

TypeScript SDK responseCustomerv15.0.0

Create customer POST /customers/create

Create a customer when you want to recognize a buyer across purchases. Save the returned customer ID in your system, then use it when creating orders or saving payment methods for that buyer.

Required attributes

TypeScript SDK requestCreateCustomerRequestv15.0.0
  • #namestringrequired

    Customer display name. Leading and trailing whitespace is removed; the maximum length is 200 characters.

Optional attributes

TypeScript SDK requestCreateCustomerRequestv15.0.0
The response returns the new customer. Store its id as the Inttegro customer ID for this buyer.

Request

POST/customers/create
cURLbash
curl https://api.inttegro.com/customers/create \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: create-customer-user-123456" \
-d '{
"name": "Jane Mensah",
"title": "Ms.",
"reference": "user_123456",
"email_address": "jane@example.com",
"phone_number": "+233242057831",
"custom_data": {
  "loyalty_tier": "gold",
  "account_manager": "am_789"
}
}'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.customers.create({
  name: "Jane Mensah",
  title: "Ms.",
  reference: "user_123456",
  emailAddress: "jane@example.com",
  phoneNumber: "+233242057831",
  customData: {
    loyalty_tier: "gold",
    account_manager: "am_789",
  },
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/customdata"
  "github.com/inttegro/inttegro-sdk-go/v14/customer"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := customer.CreateParams{
    Name: "Jane Mensah",
    Title: "Ms.",
    Reference: "user_123456",
    Email: "jane@example.com",
    PhoneNumber: "+233242057831",
    CustomData: func() *customdata.Input { value, err := customdata.NewInput(map[string]any{
        "loyalty_tier": "gold",
        "account_manager": "am_789",
      }); if err != nil { panic(err) }; return value }(),
  }
  result, err := client.Customers.Create(ctx, params)
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.customers.create(inttegro.customer.CreateRequest(
  name="Jane Mensah",
  title="Ms.",
  reference="user_123456",
  email_address="jane@example.com",
  phone_number="+233242057831",
  custom_data=inttegro.CustomDataInput({
    "loyalty_tier": "gold",
    "account_manager": "am_789",
  }),
))
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->customers->create([
  'name' => 'Jane Mensah',
  'title' => 'Ms.',
  'reference' => 'user_123456',
  'email_address' => 'jane@example.com',
  'phone_number' => '+233242057831',
  'custom_data' => [
    'loyalty_tier' => 'gold',
    'account_manager' => 'am_789',
  ],
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.customers.create(
  name: "Jane Mensah",
  title: "Ms.",
  reference: "user_123456",
  email_address: "jane@example.com",
  phone_number: "+233242057831",
  custom_data: {
    loyalty_tier: "gold",
    account_manager: "am_789",
  }
)
Javajava
import com.inttegro.Client;
import com.inttegro.customers.CreateCustomerParams;
import com.inttegro.CustomDataInput;

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("Jane Mensah")
      .title("Ms.")
      .reference("user_123456")
      .emailAddress("jane@example.com")
      .phoneNumber("+233242057831")
      .customData(new CustomDataInput()
          .set("loyalty_tier", "gold")
          .set("account_manager", "am_789"))
      .build();
    var result = client.customers().create(params);
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Customers.CreateAsync(new CreateCustomerRequest {
  Name = "Jane Mensah",
  Title = "Ms.",
  Reference = "user_123456",
  EmailAddress = "jane@example.com",
  PhoneNumber = "+233242057831",
  CustomData = new Inttegro.CustomDataInput()
    .Set("loyalty_tier", "gold")
    .Set("account_manager", "am_789"),
});
Responsejson
{
  "customer": {
    "id": "cu_a1b2c3d4e5",
    "name": "Jane Mensah",
    "title": "Ms.",
    "email_address": "jane@example.com",
    "phone_number": "+233242057831",
    "reference": "user_123456",
    "custom_data": {
      "loyalty_tier": "gold",
      "account_manager": "am_789"
    },
    "guest": false,
    "balance": {},
    "created_at": "2025-11-23T14:30:00Z"
  }
}

Search customers POST /customers/search

Search customers by name or another remembered detail, or narrow the result set by customer kind. Search results are discovery summaries: use the returned customer ID with Lookup customer before a decision or mutation that depends on current customer state.

Request attributes

TypeScript SDK requestResourceSearchRequestv15.0.0
  • #cursorstring

    Opaque continuation cursor returned by the previous page. Replay the same request and add this value to retrieve the next page.

  • #facetsResourceSearchFacet[]Fields to group and count. This route accepts only kind.Click or tap to expand
    • #fieldstringrequired
      Route-local field name. Use kind.
    • #limitnumber
      Maximum buckets to return, from 1 through 50. Defaults to 10.
  • #filtersResourceSearchFilter[]Exact constraints. This route accepts only kind.Click or tap to expand
    • #fieldstringrequired
      Route-local field name. Use kind.
    • #operatorResourceSearchOperatorrequired
      Use eq for one value or in for any of several values.
    • #valuesstring[]required
      One value for eq; one through 20 values for in.
  • #pageSizenumber

    Results per page, from 1 through 100. Defaults to 20.

  • #sortResourceSearchSortResult ordering.Click or tap to expand
    • #directionResourceSearchSortDirectionrequired
      asc or desc. Relevance supports desc only.
    • #fieldResourceSearchSortFieldrequired
      relevance or updated_at.
  • #textstring

    Search text, from 1 through 512 characters. Supply search text, exact filters, or both.

Response

Returns a typed search page with discovery summaries in results, requested facet counts in facets, page and total counts, an optional nextCursor, and freshness metadata. total.relation states whether the total is exact or a lower bound.

Request

POST/customers/search
cURLbash
curl https://api.inttegro.com/customers/search \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "Ama Mensah" }'
TypeScripttypescript
import { InttegroClient, type ResourceSearchRequest } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const request: ResourceSearchRequest = {
  text: "Ama Mensah",
}
const page = await inttegro.customers.search(request)
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/search"
)

func main() {
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
  params := search.Params{
    Text: "Ama Mensah",
  }
  page, err := client.Customers.Search(context.Background(), params)
  if err != nil {
    log.Fatal(err)
  }
  _ = page
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
request = inttegro.search.Request(
    text="Ama Mensah",
)
page = client.customers.search(request)
PHPphp
<?php

use Inttegro\Client;
use Inttegro\ResourceSearchRequest;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$request = new ResourceSearchRequest(
    text: 'Ama Mensah',
);
$page = $client->customers->search($request);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
request = Inttegro::Search::Request.new(
  text: "Ama Mensah",
)
page = client.customers.search(request)
Javajava
import com.inttegro.Client;
import com.inttegro.search.ResourceSearchRequest;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var request = ResourceSearchRequest.builder()
      .text("Ama Mensah")
      .build();
    var page = client.customers().search(request);
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var request = new ResourceSearchRequest
{
    Text = "Ama Mensah",
};
var page = await inttegro.Customers.SearchAsync(request);
Response excerptjson
{
  "search": {
    "results": [
      {
        "resource": { "type": "customer", "id": "cu_a1b2c3d4e5" },
        "title": "Ama Mensah",
        "summary": "ama@example.com",
        "updated_at": "2026-09-21T10:30:00Z"
      }
    ]
  }
}

Lookup customer POST /customers/lookup

Retrieve a customer’s current profile and available balances. Use this when showing account details, preparing a repeat purchase, or helping a customer with their account.

Required attributes

TypeScript SDK requestLookupCustomerRequestv15.0.0
  • #customerIdstringrequired

    Customer ID returned by Inttegro, beginning with cu_.

The response returns the customer object, including available customer-held balances by currency.

Request

POST/customers/lookup
cURLbash
curl https://api.inttegro.com/customers/lookup \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cu_a1b2c3d4e5"
}'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.customers.lookup({
  customerId: "cu_a1b2c3d4e5",
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  result, err := client.Customers.Lookup(ctx, "cu_a1b2c3d4e5")
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.customers.lookup("cu_a1b2c3d4e5")
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->customers->lookup("cu_a1b2c3d4e5");
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.customers.lookup(customer_id: "cu_a1b2c3d4e5")
Javajava
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_a1b2c3d4e5");
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Customers.LookupAsync("cu_a1b2c3d4e5");
Responsejson
{
  "customer": {
    "id": "cu_a1b2c3d4e5",
    "name": "Jane Mensah",
    "title": "Ms.",
    "email_address": "jane@example.com",
    "phone_number": "+233242057831",
    "reference": "user_123456",
    "guest": false,
    "billing_address": {
      "name": "Jane Mensah",
      "phone_number": "+233242057831",
      "line1": "23 Adenta High Street",
      "line2": "East Legon Hills",
      "city": "Accra",
      "region": "Greater Accra",
      "post_code": "GA-422-1134",
      "country": "GH"
    },
    "shipping_address": {
      "name": "Jane Mensah",
      "phone_number": "+233242057831",
      "line1": "23 Adenta High Street",
      "line2": "East Legon Hills",
      "city": "Accra",
      "region": "Greater Accra",
      "post_code": "GA-422-1134",
      "country": "GH"
    },
    "custom_data": {
      "loyalty_tier": "gold",
      "account_manager": "am_789"
    },
    "balance": {
      "ghs": {
        "available": {
          "currency": "ghs",
          "value": 6500
        },
        "as_of": "2025-11-24T07:55:00Z"
      }
    },
    "created_at": "2025-11-23T14:30:00Z",
    "updated_at": "2025-11-24T08:00:00Z"
  }
}

Update customer POST /customers/update

Keep a customer’s name, contact details, addresses, reference, or custom data current. Send only the fields you want to change; omitted fields keep their existing values.

Updating a guest customer created during checkout turns it into a reusable customer, so you can use the same customer ID for future purchases.

Update behavior

Request attributes

TypeScript SDK requestUpdateCustomerRequestv15.0.0

The response returns the updated customer.

Request

POST/customers/update
cURLbash
curl https://api.inttegro.com/customers/update \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: update-customer-user-123456-v2" \
-d '{
"customer_id": "cu_a1b2c3d4e5",
"name": "Jane Mensah-Asante",
"billing_address": {
  "name": "Jane Mensah-Asante",
  "line1": "5 Liberation Road",
  "city": "Accra",
  "country": "GH"
},
"custom_data": {
  "loyalty_tier": "platinum"
}
}'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.customers.update({
  customerId: "cu_a1b2c3d4e5",
  name: "Jane Mensah-Asante",
  billingAddress: {
    name: "Jane Mensah-Asante",
    line1: "5 Liberation Road",
    city: "Accra",
    country: "GH",
  },
  customData: {
    loyalty_tier: "platinum",
  },
}, {
  idempotencyKey: "update-customer-user-123456-v2",
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/customdata"
  "github.com/inttegro/inttegro-sdk-go/v14/customer"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := customer.UpdateParams{
    CustomerID: "cu_a1b2c3d4e5",
    Name: "Jane Mensah-Asante",
    BillingAddress: &customer.Address{
      Name: "Jane Mensah-Asante",
      Line1: "5 Liberation Road",
      City: "Accra",
      Country: "GH",
    },
    CustomData: func() *customdata.Input { value, err := customdata.NewInput(map[string]any{
        "loyalty_tier": "platinum",
      }); if err != nil { panic(err) }; return value }(),
  }
  result, err := client.Customers.Update(ctx, params)
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.customers.update(inttegro.customer.UpdateRequest(
  customer_id="cu_a1b2c3d4e5",
  name="Jane Mensah-Asante",
  billing_address=inttegro.customer.AddressInput(
    name="Jane Mensah-Asante",
    line1="5 Liberation Road",
    city="Accra",
    country="GH",
  ),
  custom_data=inttegro.CustomDataInput({
    "loyalty_tier": "platinum",
  }),
),
    idempotency_key="update-customer-user-123456-v2")
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->customers->update([
  'customer_id' => 'cu_a1b2c3d4e5',
  'name' => 'Jane Mensah-Asante',
  'billing_address' => [
    'name' => 'Jane Mensah-Asante',
    'line1' => '5 Liberation Road',
    'city' => 'Accra',
    'country' => 'GH',
  ],
  'custom_data' => [
    'loyalty_tier' => 'platinum',
  ],
], "update-customer-user-123456-v2");
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.customers.update(
  customer_id: "cu_a1b2c3d4e5",
  name: "Jane Mensah-Asante",
  billing_address: {
    name: "Jane Mensah-Asante",
    line1: "5 Liberation Road",
    city: "Accra",
    country: "GH",
  },
  custom_data: {
    loyalty_tier: "platinum",
  }
)
Javajava
import com.inttegro.Client;
import com.inttegro.customers.Address;
import com.inttegro.CustomDataInput;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = new UpdateCustomerParams();
    params.customerId = "cu_a1b2c3d4e5";
    params.name = "Jane Mensah-Asante";
    params.billingAddress = Address.builder()
      .name("Jane Mensah-Asante")
      .line1("5 Liberation Road")
      .city("Accra")
      .country("GH")
      .build();
    params.customData = new CustomDataInput()
      .set("loyalty_tier", "platinum");
    var result = client.customers().update(params);
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Customers.UpdateAsync(new UpdateCustomerRequest {
  CustomerId = "cu_a1b2c3d4e5",
  Name = "Jane Mensah-Asante",
  BillingAddress = new Address {
    Name = "Jane Mensah-Asante",
    Line1 = "5 Liberation Road",
    Country = "GH",
  },
  CustomData = new Inttegro.CustomDataInput()
    .Set("loyalty_tier", "platinum"),
});
Responsejson
{
  "customer": {
    "id": "cu_a1b2c3d4e5",
    "name": "Jane Mensah-Asante",
    "title": "Ms.",
    "email_address": "jane@example.com",
    "phone_number": "+233242057831",
    "reference": "user_123456",
    "custom_data": {
      "loyalty_tier": "platinum"
    },
    "guest": false,
    "billing_address": {
      "name": "Jane Mensah-Asante",
      "line1": "5 Liberation Road",
      "city": "Accra",
      "country": "GH"
    },
    "balance": {},
    "created_at": "2025-11-23T14:30:00Z",
    "updated_at": "2025-11-25T10:45:00Z"
  }
}

Page through customers POST /customers/page

Browse customers from newest to oldest. Use this endpoint to build customer lists, review recent sign-ups, or select a customer before retrieving their full account activity.

Request attributes

TypeScript SDK requestPageCustomersRequestv15.0.0
The response contains the page number, the number of customers returned, and the customer objects. An empty page has an empty customers collection and a size of 0.

Request

POST/customers/page
cURLbash
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
}'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.customers.page({
  pageNumber: 1,
  pageSize: 50,
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/customer"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := customer.PageParams{
    PageNumber: 1,
    PageSize: 50,
  }
  result, err := client.Customers.Page(ctx, params)
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.customers.page(inttegro.customer.PageRequest(
  page_number=1,
  page_size=50,
))
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->customers->page([
  'page_number' => 1,
  'page_size' => 50,
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.customers.page(
  page_number: 1,
  page_size: 50
)
Javajava
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);
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Customers.PageAsync(new PageCustomersRequest {
  PageNumber = 1,
  PageSize = 50,
});
Responsejson
{
  "page": {
    "number": 1,
    "size": 2,
    "customers": [
      {
        "id": "cu_a1b2c3d4e5",
        "name": "Jane Mensah",
        "email_address": "jane@example.com",
        "phone_number": "+233242057831",
        "reference": "user_123456",
        "guest": false,
        "billing_address": {
          "name": "Jane Mensah",
          "phone_number": "+233242057831",
          "line1": "23 Adenta High Street",
          "line2": "East Legon Hills",
          "city": "Accra",
          "region": "Greater Accra",
          "post_code": "GA-422-1134",
          "country": "GH"
        },
        "custom_data": {
          "loyalty_tier": "gold"
        },
        "balance": {
          "ghs": {
            "available": {
              "currency": "ghs",
              "value": 6500
            },
            "as_of": "2025-11-24T07:55:00Z"
          }
        },
        "created_at": "2025-11-23T14:30:00Z"
      },
      {
        "id": "cu_f6g7h8i9j0",
        "name": "Kojo Asante",
        "title": "Mr.",
        "phone_number": "+233201234567",
        "guest": true,
        "balance": {},
        "created_at": "2025-11-22T09:15:00Z",
        "updated_at": "2025-11-24T11:05:00Z"
      }
    ]
  }
}

Type to search…

↑↓ navigate↵ selectEsc close