---
search:
  tags:
    - Subscriptions
    - PUT
seo:
  description: >-
    Only the fields listed below are writable. Reference for the PUT
    /subscription_purchases/{id} endpoint in the Bolder API v2.
sidebar:
  label: Update a subscription purchase
  badge: PUT
title: Update a subscription purchase
type: openapi-operation
---
Only the fields listed below are writable.

`PUT /subscription_purchases/{id}`

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

- `state` (string)
- `next_payment_on` (string<date>)
- `total_renewal_fee` (integer)
- `remaining_payments` (integer)
- `subscription_fee_id` (integer)
- `cancel_at` (string<date>)
- `payments_to_skip` (integer)
- `paused_by` (string)
- `last_pause_at` (string<date-time>)
- `renewal_discount` (number)
- `discount_num_charges` (integer)
- `end_date` (string<date>)

Request body example:

```json
{
  "state": "paused",
  "paused_by": "admin"
}
```

**Responses**

- `200` — Subscription purchase updated
- `422` — Validation error (e.g. invalid \`state\`, or no updatable fields provided)

Response example, 200:

```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,
  "shop_id": 0,
  "contact_id": 0,
  "original_order_id": 0,
  "product_id": 0,
  "product_name": "string",
  "state": "string",
  "currency_code": "string",
  "total_renewal_fee": 0,
  "payment_interval": "string",
  "total_payments": 0,
  "remaining_payments": 0,
  "failed_attempts": 0,
  "last_payment_on": "2019-08-24",
  "next_payment_on": "2019-08-24",
  "start_date": "2019-08-24",
  "end_date": "2019-08-24",
  "cancel_at": "2019-08-24",
  "subscription_fee_id": 0,
  "renewal_discount": 0,
  "discount_num_charges": 0,
  "payments_to_skip": 0,
  "paused_by": "string",
  "paid_setup_fee": true,
  "units": 0,
  "created_on": "2019-08-24T14:15:22Z",
  "updated_on": "2019-08-24T14:15:22Z"
}
```
