Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

Use this file to discover all available pages before exploring further.

Creates a Stripe Checkout session for subscribing to a membership tier. Returns a checkout URL to redirect the user to complete payment.

URL Parameters

id
integer
required
The ID of the membership tier to subscribe to

Request Body

success_url
string
URL to redirect to after successful payment (optional)
cancel_url
string
URL to redirect to if checkout is cancelled (optional)

Returns

Returns a Stripe Checkout URL to complete the subscription.
curl -X POST https://api.onlydrams.app/odis/v1/tiers/1/subscribe \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "success_url": "https://app.onlydrams.com/subscription/success",
       "cancel_url": "https://app.onlydrams.com/subscription/cancelled"
     }'
{
  "checkout_url": "https://checkout.stripe.com/c/pay/cs_test_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0"
}

Error Responses

{
  "message": "This tier has reached its member limit"
}
{
  "message": "You are already a member of this community"
}
{
  "message": "This tier is not currently available"
}

Notes

  • Authorization: Any authenticated user
  • Constraint: User must not already be a member of this community
  • Capacity: Tier must have available spots (if member limit set)
  • Status: Tier must be active
  • Stripe Flow: User completes payment on Stripe Checkout page
  • Free Trial: If enabled, user won’t be charged during trial period
  • Shipping Address: Collected during checkout if required by tier
  • Webhook: Subscription is created via Stripe webhook after successful payment