GoCardlessDeveloper Docs
Create a sandbox account

Instalment Schedule

View as Markdown

Instalment schedules are objects which represent a collection of related payments, with the intention to collect the total_amount specified. The API supports both schedule-based creation (similar to subscriptions) as well as explicit selection of differing payment amounts and charge dates.

Unlike subscriptions, the payments are created immediately, so the instalment schedule cannot be modified once submitted and instead can only be cancelled (which will cancel any of the payments which have not yet been submitted).

Customers will receive a single notification about the complete schedule of collection.

Create (with schedule)#

POST/instalment_schedules

Creates a new instalment schedule object, along with the associated payments. This API is recommended if you wish to use the GoCardless scheduling logic. For finer control over the individual dates, please check out the alternative version.

It can take quite a while to create the associated payments, so the API will return the status as pending initially. When processing has completed, a subsequent GET request for the instalment schedule will either have the status success and link to the created payments, or the status error and detailed information about the failures.

POST https://api.gocardless.com/instalment_schedules HTTP/1.1
Content-Type: application/json
{
  "instalment_schedules": {
    "name": "Bike Invoice 271",
    "currency": "GBP",
    "total_amount": "2500",
    "instalments": {
      "start_date": "2019-12-14",
      "interval_unit": "monthly",
      "interval": 1,
      "amounts": [
        "1500",
        "1000"
      ]
    },
    "metadata": {},
    "links": {
      "mandate": "MD123"
    }
  }
}
instalment_schedule = @client.instalment_schedules.create_with_schedule(
  params: {
    name: 'ACME Invoice 103',
    total_amount: 10_000, # 100 GBP in pence, collected from the customer
    app_fee: 10, # Your 10 pence fee, applied to each instalment,
                 # to be paid out to you
    currency: 'GBP',
    instalments: {
      start_date: '2019-08-20',
      interval_unit: 'weekly',
      interval: 2,
      amounts: [
        3_400,
        3_400,
        3_200
      ]
    },
    links: {
      mandate: 'MD0000XH9A3T4C'
    },
    metadata: {}
  },
  headers: {
    'Idempotency-Key': 'random_instalment_schedule_specific_string'
  }
)
instalment_schedule = client.instalment_schedules.create_with_schedule(
    params={
        "name": "ACME Invoice 103",
        "total_amount": 10000, # 100 GBP in pence, collected from the customer
        "app_fee": 10, # Your 10 pence fee, applied to each instalment,
                       # to be paid out to you
        "currency": "GBP",
        "instalments": {
            "start_date": "2019-08-20",
            "interval_unit": "weekly",
            "interval": 2,
            "amounts": [
                3400,
                3400,
                3200
            ]
        },
        "links": {
            "mandate": "MD0000XH9A3T4C"
        },
        "metadata": {}
    }, headers={
        "Idempotency-Key": "random_instalment_schedule_specific_string"
    }
)
const instalmentSchedule = await client.instalmentSchedules.createWithSchedule(
  {
    name: "ACME Invoice 103",
    total_amount: "10000", // 100 GBP in pence, collected from the customer
    app_fee: "10", // Your 10 pence fee, applied to each instalment,
                 // to be paid out to you
    currency: "GBP",
    instalments: {
      start_date: "2019-08-20",
      interval_unit: "weekly",
      interval: 2,
      amounts: [
        "3400",
        "3400",
        "3200"
      ]
    },
    links: {
      mandate: "MD0000XH9A3T4C"
    },
    metadata: {}
  },
  "instalment_schedule_idempotency_key"
);
$instalment_schedule = $client->instalmentSchedules()->createWithSchedule([
    "params" => [
        "name" => "ACME Invoice 103",
        "total_amount" => 10000, // 100 GBP in pence, collected from the customer
        "app_fee" => 10, // Your 10 pence fee, applied to each instalment,
                         // to be paid out to you
        "currency" => "GBP",
        "instalments" => [
            "start_date" => "2019-08-20",
            "interval_unit" => "weekly",
            "interval" => 2,
            "amounts" => [
                3400,
                3400,
                3200
            ]
        ],
        "links" => [
            "mandate" => "MD0000XH9A3T4C"
        ],
        "metadata" => []
    ],
    "headers" => [
        "Idempotency-Key" => "random_instalment_schedule_specific_string"
    ]
]);
import com.gocardless.services.InstalmentScheduleService.InstalmentScheduleCreateWithScheduleRequest.Instalments.IntervalUnit;
import java.util.Arrays;

