Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
billing
/
subscriptions
Create subscription
curl --request POST \
  --url https://api.halth.com/v1/businesses/{businessId}/billing/subscriptions \
  --header 'Content-Type: application/json' \
  --data '
{
  "confirmationTokenId": "ctoken_1Sq0GFCWwNwrbV0x5GJvufPv"
}
'
{
  "id": "<string>",
  "type": "usage_based",
  "createdAt": "2023-11-07T05:31:56Z",
  "defaultPaymentMethod": {
    "id": "<string>",
    "brand": "<string>",
    "last4": "<string>",
    "customerId": "<string>"
  }
}

Path Parameters

businessId
string
required

Body

application/json
confirmationTokenId
string
required

The tokenised payment method details used to start the subscription

Example:

"ctoken_1Sq0GFCWwNwrbV0x5GJvufPv"

Response

201 - application/json
id
string
required
type
enum<string>
required
Available options:
usage_based
createdAt
string<date-time>
required
defaultPaymentMethod
object