---
title: "Purchase a service"
method: POST
path: "/api/premium/subscription/{subscriptionSlug}"
tags: ["Premium"]
---

# Purchase a service

`POST /api/premium/subscription/{subscriptionSlug}`

## Request

- Base URL: `https://sky.coflnet.com` (the document declares no server; this is the origin it was published from)
- URL: `https://sky.coflnet.com/api/premium/subscription/{subscriptionSlug}`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `GoogleToken`

## Path parameters

- `subscriptionSlug` string, required

## Query parameters

- `creatorCode` string
- `discountcode` string
- `assignSlots` boolean
- `provider` string
- `country` string

## Request body

- SubscriptionDeclarationArgs: The user's early performance declaration for a subscription checkout. Same fields as the declaration of Coflnet.Sky.Api.Models.PurchaseArgs; the legal texts are filled in by the server.
  - `immediatePerformanceRequested` boolean, nullable: Whether the user expressly requested early performance for this order.
  - `withdrawalConsequenceAcknowledged` boolean, nullable: Whether the user acknowledged the consequence of complete performance.
  - `declarationVersion` string, nullable: Hash-verified declaration version shown to the user.
  - `legalLocale` string, nullable: Locale in which the declaration was shown.
  - `declarationRequestId` string, nullable: Idempotency identifier (a GUID) for this declaration and order.

## Response `200`

OK

- TopUpIdResponse
  - `id` string, nullable
  - `dirctLink` string, nullable
  - `directLink` string, nullable
  - `trialDays` integer, nullable

## Other responses

- `401`: Unauthorized
- `403`: Forbidden

## Changes

- **2026-11-21** `e51c5614068b`: 3 info
  - added the optional property `trialDays` to the response with the `200` status (media type: text/plain)
  - added the optional property `trialDays` to the response with the `200` status (media type: application/json)
  - added the optional property `trialDays` to the response with the `200` status (media type: text/json)
- **2026-11-17** `6d0f7da6fff7`: 3 info
  - added the new optional `query` request parameter `country`
  - added the new optional `query` request parameter `provider`
  - added optional request body
- **2026-10-12** `dc2f7ffe2903`: 1 info
  - added the new optional `query` request parameter `assignSlots`
- **2026-08-04** `41f7cdd4406b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/coflnet/apis/skyapi/changes/api/premium/subscription/:subscriptionSlug/post.md)

---

[API](https://skmtc.dev/coflnet/apis/skyapi.md) - [All operations](https://skmtc.dev/coflnet/apis/skyapi/llms.txt) - [OpenAPI document](https://skmtc.dev/coflnet/apis/skyapi/revisions/c787372dc7a2?raw)
