Invalid payment gateway credentials

I am trying to integrate the Paypal payments to ERPnext-Coud-30 days trial.
I retrieved my Paypal credentials from my real (no sandbox) Paypal account.
I keep getting this error message when saving in the ERPNext Paypal settings page: “Invalid payment gateway credentials”.
Thank you for your help.

Please, can someone help ?
Has it something to do with the fact that I am working on a trial version?

Please, can someone help ?
I am desperate :frowning:
What are the possible causes for this message considering that my Paypal credentials are valid.

Still not working…
Is there a way to read the error code returned from Paypal (ErPNext Cloud version) ?

Welcome and thank you for reporting this jpkuhn!

Your issue has been logged here PayPal credentials fail to validate · Issue #11293 · frappe/erpnext · GitHub

You are not alone. A veteran user @James_Robertson had trouble with this too in December Does PayPal Integration App work with V7? - #4 by James_Robertson

Thanks @clarkej

@jpkuhn - what version of ERPNext is running in that cloud account? It is hard for us to give you help when there is little information as to how you have things setup, what the integration documents look like and other things besides the error message. Did you go into PayPal and setup the API? That is key. If you want sandbox, you have to setup a separate sandbox API key as well.

Hi James,
Thank you for replying. The cloud version is
ERPNext: v9.1.6 (master)
Frappe Framework: v9.1.8 (master).

I did get the API credentials in Paypal and copied them in the Paypal settings page of ERPNext.
I keep getting the same error message.
I also tried with a developer sandbox: Same result!

And the credentials you putting in the ERPNext integration document are the same as what you logon to PayPal with? And you setup a NVP/SOAP API integration (Classic) type of API in the PayPal Log in to your PayPal account section?

The ERPNext Paypal settings are made of

  • one username in the form of
  • one 16 characters password,
  • one 32 characters signature

which I get from my PayPal account like you said, NVP/SOAP API classic.
Nowhere in ERPNext I am asked to input my normal PayPal logon data.

Is there any traceback in Error Log?

Nothing in the error log.

I am using a regular pay pal logon account for the creds plus the api key in my setup. The user has been setup with api access

Hi @jpkuhn

You will recall I logged your issue here PayPal credentials fail to validate · Issue #11293 · frappe/erpnext · GitHub

@saurabh6790 responded ‘Not able to reproduce the issue! Are you still facing the same issue?’

Please would you advise me or him whether you have resolved your issue and provide him with any further details,


Hi clarkej,
Thank you for replying.
I still have the issue.
I also have asked the question to Paypal, in case my Paypal account has a problem. Waiting for an answer.
For the time being, I have used a workaround by creating a Paypal button in a Standard Reply email.

I am having the same trouble.

My paypal account used to work perfectly, but I updated erpnext and started to have trouble.
When customer wants to pay this is what happens:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 67, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 53, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 53, in execute_cmd
return, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 939, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_request/”, line 265, in make_payment_request
frappe.local.response[“location”] = pr.get_payment_url()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_request/”, line 90, in get_payment_url
“currency”: self.currency
File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/paypal_settings/”, line 127, in get_payment_url
response = self.execute_set_express_checkout(kwargs[“amount”], kwargs[“currency”])
File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/paypal_settings/”, line 156, in execute_set_express_checkout
response = make_post_request(url, data=params.encode(“utf-8”))
File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/”, line 50, in make_post_request
raise exc
SSLError: bad handshake: Error([(‘SSL routines’, ‘SSL3_GET_SERVER_CERTIFICATE’, ‘certificate verify failed’)],)
And if I go to paypal setting, and without modifying anything, just by clicking “save” i get the error of “Invalid Payment gateway credentials”

Installed Apps
ERPNext: v10.0.14 (master)

ERPNext Shopify: v2.0.25 (develop)

Frappe Framework: v10.0.15 (master)


I know this is a late response, I had just stumbled on this thread while trying to find a solution to the same problem. I had solved my problem.
My problem was, when I copied the stuff over from Paypal, naturally there would be some spaces at the end depending if you dragged over the signature with your mouse.
Just check that there are no stray spaces like ___ this ____ (without the underscores, of course) at the end of your signature/API ID/API password when you do it on ERPNext.

I have put this response just in case people in the future have the same problem, as a first check.

1 Like