InstalmentSchedule instalmentSchedule = client.instalmentSchedules().createWithSchedule()
    .withTotalAmount(10000) // 100 GBP in Pence, collected from the customer.
    .withAppFee(10)  // Your 10 pence fee, applied to each instalment, to be
                     // paid out to you
    .withCurrency(com.gocardless.services.InstalmentScheduleService.InstalmentScheduleCreateWithScheduleRequest.Currency.GBP)
    .withInstalmentsIntervalUnit(IntervalUnit.WEEKLY)
    .withInstalmentsInterval(2)
    .withInstalmentsAmounts(Arrays.asList(3400, 3400, 3200))
    .withLinksMandate("MD0000YTKZKY4J")
    .withMetadata("invoiceId", "001")
    .withIdempotencyKey("random_instalment_schedule_specific_string")
    .execute();
instalmentScheduleCreateWithScheduleParams := gocardless.InstalmentScheduleCreateWithScheduleParams{
  TotalAmount: 10000,
  AppFee:      10,
  Currency:    "GBP",
  Instalments: gocardless.InstalmentScheduleCreateWithScheduleParamsInstalments{
    Interval:     2,
    IntervalUnit: "monthly",
    Amounts:      []int{3400, 3400, 3200},
  },
  Metadata: map[string]string{"invoiceId": "001"},
}

requestOption := gocardless.WithIdempotencyKey("random_instalment_schedule_specific_string")
instalmentSchedule, err := client.InstalmentSchedules.CreateWithSchedule(ctx, instalmentScheduleCreateWithScheduleParams, requestOption)
using GoCardless.Services;
using System.Collections.Generic;

int?[] amountsArray = new int?[]{ 3400, 3400, 3200 };
var createResponse = await client.InstalmentSchedules.CreateWithScheduleAsync(
    new InstalmentScheduleCreateWithScheduleRequest
    {
        TotalAmount = 10000, // 100 GBP in pence, collected from the customer
        AppFee = 10, // Your 10 pence fee, applied to each instalment,
                     // to be paid out to you
        Currency = InstalmentScheduleCreateWithScheduleRequest.InstalmentScheduleCurrency.GBP,
        Name = "ACME Invoice 103",
        Instalments = new InstalmentScheduleCreateWithScheduleRequest.InstalmentScheduleInstalments
        {
            StartDate = "2019-08-20",
            IntervalUnit = InstalmentScheduleCreateWithScheduleRequest.InstalmentScheduleInstalments.InstalmentScheduleIntervalUnit.Weekly,
            Interval = 2,
            Amounts = amountsArray
        },
        Metadata = new Dictionary<string, string>
        {
            {"Invoice ID", "001"}
        },
        Links = new InstalmentScheduleCreateWithScheduleRequest.InstalmentScheduleLinks
        {
            Mandate = "MD0000XH9A3T4C"
        },
        IdempotencyKey = "random_instalment_schedule_specific_string"
    }
);
Responsehttp
HTTP/1.1 201 Created
Location: /instalment_schedules/IS123
Content-Type: application/json
{
 "instalment_schedules": {
   "id": "IS123",
   "status": "pending",
   "total_amount": "2500",
   "metadata": {},
   "payment_errors": {},
   "links": {
     "mandate": "MD123",
     "customer": "CU123"
   }
 }
}
Request Body
instalment_schedulesobject
9 properties
namestring

Name of the instalment schedule, up to 100 chars. This name will also be copied to the payments of the instalment schedule if you use schedule-based creation.

total_amountobject

The total amount of the instalment schedule, defined as the sum of all individual payments, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). If the requested payment amounts do not sum up correctly, a validation error will be returned.

currencystring

ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.

AUDCADDKKEURGBPNZDSEKUSD
app_feeobject

The amount to be deducted from each payment as an app fee, to be paid to the partner integration which created the subscription, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).

payment_referencestring

An optional reference that will appear on your customer's bank statement. The character limit for this reference is dependent on the scheme.
ACH - 10 characters
Autogiro - 11 characters
Bacs - 10 characters
BECS - 30 characters
BECS NZ - 12 characters
Betalingsservice - 30 characters
Faster Payments - 18 characters
PAD - scheme doesn't offer references
PayTo - 18 characters
SEPA - 140 characters
Note that this reference must be unique (for each merchant) for the BECS scheme as it is a scheme requirement.

