biterp

Create subscription plan

POST
/subscription-plans
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.biterp.ai/subscription-plans" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "billing_interval": "day",    "amount": "99.900000"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
  "reference_code": "string",
  "name": "string",
  "description": "string",
  "billing_interval": "day",
  "billing_interval_count": 0,
  "amount": "string",
  "currency": "string",
  "trial_period_days": 0,
  "is_blocked": true,
  "metadata": {},
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "deleted_at": "2019-08-24T14:15:22Z"
}
{
  "status_code": 422,
  "message": "Could not resolve provided geography fields",
  "error": "Unprocessable Entity",
  "details": {
    "fields": {
      "country_code": [
        "Could not resolve country from '1112' (tried ISO2, ISO3, numeric code and names)"
      ],
      "city": [
        "Could not resolve city from 'CidadeQueNaoExiste' in country 'BR'"
      ]
    }
  }
}
{
  "status_code": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}
{
  "status_code": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}
{
  "status_code": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}
{
  "status_code": 422,
  "message": "Could not resolve provided geography fields",
  "error": "Unprocessable Entity",
  "details": {
    "fields": {
      "country_code": [
        "Could not resolve country from '1112' (tried ISO2, ISO3, numeric code and names)"
      ],
      "city": [
        "Could not resolve city from 'CidadeQueNaoExiste' in country 'BR'"
      ]
    }
  }
}
{
  "status_code": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}