Cannot start a PayPal subscription
avi_vas
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jun-09-2024
03:57 AM
I created a subscription plan:
After clicking Copy Code, I pasted it in my HTML page:
<div id="paypal-button-container-P-855600647D495860NMXSO6MA"></div>
<script src="https://www.paypal.com/sdk/js?client-id=sb&vault=true&intent=subscription" data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
style: {
shape: 'pill',
color: 'white',
layout: 'vertical',
label: 'subscribe'
},
createSubscription: function(data, actions) {
return actions.subscription.create({
/* Creates the subscription */
plan_id: 'P-855600647D495860NMXSO6MA'
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID); // You can add optional success message for the subscriber here
}
}).render('#paypal-button-container-P-855600647D495860NMXSO6MA'); // Renders the PayPal button
</script>
When I click "PayPal Subscribe", I get the following error in the console:
Uncaught Error: Create Subscription Api response error: { "name": "RESOURCE_NOT_FOUND", "message": "The specified resource does not exist.", "debug_id": "f709778651899", "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 get this error whether or not sandbox mode is enabled
Labels:
- Labels:
-
Recurring Payments
-
SDK
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.
Related Content
- Error message for obtaining access_token in REST APIs
- where does paypal payments go to if there is no linked phone or email to the seller ? in PayPal Payments Standard
- Couldn't receive International payment in PayPal Payments Standard
- Which api can get oauth2.0 authorization_code? in REST APIs
- Is it possible to make payments in RON (Romanian Leu) through PayPal? in REST APIs