Create Subscription Plan

Creates a subscription plan: what a buyer pays, in which currency, and how often.

A plan on its own charges nobody. To sign a buyer up, offer one or more plans with Create Plan Offer; the buyer
accepts the offer on the hosted page or through the Payin SDK, and that creates the subscription.

Permission: Merchant User Config.

Rules

  • schedule, amount, currency, termsOfServiceUrl and privacyPolicyUrl are required. Unknown fields are rejected.
  • schedule.intervalCount and trialPeriod.intervalCount must be at least 1.
  • Amount and schedule cannot be changed later. To change the price, create a new plan and cancel the old one.

The plan is created ACTIVE.

Errors

  • 400 CURRENCY_NOT_ALLOWED: this currency is not enabled for your account.
  • 400 MAXIMUM_AMOUNT_EXCEEDED: the amount is above your limit for this currency (maxAmount).
  • 400 VALIDATION_ERROR: a field is missing or invalid; details lists them.
  • 404 NOT_FOUND: your merchant account could not be loaded. Contact Payment Labs.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The fields accepted by Create Subscription Plan. Any other field is rejected.

string

Plan name shown to the buyer. 3 to 100 characters.

string

Short description of the plan shown to the buyer. Up to 500 characters.

string

Free-form key you use to order and group plans, for example Premium#100. Up to 100 characters. Payment Labs does not
interpret it.

schedule
object
required

How often the buyer is charged, for example every 1 monthly interval.

number
required

Amount charged every billing cycle, in decimal notation in currency (19.99). Must be within the limits your account
accepts for that currency.

string
required

ISO 4217 currency code of amount, for example USD. Must be a currency your account accepts.

trialPeriod
object

Optional free trial before the first charge, as an interval and count (for example 14 daily). During the trial the
subscription is TRIAL and the buyer is not charged; the buyer's instrument is still verified when they subscribe.

string
required

URL of your terms of service, shown to the buyer when they subscribe.

string
required

URL of your privacy policy, shown to the buyer when they subscribe.

Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json