If during Plans creation you receive an error below, it means that you need to make sure the customer_id created from the correct business account and environment
{
"error_code": "DATA_NOT_FOUND",
"message": "External API error: Provided id does not exist"
}
The
DATA_NOT_FOUND error when creating a Subscription Plan (Recurring Payment) typically indicates that the customer_id provided in your request cannot be found in the current context.Common Causes & Solutions
- Environment Mismatch (Live vs. Test)
- Issue: You are using a
customer_idcreated in the Test environment while making an API call to the Live environment (or vice versa). - Action: Ensure the
customer_idwas created in the same environment where you are attempting to create the plan.
- Issue: You are using a
- Business Account Mismatch
- Issue: The
customer_idbelongs to a different Xendit business account. - Action: Verify that the API key used for the request belongs to the same business account where the customer was created.
- Issue: The
- Invalid Customer Type
- Issue: Xendit Subscriptions currently only support customers with the
INDIVIDUALtype. - Action: If you receive an error like "Unable to fetch customer details," check the customer object. If it is set to
BUSINESS, you must create a new customer with the typeINDIVIDUAL.
- Issue: Xendit Subscriptions currently only support customers with the
- Deleted or Non-Existent ID
- Issue: The ID provided does not exist or was previously deleted.
- Action: Double-check the
customer_idstring for typos and ensure the customer exists by calling the Get Customer API before creating the plan.