Restricted: You can only specify a payment reference for Bacs payments (that is, when collecting from the UK) if you're on the GoCardless Plus, Pro or Enterprise packages.

Restricted: You can not specify a payment reference for Faster Payments.

retry_if_possibleboolean

On failure, automatically retry payments using intelligent retries. Default is false.

Important: To be able to use intelligent retries, Success+ needs to be enabled in GoCardless dashboard.

instalmentsobject

Frequency of the payments you want to create, together with an array of payment amounts to be collected, with a specified start date for the first payment. See create (with schedule)

4 properties
start_datestring

The date on which the first payment should be charged. Must be on or after the mandate's next_possible_charge_date. When left blank and month or day_of_month are provided, this will be set to the date of the first payment. If created without month or day_of_month this will be set as the mandate's next_possible_charge_date

intervalinteger

Number of interval_units between charge dates. Must be greater than or equal to 1.

interval_unitstring

The unit of time between customer charge dates. One of weekly, monthly or yearly.

weeklymonthlyyearly
amountsarray

List of amounts of each instalment, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).

metadataobject

Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.

linksobject
1 properties
mandatestring

ID of the associated mandate which the instalment schedule will create payments against.

Response 201

Resource created successfully

instalment_schedulesobject
9 properties
idstring

Unique identifier, beginning with "IS".

created_atstring

Fixed timestamp, recording when this resource was created.

total_amountobject

The total amount of the instalment schedule, defined as the sum of all individual payments, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). If the requested payment amounts do not sum up correctly, a validation error will be returned.

namestring

Name of the instalment schedule, up to 100 chars. This name will also be copied to the payments of the instalment schedule if you use schedule-based creation.

currencystring

ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.

AUDCADDKKEURGBPNZDSEKUSD
metadataobject

Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.

statusstring

One of:

  • pending: we're waiting for GC to create the payments
  • active: the payments have been created, and the schedule is active
  • creation_failed: payment creation failed
  • completed: we have passed the date of the final payment and all payments have been collected
  • cancelled: the schedule has been cancelled
  • errored: one or more payments have failed
pendingactivecreation_failedcompletedcancellederrored
payment_errorsobject

If the status is creation_failed, this property will be populated with validation failures from the individual payments, arranged by the index of the payment that failed.

linksobject

Links to associated objects

3 properties
mandatestring

ID of the associated mandate which the instalment schedule will create payments against.

customerstring

ID of the associated customer.

paymentsarray

Array of IDs of the associated payments

Errors 400401404422500
400

Bad Request

401

Unauthorised

404

Not found

422

Validation Error

500

Internal Error

Error Body
codeinteger
documentation_urlstring
errorsarray
2 properties
reasonstring
messagestring
messagestring
request_idstring
typestring
metadataobject
linksobject

List instalment schedules#

GET/instalment_schedules

Returns a cursor-paginated list of your instalment schedules.

GET https://api.gocardless.com/instalment_schedules?after=IS123 HTTP/1.1
@client.instalment_schedules.list

@client.instalment_schedules.list(
  params: {
    "created_at[gt]" => "2016-08-06T09:30:00Z"
  }
)

@client.instalment_schedules.list.records.each do |instalment_schedule|
  puts instalment_schedule.inspect
end
client.instalment_schedules.list().records

client.instalment_schedules.list(params={"after": "IS123"}).records
const instalmentSchedules = await client.instalmentSchedules.list();

// List all instalment schedules associated with a given customer.
const customerInstalmentSchedules = await client.instalmentSchedules.list({ customer: "CU123" });
$client->instalmentSchedules()->list();

