Search code examples
phplaravelpaypalpaypal-rest-sdkpaypal-subscriptions

/v1/billing/subscriptions/I-XXXXXXXX/revise RESOURCE_NOT_FOUND cannot revise plan


I am following this documentation: https://developer.paypal.com/docs/platforms/subscriptions/customize/revise-subscriptions/

I can make a get subscription request and I do find the resource, so it does exists, I'm trying to change a plan for user with no success.

I have tried multiple subscriptions upgrades and keep getting this error:

{
    "name": "RESOURCE_NOT_FOUND",
    "message": "The specified resource does not exist.",
    "debug_id": "badd307417e54",
    "details": [
        {
            "issue": "INVALID_RESOURCE_ID",
            "description": "Requested resource ID was not found."
        }
    ],
    "links": [
        {
            "href": "https://developer.paypal.com/docs/api/v1/billing/subscriptions#RESOURCE_NOT_FOUND",
            "rel": "information_link",
            "method": "GET"
        }
    ]
}

I'm testing my personal user on production environment.

Request made using postman:

curl --location --request POST 'https://api-m.paypal.com/v1/billing/subscriptions/I-XXXXXX/revise' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX' \
--data-raw '{"plan_id":"P-XXXXXXXXXXXXXXX"}'

Solution

  • After posting here I have found other questions about the /revise endpoint, none was answered, after that we have initiated a communication with PayPal's merchant support and apparently there is a bug.

    The issue was escalated to PayPal's engineers, not sure when it will be resolved.

    If anyone else is having this issue at the moment and is looking to change a plan, we have found a functioning workaround:

    • Create a new subscription - Users need approve the new price on PayPal
    • You will have to manually calculate the first payment in case of an upgrade
    • Once the new subscription activated - cancel the old subscription

    We didn't find a way update an existing subscription plan

    I hope it will help someone save some time