Update Customer API
The API can be used to update the customer details like phone number, email, first name etc.
Please keep a note of the following constraints while updating customer’s email address, First Name and Last Name-
email address - You are allowed to use alphanumeric characters and the following special characters:
!#$%&'*+-/=?^_.{|}~`@_and.cannot appear at the beginning or end of the local part of the email address (before and after the@symbol).First Name/Last Name - You are allowed to use alphanumeric characters and the following special characters:
().-_
Consists of two parts.
Username: API Key obtained from Juspay dashboard
Password: Empty string
Example:-
Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
Merchant ID provided by Juspay
Example:-
merchant-id
application/x-www-form-urlencoded
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.
This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.
Example:- customer_1122
This is same as the object_reference_id using which customer was created in Juspay system or the id which you got in the create customer API response.
Example:- cst_om2l6ctlptxwxuzj
The customer’s email address. If the backend gateway requires it, then you must send this value.
You are allowed to use alphanumeric characters and the following special characters:
!#$%&'*+-/=?^_.{|}~`@_and.cannot appear at the beginning or end of the local part of the email address (before and after the@symbol).
Example:- customer@gmail.com
It is the First Name of customer. This value will be used for customer identification.
You are allowed to use alphanumeric characters and the following special characters:
().-_We will throw Bad Request error when the following special characters are used in Firstname. +!<>?;:@%`&*$^{}/\,=
Example:-Juspay
It is the Last Name of customer. This value will be used for customer identification.
You are allowed to use alphanumeric characters and the following special characters:
().-_We will throw Bad Request error when the following special characters are used in Lastname. +!<>?;:@%`&*$^{}/\,=
Example:-User
The customer's mobile country code. Pass the country code without + prefix.
When you pass alphanumeric value for country code will throw Bad Request error. Example - ‘abcd’
Example: 91
It is the customer’s mobile number.
you should pass only the 10 digit number without appending "+" or mobile country code.
We accept ‘+‘ only at prefix of the mobile number when country code passed, if it is passed in between or suffix we will throw bad request error.
when special characters(‘?‘, ’/’, ’`’, ’~’, ’@’, ’#’, ’%’, ‘^‘, ‘,‘, ‘&‘, ‘*‘, ‘(‘, ‘)‘, ‘_‘, ‘-‘, ‘=‘, ‘\‘, ‘{‘, ‘}‘) are passed in the mobile number value will throw the Bad Request error.
Example: +919912346789 or 97675789476
It is the unique identifier of the customer object in Juspay system. It is the ID with which merchant refers to a customer object and passed in the path params to update the customer details
Example :- cst_om2l6ctlptxwxuzj
Value: customer
Unique ID that you use to represent the customer in your database. The typical value for this field would be email address or mobile number or auto increment ID that you have in your DB.
Example :- customer1732614823
Cusomter's mobile country code
Example :- 91
Customers mobile number
Example:- Eaxmple :- 9988776644
Customer's e-mail address
Example :- customer@gmail.com
Customer's last name
Example :- Snow
Customer's first name
Example :- Jon
UTC timestamp when the customer object was created in Juspay system
Example :- 2016-08-02T08:07:52+0000
UTC timestamp when the customer object was last updated at
Example :- 2016-08-02T08:07:52+0000
Status of the API call.
Example :- Bad Request
Details of error occurred
Example:- Invalid Request
Further Details of keys missing in the request.
Example :- Wrong value in mobile_country_code
invalid_request_error
object_not_found
Cannot find what you are looking for