$client->instalmentSchedules()->list([
  "params" => ["created_at[gt]" => "2015-11-03T09:30:00Z"]
]);
for (InstalmentSchedule instalmentSchedule : client.instalmentSchedules().all().execute()) {
  System.out.println(instalmentSchedule.getId());
}
instalmentScheduleListParams := gocardless.InstalmentScheduleListParams{}
instalmentScheduleListResult, err := client.InstalmentSchedules.List(ctx, instalmentScheduleListParams)
for _, instalmentSchedule := range instalmentScheduleListResult.InstalmentSchedules {
    fmt.Println(instalmentSchedule.Name)
}
var instalmentScheduleListResponse = client.InstalmentSchedules.All();
foreach (GoCardless.Resources.InstalmentSchedule instalmentSchedule in instalmentScheduleListResponse)
{
    Console.WriteLine(instalmentSchedule.Name);
}
Responsehttp
HTTP/1.1 200 OK
Content-Type: application/json
{
  "meta": {
    "cursors": {
      "before": "IS000",
      "after": "IS456"
    },
    "limit": 50
  },
  "instalment_schedules": [{
    "id": "IS123",
    "name": "Bike Invoice 271",
    "currency": "GBP",
    "status": "active",
    "total_amount": "2500",
    "metadata": {},
    "payment_errors": {},
    "links": {
      "mandate": "MD123",
      "payments": ["PM123", "PM345"],
      "customer": "CU123"
    }
  }, {
    "id": "IS456",
    "name": "INV-7465",
    "currency": "GBP",
    "status": "cancelled",
    "total_amount": "3600",
    "metadata": {},
    "payment_errors": {},
    "links": {
      "mandate": "MD456",
      "payments": ["PM567", "PM789"],
      "customer": "CU456"
    }
  }]
}
Response 200

Successful response

instalment_schedulesarray
9 properties
idstring

Unique identifier, beginning with "IS".

created_atstring

Fixed timestamp, recording when this resource was created.

total_amountobject

The total amount of the instalment schedule, defined as the sum of all individual payments, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). If the requested payment amounts do not sum up correctly, a validation error will be returned.

namestring

Name of the instalment schedule, up to 100 chars. This name will also be copied to the payments of the instalment schedule if you use schedule-based creation.

currencystring

ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.

AUDCADDKKEURGBPNZDSEKUSD
metadataobject

Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.

statusstring

One of:

  • pending: we're waiting for GC to create the payments
  • active: the payments have been created, and the schedule is active
  • creation_failed: payment creation failed
  • completed: we have passed the date of the final payment and all payments have been collected
  • cancelled: the schedule has been cancelled
  • errored: one or more payments have failed
pendingactivecreation_failedcompletedcancellederrored
payment_errorsobject

If the status is creation_failed, this property will be populated with validation failures from the individual payments, arranged by the index of the payment that failed.

linksobject

Links to associated objects

3 properties
mandatestring

ID of the associated mandate which the instalment schedule will create payments against.

customerstring

ID of the associated customer.

paymentsarray

Array of IDs of the associated payments

metaobject
2 properties
limitinteger
cursorsobject
2 properties
beforestring

Cursor pointing to the end of the desired set.

afterstring

Cursor pointing to the start of the desired set.

Errors 400401404422500
400

Bad Request

401

Unauthorised

404

Not found

422

Validation Error

500

Internal Error

Error Body
codeinteger
documentation_urlstring
errorsarray
2 properties
reasonstring
messagestring
messagestring
request_idstring
typestring
metadataobject
linksobject

Get a single instalment schedule#

GET/instalment_schedules/{instalment_schedule_id}

Retrieves the details of an existing instalment schedule.

Path Parameters

NameTypeDescription
instalment_schedule_idrequiredstring

The instalment schedule id

GET https://api.gocardless.com/instalment_schedules/IS123 HTTP/1.1
@client.instalment_schedules.get("IS123")
client.instalment_schedules.get("IS123")
const instalmentSchedule = await client.instalmentSchedules.find("IS123");
$client->instalmentSchedules()->get("IS123");
InstalmentSchedule instalmentSchedule = client.instalmentSchedules().get("IS123").execute();
instalmentSchedule, err := client.InstalmentSchedules.Get(ctx, "IS123")
var instalmentScheduleResponse = await client.InstalmentSchedules.GetAsync("IS123");
GoCardless.Resources.InstalmentSchedule instalmentSchedule = instalmentScheduleResponse.InstalmentSchedule;
Responsehttp
HTTP/1.1 200 OK
Content-Type: application/json
{
 "instalment_schedules": {
   "id": "IS123",
   "name": "INV-4142",
   "currency": "GBP",
   "status": "active",
   "total_amount": "2500",
   "metadata": {},
   "payment_errors": {},
   "links": {
     "mandate": "MD456",
     "payments": ["PM123", "PM345"],
     "customer": "CU456"
   }
 }
}

