PayPal Subscription revise - buyer is not redirected after consent

Davidwesa
Contributor
Contributor

I am using following PayPal REST API endpoint to revise subscription. In this case, I am trying to change the existing plan to 'enterprise plan'.

https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-RWWYH16HNGLT/revise

Following JSON is being sent in the body:

{
    "plan_id": "{{enterprise_plan_id}}",
    "application_context": {
        "return_url": "https://ijcaonline.org",
        "cancel_url": "https://www.elsevier.com"
    }
}

PayPal sends me a proper JSON response with HATEOAS link for approval.

{
    "plan_id": "P-58L61331DX546581WMIPDYMQ",
    "plan_overridden": false,
    "links": [
        {
            "href": "https://www.sandbox.paypal.com/webapps/billing/subscriptions/update?ba_token=BA-2HE39875M7268303S",
            "rel": "approve",
            "method": "GET"
        },
        {
            "href": "https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-RWWYH16HNGLT",
            "rel": "edit",
            "method": "PATCH"
        },
        {
            "href": "https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-RWWYH16HNGLT",
            "rel": "self",
            "method": "GET"
        },
        {
            "href": "https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-RWWYH16HNGLT/cancel",
            "rel": "cancel",
            "method": "POST"
        },
        {
            "href": "https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-RWWYH16HNGLT/suspend",
            "rel": "suspend",
            "method": "POST"
        },
        {
            "href": "https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-RWWYH16HNGLT/capture",
            "rel": "capture",
            "method": "POST"
        }
    ]
}

When I go to the approval link in the browser, I am greeted with the login form. But after login, the page loops arounds for a few seconds and later I am flashed with an error in the browser:

We’re sorry Things don’t appear to be working at the moment. Try Again

I opened the google chrome developer console and have noted the errors:

3H5t3.png

I tried doing the subscription revision using Javascript SDK as well rather than calling REST API endpoints but still the HATEOAS approval link won't work.

 
Login to Me Too
14 REPLIES 14

MTS_Justin
Moderator
Moderator

Hello,

There is currently a known issue with subscriptions in our sandbox environment which our developers are actively investigating. There is currently no ETA for the resolution of this issue.

 

I'll post in this thread once the issue has been resolved.

Apologies for any inconvenience.

Thanks !


Was my post helpful? If so, please give me a kudos!
Login to Me Too

MTS_Justin
Moderator
Moderator
Hello,

Thanks for your patience.

The issue with subscriptions in our sandbox environment should now be resolved.

Apologies for any inconvenience caused.

Thanks !

Was my post helpful? If so, please give me a kudos!
Login to Me Too

VanNoctar
New Community Member
It seem the problem persist in sandbox with the revise subscription link. The user is connected ans after the payment an error is showed.
Login to Me Too

robin_alvarez
New Community Member

I still have this problem in 2024. After paying/consent via the revise subscription link, an error is displayed. Does this problem only exist in the sandbox environment?

Login to Me Too

filippzotov
Contributor
Contributor

Have same problem, after i make revise request I'm getting link for user to verify but user gets error "Things don't appear to be working at the moment. Please try again later". I have this problem both on sandbox and live keys, while payment with cards works fine because they don't require confirmation from the user. Endpoint that I'm using to change user's sub plan  /v1/billing/subscriptions/{sub_id}/revise

 

Login to Me Too

Finalle_ai
Contributor
Contributor

Here as well, after i make revise request to update subscription quantity the approval link navigate to "Things don't appear to be working at the moment. Please try again later"...

By the way, when the user paid with credit card than the revise call to update the quantity acctually update the subscription quantity but the response is 500...

Login to Me Too

filippzotov
Contributor
Contributor

Managed to solve my problem, in my case I didn't send the redirect links in JSON for revise

{
        "plan_id": plan_id,
        "application_context": {
            "return_url": "{my_return_url}",
            "cancel_url": "{my_cancel_url}",
        }
Now it works fine in sandbox and on live keys, it's redirects user on that links.
Hope this can help someone 
Login to Me Too

Finalle_ai
Contributor
Contributor

it works, thanks!

Login to Me Too

Finalle_ai
Contributor
Contributor

 @filippzotov 

How did you handle the 500 response while revising subscription paid by credit card?

 

Thanks!

Login to Me Too

Haven't Found your Answer?

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