Error creating subscription in sandbox account using js api

tradehost
Contributor
Contributor

I have followed instructions to create a product and plan in my sandbox account using the curl commands.

 

The plan ID is P-3KF88089D60992923MUAWU4Q, here is the output of the plan creation request.

 

{"id":"P-3KF88089D60992923MUAWU4Q","product_id":"PROD-5FD60555F23244316","name":"Basic Plan","status":"ACTIVE","description":"Basic plan","usage_type":"LICENSED","create_time":"2023-09-13T07:53:22Z","links":[{"href":"https://api.sandbox.paypal.com/v1/billing/plans/P-3KF88089D60992923MUAWU4Q","rel":"self","method":"GET","encType":"application/json"},{"href":"https://api.sandbox.paypal.com/v1/billing/plans/P-3KF88089D60992923MUAWU4Q","rel":"edit","method":"PATCH","encType":"application/json"},{"href":"https://api.sandbox.paypal.com/v1/billing/plans/P-3KF88089D60992923MUAWU4Q/deactivate","rel":"self","method":"POST","encType":"application/json"}]} 

When trying to subscribe to this plan, I get this error:

Uncaught Error: Create Subscription Api response error:

{
    "name": "RESOURCE_NOT_FOUND",
    "message": "The specified resource does not exist.",
    "debug_id": "f887540e5bf84",
    "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"
        }
    ]
}
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.