{
 "instalment_schedules": {
   "id": "IS123",
   "name": "INV-4142",
   "currency": "GBP",
   "status": "creation_failed",
   "total_amount": "2500",
   "metadata": {},
   "payment_errors": {
     "0": [{ "field": "description", "message": "is too long" }],
     "1": [{ "field": "charge_date", "message": "must be on or after mandate's next_possible_customer_charge_date" }]
   }
  }
}
Response 200

Successful response

instalment_schedulesobject
9 properties
idstring

Unique identifier, beginning with "IS".

created_atstring

Fixed timestamp, recording when this resource was created.

total_amountobject

The total amount of the instalment schedule, defined as the sum of all individual payments, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). If the requested payment amounts do not sum up correctly, a validation error will be returned.

namestring

Name of the instalment schedule, up to 100 chars. This name will also be copied to the payments of the instalment schedule if you use schedule-based creation.

currencystring

ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.

AUDCADDKKEURGBPNZDSEKUSD
metadataobject

Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.

statusstring

One of:

  • pending: we're waiting for GC to create the payments
  • active: the payments have been created, and the schedule is active
  • creation_failed: payment creation failed
  • completed: we have passed the date of the final payment and all payments have been collected
  • cancelled: the schedule has been cancelled
  • errored: one or more payments have failed
pendingactivecreation_failedcompletedcancellederrored
payment_errorsobject

If the status is creation_failed, this property will be populated with validation failures from the individual payments, arranged by the index of the payment that failed.

linksobject

Links to associated objects

3 properties
mandatestring

ID of the associated mandate which the instalment schedule will create payments against.

customerstring

ID of the associated customer.

paymentsarray

Array of IDs of the associated payments

Errors 400401404422500
400

Bad Request

401

Unauthorised

404

Not found

422

Validation Error

500

Internal Error

Error Body
codeinteger
documentation_urlstring
errorsarray
2 properties
reasonstring
messagestring
messagestring
request_idstring
typestring
metadataobject
linksobject

Update an instalment schedule#

PUT/instalment_schedules/{instalment_schedule_id}

Updates an instalment schedule. This accepts only the metadata parameter.

Path Parameters

NameTypeDescription
instalment_schedule_idrequiredstring

The instalment schedule id

PUT https://api.gocardless.com/instalment_schedules/IS123 HTTP/1.1
Content-Type: application/json
{
  "instalment_schedules": {
    "metadata": {
      "key": "value"
    }
  }
}
@client.instalment_schedules.update(
  "IS123",
  params: {
    metadata: { key: "value" }
  }
)
client.instalment_schedules.update("IS123", params={
  "metadata": {"key": "value"}
})
const instalmentSchedule = await client.instalmentSchedules.update(
  "IS123",
  {
    metadata: {
      key: "value"
    }
  }
);
$client->instalmentSchedules()->update("IS123", [
  "params" => ["metadata" => ["key" => "value"]]
]);
client.instalmentSchedules().update("IS123")
  .withMetadata("key", "value")
  .execute();
instalmentScheduleUpdateParams := gocardless.InstalmentScheduleUpdateParams{
  Metadata: map[string]string{"key": "value"},
}

instalmentSchedule, err := client.InstalmentSchedules.Update(ctx, "IS123", instalmentScheduleUpdateParams)
using GoCardless.Services;
using System.Collections.Generic;

var instalmentScheduleRequest = new InstalmentScheduleUpdateRequest()
{
    Metadata = new Dictionary<string, string>()
    {
        {"key", "value"}
    }
};

var instalmentScheduleResponse = await client.InstalmentSchedules.UpdateAsync("IS123", instalmentScheduleRequest);
Responsehttp
HTTP/1.1 200 OK
Content-Type: application/json
{
 "instalment_schedules": {
   "id": "IS123",
   "name": "INV-4142",
   "currency": "GBP",
   "status": "active",
   "total_amount": "2500",
   "metadata": {
     "key": "value"
   },
   "payment_errors": {},
   "links": {
     "mandate": "MD456",
     "payments": ["PM123", "PM345"],
     "customer": "CU456"
   }
  }
}
Request Body
instalment_schedulesobject
1 properties
metadataobject

Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.

Response 200

Successful response

instalment_schedulesobject
9 properties
idstring

Unique identifier, beginning with "IS".

created_atstring

Fixed timestamp, recording when this resource was created.

total_amountobject

The total amount of the instalment schedule, defined as the sum of all individual payments, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). If the requested payment amounts do not sum up correctly, a validation error will be returned.

