subscription checkout not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have created the subscription plan with below payload:-
{
"product_id": "PROD-39T93926CP7625608",
"name": "Netflix Plan",
"description": "Netflix Basic Plan",
"status": "ACTIVE",
"usage_type": "LICENSED",
"billing_cycles": [
{
"tenure_type": "REGULAR",
"sequence": 1,
"total_cycles": 12,
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"pricing_scheme": {
"fixed_price": {
"currency_code": "USD",
"value": "20"
}
}
}
],
"payment_preferences": {
"auto_bill_outstanding": true,
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 3,
"setup_fee": {
"value": "0",
"currency_code": "USD"
},
"service_type": "PREPAID"
},
"taxes": {
"percentage": "0",
"inclusive": true
}
}
After successfully created the subscription plan.
Now created the subscription for checkout:-
Payload:- {
"plan_id": "P-3LC449801U914371BLTKQB6I",
"shipping_amount": {
"currency_code": "USD",
"value": "20"
},
"subscriber": {
"name": {
"given_name": "ashish",
"surname": "<removed"
},
"email_address": "emailAddress",
"shipping_address": {
"name": {
"full_name": "ashish <removed>"
},
"address": {
"address_line_1": "<removed>",
"address_line_2": "<removed>",
"admin_area_2": "<removed>",
"admin_area_1": "CA",
"postal_code": "<removed>",
"country_code": "US"
}
}
},
"auto_renewal": true,
"application_context": {
"brand_name": "PetroleumTaxTools",
"locale": "en-US",
"shipping_preference": "SET_PROVIDED_ADDRESS",
"user_action": "SUBSCRIBE_NOW",
"payment_method": {
"payer_selected": "PAYPAL",
"payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED"
},
"return_url": "https://example.com/returnUrl",
"cancel_url": "https://example.com/cancelUrl"
}.
I was created successfully and got the links in response.
"links" :[{
"href": "https://api.sandbox.paypal.com/v1/billing/subscriptions/I-P991F8S8KN5V",
"rel": "edit",
"method": "PATCH"
}, {
"href": "https://api.sandbox.paypal.com/v1/billing/subscriptions/I-P991F8S8KN5V",
"rel": "self",
"method": "GET"
}, {
"href": "https://www.sandbox.paypal.com/webapps/billing/subscriptions?ba_token\u003dBA-46M94926X0815490K",
"rel": "approve",
"method": "GET"
}]
after that i was tried to go on approval link for payment.
then i got this error page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This seems to be an issue with your API or if it's your custom development then an argument is not passed correctly. Are you using WOO and WP or is that something else, custom PHP may be? Do you have logging enabled for this PayPal API call so that you can track where its breaking?
Please check and let me know.
Thank!
Mansoor
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Mandatory Account Creation Hindering Customer Experience in REST APIs
- User is asked for shipping address when creating a credit card order in REST APIs
- Recurring payments for cart with multiple individually subscribable items? in PayPal Payments Standard
- Adaptive Payments stopped working in early Feb 2024 in NVP/SOAP APIs
- Encrypted subscription button has stopped working in NVP/SOAP APIs