Skip to main content

billing.createSubscription

post/v1/billing/subscription

billing.createSubscription

Request

Body

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "plan": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "interval": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "monthly",
              "yearly"
            ]
          }
        },
        "required": [
          "plan",
          "payment_method"
        ],
        "title": "SubscriptionRequest"
      }
    }
  }
}

Responses

200No description
Schema Structure
{
"type": "object"
}
403Authorization error
Schema Structure
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Error overview."
}
},
"required": [
"message"
]
}
422Validation error
Schema Structure
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Errors overview."
},
"errors": {
"type": "object",
"description": "A detailed description of each field that failed validation.",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"required": [
"message",
"errors"
]
}