Internal server error means internal PayPal server. This is PayPal "Help! I give up!" error message.
This does not exclude the possibility that you did something wrong, which led the PayPal code from the green path and to the forest where it was eaten by the bear, but independently: do as the error page says and contacts PayPal support. They should be able to look up your correlation identifier and see what happened. Then they can tell you if you can solve the problem by making changes at the end or if your code will be good and that is 100% their problem. And then they can improve their code so that the next person who can make a mistake like yours gets the best feedback.
(Although in the case of such a page, which is usually displayed to your client, and not to you, PayPal usually gives only a message about a generic rejection.)
And a few more things I would like to check to see if you want to work on this a bit while you wait until PayPal gets back to you: you have confirmed that the API seems to work as it claims. A reasonable thing to check, but the error in redirecting to the Internet is so focused on this: what do you get if you transfer a known dummy token? What happens on another computer or after clearing cookies? What do you get if you try to make a payment using a button (not an express statement) using the same pair of accounts?
source share