v41

latestOpenAPI 3.1.0raw.githubusercontent.com2025-08-053715199.1 KB
Subscription

Update subscription

Update card, address, or interval for an existing subscription.

put/subscription/{id}

Path parameters

idstring required

ID of the subscription to update.

Example:sub_XXXXXXXXXXXXXXXXXXXXXXXXX

Request body

cardIDstring

New payment method ID for the subscription.

addressIDstring

New shipping address ID for the subscription.

Example request

{
  "cardID": "crd_XXXXXXXXXXXXXXXXXXXXXXXXX",
  "addressID": "shp_XXXXXXXXXXXXXXXXXXXXXXXXX"
}

Response

Updated subscription information.

Example response

{
  "data": {
    "id": "sub_XXXXXXXXXXXXXXXXXXXXXXXXX",
    "productVariantID": "var_XXXXXXXXXXXXXXXXXXXXXXXXX",
    "price": 2200,
    "quantity": 1,
    "addressID": "shp_XXXXXXXXXXXXXXXXXXXXXXXXX",
    "cardID": "crd_XXXXXXXXXXXXXXXXXXXXXXXXX",
    "schedule": {
      "type": "weekly",
      "interval": 3
    },
    "next": "2025-02-01T19:36:19.000Z",
    "created": "2024-06-29T19:36:19.000Z"
  }
}