Conekta::PlanRequest

April 10, 2025 ยท View on GitHub

Properties

NameTypeDescriptionNotes
amountIntegerThe amount in cents that will be charged on the interval specified.
currencyStringISO 4217 for currencies, for the Mexican peso it is MXN/USD[optional]
expiry_countIntegerNumber 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.[optional]
frequencyIntegerFrequency of the charge, which together with the interval, can be every 3 weeks, every 4 months, every 2 years, every 5 fortnights
idStringinternal reference id[optional]
intervalStringThe interval of time between each charge.
nameStringThe name of the plan.
trial_period_daysIntegerThe number of days the customer will have a free trial.[optional]
max_retriesInteger(optional) Specifies the maximum number of retry attempts for a subscription payment before it is canceled.[optional]
retry_delay_hoursInteger(optional) Defines the number of hours between subscription payment retry attempts.[optional]

Example

require 'conekta'

instance = Conekta::PlanRequest.new(
  amount: 10000,
  currency: MXN,
  expiry_count: 12,
  frequency: 1,
  id: plan_24234,
  interval: null,
  name: Extra Plan3,
  trial_period_days: 0,
  max_retries: 3,
  retry_delay_hours: 50
)