---
updatedAt: 2025-08-12T18:55:16.000Z
agentTools:
  projectIndex: https://docs.staxpayments.com/llms.txt
---

# Update Customer Information

Modify an existing customer record in your merchant account.

The **Update a Customer's Information** endpoint allows merchants to modify an existing customer record in their account. This is essential for keeping customer data accurate and up-to-date, ensuring seamless operations and compliance.

***

## Key Features

* **Modify Existing Records**: Update any field in the customer record, such as name, email, address, or phone number.
* **Partial Updates**: Only supply the fields you wish to modify. Fields left blank or omitted will remain unchanged.
* **Correct Errors**: Fix inaccurate or outdated data in the initial customer record.

***

## Usage Notes

* **GET Before PUT**: Use the [Get a Customer's Information](https://docs.staxpayments.com/reference/get-a-customers-information) endpoint to retrieve the existing record before making updates.
* **Optional Parameters**: All fields are optional; include only the fields you need to update.
* **Key Parameters**:
  * `firstname`, `lastname`, `email`, or `company` are typically the most commonly updated fields.
  * `address_country` should follow the ISO 3-letter country code standard if supplied.

***

## Response Structure

| Code | Response              | Description                                        |
| ---- | --------------------- | -------------------------------------------------- |
| 200  | Success               | The customer record was successfully updated.      |
| 400  | Bad Request           | Invalid or missing fields in the request.          |
| 401  | Unauthorized          | API key invalid or missing.                        |
| 404  | Not Found             | No customer found with the provided `customer_id`. |
| 500  | Internal Server Error | An unexpected error occurred on the server.        |

***

## Important Considerations

**Required Access**: The API key must belong to the merchant associated with the customer record.

**Immutable Fields**: Some fields, such as `customer_id`, cannot be modified.

**Deleted Records**: Updates cannot be made to soft-deleted customer records. Use the [Find all Customer](https://docs.staxpayments.com/reference/find-all-customers) endpoint to confirm the `deleted_at` status.

**Validation**: Ensure all supplied fields follow the required formats. For example:

* `address_country`: Must be a valid ISO 3-letter code.
* `email`: Should be a properly formatted email address.

***

## Best Practices

* Retrieve the existing record with the [Get a Customer's Information](https://docs.staxpayments.com/reference/get-a-customers-information) endpoint before updating to avoid overwriting fields unnecessarily.
* Log updates for auditing and troubleshooting purposes.
* Use this endpoint to maintain accurate customer data, which is critical for reporting and transactional accuracy.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "stax-api",
    "version": "0.1"
  },
  "servers": [
    {
      "url": "https://apiprod.fattlabs.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "API key for merchant-level operations. Provides access to merchant-specific endpoints including transactions, payments, customer management, and merchant account settings. This key is scoped to a single merchant account and cannot access partner-level functionality."
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/customer/{id}": {
      "put": {
        "summary": "Update Customer Information",
        "description": "Modify an existing customer record in your merchant account.",
        "operationId": "update-customer-info",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"id\": \"d45ee88c-8b27-4be8-8d81-77dda1b81826\",\n  \"firstname\": \"John\",\n  \"lastname\": \"Smith\",\n  \"company\": \"ABC INC\",\n  \"email\": \"demo@abc.com\",\n  \"cc_emails\": [\n    \"demo1@abc.com\",\n    \"demo2@abc.com\"\n  ],\n  \"phone\": \"1234567898\",\n  \"address_1\": \"123 Rite Way\",\n  \"address_2\": \"Unit 12\",\n  \"address_city\": \"Orlando\",\n  \"address_state\": \"FL\",\n  \"address_zip\": \"32801\",\n  \"address_country\": \"USA\",\n  \"notes\": null,\n  \"reference\": \"BARTLE\",\n  \"options\": null,\n  \"created_at\": \"2017-05-08 19:22:51\",\n  \"updated_at\": \"2017-05-08 19:23:46\",\n  \"deleted_at\": null,\n  \"gravatar\": \"//www.gravatar.com/avatar/fe3e929dd80f1653c3a4b82812660061\",\n  \"has_address\": true,\n  \"missing_address_components\": []\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "d45ee88c-8b27-4be8-8d81-77dda1b81826"
                    },
                    "firstname": {
                      "type": "string",
                      "example": "John"
                    },
                    "lastname": {
                      "type": "string",
                      "example": "Smith"
                    },
                    "company": {
                      "type": "string",
                      "example": "ABC INC"
                    },
                    "email": {
                      "type": "string",
                      "example": "demo@abc.com"
                    },
                    "cc_emails": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "demo1@abc.com"
                      }
                    },
                    "phone": {
                      "type": "string",
                      "example": "1234567898"
                    },
                    "address_1": {
                      "type": "string",
                      "example": "123 Rite Way"
                    },
                    "address_2": {
                      "type": "string",
                      "example": "Unit 12"
                    },
                    "address_city": {
                      "type": "string",
                      "example": "Orlando"
                    },
                    "address_state": {
                      "type": "string",
                      "example": "FL"
                    },
                    "address_zip": {
                      "type": "string",
                      "example": "32801"
                    },
                    "address_country": {
                      "type": "string",
                      "example": "USA"
                    },
                    "notes": {},
                    "reference": {
                      "type": "string",
                      "example": "BARTLE"
                    },
                    "options": {},
                    "created_at": {
                      "type": "string",
                      "example": "2017-05-08 19:22:51"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2017-05-08 19:23:46"
                    },
                    "deleted_at": {},
                    "gravatar": {
                      "type": "string",
                      "example": "//www.gravatar.com/avatar/fe3e929dd80f1653c3a4b82812660061"
                    },
                    "has_address": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "missing_address_components": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"firstname\": [\n    \"The firstname field is required when none of lastname / email / company are present.\"\n  ],\n  \"lastname\": [\n    \"The lastname field is required when none of firstname / email / company are present.\"\n  ],\n  \"email\": [\n    \"The email field is required when none of firstname / lastname / company are present.\"\n  ],\n  \"company\": [\n    \"The company field is required when none of firstname / lastname / email are present.\"\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "firstname": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "The firstname field is required when none of lastname / email / company are present."
                      }
                    },
                    "lastname": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "The lastname field is required when none of firstname / email / company are present."
                      }
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "The email field is required when none of firstname / lastname / company are present."
                      }
                    },
                    "company": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "The company field is required when none of firstname / lastname / email are present."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "firstname": {
                    "type": "string",
                    "description": "Max: 255. Required if no lastname, email, company supplied"
                  },
                  "lastname": {
                    "type": "string",
                    "description": "Max: 255. Required if no firstname, email, company supplied"
                  },
                  "email": {
                    "type": "string",
                    "description": "Max: 255. Required if no firstname, lastname, company supplied"
                  },
                  "company": {
                    "type": "string",
                    "description": "Max: 255. Required if no firstname, lastname, email supplied"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Matching regex: /[0-9]{10,15}/"
                  },
                  "address_1": {
                    "type": "string",
                    "description": "Max: 255"
                  },
                  "address_2": {
                    "type": "string",
                    "description": "Max: 255"
                  },
                  "address_city": {
                    "type": "string",
                    "description": "Max: 255"
                  },
                  "address_state": {
                    "type": "string",
                    "description": "Max: 2"
                  },
                  "address_zip": {
                    "type": "string",
                    "description": "Max: 16"
                  },
                  "address_country": {
                    "type": "string",
                    "description": "Max: 3"
                  },
                  "notes": {
                    "type": "string",
                    "description": "For internal notes only; not visible to customers in invoices or communications. Max: 21844"
                  },
                  "reference": {
                    "type": "string",
                    "description": "This field is for the merchant's internal use. Max: 255. "
                  },
                  "files": {
                    "type": "array",
                    "description": "Array of strings(50) where each index is a valid file_id",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cc_emails": {
                    "type": "array",
                    "description": "Array of strings(255) where each index is a valid email address",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cc_sms": {
                    "type": "array",
                    "description": "Array of strings(255) where each index is a valid phone number",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allow_invoice_credit_card_payments": {
                    "type": "boolean"
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "customer_custom_fields": {
                        "type": "array",
                        "items": {
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Unique identifier for the custom field"
                            },
                            "name": {
                              "type": "string",
                              "description": "Display name of the custom field"
                            },
                            "placeholder": {
                              "type": "string",
                              "description": "Placeholder text for the field (can be empty)"
                            },
                            "required": {
                              "type": "boolean",
                              "description": "Whether the field is required"
                            },
                            "visible": {
                              "type": "boolean",
                              "description": "Whether the field is visible in the UI"
                            },
                            "type": {
                              "type": "string",
                              "description": "The data type of the field value",
                              "enum": [
                                "text"
                              ]
                            },
                            "value": {
                              "type": "string",
                              "description": "The actual value stored in the custom field"
                            }
                          },
                          "type": "object"
                        },
                        "description": "An array of custom field objects that contain additional customer information."
                      }
                    },
                    "description": "Additional customer options such as custom fields"
                  }
                },
                "type": "object"
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```