Xsolla-logo
  • 문서화
  • 계정 생성

Create PlanServer-sideAdmin

post/projects/{project_id}/subscriptions/plans

Creates a subscription plan.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

Request Body schema: application/json
required
object

Plan name. Value consists of pairs "localization":"plan name".

ar
string

Arabic.

bg
string

Bulgarian.

cn
string

Chinese (Simplified).

cs
string

Czech.

de
string

German.

en
string

English.

es
string

Spanish.

fr
string

French.

he
string

Hebrew.

it
string

Italian.

ja
string

Japanese.

ko
string

Korean.

pl
string

Polish.

pt
string

Portuguese.

ro
string

Romanian.

ru
string

Russian.

th
string

Thai.

tr
string

Turkish.

tw
string

Chinese (Traditional).

vi
string

Vietnamese.

required
object

Billing details.

required
object

Billing period.

value
required
integer

Number of time units. The value depends on the type parameter and can be:
- from 1 to 366, if type is day
- from 1 to 12, if type is month
- 0 if type is lifetime

type
required
string

Time unit. Can be day, month or lifetime.

Enum: "day" "month" "lifetime"
amount
number <float>

Billing amount.

currency
string

Currency of the purchase. Three-letter currency code per ISO 4217.

Array of objects

List of prices in different currencies.

Array
amount
required
number <float>

Billing amount.

currency
required
string

Currency of the purchase. Three-letter currency code per ISO 4217.

setup_fee
number <float>

One-time setup fee charged as part of the first invoice.

object

Billing retry details.

value
required
integer

Number of billing retries.

object

Plan description. Value consists of pairs "localization":"plan description".

ar
string

Arabic.

bg
string

Bulgarian.

cn
string

Chinese (Simplified).

cs
string

Czech.

de
string

German.

en
string

English.

es
string

Spanish.

fr
string

French.

he
string

Hebrew.

it
string

Italian.

ja
string

Japanese.

ko
string

Korean.

pl
string

Polish.

pt
string

Portuguese.

ro
string

Romanian.

ru
string

Russian.

th
string

Thai.

tr
string

Turkish.

tw
string

Chinese (Traditional).

vi
string

Vietnamese.

object

Subscription expiration details.

value
required
integer

Validity time.

type
required
string

Time unit. Can be day or month.

Enum: "day" "month"
external_id
string

Plan external ID (32 characters).

object

Grace period details.

value
required
integer

Number of time units.

type
required
string

Time unit. Can be day.

Value: "day"
group_id
string

Group ID the plan is linked to.

id
integer

Subscription plan ID.

refund_period
integer

Period of time that user can refund the payment for a subscription plan (in days).

object
value
string

Subscription plan status.

Enum: "active" "disabled"
tags
Array of strings

Plan tags.

object

Trial period details.

value
required
integer

Number of time units.

type
required
string

Time unit. Can be day.

Value: "day"
Responses
201

Сreated.

Request samples
application/json
{
  • "billing_retry": {
    },
  • "charge": {
    },
  • "description": {
    },
  • "expiration": {
    },
  • "external_id": "exp",
  • "grace_period": {
    },
  • "name": {
    },
  • "refund_period": null,
  • "status": {
    },
  • "trial": {
    }
}
Response samples
application/json
{
  • "external_id": "exp",
  • "plan_id": 241082
}