paypalpaypal-ipnpaypal-rest-sdkpaypal-subscriptions

Paypal Plan MULTIPLE_FREE_TRIAL_BILLING_CYCLE_NOT_SUPPORTED


In the [Paypal documentation][1], it mentions under tenure_type:

The tenure type of the billing cycle. In case of a plan having trial cycle, only 2 trial cycles are allowed per plan.

If we want to do a free trial for 366 days, we'd set up a plan like this:

"billing_cycles": [
{
  "frequency": {
    "interval_unit": "DAY",
    "interval_count": 1
  },
  "sequence": 1,
  "tenure_type": "TRIAL",
  "total_cycles": 1
},
{
  "frequency": {
    "interval_unit": "YEAR",
    "interval_count": 1
  },
  "sequence": 2,
  "tenure_type": "TRIAL",
  "total_cycles": 1
},
{
  "frequency": {
    "interval_unit": "YEAR",
    "interval_count": 1
  },
  "tenure_type": "REGULAR",
  "total_cycles": 0,
  "sequence": 3,
}
]

But this returns the error:

{"name":"UNPROCESSABLE_ENTITY","message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"37d4b8ed61f65","details":[{"field":"/billing_cycles","location":"body","issue":"MULTIPLE_FREE_TRIAL_BILLING_CYCLE_NOT_SUPPORTED","description":"Only one free trial billing cycle is allowed."}],"links":[{"href":"https://developer.paypal.com/docs/api/v1/billing/subscriptions#UNPROCESSABLE_ENTITY","rel":"information_link","method":"GET"}]}

What am I misunderstanding here? The objective here is to have a trial period which is not whole years but over 1 year in length, eg 400 days. Paypal doesn't allow and interval_unit of DAY to be greater than 365.


Solution

  • There can be up to 2 trial periods to a plan. Only one of the trial periods can be for $0 per cycle. The second trial period, if one exists, must be for > $0 per cycle.