Subscriptions

Update subscription

Update subscription settings like payment configuration, billing options, etc.

patch/api/v1/subscriptions/{subscription_id}

Path parameters

subscription_idstring MeteroidId required
Example:sub_7n42DGM5Tflk9n8mt7Fhc7

Subscription ID

Request body

auto_advance_invoicesboolean nullable

If false, invoices will stay in Draft until manually reviewed and finalized.

charge_automaticallyboolean nullable

Automatically try to charge the customer's configured payment method on finalize.

invoice_memostring nullable

Default memo for invoices

net_termsinteger nullable

Payment terms in days (0 = due on issue)

purchase_orderstring nullable

Purchase order number

Example request

{
  "payment_methods_config": {
    "account_id": "ba_7n42DGM5Tflk9n8mt7Fhc7"
  }
}

Response

Subscription updated

Example response

{
  "subscription": {
    "add_ons": [
      {
        "add_on_id": "add_7n42DGM5Tflk9n8mt7Fhc7",
        "fee": {
          "metric_id": "bm_7n42DGM5Tflk9n8mt7Fhc7"
        },
        "id": "sub_add_7n42DGM5Tflk9n8mt7Fhc7"
      }
    ],
    "applied_coupons": [
      {
        "applied_coupon": {
          "coupon_id": "cou_7n42DGM5Tflk9n8mt7Fhc7",
          "id": "sub_cou_7n42DGM5Tflk9n8mt7Fhc7"
        },
        "coupon": {
          "id": "cou_7n42DGM5Tflk9n8mt7Fhc7"
        }
      }
    ],
    "components": [
      {
        "fee": {
          "metric_id": "bm_7n42DGM5Tflk9n8mt7Fhc7"
        },
        "price_component_id": "price_7n42DGM5Tflk9n8mt7Fhc7",
        "product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
      }
    ],
    "currency": "EUR",
    "customer_id": "cus_7n42DGM5Tflk9n8mt7Fhc7",
    "id": "sub_7n42DGM5Tflk9n8mt7Fhc7",
    "payment_methods_config": {
      "account_id": "ba_7n42DGM5Tflk9n8mt7Fhc7"
    },
    "plan_id": "plan_7n42DGM5Tflk9n8mt7Fhc7",
    "plan_version_id": "plv_7n42DGM5Tflk9n8mt7Fhc7"
  }
}

Changes