POST /v1/subscriptions/upgrade
Upgrade subscription
Upgrades user's subscription to a higher plan. Initiates payment process with İyzico.
Request
POST /v1/subscriptions/upgrade
Parameters
[]
Response
{
"200": {
"description": "Subscription upgrade initiated successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"subscription": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"package_id": {
"type": "string"
},
"billing_cycle": {
"type": "string"
},
"status": {
"type": "string"
},
"current_period_start": {
"type": "string"
},
"current_period_end": {
"type": "string"
}
},
"required": [
"id",
"package_id",
"billing_cycle",
"status",
"current_period_start",
"current_period_end"
]
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"amount_cents": {
"type": "number"
},
"currency": {
"type": "string"
},
"status": {
"type": "string"
},
"payment_url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"amount_cents",
"currency",
"status",
"payment_url"
]
}
},
"required": [
"subscription",
"payment"
]
}
},
"required": [
"success",
"data"
]
}
}
}
},
"400": {
"description": "Invalid package or downgrade not allowed"
}
}
View in Interactive API Reference