Plans

postPlans

POST
/plans

Create a Plan that represents a recurring type of payment that charges a certain amount on a weekly, monthly, quarterly, or annual basis, which once created, allows you to associate a Subscription and user with it.

Authorization

APIKEY<token>

In: header

Header Parameters

token?string

A single-use, limited authentication layer in addition to an API Key or Session Key to authorize sensitive operations. Auth Tokens add security by requiring one-time approval for specific actions.

request-token?string

A custom, one-time identifier for any API request (GET, PUT, POST, or DELETE). Blocks future requests with the same token for 48 hours, ensuring only the first request is processed. Valid values can contain 1-100 alphanumeric and special characters. See Request Tokens for more information.

Request Body

application/json

amount*integer

The amount to charge with each payment under this Plan, specified as an integer in cents.

billing?string

The attached billing for which recurring payments should be made to pay off statements.

order?string

The order of the Txn that will be created through this Plan.

txnDescription?string

The description of the Txn that will be created through this Plan.

description?string

A description of this Plan. This field is stored as a text string and must be between 0 and 100 characters long.

maxFailures?integer

The maximum consecutive amount of payment failures to allow for a subscription before inactivating it.

merchant*string

The identifier of the Merchant associated with this Plan.

name?string

The name of this Plan. This field is stored as a text string and must be between 0 and 100 characters long.

schedule*planSchedule

The schedule that determines when the subscription related to this Plan is triggered.

  • 1 - Daily
  • 2 - Weekly
  • 3 - Monthly
  • 4 - Annually

Value in

  • 1
  • 2
  • 3
  • 4
scheduleFactor?integer

A multiplier that you can use to adjust the schedule set in the 'schedule' field, such as daily, weekly, monthly, or annually. In this field is specified as an integer and its value determines how the interval is multiplied.

Default0
um?planUm

The unit of measure for the amount on the plan.

  • actual - An actual amount to charge, in cents.
  • percent - A percentage of another amount, in basis points.

Value in

  • "actual"
  • "percent"
type?planType

The type of plan.

  • recurring - A recurring payment plan (subcription).

  • installment - A deferred payment installment plan.

Value in

  • "recurring"
  • "installment"
inactive?inactive

Whether this resource is marked as inactive.

  • 0 - Active
  • 1 - Inactive

Value in

  • 0
  • 1
frozen?frozen

Whether this resource is marked as frozen.

  • 0 - Not Frozen
  • 1 - Frozen

Value in

  • 0
  • 1
subscriptions?array<>

Response Body

application/json

application/json

curl -X POST "https://example.com/plans" \  -H "Content-Type: application/json" \  -d '{    "merchant": "p1_mer_000444add0403c3553f4d20",    "name": "Lind - Wyman Subscription Plan weekly",    "description": "Payment",    "schedule": 1,    "scheduleFactor": 1,    "amount": 50000,    "inactive": 0,    "frozen": 0,    "maxFailures": 2,    "type": "recurring",    "txnDescription": "Payment Plan",    "order": "S1 - 1000 - LAST",    "billing": "p1_bil_00cee36329ead6ae6d31e43",    "um": "actual"  }'
{  "response": {    "data": [      {        "id": "p1_pln_00cb491aa15f9b515c3b59b",        "created": "2025-03-07 14:29:30.6772",        "modified": "2025-03-07 14:29:30.6772",        "creator": "p1_log_000444ad99da5eb18e00207",        "modifier": "p1_log_000444ad99da5eb18e00207",        "merchant": "p1_mer_000444add0403c3553f4d20",        "name": "Lind - Wyman Subscription Plan weekly",        "description": "regular plan",        "schedule": 3,        "scheduleFactor": 1,        "amount": 9211,        "inactive": 0,        "frozen": 0,        "maxFailures": 2,        "type": "recurring",        "txnDescription": "plan txn description",        "order": "S1 - 1000 - LAST",        "billing": "p1_bil_00cee36329ead6ae6d31e43",        "um": "actual"      }    ],    "details": {      "requestId": 1,      "totals": [],      "page": {        "current": 1,        "last": 1,        "hasMore": false      }    },    "errors": []  }}