API ReferenceapipaymentsPOST /v1/admin/subscriptions/{id}/pause

POST /v1/admin/subscriptions/\{id\}/pause

Service: payments · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Request body

{
  "type": "object",
  "properties": {
    "duration_months": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3
    },
    "reason": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "duration_months",
    "reason"
  ]
}

Responses

200 Subscription paused

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "customer_id": {
      "type": "string"
    },
    "stripe_subscription_id": {
      "type": "string"
    },
    "plan_id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "current_period_end": {
      "type": "string"
    },
    "cancel_at_period_end": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "customer_id",
    "stripe_subscription_id",
    "plan_id",
    "status",
    "current_period_end"
  ]
}

404 Subscription not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

412 Subscription cannot be paused in its current state

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://payments.platform.loop.health/v1/admin/subscriptions/{id}/pause \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'