500 Error on Add Payment Method

Hi I’m in the process of setting up the account and came across this issue (with the hosted version):
https://pump.invoicing.co/client/payment_methods/create?method=2

When I try to add a new payment method on the client portal while testing I get this error:


Screen Shot 2023-05-16 at 3.42.37 PM

Hi,

@david do you have any thoughts?

@spndn

You will need to increase the permission levels on the API key you are using, Gocardless indicates a insufficient permissions exception.

Having same error but i use Paypal. Cannot add payment method.

Also I have paypal enabled but the “add payment method” button only shows credit card as an option, which then fails with error 500. PP payment do work for invoices.
I updated today to latest version and issue persists.

production.ERROR: Symfony\Component\HttpFoundation\Response::setContent(): Argument #1 ($content) must be of type ?string, App\PaymentDrivers\PayPalRestPaymentDriver given, called in /home/banayrlg/invoice.xxxxxx.com/vendor/laravel/framework/src/Illuminate/Http/Response.php on line 72 {“userId”:36,“exception”:"[object] (TypeError(code: 0): Symfony\Component\HttpFoundation\Response::setContent(): Argument #1 ($content) must be of type ?string, App\PaymentDrivers\PayPalRestPaymentDriver given, called in /home/banayrlg/invoice.xxxx.com/vendor/laravel/framework/src/Illuminate/Http/Response.php on line 72 at /home/banayrlg/invoice.xxxx.com/vendor/symfony/http-foundation/Response.php:449)

Having the same error when trying to use PayPal. Any update or fix on this please?

Found any fix please? I’m having the same exact issue.

@hillel Same issue for me. I’m using Payfast.

Payfast is set up correctly, once the user/client clicks pay now it collects personal info then redirects and error 500. I assume it is something being blocked either ports or something any ideas?

Are there any details about the 500 error in storage/logs?

I am having this exact issue in my logs. Did you ever find a solution?

In case it helps anyone, I noticed when you are creating the API key in PayPal, there are checkboxes to enable the additional options for Venmo and PayPal. This works in the customer portal to allow payment by credit/debit, paypal, and Venmo. Also make sure you are adding the key to your production environment not your sandbox.
However, I’m also getting the 500 error on trying to add a saved payment method and found a help document saying to recreate the API key as there needs additional permissions. I tried enabling “vault” for saved payments in my new API key but I’m still getting the 500 error when trying to add a payment method??

Are there any details about the 500 error in storage/logs?

Thanks for the reply! No error in the Invoice Ninja system logs. No error on my server. Console on the page where I’m getting the error only includes: Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Are you using the hosted or selfhosted app?

Self Hosted

Healthcheck looks good:
System
Email: log
queue: sync
PDF: Invoice Ninja Hosted PDF Generator
Database Connection
passed
PHP
web: 8.2.29
cli: PHP 8.2.29 (cli) (built: Jul 11 2025 10:20:47) (NTS)
Memory: 2G
API: 5.12.28

I also cross posted here before seeing your reply:

If you see a 500 error in the app the details will be logged to either the web server error logs or the application error logs in the storage/logs folder.

I dug a little deeper in my server files (invoice ninja is installed at a subdomain, so it was in a different spot) I replaced my actual domain with “MYDOMAIN”

[2025-10-09 18:13:37] production.ERROR: Symfony\Component\HttpFoundation\Response::setContent(): Argument #1 ($content) must be of type ?string, App\PaymentDrivers\PayPalRestPaymentDriver given, called in /home/MYDOMAIN/vendor/laravel/framework/src/Illuminate/Http/Response.php on line 82 {“userId”:2,“exception”:"[object] (TypeError(code: 0): Symfony\Component\HttpFoundation\Response::setContent(): Argument #1 ($content) must be of type ?string, App\PaymentDrivers\PayPalRestPaymentDriver given, called in /home/MYDOMAIN/vendor/laravel/framework/src/Illuminate/Http/Response.php on line 82 at /home/MYDOMAIN/vendor/symfony/http-foundation/Response.php:420)
[stacktrace]

I’m not sure, I suggest asking in a discussion on GitHub.

1 Like