Plan Resource

With Plans, you can create different options for your customers to pay a subscription

🚧

This is an early access feature.

If you would like your account to be configured, please contact [email protected]

{
  "data": {
    "id": "plan_CbFCTDfxvMFNjwjVi26Uzhtj",
    "type": "plan",
    "attributes": {
      "amount": 100000,
      "currency": “PHP”,
      "cycle_count": 2,
      "description": "The basic plan offers essential coverage for life’s unexpected events.",
      "interval": "monthly",
      "interval_count": 1,
      "livemode": true,
      "name": "Basic Plan",
      "metadata":{
        "another_metadata": "good metadata",
        "reference_number": "X1999"
      },  
      "created_at": 1671437933,
      "updated_at": 1671437933
    }
  }
}

id string
Unique ID of the resource.


type string
Represents the resource type. Value is always plan.


amount integer
Amount to be collected from the customer. A positive integer with a minimum amount of 2000. 2000 is the smallest unit in cents. If you want to receive an amount of 20.00, the value that you should pass is 2000. If you want to receive an amount of 1500.50, the value that you should pass is 150050.


currency string
Three-letter ISO currency code, in uppercase. PHP is the only supported currency as of the moment.


cycle_count integer
Defines how long the subscription will be active. The count includes the first payment to activate the subscription. If the value is not provided, the subscription will run indefinitely. Minimum value is 2.


description string
Description of the plan.


interval string
Defines how frequent the customer will be billed. Possible values are weekly, monthly, or yearly.


interval_count integer
The number of intervals between the subscription’s next billing schedule. Possible values are 1 to 10.

For example:
Monthly: Set the interval to monthly and the interval_count to 1.
Quarterly: Set the interval to monthly and the interval_count to 3.


livemode boolean
The value is true if the resource exists in live mode or the value is false if the resource exists in test mode.


name string
Name of the plan.


metadata dictionary
A set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the object in a structured format. Only string values are accepted.


created_at timestamp
The date when the Plan has been created.


updated_at timestamp
The date when the Plan has been updated.