Skip to main content
POST
/
v3
/
customer
Create Customer
curl --request POST \
  --url https://service-sandbox.tazapay.com/v3/customer \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Andrew Robin",
  "country": "US",
  "email": "andrew.robin@example.com"
}
'
{
  "status": "success",
  "message": "customer created successfully",
  "data": {
    "id": "cus_abc123xyz456",
    "object": "customer",
    "created_at": "2025-10-13T14:30:00Z",
    "name": "Andrew Robin",
    "email": "andrew.robin@example.com",
    "country": "US",
    "phone": {
      "calling_code": "1",
      "number": "2025550183"
    },
    "billing_address": [
      {
        "name": "Andrew Robin",
        "address": {
          "line1": "123 Main Street",
          "line2": "Apt 45B",
          "city": "New York",
          "state": "NY",
          "country": "US",
          "postal_code": "10001"
        },
        "phone": {
          "calling_code": "1",
          "number": "2125550199"
        }
      }
    ],
    "shipping_address": [
      {
        "name": "Andrew Robin",
        "address": {
          "line1": "789 Broadway Avenue",
          "line2": "Suite 500",
          "city": "New York",
          "state": "NY",
          "country": "US",
          "postal_code": "10003"
        },
        "phone": {
          "calling_code": "1",
          "number": "9175550132"
        }
      }
    ],
    "metadata": {
      "customer_type": "premium",
      "preferred_language": "en",
      "referral_code": "REF2025ABC"
    }
  }
}

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
name
string
default:""
required

Customer's name

email
string
default:""
required

Customer's email address

country
string
required

Customer's country. ISO 3166 standard alpha-2 code. eg: SG, IN, US, etc.

reference_id
string

The unique reference_id on your system representing the customer

phone
object

Customer's phone details

billing_address
object[]

Customer's billing details

shipping_address
object[]

Customer's shipping details

metadata
string<json>

Set of key-value pairs to attach to the customer object

Response

200 - application/json

200

status
string

Indicates whether the request was successful.

message
string

Describes the result or status of the operation.

data
object

Contains all the details of the created customer.