Xsolla-logo

Update Plan

put/projects/{project_id}/subscriptions/plans/{plan_id}

Updates subscription plan parameters.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

plan_id
required
integer

Plan ID.

Request Body schema: application/json
object

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

en
string

English.

ru
string

Russian.

cs
string

Czech.

ar
string

Arabic.

bg
string

Bulgarian.

cn
string

Chinese (Simplified).

tw
string

Chinese (Traditional).

fr
string

French.

de
string

German.

he
string

Hebrew.

it
string

Italian.

ko
string

Korean.

pl
string

Polish.

pt
string

Portuguese.

ro
string

Romanian.

es
string

Spanish.

th
string

Thai.

tr
string

Turkish.

vi
string

Vietnamese.

ja
string

Japanese.

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.

external_id
string

Plan external ID (32 characters).

object

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

en
string

English.

ru
string

Russian.

cs
string

Czech.

ar
string

Arabic.

bg
string

Bulgarian.

cn
string

Chinese (Simplified).

tw
string

Chinese (Traditional).

fr
string

French.

de
string

German.

he
string

Hebrew.

it
string

Italian.

ko
string

Korean.

pl
string

Polish.

pt
string

Portuguese.

ro
string

Romanian.

es
string

Spanish.

th
string

Thai.

tr
string

Turkish.

vi
string

Vietnamese.

ja
string

Japanese.

group_id
string

Group ID the plan is linked to.

object

Subscription expiration details.

value
required
integer

Validity time.

type
required
string

Time unit. Can be day or month.

Enum: "day" "month"
object

Trial period details. If this parameter is not passed, the default values (0 days) are used.

value
required
integer

Number of time units.

type
required
string

Time unit. Can be day.

Value: "day"
object

Grace period details.

value
required
integer

Number of time units.

type
required
string

Time unit. Can be day.

Value: "day"
object

Billing retry details.

value
required
integer

Number of billing retries.

refund_period
integer

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

tags
Array of strings

Plan tags.

object
value
string

Subscription plan status.

Enum: "active" "disabled"
Responses
200

OK.

Request samples
application/json
{
  • "charge": {
    },
  • "description": {
    },
  • "expiration": {
    },
  • "external_id": "exp",
  • "grace_period": {
    },
  • "billing_retry": {
    },
  • "refund_period": null,
  • "name": {
    },
  • "tags": null,
  • "trial": {
    }
}
Response samples
application/json
{
  • "charge": {
    },
  • "description": {
    },
  • "expiration": {
    },
  • "external_id": "exp",
  • "grace_period": {
    },
  • "billing_retry": {
    },
  • "refund_period": null,
  • "group_id": null,
  • "id": 241082,
  • "localized_name": "Experience boost",
  • "name": {
    },
  • "project_id": 40797,
  • "status": {
    },
  • "tags": [ ],
  • "trial": {
    },
  • "type": "all"
}