Create subscription
POST
/billing/v1/subscriptionCreate a subscription for the authenticated organization
Authorization
Bearer Authorization<token>
In: header
Request Body
requiredapplication/json{
"$ref": "#/components/schemas/internal_billing.createSubscriptionBody",
"$ref-value": {
"properties": {
"billing_address": {
"$ref": "#/components/schemas/internal_billing.billingAddressBody",
"$ref-value": {
"properties": {
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"email": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"state": {
"type": "string"
}
},
"type": "object"
}
},
"payment_method_id": {
"type": "string"
},
"stripe_price_id": {
"type": "string"
}
},
"type": "object"
}
}Response Body
200application/json
OK
type: unknown
{
"$ref": "#/components/schemas/billingv1.CreateSubscriptionResponse",
"$ref-value": {
"properties": {
"cancel_at_period_end": {
"type": "boolean"
},
"current_period_end": {
"type": "string"
},
"id": {
"type": "string"
},
"org_id": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"status": {
"type": "string"
},
"stripe_customer_id": {
"type": "string"
},
"stripe_subscription_id": {
"type": "string"
}
},
"type": "object"
}
}curl -X POST "https://api.rixl.com/billing/v1/subscription" \
-H "Content-Type: application/json" \
-d '{}'OK
application/json
{
"$ref": "#/components/schemas/billingv1.CreateSubscriptionResponse",
"$ref-value": {
"properties": {
"cancel_at_period_end": {
"type": "boolean"
},
"current_period_end": {
"type": "string"
},
"id": {
"type": "string"
},
"org_id": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"status": {
"type": "string"
},
"stripe_customer_id": {
"type": "string"
},
"stripe_subscription_id": {
"type": "string"
}
},
"type": "object"
}
}