Manage Customers with the API
Learn how to add and manage customers with the Payabli API
In Payabli, customers are the entities that buy goods and services and make payments to your paypoints (merchants). This guide explains how to add customers with .
You can also manage customers via the API:
Build the request
First, choose an endpoint. If you’re testing, use the Sandbox endpoint..
Authenticate
Authenticate by sending your API token in the request header with the key requestToken
:
--header 'requestToken: API TOKEN'
Path parameter
For complete details about available parameters, see the API reference for this endpoint.
This request has a required path parameter, entry
.
The ID for the entrypoint the customer is for.
Query parameters
This request has two optional query parameters.
When set to 1
, an existing customer record will be overwritten with a new customer record (if the identifiers find a match). Possible values: 0 (don’t replace), 1 (replace). Default is 0
.
When true
, the request creates a new customer record, regardless of whether the customer data matches an existing customer.
Body parameter
Update the body parameter as needed, you need to include only the fields you want to change. The body is where you include information about the customer, including identifiers. An identifier is required to create customer records. You can change your identifier settings in Settings > Custom Fields in PartnerHub.
When you create a new customer record, Payabli first looks for an existing customer based on matching any of your configured identifier fields. If Payabli doesn’t find a match, then it attempts to match based on the CustomerNumber
field, if included. If there is no match, Payabli creates a new customer.
Check out CustomerData Object Model for a complete reference on each available field.
Example request
This example creates a customer record. It includes firstname
and lastname
as the minimum required identifiers, as set in the example account.
Example response
A successful request returns a JSON response.
The customerId
value is the Payabli-generated identifier that you can use with other endpoints to manage the customer and make transactions.
Was this page helpful?