Skip to main content

BillingPlanResource

Object containing the billing plan resource.

billingPlan object

Defines the configuration for recurring billing, including price, interval, and retry behavior. Used by Billing Agreements to determine how and when ePay processes scheduled charges.

iduuidrequired

Unique identifier for the billing plan.

instantCapturestring

If the payment should be captured instantly or not.

  • OFF indicates that the payment should not be captured instantly.
  • VOID indicates that the payment should be captured instantly and if somehow the instant capture fails the payment is voided.
  • NO_VOID indicates that the payment should be captured instantly and if the capture fails the authorization is kept (no void is made)

Possible values: [OFF, VOID, NO_VOID]

namestringrequired

Human-readable name of the billing plan.

colorstringnullable

An optional hex color, which is used visually in the ePay backoffice

emojistringnullable

An optional single emoji, which is used visually in the ePay backoffice

amountintegerrequired

Charge amount for the plan (in the smallest currency unit, e.g. cents).

currencystringrequired

ISO 4217 three-letter currency code (e.g., USD, EUR).

Possible values: >= 3 characters and <= 3 characters, Value must match regular expression ^[A-Z]{3}$

maxAttemptsintegerrequired

Maximum number of billing attempts allowed per billing period.

interval objectrequired

The frequency between automatic charges. A frequency=2 and period=WEEK means one charge every two weeks.

periodstringrequired

The time unit of the frequency field

Possible values: [DAY, WEEK, MONTH, YEAR]

Example: MONTH
frequencyintegerrequired

The number of period's between each charge.

Possible values: >= 1 and <= 31

Example: 1
createdAtdate-timerequired

Timestamp when the billing plan was created.

BillingPlanResource
{
"billingPlan": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"instantCapture": "OFF",
"name": "string",
"color": "string",
"emoji": "string",
"amount": 0,
"currency": "string",
"maxAttempts": 0,
"interval": {
"period": "MONTH",
"frequency": 1
},
"createdAt": "2024-07-29T15:51:28.071Z"
}
}