---
title: "Create a subscription and get the gateway checkout payload"
method: POST
path: "/v1/subscriptions"
---

# Create a subscription and get the gateway checkout payload

`POST /v1/subscriptions`

## Request

- Base URL: `https://api.hify.club`
- URL: `https://api.hify.club/v1/subscriptions`
- Auth: API key in header `X-User-Token`

## Request body

- object
  - `subscription` object
    - `plan_price_id` integer, required

## Response `201`

Subscription created; open gateway checkout with `checkout`

- object
  - `subscription` Subscription, nullable
    - `id` integer
    - `status` 'created' | 'authenticated' | 'active' | 'past_due' | 'halted' | 'cancelled' | 'completed'
    - `pg` string
    - `current_period_start` string, date-time, nullable
    - `current_period_end` string, date-time, nullable
    - `cancel_at_period_end` boolean
    - `payment_method_summary` object
  - `checkout` object: Opaque payload for the mobile payment SDK

## Other responses

- `404`: Plan price not found
- `409`: User already has a live subscription

---

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