To revise a paypal subscription I use the following curl translated to php:
curl -v -X POST https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G/revise
-H "Content-Type: application/json" \
-H "Authorization: Bearer <Access-Token>" \
-d '{
"plan_id": "P-5ML4271244454362WXNWU5NQ"
}'
I replaced the plan-id and subscription id with variables. But I receive the following error:
{
"name":"UNPROCESSABLE_ENTITY",
"message":"The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id":"1620f0049dfd6",
"details":[
{
"issue":"PAYMENT_IN_PROGRESS",
"description":"Payment for the subscription is in progress."
}
],
"links":[
{
"href":"https://developer.paypal.com/docs/api/v1/billing/subscriptions#UNPROCESSABLE_ENTITY",
"rel":"information_link",
"method":"GET"
}
]
}
I can't explain why this isn't working.