Xsolla-logo

Update Subscription

put/projects/{project_id}/users/{user_id}/subscriptions/{subscription_id}

Updates a subscription by either changing its status (active, canceled, or non_renewing) or postponing the next billing date.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

user_id
required
string

User ID.

subscription_id
required
integer

Subscription ID.

Request Body schema: application/json
user_id
string

User ID.

status
string

Status.

Enum: "active" "canceled" "non_renewing"
cancel_subscription_payment
boolean

Setting to true will refund the last payment made for this subscription. Only works together with setting the status to canceled..

object

Billing postponement.

object
Responses
200

OK.

Request samples
application/json
{
  • "status": "active"
}
Response samples
application/json
{
  • "charge_amount": 0.03,
  • "currency": "USD",
  • "date_create": "2018-09-21T16:54:59+0300",
  • "date_end": null,
  • "date_last_charge": "2018-09-21T16:55:05+0300",
  • "date_next_charge": "2018-09-21T16:55:05+0300",
  • "id": 24953579,
  • "plan": {
    },
  • "product": null,
  • "status": "active",
  • "user": {
    }
}