Create Customer API
This API is responsible for creating a new customer object in Juspay systems. You can invoke this API whenever a new user registers in your App/Website and is triggering the payment process.
Customer creation at Juspay end is required for : Tokenization/Storing Cards, Linked Wallet Flows and Subscription flows.
Request
Response
API Endpoints
Sandbox Link
POST
https://sandbox.juspay.in/customers
Production Link
POST
https://api.juspay.in/customers
Headers
Body
200 : Success
400 : Invalid Input data
401 : Authentication Failed
Error Codes:
Scroll inside to view more
|
Scenario
|
Error Codes
|
Description
|
Sample Error Message
|
|---|---|---|---|
customer creation with same object_reference_id
| 400
| Bad Request
| {"error_message":"Customer with given object reference id already exist for your account.","status":"invalid_request_error","error_code":"unique","error_info": {"user_message":"Already exists.","developer_message":"Customer account with given object reference already exists.","code":"ALREADY_EXISTS","category":"USER_ERROR"}}
|
Passing object_reference_id as empty value
| 400
| Bad Request
| {"error_message":"Wrong value in object_reference_id","status":"Invalid Request","error_code":"Invalid Request","error_info": {"user_message":"Invalid request params. Please verify your input.","fields": [{"field_name":"object_reference_id","reason":"Invalid value."}],"developer_message":"Invalid request params","code":"INVALID_INPUT","category":"USER_ERROR"}}
|
Passing mobile_number as empty 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
| |
passing "-" before mobile_number 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"}}
|
- Have questions?
- Need help? Contact support
- LLM? Read llms.txt

