Add Customer
Register a new customer to save their details for future payments.
Endpoint Information
Name: Add Customer
Method: POST
URL: {{BASE_URL}}/api/v1/add-customer
Description
Adding a customer allows you to tokenize their payment details for recurring payments or "one-click" checkout experiences in the future.
Authentication
Type: Basic Auth
- Username: App Key
- Password: Secret Key
Request Body
Content-Type: application/json
{
"firstName": "John",
"middleName": "",
"lastName": "Doe",
"email": "[email protected]",
"dob": "1995-01-10",
"contactNumber": "+1234567890",
"merchantAccountId": "{{your_account_no}}",
"addressDetails": {
"country": "Sweden",
"state": "Stockholm",
"city": "Stockholm",
"address": "16/A, Stockholm",
"zipCode": "11234"
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
firstName | string | Yes | Customer first name |
lastName | string | Yes | Customer last name |
email | string | Yes | Customer email |
merchantAccountId | string | Yes | Merchant Account ID |
addressDetails | object | Yes | Customer address object |
Response
Success Response
{
"success": true,
"message": "Success",
"data": {
"customer_reference_id": "70e9efaf-2e72-4130-b38b-9552e2e94902",
"token": "d04d2e57c700bc1d2c2da91d0e7b482a",
"expire_at": "2025-11-05"
}
}
Usage
Save the returned customer_reference_id and token. You will need these to make payments using the Payment with Token endpoint.