Skip to main content
POST
/
subscribe
Subscribe
curl --request POST \
  --url https://xquik.com/api/v1/subscribe \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "tier": "<string>"
}
'
Free — does not consume credits
Returns a Stripe checkout URL for new subscribers or a billing portal URL for existing subscribers.
curl -X POST https://xquik.com/api/v1/subscribe \
  -H "x-api-key: xq_YOUR_KEY_HERE" | jq

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard.

Body

tier
string
Subscription tier to pre-select. One of: starter, pro, business. If omitted, the user chooses on the checkout page.

Response

url
string
Stripe checkout URL (new subscribers) or billing portal URL (existing subscribers). Redirect the user to this URL.
message
string
Human-readable message describing the action taken.
status
string
One of: already_subscribed, checkout_created, payment_issue.
{
  "url": "https://checkout.stripe.com/c/pay/cs_live_...",
  "message": "Complete checkout at the URL below to start your subscription.",
  "status": "checkout_created"
}
Related: Get Account to check current subscription status and usage.