Customers
The Customers API in Stax allows merchants to manage their customers efficiently, providing a centralized way to create, retrieve, update, and delete customer records. Customers are tied to a merchant's account and enable seamless transactions without requiring individual Stax accounts. Once a customer completes a transaction, their record is automatically saved under the merchant's account, facilitating future interactions.
Key Features
Create, update, and delete customer records tied to a merchant's account.
Retrieve all customers or search using various filters, such as name, email, or keywords.
Automatically save customer records upon transaction completion for future use.
Modify customer information to ensure records remain accurate and up to date.
Remove customers from active view without permanent deletion, allowing for recovery when needed.
Common Use Cases
Merchants can create customer records using the Create Customer endpoint, enabling quick access to customer details for future transactions.
The Find All Customers endpoint allows merchants to retrieve customer lists based on specific criteria such as first name, last name, or email address.
Keep customer records accurate with the Update a Customer's Information endpoint, ensuring merchants always have the most up-to-date information.
Use the Delete a Customer endpoint to soft-delete a customer, making the record inactive but still retrievable if necessary.
Customer Data Model
Customer Fields Reference
The Customers API requires certain data points for creating and managing records. Here's an overview of the required and optional fields:
| Field | Description |
|---|---|
| firstname | Customer's first name (optional, but required if lastname, email, or company is not provided). |
| lastname | Customer's last name (optional, but required if firstname, email, or company is not provided). |
Customer's email address (optional, but required if firstname, lastname, or company is not provided). | |
| company | Company name associated with the customer (optional, same requirements as above). |
| address_country | ISO 3 code for the country (optional). |
| reference | Reference string for identifying the customer (optional). |
Status and Deletion
Active vs Deleted Customers
Customers marked as deleted are hidden from active views but remain retrievable using their customer_id.
Soft Deletion
Use the Delete a Customer endpoint to soft-delete a customer record without permanently erasing it.
Benefits for Developers
A unified system for managing customer records tied to a merchant's account.
Search, retrieve, and update customer records effortlessly with powerful filtering and sorting options.
By maintaining accurate and centralized records, merchants can provide a seamless payment experience.
