# Unpause a subscription

> Unpauses a previously paused subscription by its ID. This computes the next billing date from the plan's frequency and reschedules the subscription's order. Returns an error if the subscription is not currently paused.

Source: https://help.boltapp.com/api-reference/subscriptions/subscriptions-v1/unpausesubscription

`POST /v1/subscriptions/{subscriptionId}/unpause`

## OpenAPI definition

This endpoint as it appears in the OpenAPI document, with every schema it references included.

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "Subscriptions API",
    "version": "v1",
    "description": "API for managing subscriptions and products."
  },
  "servers": [
    {
      "url": "https://api.boltapp.com",
      "description": "The Production URL (Live Data)."
    },
    {
      "url": "https://api-sandbox.boltapp.com",
      "description": "The Sandbox URL (Test Data)."
    },
    {
      "url": "https://api-staging.boltapp.com",
      "description": "The Staging URL (Staged Data)."
    }
  ],
  "security": [
    {
      "X-API-Key": []
    },
    {
      "X-Publishable-Key": []
    }
  ],
  "paths": {
    "/v1/subscriptions/{subscriptionId}/unpause": {
      "post": {
        "operationId": "unpauseSubscription",
        "summary": "Unpause a subscription",
        "description": "Unpauses a previously paused subscription by its ID. This computes the next billing date from the plan's frequency and reschedules the subscription's order. Returns an error if the subscription is not currently paused.",
        "tags": [
          "Subscriptions v1"
        ],
        "security": [
          {
            "X-API-Key": []
          },
          {
            "X-Publishable-Key": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the subscription to unpause.",
            "examples": {
              "default": {
                "value": "s_1234567890"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscription unpaused successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - request is malformed, or the subscription is not currently paused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing X-API-Key or X-Publishable-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found. No subscription with this ID exists for this merchant division.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Subscription": {
        "type": "object",
        "description": "A Bolt subscription.",
        "required": [
          "id",
          "created_at",
          "updated_at",
          "merchant_name",
          "email",
          "status_details",
          "plan",
          "product_names",
          "total_amount",
          "metadata"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID for a Bolt subscription.",
            "examples": [
              "s_1234567890"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "consumer_id": {
            "type": "integer",
            "format": "int64"
          },
          "subscription_plan_id": {
            "type": "string",
            "description": "ID of the subscription plan.",
            "examples": [
              "spl_ba_PpkW16oIW"
            ]
          },
          "merchant_name": {
            "type": "string",
            "description": "The name of the merchant this subscription belongs to.",
            "examples": [
              "Bolt Swag Store"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "The email address of the shopper who owns this subscription. Nullable.",
            "examples": [
              "shopper@example.com"
            ]
          },
          "price": {
            "type": "integer",
            "format": "int64",
            "description": "Deprecated. Use `total_amount` instead. Represents the price of the subscription in cents, e.g. `199` would translate to `$1.99`.",
            "deprecated": true,
            "examples": [
              999
            ]
          },
          "currency": {
            "type": "string",
            "description": "Deprecated. Use `total_amount.currency` instead. ISO4217 compatible currency code.",
            "deprecated": true,
            "examples": [
              "USD"
            ]
          },
          "quantity": {
            "type": "integer",
            "format": "int64",
            "description": "How many units the subscription signed up for. Absent when the signup carried no quantity."
          },
          "product_names": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Product name"
            }
          },
          "next_renewal_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The date of the next scheduled renewal, if any."
          },
          "next_payment_retry_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The date of the next scheduled payment retry, if the subscription currently has a failed payment."
          },
          "trial_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Length of the subscription's free trial. Absent when it has none."
          },
          "trial_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the free trial ends. Absent when the subscription has none."
          },
          "scheduled_change": {
            "description": "A plan change or cancel waiting for the end of the current billing period, or `null` when nothing is scheduled.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScheduledChange"
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_address": {
            "description": "Only returned by `getSubscription` (the single-subscription read).",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "shipping_address": {
            "description": "Only returned by `getSubscription`; absent for digital goods.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              null
            ]
          },
          "paused_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              null
            ]
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus",
            "deprecated": true
          },
          "status_details": {
            "$ref": "#/components/schemas/StatusDetails"
          },
          "total_amount": {
            "$ref": "#/components/schemas/AmountView"
          },
          "plan": {
            "description": "The billing plan the subscription is enrolled in.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Plan"
              }
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "ScheduledChange": {
        "type": "object",
        "description": "A change waiting for the end of the current billing period.",
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "plan_change",
              "cancel"
            ],
            "description": "What applies at the period boundary."
          },
          "effective_from": {
            "type": "string",
            "format": "date-time",
            "description": "When the change applies."
          },
          "to_plan": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the plan the subscription moves to. `null` for a scheduled cancel."
          },
          "to_plan_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "to_product": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the product the target plan belongs to. `null` for a scheduled cancel."
          },
          "to_product_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Address": {
        "type": "object",
        "properties": {
          "street_address1": {
            "type": "string"
          },
          "street_address2": {
            "type": "string"
          },
          "locality": {
            "type": "string",
            "description": "City."
          },
          "region": {
            "type": "string"
          },
          "region_code": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "phone_number": {
            "type": "string"
          },
          "email_address": {
            "type": "string"
          }
        }
      },
      "PaymentMethod": {
        "type": "object",
        "properties": {
          "card_last_4": {
            "type": "string",
            "examples": [
              "4123"
            ]
          },
          "card_network": {
            "type": "string",
            "examples": [
              "Visa"
            ]
          }
        },
        "required": [
          "card_last_4",
          "card_network"
        ]
      },
      "SubscriptionStatus": {
        "type": "string",
        "description": "The current status of the subscription.",
        "enum": [
          "active",
          "trialing",
          "paused",
          "canceled",
          "payment_failed"
        ],
        "examples": [
          "active"
        ]
      },
      "StatusDetails": {
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason for the current status. Known values: `payment_failed`, `cancelled_manually`, `shopper_canceled`, `merchant_canceled`, `shopper_paused`, `merchant_paused`, `unpaid_invoice`, `renewal_failed`, `signup_voided`. `null` when the status carries no reason.\n",
            "examples": [
              "payment_failed"
            ]
          },
          "type": {
            "type": "string",
            "description": "Type of status detail",
            "enum": [
              "active",
              "trialing",
              "paused",
              "canceled",
              "payment_failed"
            ],
            "examples": [
              "canceled"
            ]
          }
        }
      },
      "AmountView": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "description": "Amount in cents"
          },
          "currency": {
            "type": "string",
            "description": "ISO4217 compatible currency code"
          },
          "currency_symbol": {
            "type": "string",
            "description": "Currency symbol"
          }
        }
      },
      "Plan": {
        "type": "object",
        "required": [
          "id",
          "name",
          "sku",
          "created_at",
          "updated_at",
          "frequency",
          "frequency_unit",
          "product_id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "unique identifier for the plan.",
            "examples": [
              "spl_ba_PpkW16oIW"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the plan.",
            "examples": [
              "Monthly Subscription"
            ]
          },
          "sku": {
            "type": "string",
            "description": "SKU of the product.",
            "examples": [
              "BOLT-12345"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "frequency": {
            "type": "integer",
            "format": "int64",
            "description": "The number of `frequency_unit`s between each billing cycle.",
            "examples": [
              1
            ]
          },
          "product_id": {
            "type": "string",
            "description": "ID of the product associated with the plan.",
            "examples": [
              "sp_Tlj0Osm0N76T"
            ]
          },
          "frequency_unit": {
            "type": "string",
            "description": "Unit of frequency (e.g., week, month).",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ],
            "examples": [
              "month"
            ]
          },
          "initial_period": {
            "type": [
              "object",
              "null"
            ],
            "description": "How long the initial period lasts before we move over to the regular plan.",
            "required": [
              "frequency",
              "frequency_unit"
            ],
            "properties": {
              "frequency": {
                "type": "integer",
                "format": "int64",
                "description": "Number of units the initial period lasts.",
                "examples": [
                  2
                ]
              },
              "frequency_unit": {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year"
                ],
                "description": "Unit of the initial period (e.g. week, month).",
                "examples": [
                  "week"
                ]
              }
            }
          },
          "checkout_link": {
            "type": "string",
            "description": "Checkout link for the plan, when available.",
            "examples": [
              "https://your_site.c.boltapp.com/g?merchant_product_id=37&merchant_variant_id=67&publishable_key=BQ9PKQksUGtj.Q9LwVLfV3WF4.32122926f7b9651a416a5099dc92dc2b4c87c8b922c114229f83b345d65f1195"
            ]
          },
          "base_price": {
            "type": "integer",
            "format": "int64",
            "description": "The plan's recurring charge in cents. `0` for a plan billed purely on usage.",
            "examples": [
              3000
            ]
          },
          "ubb": {
            "type": "boolean",
            "description": "Whether the plan is usage-billed."
          },
          "usage_pricing": {
            "type": "array",
            "description": "One entry per meter a usage-billed plan charges on top of `base_price`. Absent for a flat plan.",
            "items": {
              "$ref": "#/components/schemas/PlanUsagePricing"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ],
            "description": "The plan's lifecycle status. Catalog divisions only."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO4217 currency code for `base_price`. Catalog divisions only.",
            "examples": [
              "USD"
            ]
          },
          "trial": {
            "type": [
              "object",
              "null"
            ],
            "description": "The plan's free-trial terms, or `null` when it has none. Catalog divisions only.",
            "properties": {
              "trial_days": {
                "type": "integer",
                "format": "int64",
                "examples": [
                  14
                ]
              }
            }
          },
          "usage": {
            "type": [
              "object",
              "null"
            ],
            "description": "The usage block the plan was written with. Catalog divisions only; absent for a flat plan.",
            "properties": {
              "meter_id": {
                "type": "integer",
                "format": "int64"
              },
              "charge_model": {
                "type": "string"
              },
              "charge_config": {
                "type": "object"
              },
              "sessions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "duration": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int64"
                    },
                    "duration_unit": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "alert_threshold": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "PlanUsagePricing": {
        "type": "object",
        "description": "How one meter prices a usage-billed plan's consumption. Amounts inside `charge_config` are decimal strings in the plan currency's major units.",
        "properties": {
          "meter_name": {
            "type": "string",
            "examples": [
              "API Calls"
            ]
          },
          "event_type": {
            "type": "string",
            "examples": [
              "api_call"
            ]
          },
          "aggregation_type": {
            "type": "string",
            "enum": [
              "sum",
              "count"
            ]
          },
          "charge_model": {
            "type": "string",
            "description": "The pricing shape (e.g. `per_unit`, `graduated`, `capped`).",
            "examples": [
              "per_unit"
            ]
          },
          "charge_config": {
            "type": "object",
            "description": "The shape's configuration. Amounts are decimal strings in major units."
          },
          "currency": {
            "type": "string",
            "examples": [
              "USD"
            ]
          }
        }
      },
      "Metadata": {
        "type": "object",
        "description": "Merchant-defined custom metadata.",
        "additionalProperties": {
          "type": "string"
        }
      },
      "ApiErrorResponse": {
        "type": "object",
        "description": "Standard error envelope returned by every non-2xx response.",
        "required": [
          "result",
          "errors"
        ],
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Always `false` on an error.",
                "examples": [
                  false
                ]
              }
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        },
        "examples": [
          {
            "result": {
              "success": false
            },
            "errors": [
              {
                "code": 15,
                "message": "A valid value must be provided.",
                "field": "frequency"
              }
            ]
          }
        ]
      },
      "ApiError": {
        "type": "object",
        "description": "One error of a failed request.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "Bolt error code.",
            "examples": [
              15
            ]
          },
          "message": {
            "type": "string",
            "description": "What went wrong.",
            "examples": [
              "A valid value must be provided."
            ]
          },
          "field": {
            "type": "string",
            "description": "Path of the request field the error is about, such as `product.taxable` or `plans[1].sku`. Absent when the error is not about one field.",
            "examples": [
              "frequency"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "X-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard. Send it together with `X-Publishable-Key`."
      },
      "X-Publishable-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Publishable-Key",
        "description": "The publicly viewable identifier used to identify a merchant division. This key is found in the Developer > API section of the Bolt Merchant Dashboard. Required. Send it together with `X-API-Key`."
      }
    }
  }
}
```
