post https://api.juspay.in/customers
Creates a new customer object with the given Customer Data parameters. You may invoke this method whenever someone registers in your website or App. JusPay will respond with a customer_id that you can persist in your Database. Pass this ID at the time of order creation to ensure proper linking of orders/payments belonging to a customer.
Returns: Customer Object (click to view)
Field | Type | Description |
---|---|---|
customer_id | String | Customer ID generated by JUSPAY. |
object | String | Object type of entity, in this case it’ll be customer. |
object_reference_id | String | Customer ID defined by you. |
mobile_number | String | Customer’s mobile number. |
date_created | String | Date creation of customer entity. |
last_udpated | String | Last updated date of customer entity. |
email_address | String | Customer’s e-mail address. |
first_name | String | Customer’s first name. |
last_name | String | Customer’s last name. |
mobile_country_codewwwwi | String | Mobile country code. |
juspay: { client_auth_token, client_auth_token_expiry} | Object String String | Object containing two client_auth_token parameters Token required for SDK integration Expiration date of client_auth_token |
Note 1:
A "customer_id" should be returned, not "id", as shown in the main document.
Note 2:
A Juspay Object (client_auth_token parameters) is included in the Customer Object response for the Create Customer API only if options.get_client_auth_token is set to true in the request .
The request consists of Customer Data, merchant_id, object_reference_id, and an optional get_client_auth_token parameter.
(click to open table) Each parameter in tables is listed below:⭣
(click to open table) Each parameter in tables is listed below:
⭣
Customer Data parameters: (click to view)
Field | Type | Description | |
---|---|---|---|
mobile_number | * | String | Customer’s mobile number.wwwwwwwwww |
email_address | * | String | Customer’s e-mail address. |
first_name | String | Customer’s first name. | |
last_name | String | Customer’s last name. | |
mobile_country_code | String | Mobile country code. No need to prefix “+”. |
* = Required only for the Create Customer API
Field | Type | Description | |
---|---|---|---|
x-merchantid | * | String | The merchant id that a merchant hold at Juspay. Must be in Header. |
object_reference_idwwwi | * | String | Unique ID that you use to represent the customer in your database. This must be atleast 8 characters and must be unique. The typical value for this field would be email address or mobile number or auto increment ID that you have in your DB |
options. get_client_auth_token | Object Boolean | This is required to obtain the client_auth_token which is used for SDK integration |
* = Required