Stripe integration fails on self hosted ghost instance

I’ve created a Stripe account and I’m trying to connect it to a self-hosted Ghost instance.
It keeps failing with this error page:

I tried it again with the network console developer tool opened up. The request to returns a HTTP 500 error code with the message “Request aborted due to timeout being reached (2500ms)”.