Pine LabsDOCS

Create Customer

POST/api/v1/customer

Create a new customer profile in the Pine Labs Online system. The customer profile can be used for tokenization and recurring payment operations.

Requires Bearer token. Get token →

Header Parameters

FieldDetails
Request-Timestamp
stringdate-time

ISO 8601 UTC timestamp of the request. Used for idempotency and audit.

Request-ID
string

Use a global unique identifier [GUID] for the request.

Constraints
Minimum length: 1 characterMaximum length: 50 characters

Request Bodyrequired

FieldDetails
merchant_customer_reference
string

Unique customer reference assigned by the merchant.

Constraints
Minimum length: 1 characterMaximum length: 50 characters
first_name
string

Customer's first name.

Constraints
Minimum length: 1 characterMaximum length: 50 characters
last_name
string

Customer's last name.

Constraints
Minimum length: 1 characterMaximum length: 50 characters
country_code
string

Country code of the registered mobile number. Defaults to 91.

Constraints
Maximum length: 5 characters
mobile_number
string

Customer's mobile number.

Constraints
Minimum length: 10 charactersMaximum length: 20 characters
Pattern: ^[0-9]+$
email_id
string

Customer's email address.

Constraints
Maximum length: 50 characters
billing_address
object10 nested fields

Physical address.

shipping_address
object10 nested fields

Physical address.

gstin
string

Customer's unique GSTIN (Goods and Services Tax Identification Number).

merchant_metadata
object

Arbitrary key-value pairs for merchant use. Maximum 10 pairs, 256 characters each.

Constraints
Maximum properties: 10
Additional properties: string · Maximum length: 256 characters

Status Codes

