Use this endpoint when updating customer details (e.g., name, email, or metadata). You can identify the customer by FlexPrice ID or external customer ID.
Path Parameters
The unique FlexPrice customer ID (e.g., cust_abc123xyz789). Can be provided as path parameter or query parameter.
Query Parameters
The unique FlexPrice customer ID. Alternative to path parameter.
The external customer ID from your system. Use this to update by your own identifier instead of the FlexPrice ID.
Provide either id (as path or query parameter) or external_customer_id, but not both. If both are provided, they must refer to the same customer.
Request Body
All fields are optional. Only the fields you provide will be updated.
Updated external identifier for the customer.
Updated name or company name.
Updated email address. Must be a valid email format if provided.
Updated primary address line. Maximum 255 characters.
Updated secondary address line. Maximum 255 characters.
Updated city name. Maximum 100 characters.
Updated state, province, or region name. Maximum 100 characters.
Updated postal code. Maximum 20 characters.
Updated two-letter ISO 3166-1 alpha-2 country code.
Updated metadata key-value pairs. This will replace the existing metadata completely.
Updated parent customer FlexPrice ID.
parent_customer_external_id
Updated parent customer external ID. Provide either parent_customer_id or parent_customer_external_id, but not both.
integration_entity_mapping
Updated provider integration mappings. Show Integration Entity Mapping Object
The integration provider name. Must be one of: stripe, razorpay, paypal.
The external entity ID from the provider.
Response
The unique FlexPrice customer ID.
The customer’s name or company name.
The customer’s email address.
The parent customer ID if applicable.
Custom metadata key-value pairs.
ISO 8601 timestamp of creation.
ISO 8601 timestamp of last update.
The ID of the user who created the customer.
The ID of the user who last updated the customer.
Update by ID
Update by External ID
JavaScript
Python
curl -X PUT https://api.flexprice.io/v1/customers/cust_abc123xyz789 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp (Updated)",
"email": "billing-new@acme.com",
"metadata": {
"plan_tier": "enterprise_plus",
"renewal_date": "2025-01-15"
}
}'
200 - Success
400 - Bad Request
404 - Not Found
{
"id" : "cust_abc123xyz789" ,
"external_id" : "user_12345" ,
"name" : "Acme Corp (Updated)" ,
"email" : "billing-new@acme.com" ,
"address_line1" : "123 Main Street" ,
"address_line2" : "" ,
"address_city" : "San Francisco" ,
"address_state" : "CA" ,
"address_postal_code" : "94105" ,
"address_country" : "US" ,
"parent_customer_id" : null ,
"metadata" : {
"plan_tier" : "enterprise_plus" ,
"renewal_date" : "2025-01-15"
},
"environment_id" : "env_prod_001" ,
"tenant_id" : "tenant_001" ,
"status" : "published" ,
"created_at" : "2024-01-15T10:30:00Z" ,
"updated_at" : "2024-01-20T14:45:00Z" ,
"created_by" : "user_admin" ,
"updated_by" : "user_admin"
}
Partial Updates
This endpoint supports partial updates, meaning you only need to send the fields you want to change. All other fields will remain unchanged.
Example : To update only the email address:
{
"email" : "new-email@acme.com"
}
The metadata field replaces the entire existing metadata object. If you want to preserve existing keys, you must include them in your update request.