Subscriptions

Update a subscription

Updates a subscription.

PUT
/biller/subscriptions/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

Subscription payload

plan_id*string

Plan ID associated with the subscription.

collection_method*string

Payment collection method for invoices generated by the subscription.

payment_method_id?string|null

Payment method ID associated with the subscription. Required if collection_method is automatic.

billing_cycle_type?string

Billing cycle type of the subscription.

Value in"anniversary" | "calendar"
trial_period_days?integer|null

Trial period of the subscription in days. Overrides the plan's trial period if set.

items?

Modify fee quantities for the subscription plans and fees.

account_id*string

Billingrails account ID associated with the subscription.

start_at?string

Start date of the subscription.

Formatdate-time
start_billing_at?string

First billing date of the subscription.

Formatdate-time

Response Body

application/json

curl -X PUT "https://api.sandbox.billingrails.com/v1/biller/subscriptions/sub_IhMUl3rrZ3" \  -H "Content-Type: application/json" \  -d '{    "account_id": "acc_IhMUl3rrZ3",    "plan_id": "plan_IhMUl3rrZ3",    "currency": "USD",    "billing_cycle_type": "anniversary",    "collection_method": "automatic",    "payment_method_id": "pme_IhMUl3rrZ3"  }'
{
  "subscription": {
    "object": "subscription",
    "id": "sub_IhMUl3rrZ3",
    "status": "active",
    "account_id": "acc_IhMUl3rrZ3",
    "plan_id": "plan_IhMUl3rrZ3",
    "payment_method_id": "pme_IhMUl3rrZ3",
    "currency": "USD",
    "billing_cycle_type": "anniversary",
    "collection_method": "automatic",
    "current_period_start": "2025-02-14T17:33:40.843Z",
    "current_period_end": "2025-03-14T17:33:40.843Z",
    "first_billing_at": "2025-02-28T17:33:40.843Z",
    "previous_billing_at": "2025-02-14T17:33:40.843Z",
    "billed_through": "2025-03-14T17:33:40.843Z",
    "next_billing_at": "2025-03-14T17:33:40.843Z",
    "started_at": "2025-02-14T17:33:40.843Z",
    "trial_period_start": null,
    "trial_period_end": null,
    "created_at": "2025-02-14T17:33:40.843Z",
    "items": [
      {
        "plan_id": "plan_IhMUl3rrZ3",
        "quantity": 1
      }
    ]
  },
  "meta": {
    "request_id": "req_IhMUl3rrZ3"
  }
}