Skip to main content

The customer object

A customer represents a buyer who has interacted with your business through Orafi. Customers are typically created automatically during payment flows.
string
Unique identifier for the customer.
string
Customer’s first name.
string
Customer’s last name.
string
Customer’s email address.
string[]
Environments the customer has interacted in. Contains test, live, or both.
number
default:"0"
Aggregate amount the customer has spent across all completed transactions.
datetime
When the customer record was created.
datetime
When the customer record was last updated.

Create a customer

POST /customers/create
Manually creates a customer record.
In most flows, customers are created automatically when a payment is completed. Manual creation is intended for pre-registration, data migrations, or account-based billing.

Request body

string
required
Customer’s first name.
string
required
Customer’s last name.
string
required
Customer’s email address.

List customers

GET /customers
Returns a paginated list of customers. All query parameters are optional.

Query parameters

string
Filter by spending range. One of BELOW10USDT, FROM10TO30USDT, FROM30TO100USDT, FROM100TO200USDT, FROM200TO500USDT, ABOVE500USDT.
string
Filter by environment. test or live.
number
default:"20"
Maximum number of results per page.
string
Pagination cursor. Results start after the referenced customer.

Retrieve a customer

GET /customers/{customerId}
Returns the details of a specific customer.

Path parameters

string
required
The customer ID to retrieve.

Delete a customer

DELETE /customers/{customerId}
Permanently deletes a customer record. This action cannot be undone.
Deleting a customer is irreversible. Only use this for duplicate records, accidental creation, or compliance-related data removal requests. We recommend keeping records for transaction history and reconciliation.

Path parameters

string
required
The customer ID to delete.