Create a subscription

POST
/subscriptions

Not enabled. Returns 503 until recurring billing is live (SUBSCRIPTIONS_API_WRITE_ENABLED). The handler is written and validates its input, but no caller should depend on it yet. Read endpoints in this tag do work.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Authorization: Bearer hh_live_.... Create and revoke keys in Organizer → Settings → API. A key carries full access to its partner's data, including refunds and promo codes — treat it as a production credential and keep it server-side.

Request Body

application/json
  1. body

Needs customer.email or customer.fan_id — one of the two.

tier_id*string
Formatuuid
customer?
success_url?string
Formaturi
cancel_url?string
Formaturi

Response Body

The created subscription. Not currently reachable.

application/json
  1. response
data?
Example Request
curl -X POST 'https://hanghut.com/api/v1/subscriptions' \  -H 'Content-Type: application/json' \  -d '{  "tier_id": "b1cd8bf0-c8eb-4fce-9cae-ebe5317fe7f6"}'
Example Response
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "status": "active",    "tier": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "price": 0,      "interval": "string",      "is_active": true,      "perks": [        {}      ]    },    "current_period_end": "2019-08-24T14:15:22Z",    "cancelled_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  }}