Update Customer API

The API can be used to update the customer details like phone number, email, first name etc.

Note

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: ().-_

API Endpoints
Sandbox Link
POST
https://sandbox.juspay.in/customers/{customer_id}
Production Link
POST
https://api.juspay.in/customers/{customer_id}
Authorization Header
Headers
Path Params
Body
200 : Success
401 : Authentication Failed
404 : Not Found

Error Codes:

Scroll inside to view more
Scenario
Error Codes
Description
Sample Error Message
Trying to update for wrong/random customer_id
404
Not Found
{"error_message": "Cannot find what you are looking for","status": "invalid_request_error","error_code": "object_not_found","error_info": {"user_message": "Cannot process your request as customer account not found.","developer_message": "Customer account not found.","code": "RESOURCE_NOT_FOUND","category": "USER_ERROR"}}
Updating mobile_number with empty or negative value
400
Bad Request
{"error_message":"Wrong value in mobile_number","status":"Invalid Request","error_code":"Invalid Request","error_info": {"user_message":"Invalid request params. Please verify your input.","fields": [{"field_name":"mobile_number","reason":"Invalid value."}],"developer_message":"Invalid request params","code":"INVALID_INPUT","category":"USER_ERROR"}}
Whitelisting of IP in dashboard
403
IP Verification Failed
{"error":true,"error_message":"Internal Server error.","user_message":"Bad Origin.","error_info":{"code":"BAD_ORIGIN","category":"USER_ERROR","user_message":"Bad Origin.","developer_message":"IP Verification Failed"}}
Wrong API Key
401
Unauthorized
{"status":"error","error_code":"access_denied","error_info": {"user_message":"Unauthorized.","developer_message":"Invalid API Key. Please pass a valid and active api key.","code":"UNAUTHORIZED","category":"USER_ERROR"}}
Wrong API endpoint
404
Not Found
Last updated 1 month ago