namestring

Name of the instalment schedule, up to 100 chars. This name will also be copied to the payments of the instalment schedule if you use schedule-based creation.

currencystring

ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.

AUDCADDKKEURGBPNZDSEKUSD
metadataobject

Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.

statusstring

One of:

  • pending: we're waiting for GC to create the payments
  • active: the payments have been created, and the schedule is active
  • creation_failed: payment creation failed
  • completed: we have passed the date of the final payment and all payments have been collected
  • cancelled: the schedule has been cancelled
  • errored: one or more payments have failed
pendingactivecreation_failedcompletedcancellederrored
payment_errorsobject

If the status is creation_failed, this property will be populated with validation failures from the individual payments, arranged by the index of the payment that failed.

linksobject

Links to associated objects

3 properties
mandatestring

ID of the associated mandate which the instalment schedule will create payments against.

customerstring

ID of the associated customer.

paymentsarray

Array of IDs of the associated payments

Errors 400401404422500
400

Bad Request

401

Unauthorised

404

Not found

422

Validation Error

500

Internal Error

Error Body
codeinteger
documentation_urlstring
errorsarray
2 properties
reasonstring
messagestring
messagestring
request_idstring
typestring
metadataobject
linksobject

Cancel an instalment schedule#

POST/instalment_schedules/{instalment_schedule_id}/actions/cancel

Immediately cancels an instalment schedule; no further payments will be collected for it.

This will fail with a cancellation_failed error if the instalment schedule is already cancelled or has completed.

Path Parameters

NameTypeDescription
instalment_schedule_idrequiredstring

The instalment schedule id

POST https://api.gocardless.com/instalment_schedules/IS123/actions/cancel HTTP/1.1
@client.instalment_schedules.cancel("IS123")
client.instalment_schedules.cancel("IS123")
const instalmentScheduleResponse = await client.instalmentSchedules.cancel("IS123");
$client->instalmentSchedules()->cancel("IS123");
client.instalmentSchedules().cancel("IS123").execute();
instalmentScheduleCancelParams := gocardless.InstalmentScheduleCancelParams{}
instalmentSchedule, err := client.InstalmentSchedules.Cancel(ctx, "IS123", instalmentScheduleCancelParams)
var response = await client.InstalmentSchedules.CancelAsync("IS123");
Responsehttp
HTTP/1.1 200 OK
Content-Type: application/json
{
  "instalment_schedules": {
    "id": "IS123",
    "name": "Bike Invoice 271",
    "currency": "GBP",
    "status": "cancelled",
    "total_amount": "2500",
    "metadata": {},
    "payment_errors": {},
    "links": {
      "mandate": "MD123",
      "payments": ["PM123", "PM345"],
      "customer": "CU123"
    }
  }
}
Request Body
instalment_schedulesobject
0 properties
Response 200

Action completed successfully

instalment_schedulesobject
9 properties
idstring

Unique identifier, beginning with "IS".

created_atstring

Fixed timestamp, recording when this resource was created.

total_amountobject

The total amount of the instalment schedule, defined as the sum of all individual payments, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). If the requested payment amounts do not sum up correctly, a validation error will be returned.

namestring

Name of the instalment schedule, up to 100 chars. This name will also be copied to the payments of the instalment schedule if you use schedule-based creation.

currencystring

ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.

AUDCADDKKEURGBPNZDSEKUSD
metadataobject

Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.

statusstring

One of:

  • pending: we're waiting for GC to create the payments
  • active: the payments have been created, and the schedule is active
  • creation_failed: payment creation failed
  • completed: we have passed the date of the final payment and all payments have been collected
  • cancelled: the schedule has been cancelled
  • errored: one or more payments have failed
pendingactivecreation_failedcompletedcancellederrored
payment_errorsobject

If the status is creation_failed, this property will be populated with validation failures from the individual payments, arranged by the index of the payment that failed.

linksobject

Links to associated objects

3 properties
mandatestring

ID of the associated mandate which the instalment schedule will create payments against.

customerstring

ID of the associated customer.

paymentsarray

Array of IDs of the associated payments

Errors 400401404422500
400

Bad Request

401

Unauthorised

404

Not found

422

Validation Error

500

Internal Error

Error Body
codeinteger
documentation_urlstring
errorsarray
2 properties
reasonstring
messagestring
messagestring
request_idstring
typestring
metadataobject
linksobject