If you look at the document you shared, it looks like that functionality is in a 'Public preview'. This means that you need to request access under 'Interested in getting early access to invoice payment plans?'. If you have already done that/ gained access, and if you're still seeing this error, you should write in to their support with the request id that failed, https://support.stripe.com/questions/finding-the-id-for-an-api-request. If not, that seems to be the issue as the error is says that you have passed an unknown parameter, amounts_due
.