API ReferenceapicommercePOST /v1/subscriptions/{id}/pause

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

Service: commerce · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Responses

200 Subscription paused

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "customer_id": {
      "type": "string"
    },
    "product_id": {
      "type": "string"
    },
    "bc_subscription_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string"
    },
    "interval_type": {
      "type": "string"
    },
    "next_billing_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancel_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "paused_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "resumed_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "skipped_until": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "customer_id",
    "product_id",
    "bc_subscription_id",
    "status",
    "interval_type",
    "next_billing_at",
    "cancelled_at",
    "cancel_reason",
    "paused_at",
    "resumed_at",
    "skipped_until",
    "created_at",
    "updated_at"
  ]
}

404 Subscription not found

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

409 Already paused

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

412 Subscription not active

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

Example

curl -X POST https://commerce.platform.loop.health/v1/subscriptions/{id}/pause \
  -H "Authorization: Bearer $ACCESS_TOKEN"