---
search:
  tags:
    - Subscriptions
    - POST
seo:
  description: >-
    Attaches recurring-payment terms to a product (and optionally a specific
    variant). Reference for the POST /subscription_fees endpoint in the Bolder
    API v2.
sidebar:
  label: Create a subscription fee
  badge: POST
title: Create a subscription fee
type: openapi-operation
---
Attaches recurring-payment terms to a product (and optionally a specific variant).

`POST /subscription_fees`

**Request body** (`application/json`, required)

- `product_id` (integer, required)
- `variant_id` (integer)
- `payment_interval` (string, required)
- `renewal_fee` (integer) — In cents
- `setup_fee` (integer) — In cents
- `number_of_payments` (integer)
- `payment_day` (integer)
- `by_percentage` (boolean)
- `allow_non_recurring_payment` (boolean)
- `min_days_for_cancellation` (integer)
- `allow_changing_day` (boolean)
- `extend_on_reenable` (boolean)
- `on_first_renewal` (string)

Request body example:

```json
{
  "product_id": 101,
  "payment_interval": "1_month",
  "renewal_fee": 2999
}
```

**Responses**

- `201` — Subscription fee created
- `422` — Validation error

Response example, 201:

```json
{
  "_links": {
    "property1": {
      "href": "string",
      "templated": true,
      "method": "get",
      "title": "string",
      "type": "string"
    },
    "property2": {
      "href": "string",
      "templated": true,
      "method": "get",
      "title": "string",
      "type": "string"
    }
  },
  "id": 0,
  "seller_id": 0,
  "product_id": 0,
  "variant_id": 0,
  "payment_interval": "1_week",
  "renewal_fee": 0,
  "renewal_fee_price": 0,
  "setup_fee": 0,
  "number_of_payments": 0,
  "payment_day": 0,
  "by_percentage": true,
  "allow_non_recurring_payment": true,
  "min_days_for_cancellation": 0,
  "allow_changing_day": true,
  "extend_on_reenable": true,
  "on_first_renewal": "string",
  "created_on": "2019-08-24T14:15:22Z",
  "updated_on": "2019-08-24T14:15:22Z"
}
```
