Use this endpoint when removing a customer (e.g., GDPR compliance or customer churn). Returns 204 No Content on success.
Deleting a customer is a permanent action. Consider archiving the customer by updating its status instead if you need to retain historical data.
Path Parameters
The unique FlexPrice customer ID (e.g., cust_abc123xyz789).
Response
On successful deletion, this endpoint returns a 204 No Content response with an empty body.
curl -X DELETE https://api.flexprice.io/v1/customers/cust_abc123xyz789 \
-H "Authorization: Bearer YOUR_API_KEY"
Important Considerations
Data Retention
When a customer is deleted:
- The customer record is permanently removed from the system
- Associated subscriptions may be canceled (depending on your configuration)
- Historical invoices and usage data may be retained for compliance purposes
- The operation cannot be undone
Alternative: Archiving
If you need to deactivate a customer but preserve historical data, consider updating the customer’s status to archived instead:
curl -X PUT https://api.flexprice.io/v1/customers/cust_abc123xyz789 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "archived"}'
GDPR Compliance
If you’re deleting a customer for GDPR or data privacy compliance:
- Ensure all related personal data is also removed
- Consider using the deletion to trigger cleanup of related records
- Maintain deletion logs for audit purposes
- Verify that any third-party integrations (Stripe, PayPal, etc.) are also notified
Cascade Effects
Before deleting a customer, ensure:
- All active subscriptions are canceled
- Outstanding invoices are resolved
- Any scheduled workflows or tasks are stopped
- Dependent child customers (if any) are handled appropriately