Create a checkout

POST
/checkouts

Returns a hosted checkout_url to send the buyer to. Inventory is held only until expires_at.

For a reserved-seating event, pass section_id (from GET /events/{id}/sections); omitting it is a 400 rather than a general-admission fallback. The seats the buyer was given come back in assigned_seats.

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
event_id*string
Formatuuid
quantity*integer
Range1 <= value
customer*
success_url*string

Where the buyer lands after paying.

Formaturi
cancel_url?string
Formaturi
tier_id?string

Defaults to the event's first sellable tier.

Formatuuid
section_id?string

Required for reserved-seating events. Seats are assigned best-available within it.

Formatuuid

Response Body

Checkout created.

application/json
  1. response
data?
Example Request
curl -X POST 'https://hanghut.com/api/v1/checkouts' \  -H 'Content-Type: application/json' \  -d '{  "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",  "quantity": 1,  "customer": {    "email": "user@example.com",    "name": "string"  },  "success_url": "http://example.com"}'
Example Response
{  "data": {    "checkout_id": "a0db819d-3316-4040-b9b7-2c905552650c",    "checkout_url": "http://example.com",    "expires_at": "2019-08-24T14:15:22Z",    "assigned_seats": [      {        "section": "string",        "row": "string",        "seat": "string",        "label": "string"      }    ]  }}