curl --request POST \
--url https://api.streamskill.pro/v1/purchases/{orderId}/prolong \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"hours": 24
}'{
"status": "ok"
}{
"error_code": "unauthorized",
"name": "Your request was made with invalid credentials.",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401,
"type": "unauthorized_http_exception"
}{
"error_code": "insufficient_funds",
"name": "Insufficient funds",
"message": "Insufficient funds",
"code": 0,
"status": 402,
"type": "insufficient_funds_exception",
"required_balance": 100,
"current_balance": 50
}{
"error_code": "not_found",
"name": "Record not found.",
"message": "Record not found.",
"code": 0,
"status": 404,
"type": "record_not_found_exception"
}{
"error_code": "not_supported",
"name": "Action is not available for this order",
"message": "Action is not available for this order",
"code": 0,
"status": 405,
"type": "action_unavailable"
}{
"error_code": "already_done",
"name": "Order already completed",
"message": "Order already completed",
"code": 0,
"status": 409,
"type": "purchase_done"
}{
"error_code": "validation_error",
"name": "The Channel field is required.",
"message": "The Channel field is required.",
"code": 0,
"status": 422,
"type": "validate_exception",
"errors": {
"channel": [
"The Channel field is required."
]
}
}{
"error_code": "server_error",
"name": "An unexpected error occurred.",
"message": "An unexpected error occurred.",
"code": 0,
"status": 500,
"type": "action_failed"
}Actions
Prolong purchase
POST
/
purchases
/
{orderId}
/
prolong
curl --request POST \
--url https://api.streamskill.pro/v1/purchases/{orderId}/prolong \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"hours": 24
}'{
"status": "ok"
}{
"error_code": "unauthorized",
"name": "Your request was made with invalid credentials.",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401,
"type": "unauthorized_http_exception"
}{
"error_code": "insufficient_funds",
"name": "Insufficient funds",
"message": "Insufficient funds",
"code": 0,
"status": 402,
"type": "insufficient_funds_exception",
"required_balance": 100,
"current_balance": 50
}{
"error_code": "not_found",
"name": "Record not found.",
"message": "Record not found.",
"code": 0,
"status": 404,
"type": "record_not_found_exception"
}{
"error_code": "not_supported",
"name": "Action is not available for this order",
"message": "Action is not available for this order",
"code": 0,
"status": 405,
"type": "action_unavailable"
}{
"error_code": "already_done",
"name": "Order already completed",
"message": "Order already completed",
"code": 0,
"status": 409,
"type": "purchase_done"
}{
"error_code": "validation_error",
"name": "The Channel field is required.",
"message": "The Channel field is required.",
"code": 0,
"status": 422,
"type": "validate_exception",
"errors": {
"channel": [
"The Channel field is required."
]
}
}{
"error_code": "server_error",
"name": "An unexpected error occurred.",
"message": "An unexpected error occurred.",
"code": 0,
"status": 500,
"type": "action_failed"
}Authorizations
Body
application/json
- Option 1
- Option 2
Provide hours (preferred) or the deprecated count. Limits depend on the original tariff: hourly — 24 hours (1 day), daily — 168 hours (7 days), weekly — 672 hours (4 weeks), monthly — 1440 hours (30 days).
Deprecated compatibility field. Number of original tariff units: hours for an hourly tariff, days for a daily tariff, weeks for a weekly tariff, and 30-day months for a monthly tariff. Maximum count: hourly — 24, daily — 7, weekly — 4, monthly — 2. Use hours for new integrations.
Required range:
1 <= x <= 24Example:
1