Creating plan error

charlesdev
Contributor
Contributor

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.

 

    "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
            )
        );
Login to Me Too
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.