Skip to main content
POST
/
s2s
/
customers
cURL
curl --request POST \
  --url https://api.xpaycheckout.com/s2s/customers \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "John Doe",
  "email": "john.doe@example.com",
  "mobile": "+1234567890",
  "address": {
    "line1": "123 Main Street",
    "line2": "Apt 4B",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94102",
    "country": "US"
  }
}'
{
  "customer_id": "cus_Tfd3Jq1tZxPjYVhRQW2r3",
  "name": "John Doe",
  "email": "john.doe@example.com",
  "mobile": "+1234567890",
  "address": {
    "line1": "123 Main Street",
    "line2": "Apt 4B",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94102",
    "country": "US"
  },
  "created_at": 1728127800000
}
Creates a new customer profile for future transactions.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Create Customer Request

name
string
required

Customer's full name

Example:

"John Doe"

email
string
required

Customer's email address

Example:

"john.doe@example.com"

mobile
string
required

Customer's phone number with country code

Example:

"+1234567890"

address
object
required

Response

Customer created successfully

customer_id
string

Unique customer identifier

Example:

"cus_Tfd3Jq1tZxPjYVhRQW2r3"

name
string
Example:

"John Doe"

email
string
Example:

"john.doe@example.com"

mobile
string
Example:

"+1234567890"

address
object
created_at
integer

Epoch timestamp in milliseconds of when the customer was created

Example:

1728127800000