Plans

Create Plan

Create a new plan for an existing order

post/plans

Request

Headers

Accept-Language'es' | 'en'

Use for knowing which language to use

X-Child-Company-Idstring

In the case of a holding company, the company id of the child company to which will process the request.

Request body

amountinteger required

The amount in cents that will be charged on the interval specified.

currencystring

ISO 4217 for currencies, for the Mexican peso it is MXN/USD

expiry_countinteger

Number of repetitions of the frequency NUMBER OF CHARGES TO BE MADE, considering the interval and frequency, this evolves over time, but is subject to the expiration count.

frequencyinteger required

Frequency of the charge, which together with the interval, can be every 3 weeks, every 4 months, every 2 years, every 5 fortnights

idstring

internal reference id

interval'week' | 'half_month' | 'month' | 'year' required

The interval of time between each charge.

namestring required

The name of the plan.

trial_period_daysinteger

The number of days the customer will have a free trial.

max_retriesinteger

(optional) Specifies the maximum number of retry attempts for a subscription payment before it is canceled.

retry_delay_hoursinteger

(optional) Defines the number of hours between subscription payment retry attempts.

Example request

{
  "amount": 10000,
  "currency": "MXN",
  "expiry_count": 12,
  "frequency": 1,
  "id": "plan_24234",
  "name": "Extra Plan3",
  "max_retries": 3,
  "retry_delay_hours": 50
}

Response

successful

amountinteger
created_atinteger
currencystring
expiry_countinteger nullable
frequencyinteger
idstring
intervalstring
livemodeboolean
namestring
objectstring
trial_period_daysinteger nullable
max_retriesinteger
retry_delay_hoursinteger

Example response

{
  "amount": 10000,
  "created_at": 1666900846,
  "currency": "MXN",
  "expiry_count": 12,
  "frequency": 1,
  "id": "gold-plan",
  "interval": "month",
  "livemode": true,
  "name": "Extra Plan3",
  "object": "plan",
  "max_retries": 3,
  "retry_delay_hours": 48
}

Changes

No recorded changes to this operation across all 2 revisions of this API.