201Customer created successfully.
400The request was malformed or missing required fields.
401Authentication failed — missing, expired, or invalid Bearer token.
403The authenticated client does not have permission for this operation.
500An unexpected error occurred on the server.
Run
Request
curl --request POST \
  --url https://pluraluat.v2.pinepg.in/api/v1/customer \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --header 'Request-ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  --header 'Request-Timestamp: 2024-10-01T10:30:00Z' \
  --data '{
  "merchant_customer_reference": "82d57572-057c-4826-5775-385a52150554",
  "first_name": "Kevin",
  "last_name": "Bob",
  "country_code": "91",
  "mobile_number": "9876543210",
  "email_id": "kevin@example.com",
  "billing_address": {
    "address1": "10 Downing Street Westminster London",
    "address2": "Oxford Street Westminster London",
    "address3": "Baker Street Westminster London",
    "pincode": "51524036",
    "city": "Westminster",
    "state": "Westminster",
    "country": "London",
    "full_name": "Kevin Bob",
    "address_type": "Home",
    "address_category": "billing"
  },
  "shipping_address": {
    "address1": "10 Downing Street Westminster London",
    "address2": "Oxford Street Westminster London",
    "address3": "Baker Street Westminster London",
    "pincode": "51524036",
    "city": "Westminster",
    "state": "Westminster",
    "country": "London",
    "full_name": "Kevin Bob",
    "address_type": "Home",
    "address_category": "billing"
  },
  "gstin": "28ABCDE1234F2Z6",
  "merchant_metadata": {
    "clientId": "DD",
    "transactionReferenceNo": "pine-1223",
    "merchantId": "1234",
    "tid": "9000990",
    "acquirerName": "HDFC_FSS",
    "isOfferDisplayRequired": "true",
    "OfferData": "UHJvZHVjdF9Db2RlPSIgIiZQcm9kdWN0X05hbWU9IiImUGF5bWVudF9Nb2RlPUJhbmsgRU1JJkNhcmRfVHlwZT1EZWJpdCBDYXJkJkJhbmtfTmFtZT1IREZDIERlYml0JkVNSV9UZW51cmU9NiZJbnRlcmVzdF9SYXRlPTkuMCZJbnRlcmVzdF9BbW91bnQ9MTM4MTQwJk1vbnRobHlfSW5zdGFsbG1lbnQ9ODk0NjkwJkF1dGhvcml6YXRpb25fQW1vdW50PTEwMCZMb2FuX2Jvb2tpbmdfQW1vdW50PTUyMzAwMDAmSW50ZXJlc3RfQ2FzaGJhY2tfQW1vdW50PTAmSW50ZXJlc3RfQ2FzaGJhY2tfVHlwZT1EZWZlcnJlZCZBZGRpdGlvbmFsX0Nhc2hiYWNrPSIiJkFkZGl0aW9uYWxfQ2FzaGJhY2tfVHlwZT0iIiZEZXNjcmlwdGlvbj1CYW5rIEVNSSZQcm9kdWN0X1ZhbHVlPTUyMzAwMDA",
    "tenant_id": "PGATPOS",
    "is_offer_validation_required": "true"
  }
}'
{
  "customer_id": "cust-v1-0811030624-aa-RBDgpR",
  "merchant_customer_reference": "82d57572-057c-4826-5775-385a52150554",
  "first_name": "Kevin",
  "last_name": "Bob",
  "country_code": "91",
  "mobile_number": "9876543210",
  "email_id": "kevin@example.com",
  "billing_address": {
    "address1": "10 Downing Street Westminster London",
    "address2": "Oxford Street Westminster London",
    "address3": "Baker Street Westminster London",
    "pincode": "51524036",
    "city": "Westminster",
    "state": "Westminster",
    "country": "London",
    "full_name": "Kevin Bob",
    "address_type": "Home",
    "address_category": "billing"
  },
  "shipping_address": {
    "address1": "10 Downing Street Westminster London",
    "address2": "Oxford Street Westminster London",
    "address3": "Baker Street Westminster London",
    "pincode": "51524036",
    "city": "Westminster",
    "state": "Westminster",
    "country": "London",
    "full_name": "Kevin Bob",
    "address_type": "Home",
    "address_category": "billing"
  },
  "gstin": "28ABCDE1234F2Z6",
  "merchant_metadata": {
    "clientId": "DD",
    "transactionReferenceNo": "pine-1223",
    "merchantId": "1234",
    "tid": "9000990",
    "acquirerName": "HDFC_FSS",
    "isOfferDisplayRequired": "true",
    "OfferData": "UHJvZHVjdF9Db2RlPSIgIiZQcm9kdWN0X05hbWU9IiImUGF5bWVudF9Nb2RlPUJhbmsgRU1JJkNhcmRfVHlwZT1EZWJpdCBDYXJkJkJhbmtfTmFtZT1IREZDIERlYml0JkVNSV9UZW51cmU9NiZJbnRlcmVzdF9SYXRlPTkuMCZJbnRlcmVzdF9BbW91bnQ9MTM4MTQwJk1vbnRobHlfSW5zdGFsbG1lbnQ9ODk0NjkwJkF1dGhvcml6YXRpb25fQW1vdW50PTEwMCZMb2FuX2Jvb2tpbmdfQW1vdW50PTUyMzAwMDAmSW50ZXJlc3RfQ2FzaGJhY2tfQW1vdW50PTAmSW50ZXJlc3RfQ2FzaGJhY2tfVHlwZT1EZWZlcnJlZCZBZGRpdGlvbmFsX0Nhc2hiYWNrPSIiJkFkZGl0aW9uYWxfQ2FzaGJhY2tfVHlwZT0iIiZEZXNjcmlwdGlvbj1CYW5rIEVNSSZQcm9kdWN0X1ZhbHVlPTUyMzAwMDA",
    "tenant_id": "PGATPOS",
    "is_offer_validation_required": "true"
  },
  "status": "ACTIVE",
  "created_at": "2024-10-04T13:11:29.645591Z",
  "updated_at": "2024-10-04T13:11:29.645657Z"
}