Autional Autional
API Reference GitHub autional.com →

POST /billing/subscribe

Create a subscription for the current tenant, binding a plan (free/basic/pro/enterprise/platform) and billing cycle (monthly/yearly). Supports setting auto-renewal and trial days.

Billing Service `bearerAuth` application/json

Request Body

Schema: dto.SubscribeRequestDTO

FieldTypeRequiredExampleConstraintsDescription
billing_cycle string Yes monthly
plan string Yes pro
auto_renew boolean No True
trial_days integer No 14

Responses

StatusDescriptionSchema
201Subscription created successfullydto.SubscriptionDetailResponse
400Invalid request parametersobject
401Unauthorizedobject
409Tenant already has an active subscriptionobject
500Internal server errorobject

Referenced Schemas

dto.SubscriptionDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.SubscriptionResponse No
message string No
timestamp string No

dto.SubscriptionResponse

FieldTypeRequiredExampleConstraintsDescription
admin_user_id string No usr_abc123
amount number No 499
auto_renew boolean No True
billing_cycle string No monthly
cancel_at_period_end boolean No False
currency string No CNY
current_period_end string No 2026-02-01T00:00:00Z
current_period_start string No 2026-01-01T00:00:00Z
grace_period_days integer No 7
plan_id string No pro
status string No active
tenant_id string No tnt_xyz789
trial_end_date string No 2026-01-15T00:00:00Z