Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Shahrukhlaravel's avatar

PayPal Plan API

I am building a site with subscription based models. I am integrating PayPal as the payment merchant, while using plan API https://api.sandbox.paypal.com/v1/billing/plans, I am unable to create a plan as 1 + 1 year free plan as I am getting this error { "name": "INVALID_REQUEST", "message": "Request is not well-formed, syntactically incorrect, or violates schema.", "debug_id": "30cf64dbe0368", "details": [ { "field": "/billing_cycles/0/frequency/interval_count", "value": "2", "location": "body", "issue": "INVALID_PARAMETER_VALUE", "description": "The value of a field is invalid." } ], "links": [ { "href": "https://developer.paypal.com/docs/api/v1/billing/subscriptions#INVALID_REQUEST", "rel": "information_link", "method": "GET" } ] } My Payload json is { "product_id": "PROD-34T12172NS098611W", "name": "1 + 1 Year Free Plan", "billing_cycles": [ { "frequency": { "interval_unit": "Year", "interval_count": 2 }, "tenure_type": "REGULAR", "sequence": 1, "total_cycles": 0, "pricing_scheme": { "fixed_price": { "value": "19.95", "currency_code": "USD" } } } ], "payment_preferences": { "auto_bill_outstanding": true, "setup_fee": { "value": "0", "currency_code": "USD" }, "setup_fee_failure_action": "CONTINUE", "payment_failure_threshold": 3 }, "description": "FastestVPN 1 + 1 Year Free Plan Service", "status": "ACTIVE", "taxes": { "percentage": "0", "inclusive": false } } I was able to create a monthly and yearly product, but I can't create this as interval 2 is giving me error? Can't we create a plan with 2 year recurring period? I have a one time payment product as well. How can I create that?

0 likes
1 reply

Please or to participate in this conversation.