Search code examples
paypalpaypal-rest-sdk

RESOURCE_NOT_FOUND post request from Postman v2/payments/authorizations/{authorization_id}/void


Trying to call post request from Postman

www.sandbox.paypal.com/v2/payments/authorizations/{authorization_id}/void

getting below response error:

{
    "name": "RESOURCE_NOT_FOUND",
    "message": "The specified resource does not exist.",
    "debug_id": "e5eafe26bbc24",
    "details": [
        {
            "issue": "INVALID_RESOURCE_ID",
            "field": "authorization_id",
            "value": "72J58097UL3794703",
            "description": "Specified resource ID does not exist. Please check the resource ID and try again.",
            "location": "path"
        }
    ],
    "links": [
        {
            "href": "https://developer.paypal.com/docs/api/payments/v2/#error-INVALID_RESOURCE_ID",
            "rel": "information_link"
        }
    ]
}

Solution

  • The RESOURCE_NOT_FOUND error occurs when the resource specified in the request path (72J58097UL3794703, in this case) is not valid for the specified operation. The most likely explanations are that 72J58097UL3794703 is from a different environment (live, not sandbox) or that it is something like an Order ID or capture ID, rather than an authorization ID.

    Orders and captures cannot be voided. If you are not going to use an Order ID, forget it and do not capture nor authorize it. In the case of a capture, it's already finalized so you can refund it.