Paypal REST not working!

Version ie <v5.11.60>

Environment <Self Hosted - Ubuntu Server>

Describe the bug

I used to have Paypal Express set up as a payment gateway and all worked fine - this was from the initial v5 versions. We upgraded as new versions became available… After our last version upgrade from x.32 to x.60 - our PayPal Express stopped working - no errors nothing - from the client portal, the button pay now button no longer was there…

Anyways did alot of searching and couldn’t figure it out. Tried to add a new gateway and noticed that Paypal Express is no longer an option - Only Paypal Rest. So archived the old Express and tried to setup Paypal REST. Populated the fields from Paypal and tried to test it.

  1. When clicking the CHECK CREDENTIALS button in the gate way section it comes back saying “Credentials are not valid” - however, thats impossible as I copied and pasted from the paypal site.

  2. When we are in the client portal, and try to pay, we see an error about cannot get a token.

  3. There are no logs on paypals side so I am guessing there is zero requests going to paypal

  4. There are no logs in the storage folder that reference any of these issues

Any assistance would be greatly appreciated… :slight_smile:

Thanks

Hi,

It may help to try creating new credentials in PayPal.

I have done that - I created a new REST API credentials… still the same :frowning:

I’m not sure, here’s what ChatGPT suggests:

The “invalid credentials” error when integrating PayPal REST with Invoice Ninja typically indicates one of the following issues:

1. Check API Credentials

Ensure you’re using the correct credentials for Live or Sandbox mode:

  • Go to PayPal Developer DashboardMy Apps & Credentials.
  • Select Live or Sandbox, depending on what you’re using.
  • Copy the Client ID and Secret Key correctly.
  • Make sure you’re not using sandbox credentials in live mode (or vice versa).

2. Verify Mode Settings

  • If using sandbox: Ensure Invoice Ninja is set to sandbox mode.
  • If using live: Ensure Invoice Ninja is set to live mode.
  • Check your .env file (if self-hosted) for:
    PAYPAL_MODE=sandbox
    
    or
    PAYPAL_MODE=live
    

3. Clear Cache

Sometimes, cached settings can cause problems:

  • Run:
    php artisan optimize:clear
    
  • If self-hosted, also clear your browser cache and try again.

4. Check PayPal Account Permissions

Ensure your PayPal Business Account is set up properly:

  • The account must be fully verified and have REST API permissions enabled.
  • Some accounts require extra approval from PayPal to accept payments via the REST API.

5. Enable REST API in Invoice Ninja

  • In Invoice Ninja, go to SettingsPayment Settings.
  • Select PayPal REST.
  • Enter your Client ID and Secret.
  • Save and test with a real or sandbox transaction.

6. Check PayPal Logs

  • If enabled, check the logs at:
    storage/logs/laravel.log
    
    for more detailed error messages.

Let me know if you need more specific debugging! :rocket:

ok - tried the above - nothing showing up in laravel.log and nothing showing up in the paypal logs.
even setup up the new tag in the .env and tried both options - nada!
Also check credentials still insists its incorrect…

its almost like its not even talking to paypal - otherwise there would have been some logs on the paypal end…

also weird is that there is no logging on the laravel.log file

You may want to ask in a discussion on GitHub