This one was scratching my head for a long time.
When you create a subscription plan you can optionally pass in your own ID instead of allowing Rapyd to create one for you.
I discovered after many hours of frustration / confusion.
If you pass in a plan.id with around 45,46 characters or more, you receive this message back from the API:
{
"status": {
"error_code": "ERROR_CREATE_PLAN",
"status": "ERROR",
"message": "The request tried to create a plan, but the 'type' field of a product is set to 'goods'. The request was rejected. Corrective action: Add only products that have 'type' set to 'service'.",
"response_code": "ERROR_CREATE_PLAN",
"operation_id": "6421c100-c2e8-4f5b-8d5c-3e49668365b1"
}
}
This is error message seems to be incorrectly mapped, as the error has nothing to do with the Product. The product does have the type set to service and as long as the ID is shorter then 45 characters, there is no issues.
Just wanted to share as you might add to the docs a max length on the subscription.plan.id or add a targeted error message.