Plans

Create a plan

Creates a plan.

POST
/biller/plans

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

Plan payload

code*string

Internal identifier of the plan.

name*string

Name of the plan.

description?string

Description of the plan.

invoice_name?string

Name that appears on invoices for this plan.

billing_cycles?integer

Number of billing cycles for this fee.

Range1 <= value
bill_timing?string

When to bill for this fee.

Value in"advance" | "arrears"
free_units?integer

Number of free units included.

Range0 <= value
trial_period_days?integer

Trial period of the plan in days.

interval*

Billing interval for the plan.

price*

Price object for the plan.

fees?

Fees associated with the plan.

Response Body

application/json

curl -X POST "https://api.sandbox.billingrails.com/v1/biller/plans" \  -H "Content-Type: application/json" \  -d '{    "name": "Premium Plan",    "code": "premium_plan",    "description": "Premium subscription plan.",    "interval": {      "frequency": 1,      "unit": "month"    },    "price": {      "model": "flat",      "currency": "USD",      "amount": 5000    }  }'
{
  "plan": {
    "id": "plan_IhMUl3rrZ3",
    "name": "Premium Plan",
    "code": "premium_plan",
    "status": "active",
    "description": "Premium subscription plan.",
    "bill_timing": "advance",
    "billing_cycles": null,
    "free_units": 0,
    "invoice_name": "Premium Plan",
    "trial_period_days": 14,
    "meter_id": null,
    "meter_name": null,
    "meter_profile_id": null,
    "meter_profile_name": null,
    "created_at": "2025-02-14T17:33:40.843Z",
    "interval": {
      "frequency": 1,
      "unit": "month"
    },
    "price": {
      "model": "flat",
      "currency": "USD",
      "amount": 5000
    },
    "fees": []
  }
}