Plan Resource

🚧

Account configuration is required before testing transactions

If you are interested in access to this feature, please contact [email protected]!


{
  "data": {
    "id": "plan_CbFCTDfxvMFNjwjVi26Uzhtj",
    "type": "plan",
    "attributes": {
      "type": "scheduled",
      "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.


attributes.type string

Determines the type of Plan. Possibles values are scheduled and on_demand. If no value is set, default value is scheduled.

If value is set to scheduled, it requires you to set the interval and interval_count attribute to determine the schedule of the payments.

If the value is set to on_demand, the interval, interval_count, and cycle_count attributes are optional.


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.