POST
/
customers
/
{customer_id}
curl --request POST \
  --url https://sandbox.hyperswitch.io/customers/{customer_id} \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "email": "guest@example.com",
  "name": "John Doe"
}'
{
  "customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
  "name": "Jon Test",
  "email": "JonTest@test.com",
  "phone": "9123456789",
  "phone_country_code": "+65",
  "description": "First Customer",
  "address": {
    "city": "New York",
    "country": "AF",
    "line1": "123, King Street",
    "line2": "Powelson Avenue",
    "line3": "Bridgewater",
    "zip": "08807",
    "state": "New York",
    "first_name": "John",
    "last_name": "Doe"
  },
  "created_at": "2023-01-18T11:04:09.922Z",
  "metadata": {},
  "default_payment_method_id": "pm_djh2837dwduh890123"
}

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.

Path Parameters

customer_id
string
required

The unique identifier for the Customer

Body

application/json

The identifier for the customer object. If not provided the customer ID will be autogenerated.

Response

200
application/json

Customer was Updated

The response is of type object.