# Create a Subscription Use this endpoint to create or update a Subscription for a given user. If a Subscription Option is provided, a payment will be prepared and a checkout URL returned. The customer will be notified before the subscription expires, so they can manually renew it. **Notes:** * Requires a configured Subscription Service. * At least one cryptocurrency must be enabled in the service options to generate a payment link. **Method:** `GET` **Path:** ``` https://api.blockbee.io/subscription/create/ ``` --- ## Parameters ### Query Parameters - **`apikey`** (`string`) (required): API Key provided by BlockBee's [Dashboard](https://dash.blockbee.io/). Unsure how to get yours? [Check this tutorial](/kb/tutorials/dashboard/how-to-generate-a-new-api-key). **Note:** The API key can also be sent as a header named `apikey`. - **`user_id`** (`string`) (required) - Example: `user_1234`: User identifier in your system. - **`user_email`** (`string`) (required) - Example: `example@mail.com`: Customer e-mail to notify before subscription expiration. - **`option`** (`string`) - Example: `pro`: Unique identifier for the subscription plan that the user will be charged for. This is useful when displaying subscription options on your own website or application. **Notes:** - When a subscription plan slug is provided, the `subscription_url` will be converted to a direct payment link for that specific plan. - **`post`** (`number`) - Example: `1`: Set this to `1` if you wish to receive the IPN as a `POST` request. If set to `0`, API will default to `GET`. **Notes**: * `GET` parameters you added to the `notify_url` URL will still be sent as `GET`. --- ## Returns Returns the subscription details, including the subscription URL and a token. - **`status`** (`string`): Status of the request. - **`token`** (`string`): Token associated with the created subscription. - **`subscription_url`** (`string`): Subscription or payment link for the customer. ## Example Response ```json { "status": "success", "token": "I55hhRINHptLJPwsqwYNxJOKBItRiq1o", "subscription_url": "https://pay.blockbee.io/subscription/I55hhRINHptLJPwsqwYNxJOKBItRiq1o" } ```