Customers - Update
POST /customers/{customer_id}
Update a Customer.
Example (cURL)
curl --request POST \
--url https://sandbox.hyperswitch.io/customers/{customer_id} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"email": "[email protected]",
"name": "John Doe"
}
'Request
Authorizations
api-key (string, header) — required Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Do not expose the API key in client-side code or public repositories.
Path parameters
customer_id (string) — required The unique identifier for the Customer.
Body (application/json)
The request body may include the following fields:
name (string | null) — The customer's name. Maximum length: 255. Example:
"Jon Test"email (string | null) — The customer's email address. Maximum length: 255. Example:
"[email protected]"phone (string | null) — The customer's phone number. Maximum length: 255. Example:
"9123456789"phone_country_code (string | null) — Country code for the phone number. Maximum length: 255. Example:
"+65"description (string | null) — Arbitrary string attached to the customer. Maximum length: 255. Example:
"First Customer"address (object) — Address details (see expandable for attributes)
metadata (object) — Up to 50 keys. Key names up to 40 characters; values up to 500 characters. Useful for storing additional structured information.
tax_registration_id (string | null) — Customer's tax registration ID. Maximum length: 255. Example:
"123456789"
Response (200, application/json)
Customer was updated. Example response:
Response fields:
customer_id (string) — Identifier for the customer object. Required. Length: 1–64. Example:
"cus_y3oqhf46pyzuxjbcn2giaqnb44"created_at (string, date-time) — ISO 8601 timestamp when customer was created. Example:
"2023-01-18T11:04:09.922Z"name (string | null) — Customer's name. Max length: 255.
email (string | null) — Customer's email. Max length: 255.
phone (string | null) — Customer's phone. Max length: 255.
phone_country_code (string | null) — Country code for phone. Max length: 255.
description (string | null) — Arbitrary string attached to the customer. Max length: 255.
address (object) — Address details (see request address attributes).
metadata (object) — Up to 50 keys; key names up to 40 chars; values up to 500 chars.
default_payment_method_id (string | null) — Identifier for default payment method. Max length: 64.
tax_registration_id (string | null) — Customer's tax registration number. Max length: 255.
Notes
Endpoint: POST https://sandbox.hyperswitch.io/customers/{customer_id}
Ensure the api-key header is provided for authentication.
Suggest edits or raise issues on the original docs:
Edit: https://github.com/juspay/hyperswitch/edit/main/api-reference/v1/customers/customers--update.mdx
Report issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v1/customers/customers--update