[FIXED] Preparing Paypal payment fails with error "A problem occured when performing an operation in PayPal"

we’re having issues with Paypal payments in our web application.

The call to:

fails with a 422 error and these details:
{ code: “ApplicationErrors_PaypalError”
message: “A problem occured when performing an operation in PayPal.” }.

We’ve just enabled the live mode and generated the production API key.

Thanks for your help,

We’ve fixed the issue!
It seems that Paypal EC doesn’t accept product names and descriptions longer than 127 characters.

Could be useful if this third-party limitation was mentioned in the documentation so that other developers won’t go mad like me debugging this :rofl: :rofl: :rofl:.


I am getting the same 422 “Unprocessable Entity” error from a PATCH request to https://payment.snipcart.com/api/public/sessions/8f328b38-60b6e96a-9960-40f7-a24f-c29b8bdf10ee even after limiting product names and descriptions to 120 characters length.

Here’s the response for that request:

{"errors":[{"code":"ApplicationErrors_PaypalError","message":"A problem occured when performing an operation in PayPal."}],"type":"","title":null,"status":422,"detail":"","instance":"","extensions":{}}

And the request body:


What else could be the reason for this?

I had another problem with discounts which triggered a similar error.

Not sure if this can help you but I’ll try nonetheless, here is the thread:


Thanks @azicchetti. We don’t have discounts applied. But I will note this down for future reference.