Search code examples
paypalbraintree

Paypal Express Checkout through Braintree SDK suddenly fails (missing facilitator REST API App?)


We implemented PayPal express checkout through the Braintree SDK (js v3) because this allows us to use our own HTML button whereas we would have to use the provided PayPal buttons if we were using the REST API.

Everything was working fine within our live setup until yesterday. Code was changed neither on the client nor on the server. However, I did delete two REST API apps within the PayPal developer dashboard which were no longer needed since we had decided to go down the Braintree JS SDK path.

After that, express checkouts started throwing AuthenticationErrors. Generating client tokens on our server still works. Performing the actual checkout fails on tokenization. I receive the following exception:

{
    "paymentResource": {
        "errorName": "invalid_client",
        "errorMessage": "Client Authentication failed",
        "errorDetails": null,
        "debugId": "84b227241374e",
        "paypalHttpStatus": 401
    }
}

The whole setup works using the test access_token btw :/

My current assumption is that the Braintree SDK access_token is somehow coupled to the default REST API App (email-facilitator@domain.tld). I deleted this default REST API App.

I found the following FAQ article which I believe proves the assumption might be correct: https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ1938&expand=true&locale=en_US

We now switched to a different PayPal account as we could not figure out what was going wrong. Without changing any code except for the new access_token, everything started working again.

Has anyone experienced this or something similar before? Does anyone know how I can either

  • Delete the Braintree Account or regenerate it (which will hopefully restore the link to my new REST API App)? or
  • Restore the link between my Braintree SDK access_token and my REST API app?

If something was unclear or if I can provide more context somewhere please let me know!


Solution

  • As Brian K correctly noted, the solution was to contact the PayPal technical support at paypal-techsupport.com/app/ask and ask for the deleted REST API app to be reinstated. Everything is back to normal now.