Skip to main content
POST
Create a customer

Authorizations

Authorization
string
header
required

The API key to use for authentication

Body

application/json
phoneNumber
string
required

The phone number of the customer

Example:

"254712345678"

name
description
string
metadata
object

Key-value object allowing you to store additional information.

Key Requirements:

  • Must be a string
  • Maximum length of 40 characters

Value Types:

  • String (maximum 500 characters)
  • Integer
  • Floating-point number
  • Boolean

Limits:

  • Maximum of 50 key-value pairs
Example:

Response

Get One Customer

Get One Customer

id
string
required

Unique identifier for the customer, prefixed with 'cus_'

Maximum string length: 255
Example:

"cus_GqfKXLmg61LURZhB"

object
string
required
Example:

"customer"

environment
enum<string>
required

The environment of the customer. Either 'sandbox' or 'production'

Available options:
sandbox,
production
Example:

"sandbox"

name
string | null
required

The name of the customer

Minimum string length: 2
Example:

"John Doe"

phoneNumber
string
required

The phone number of the customer

Example:

"254712345678"

description
string | null
required

The description of the customer

Example:

"VIP customer with recurring payments"

countryCode
string
required

The country code of the customer

Maximum string length: 2
Example:

"KE"

isActive
boolean
required

Whether the customer is active

Example:

true

isVerified
boolean
required

Whether the customer is verified

Example:

true

lastActiveAt
string | null
required

Timestamp when the customer was last active (ISO 8601 format)

Example:

"2024-12-19T16:45:00.000Z"

firstTransactionAt
string | null
required

Timestamp when the customer made their first transaction (ISO 8601 format)

Example:

"2024-12-15T09:15:00.000Z"

source
enum<string>
required

The source of the resource. Either 'api', 'dashboard', or 'checkout'

Available options:
api,
dashboard,
checkout
Example:

"api"

metadata
object
required

Key-value object allowing you to store additional information.

Key Requirements:

  • Must be a string
  • Maximum length of 40 characters

Value Types:

  • String (maximum 500 characters)
  • Integer
  • Floating-point number
  • Boolean

Limits:

  • Maximum of 50 key-value pairs
Example:
createdAt
string
required

Timestamp when the customer was created (ISO 8601 format)

Example:

"2024-12-10T08:30:00.000Z"

updatedAt
string
required

Timestamp when the customer was last updated (ISO 8601 format)

Example:

"2024-12-19T14:22:00.000Z"