PayPal commerce error: "Expected an order id to be passed" showing in 4.80.0 and 4.80.1

4 months ago
Upgraded from 4.70.5 to 4.80.0. I am using Windows 2025 Standard, and using PayPal commerce.

When checking out and after reaching the payment information page, all previous steps disappear and the PayPal and Pay by Credit or Debit options appear.
When I choose either option, an error message shows at the top "Expected an order id to be passed."
I noticed a new box in the PayPal commerce setup information for 4.80.0 and 4.80.1, which is the merchant ID, I entered those for each store. I have two store setup.

I cleared the cache and restarted the application, the error is still there.

This does not happen in 4.70.5, which I had to revert to because I could not solve this problem.

Thank you for any help.
4 months ago
"Expected an order id to be passed." - this is just a common error text received from PayPal service, the exact error see in logs in the admin area.  
4 months ago
Thank you so much for replying.

I double checked the credentials information from Paypal (clientID and Secret key), and the merchant ID, which is the account email address.

Here is the log from 4.80.1 after attempting the purchase.

Log level Error
Short message Payments.PayPalCommerce error:
Failed request
Full message
Nop.Core.NopException: Failed request (BadRequest): Request is not well-formed, syntactically incorrect, or violates schema.
{
  "name": "INVALID_REQUEST",
  "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
  "debug_id": "77af0a511fb2e",
  "details": [
    {
      "field": "/purchase_units/@reference_id=='default'/payee/merchant_id",
      "value": "PayPal email account goes here",
      "location": "body",
      "issue": "INVALID_STRING_LENGTH",
      "description": "The value of a field is either too short or too long."
    },
    {
      "field": "/purchase_units/@reference_id=='default'/payee/merchant_id",
      "value": "PayPal email account goes here ",
      "location": "body",
      "issue": "INVALID_PARAMETER_SYNTAX",
      "description": "The value of a field does not conform to the expected format."
    }
  ],
  "links": [
    {
      "title": null,
      "href": "https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX",
      "method": null,
      "rel": "information_link",
      "encType": "application/json",
      "mediaType": null
    },
    {
      "title": null,
      "href": "https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH",
      "method": null,
      "rel": "information_link",
      "encType": "application/json",
      "mediaType": null
    }
  ]
}


4 months ago
Usually PayPal Merchant ID is an alphanumeric value (e.g. 9JJPJNNPQ7PZ8) and not an email value. Anyway you should contact to PayPal support for help with this ID.
4 months ago
Thank you again for your help. Everything is working correctly now on version 4.80.1.
The merchant ID is a new field in this version and I thought it was an email address.

Not sure if this thread will stay here or should moved or removed as this is not a bug.