Subscription

Update a subscription

Updates a subscription object.

This fails with:

  • validation_failed if invalid data is provided when attempting to update a subscription.

  • subscription_not_active if the subscription is no longer active.

  • subscription_already_ended if the subscription has taken all payments.

  • mandate_payments_require_approval if the amount is being changed and the mandate requires approval.

  • number_of_subscription_amendments_exceeded error if the subscription amount has already been changed 10 times.

  • forbidden if the amount is being changed, and the subscription was created by an app and you are not authenticated as that app, or if the subscription was not created by an app and you are authenticated as an app

  • resource_created_by_another_app if the app fee is being changed, and the subscription was created by an app other than the app you are authenticated as

put/subscriptions/{subscription_id}

Request

  • Base URL
    https://api.gocardless.com
  • Auth
    HTTP bearer

Path parameters

subscription_idstring required

The subscription id

Headers

GoCardless-Versionstring required

Request body

Example request

{
  "subscriptions": {
    "name": "12 month subscription",
    "payment_reference": "GOLDPLAN"
  }
}

Response

Successful response

Example response

{
  "subscriptions": {
    "id": "SB123",
    "created_at": "2014-01-01T12:00:00.000Z",
    "amount": 1000,
    "name": "12 month subscription",
    "start_date": "2014-10-21",
    "end_date": "2015-10-21",
    "interval": 1,
    "interval_unit": "monthly",
    "day_of_month": 28,
    "currency": "EUR",
    "month": "january",
    "count": 5,
    "payment_reference": "GOLDPLAN",
    "status": "active",
    "upcoming_payments": [
      {
        "amount": 2500,
        "charge_date": "2014-11-03"
      }
    ],
    "app_fee": 100,
    "links": {
      "mandate": "MD123"
    },
    "earliest_charge_date_after_resume": "2014-11-03"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.