Creating plan error
charlesdev
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Mar-30-2021
08:19 AM
I am trying to create a plan, so that it is charged every month, for 12 months.
I am working with PHP and when I send the information to create the plan it returns a 422 Unprocessable Entity error.
I do not know what is happening, I am working with the sandbox test account, I share the data that I send and a message of the error.
Can you help me by telling me that it is wrong please.
"message": "Client error: `POST https://api-m.sandbox.paypal.com/v1/billing/plans` resulted in a `422 Unprocessable Entity` response...",
"exception": "GuzzleHttp\\Exception\\ClientException",
$planData = array(
"product_id" => "PROD-7VH650298R0436845",
"name" => "3 - MCSS plan susbcription",
"description" => "MCSS custom plan",
"status" => "ACTIVE",
"billing_cycles" => array(
array(
"frequency" => array(
"interval_unit" => "MONTH",
"interval_count" => 1
),
"tenure_type" => "REGULAR",
"sequence" => 3,
"total_cycles" => 12,
"pricing_scheme" => array(
"fixed_price" => array(
"value" => "12",
"currency_code" => "USD"
)
)
)
),
"payment_preferences" => array(
"auto_bill_outstanding" => true,
"setup_fee" => array(
"value" => "0",
"currency_code" => "USD"
),
"setup_fee_failure_action" => "CONTINUE",
"payment_failure_threshold" => 3
),
"taxes" => array(
"percentage" => "0",
"inclusive" => false
)
);
Labels:
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
- subscription_id has disappeared in REST APIs
- Recurring Payment issue in Braintree Client-side Integration (JS, iOS, Android SDKs)
- I'm getting a 500 Error from Paypal when tryin to create a Platform Partner App in the sandbox. in Sandbox Environment
- I'm getting an error when creating an invoice in PayPal Upgrade Community
- A gateway error log add to get detailed information response from paypal. in PayPal Payments Standard