400 PERMISSION_DENIED when executing Express Checkout payment

philip-s
New Community Member

I'm upgrading an existing eCommerce platform to use the new checkout.js workflow. I can successfully obtain an access token and create a payment using a server-side POST to /v/payments/payment. When I call the payment.execute() function inside the onAuthorised callback, the HTTP request fails with status 400. The response content is:

 

{"ack":"contingency","contingency":"PERMISSION_DENIED","meta":{"calc":"63619b98eebef","rlog":"mtsNs3Wfs2yQcM%2BCxX2oZ5f%2FrUY6AoaKFysQn1p7kPGyNiTSAIRvTj%2FjwCKegXRQLMdvXArzEoosB2Ni62MBIg_1643e771d10"},"server":"GtL1Bz8bZwS3AY2j7-IVw5BH5CqbirUy-w-ntiYKhuTeulcVgmeY7DS6IzPxwAClZlTghHpAkf663P2BUWm_K30DtXW6uYxdxty3KvnwNbH8Bui5vswxeDQlGYUD60DoPATABNg4nh0nFFEZeRRW4zWkgMKaM9q2UHbFpz9XCs0VgAwcM2J3L0QD87DKxIPzXpHEn9vo0N5cYRUMzeka1f_0zzJoZ4JzNS988CU0rTXhKvTXpQz1TJ0cB8PfNBCSu7rgBM2QOXa"}

 

I'm not sure what is causing this... 400 suggests my request is incorrect, but it's the express.js code making the execute call. PERMISSION_DENIED suggests that my token is invalid or doesn't have the correct permissions, but the sandbox account associated with the client key/secret definitely has payment ability selected. Has anyone else seen this problem and am I doing something obviously wrong? Any help would be much appreciated.

 

If it helps, the failed response returned this header:

Paypal-Debug-Id:"63619b98eebef, 63619b98eebef"

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.