Create Subscription Plan

Body Params
string
required
length ≤ 50

Merchant API client account identifier.

string
required
length ≤ 32

Identifier of your application (website).

string
required
length ≤ 3

API version.

integer
required

Request time (unix timestamp, seconds).

string
required
length ≤ 32

Description of the subscription plan

string
length ≤ 32

Subscription Plan name

string
required
length ≤ 14

The frequency of charging within the subscription plan. List of possible values:

  • Weekly (weekly)
  • Monthly (monthly)
  • Every 3 months (every_3_months)
  • Every 6 months (every_6_months)
  • Yearly (yearly)
prices
array of objects
required

Options with the amount/currency pairs in the subscription plan. Here are possible multiple pairs with different prices for different currencies. The currency parameter should be unique, meaning the record with two identical currencies cannot be created. The system should allow configuring only the currencies that exist in merchants gateway settings, considering only the gateways with MIT enabled.

prices*
integer

Number of days/months without charging the client. List of possible values:

  • null - meaning the trial period is not enabled
  • [1, 2, 3, ... N] - the number of days/months without charging
string
length ≤ 6

Cycle for attempts in the trial period without charging the client.List of possible values:

  • null - meaning the trial period is not enabled
  • days
  • months
integer

Number of weeks after which billing cycle will be expired.

integer

Number of retries in case of failure before disabling the plan for the customer. Default value - 3

integer

Delay between the retries in days. Default value - 1

string
length ≤ 8

Subscription Plan Status. Default value - active

string
length ≤ 8

Status of subscriptions in case of failure after all the retries. List of possible value:

  • inactive (that can be re-activated)
  • canceled (that cannot be re-activated)
integer

Number of days before changing the subscription status from inactive to canceled.

Headers
string
required

Authentication HTTP header of your outgoing request to the API. Below request parameters should be used for creating signature in request header.

  • merchant_id
  • application_key
  • timestamp
Responses

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