Xsolla-logo

Create Plan

post/projects/{project_id}/subscriptions/plans

Creates a subscription plan.

Request
Security:
path Parameters
project_id
required
integer

Project ID.

Request Body schema: application/json
required
object

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

required
object

Billing details.

id
integer

Subscription plan ID.

external_id
string

Plan external ID (32 characters).

object

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

group_id
string

Group ID the plan is linked to.

object

Subscription expiration details.

object

Trial period details.

object

Grace period details.

object

Billing retry details.

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
Responses
201

Сreated.

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