Forums >> BVSTools >> BVSTools Software Discussion >> GreenTools for PayPal (G4PP) Specific Discussion
"Number is too long" Error from GreenTools for PayPal (G4PP) Create Invoice Call
by: bvstone

Jump to: 


"Number is too long" Error from GreenTools for PayPal (G4PP) Create Invoice Call


This issue came up while I was testing in the PayPal sandbox.  I posted the question and answer here on StackExchange but in case it doesn't last, I copied the information here.


I was helping a customer figure out an issue and creating test invoices in the sandbox.

After the 4th one I started getting this error:

  "name": "BUSINESS_ERROR",
  "message": "Number is too long.",
  "debug_id": "2ca1d32e1fed3"

What number is too long? I've tried looking through all the info and nothing appears too long our out of spec. Hopefully somoene at Paypal can use the debug ID to track this. This test program has worked without issue for months.


So, after dealing with PayPal support the number that is too long was the invoice number.

When I started my testing in the sandbox I always had PayPal auto-generate the invoice number. It gave something like:


So, after a few tests, the invoice number was incremented (by PayPal) and eventually reached:


Now, on one more call the invoice would be incremented to:


Which is 26 characters, and the maximum length for invoice number is 25.

The solution? I was told to use smaller invoice numbers. ;)

I feel this is a possible bug in the auto-incrementation of the PayPal Invoice, but I am posting this so when others run into this they know what to do.

What I did was in my sandbox account call the Create Invoice Draft API with an invoice number like "Test001" so that there will be plenty of increments left in the invoice number. After that call there should be no need to supply an invoice number, at least for a very long time.


Copyright 1983-2017 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, CKEditor and running on the IBM i (AKA AS/400, iSeries, System i).