Unauthorized error when making live payments via REST API

RichardW2
Contributor
Contributor

Unauthorized error when making live payments via REST API

We have developed a marketplace app which uses the REST API and we can make payments using the sandbox credentials without any problems. When we switch to live credentials, we cannot make any payments, we just get an UNAUTHORIZED_PAYMENT error with a debug ID.  Both the PayPal accounts are in good standing (i.e. the sending account for the purchaser and the receiving account for the merchant) and funds can be transferred between the accounts in both directions.

We are using the production environment, Client ID and Secret. Here is the request that was made, which generated a debug ID of b739b8025c4d7:

{
  "intent": "sale",
  "payer": {
    "payment_method": "paypal"
  },
  "transactions": [
    {
      "amount": {
        "currency": "GBP",
        "total": 1.0
      },
      "payee": {
        "email": "----------------"
      },
      "description": "Paracetamol",
      "payment_options": {
        "allowed_payment_method": "INSTANT_FUNDING_SOURCE"
      },
      "item_list": {
        "items": [
          {
            "name": "test item",
            "description": "description here",
            "price": "1",
            "quantity": "1"
          }
        ],
        "shipping_address": {
          "recipient_name": "John Smith",
          "line1": "Address 1",
          "line2": "Address 2",
          "city": "Address 3",
          "country_code": "UK",
          "postal_code": "AB12 3CD"
        }
      }
    }
  ]
}

(email address has been redacted)


Can someone please help with this, we've been stuck on this for a couple of days trying everything we can think of and can now go no further with the app which is otherwise complete and ready to release.

Thanks.

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.