Paypal Smart Payment Buttons and create subscriptions give me a RESOURCE_NOT_FOUND error

paypal smart buttons
paypal checkout button
paypal subscription button
paypal _xclick-subscriptions
paypal javascript sdk
paypal checkout-sdk
paypal me api
paypal dashboard

I'm using a Sandbox and I created a paypal plan with Paypal PHP SDK and activated it.

I'm following the integration guide to create a subscription to this plan (https://developer.paypal.com/docs/subscriptions/integrate/#4-create-a-subscription).

But when I clic on the yellow button I have a Javascript Error in the console :

Error: Create Subscription Api response error:

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

I checked if the plan exists and it's OK with the Paypal PHP SDK.

Here is the Javascript code used :

<script src="https://www.paypal.com/sdk/js?client-id=sandbox_paypal_client_id&vault=true"></script>

  <div id="paypal-button-container"></div>

  <script>
    // paypal.Buttons().render('#paypal-button-container');

    paypal.Buttons({
      createSubscription: function(data, actions) {
        return actions.subscription.create({
          'plan_id': 'P-8N6112936N290211KKMN5MZI'
        });
      },
      onApprove: function(data, actions) {
        alert('You have successfully created subscription ' + data.subscriptionID);
      }
    }).render('#paypal-button-container');
  </script>

In the paypal developer dashboard I see the API call for this action, but in orange...

Thanks in advance for your help.

I also ran into this problem. My confusion when following the Subscriptions Integration instructions was that I thought the SDK would work with Subscription Plans (API endpoint /billing/plans), but at the time of writing it doesn't (at least the PHP and .NET versions) - the SDK only works with the older Billing Plans (/payments/billing-plans) which are very similarly named (Plans for short).

As @giannisrig says, you have to call the Subscription Plans part of the API directly (/billing/plans). I hope they'll update the SDK soon - this seems like an important missing feature.

Subscription and Plan ID : RESOURCE NOT FOUND, Hello I'm using a Sandbox and I created a paypal plan with Paypal PHP visiting our Help Center, or messaging us (message response times will be delayed). Our agents cannot take applications over the phone or provide you with the-​smart-payment-buttons) to create a subscription with Smart Button  Re: Subscription and Plan ID : RESOURCE NOT FOUND I had the same problem. Probably you are loading the button script with "client-id=sb" or no client id specified.

In addition to what Harvey Kadyanji said make sure that:

  1. The Plan is in active state
  2. That the plan was created through the Subscriptions API and Catalog Products API

If you are following the steps provided from paypal in this link: https://developer.paypal.com/docs/subscriptions/integrate/ you will have to use the Subscriptions API to create the Plans and not the Billing Plans and Billing Agreements APIs.

Subscriptions Integration, If the resource was already created by a previous execution of the same method, 404 Not Found, RESOURCE_NOT_FOUND . For all errors except Identity errors, PayPal returns an error response body that "links": [{ "href": "https://api.​paypal.com/v1/payments/sale/36C38912MN9658832", "rel": "self", "method": "​GET" }  Offer more payment options to your customers. PayPal Checkout comes with Smart Payment Buttons TM that present shoppers with the most relevant online payment methods. With one integration, you can give customers the option to pay with PayPal, Venmo, PayPal Credit*, and major credit cards and debit cards - on almost any device.

I had the same problem and the following solved my issues:

  1. Make sure the sandbox_paypal_client_id provided is valid
  2. Make sure the plan_id exists
  3. Add the plan name in the request e.g.
{
  'plan_id': 'P-8N6112936N290211KKMN5MZI',
  'name': 'Monthly plan'
}

API Responses, PayPal Checkout with Smart Payment Buttons gives your buyers a simplified and secure checkout experience. PayPal intelligently presents the most relevant payment types to your shoppers, Tip: To log in to PayPal after you click the Smart Payment Buttons, create a Docs Catalog · APIs · Engineering Blog · About Us  Smart Payment Buttons™ give customers the option to pay with PayPal, Venmo, PayPal Credit*, and major credit cards and debit cards on almost any device. Buy Now Make it easy to buy one or more of a single item.

Probably you are loading the button script with "client-id=sb" or no client id specified. In order to work with plans you created via API you need to explicitly set "client-id" to the client-id of your REST SDK app when loading the script. Then the buttons will find your created plan.

I also answered to basically the same problem in the PayPal community forum

Smart Payment Buttons Overview, Create product. Negative response test values. Use the JSON pointer in the request payload to simulate the following error responses at POST /v1/catalogs/  Show a Pay Now button in the PayPal Checkout flow. The final amount will not change after the buyer returns from PayPal to your site. false: Show a Continue button in the PayPal Checkout flow. The final amount might change after the buyer returns from PayPal to your site, due to extra shipping, tax, or other fees.

Test Subscriptions, Creates a plan that defines pricing and billing cycle details for subscriptions. To make REST API calls, include the bearer token in the Authorization header with the Bearer The payment preferences for a subscription. After you redirect the customer to the PayPal subscription consent page, a Continue button appears. After you redirect the customer to the PayPal payment page, a Pay Now button appears. Use this option when the final amount is known when the checkout is initiated and you want to process the payment immediately when the customer clicks Pay Now.

Subscriptions API, Error Handling · API Errors This sample request create s a trial plan with a fixed pricing scheme. Smart Payment Buttons in the JavaScript SDK - PayPal recommends using Subsc Smart Payment Buttons as it gives your buyers a simplified and secure subsc ription Docs Catalog · APIs · Engineering Blog · About Us  A hassle-free subscription billing service. PayPal Subscription Payments helps you manage scheduled payments, so your business runs smoothly. Enjoy flexibility for you and your customers. Easily create different plans and fee structures in more than 100 currencies.

When using paypal smart button on subscruiption page and on , Show activity on this post. When using PayPal smart button on subscription page and on order page its showing error " Object { err: "Do not pass both create Subscription and Paypal Smart Payment Buttons and create subscriptions give me a RESOURCE_NOT_FOUND error · 3 · Paypal smart button  Use PayPal button style Log in to save your button, add more features. You can give donors more options and save your button for future use if you are logged in

Comments
  • The fact that the SDK is out of date for an import feature like Subscriptions is infuriating.