It may be that you’re using the endpoint for a previous API version that is not allowing you to do this. See Stripe’s documentation on versioning here.

Worst case scenario, include the API version provided to you by the error message as a header for your API calls and try again.