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.

entry
string
required

The ID for the entrypoint the customer is for.

Query parameters

This request has two optional query parameters.

replaceExisting
integer
default:
"0"

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.

forceCustomerCreation
boolean
default:
"false"

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.

Create customer
curl --request POST \
     --url 'https://api-sandbox.payabli.com/api/Customer/single/41035afaa7?replaceExisting=0&forceCustomerCreation=false' \
     --header 'accept: application/json' \
     --header 'content-type: application/*+json' \
     --header 'requestToken: <API TOKEN>' \
     --data '@- <<EOF
{
  "firstname": "Joseph",
  "lastname": "Peters",
  "email": "joe@email.com",
  "address": "2328 Oak Street",
  "city": "Bell Buckle",
  "state": "TN",
  "zip": "37832",
  "country": "US"
}'

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.

Customer create success response
{
  "responseText": "Success",
  "responseData": {
    "customerId": 3121,
    "customerNumber": null,
    "customerUsername": null,
    "customerStatus": 0,
    "Company": null,
    "Firstname": "Joseph",
    "Lastname": "Peters",
    "Phone": null,
    "Email": "joe@email.com",
    "Address": "2328 Oak Street",
    "Address1": null,
    "City": "Bell Buckle",
    "State": "TN",
    "Zip": "37832",
    "Country": "US",
    "ShippingAddress": null,
    "ShippingAddress1": null,
    "ShippingCity": null,
    "ShippingState": null,
    "ShippingZip": null,
    "ShippingCountry": null,
    "Balance": 0,
    "TimeZone": 0,
    "MFA": false,
    "MFAMode": 0,
    "snProvider": null,
    "snIdentifier": null,
    "snData": null,
    "LastUpdated": "2023-07-31T15:31:02.8643829+00:00",
    "Created": "2023-07-31T15:31:02.8643829+00:00",
    "AdditionalFields": {},
    "IdentifierFields": [
      "email"
    ],
    "Subscriptions": null,
    "StoredMethods": null,
    "customerSummary": {
      "NumberofTransactions": 0,
      "TotalAmountTransactions": 0,
      "TotalNetAmountTransactions": 0,
      "RecentTransactions": null
    },
    "PaypointLegalname": "Gruzya Adventure Outfitters, LLC",
    "PaypointDbaname": "Gruzya Adventure Outfitters",
    "ParentOrgName": "The Pilgrim Planner",
    "PaypointEntryname": "41035afaa7",
    "pageindentifier": null,
    "externalPaypointID": null
  },
  "pageidentifier": null,
  "isSuccess": true
}