Subscription
Subscriptions create payments according to a schedule.
Recurrence Rules
The following rules apply when specifying recurrence:
- If
day_of_monthandstart_dateare not providedstart_datewill be the mandate'snext_possible_charge_dateand the subscription will then recur based on theinterval&interval_unit - If
monthorday_of_monthare present the following validations apply:
| interval_unit | month | day_of_month |
|---|---|---|
| yearly | optional (required if day_of_month provided) | optional (invalid if month not provided) |
| monthly | invalid | optional |
| weekly | invalid | invalid |
Examples:
| interval_unit | interval | month | day_of_month | valid? |
|---|---|---|---|---|
| yearly | 1 | january | -1 | valid |
| monthly | 6 | valid | ||
| monthly | 6 | 12 | valid | |
| weekly | 2 | valid | ||
| yearly | 1 | march | invalid - missing day_of_month | |
| yearly | 1 | 2 | invalid - missing month | |
| monthly | 6 | august | 12 | invalid - month must be blank |
| weekly | 2 | october | 10 | invalid - month and day_of_month must be blank |
Rolling dates
When a charge date falls on a non-business day, one of two things will happen:
- if the recurrence rule specified
-1as theday_of_month, the charge date will be rolled backwards to the previous business day (i.e., the last working day of the month). - otherwise the charge date will be rolled forwards to the next business day.
Create a subscription#
/subscriptionsCreates a new subscription object
Request Body
subscriptionsobject15 properties
amountobject
Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
namestring
Optional name for the subscription. This will be set as the description on each payment created. Must not exceed 255 characters.
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
countobject
The total number of payments that should be taken by this subscription.
end_datestring
Date on or after which no further payments should be created.
If this field is blank and count is not specified, the subscription will continue forever.
Deprecated: This field will be removed in a future API version. Use count to specify a number of payments instead.
intervalobject
Number of interval_units between customer charge dates. Must be greater than or equal to 1. Must result in at least one charge date per year. Defaults to 1.
interval_unitstring
The unit of time between customer charge dates. One of weekly, monthly or yearly.
weeklymonthlyyearlyday_of_monthobject
As per RFC 2445. The day of the month to charge customers on. 1-28 or -1 to indicate the last day of the month.
monthstring
Name of the month on which to charge a customer. Must be lowercase. Only applies
when the interval_unit is yearly.
januaryfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecembercurrencystring
ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
payment_referencestring
An optional payment reference. This will be set as the reference on each payment
created and will appear on your customer's bank statement. See the documentation for
the create payment endpoint for more details.
Restricted: You need your own Service User Number to specify a payment reference for Bacs payments.
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).
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.
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.
linksobject
1 properties
mandatestring
ID of the associated mandate which the subscription will create payments against.
Response 201
Resource created successfully
subscriptionsobject21 properties
idstring
Unique identifier, beginning with "SB".
created_atstring
Fixed timestamp, recording when this resource was created.
amountobject
Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
namestring
Optional name for the subscription. This will be set as the description on each payment created. Must not exceed 255 characters.
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
end_datestring
Date on or after which no further payments should be created.
If this field is blank and count is not specified, the subscription will continue forever.
Deprecated: This field will be removed in a future API version. Use count to specify a number of payments instead.
intervalobject
Number of interval_units between customer charge dates. Must be greater than or equal to 1. Must result in at least one charge date per year. Defaults to 1.
interval_unitstring
The unit of time between customer charge dates. One of weekly, monthly or yearly.
weeklymonthlyyearlyday_of_monthobject
As per RFC 2445. The day of the month to charge customers on. 1-28 or -1 to indicate the last day of the month.
currencystring
ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
monthstring
Name of the month on which to charge a customer. Must be lowercase. Only applies
when the interval_unit is yearly.
januaryfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecembercountobject
The total number of payments that should be taken by this subscription.
payment_referencestring
An optional payment reference. This will be set as the reference on each payment
created and will appear on your customer's bank statement. See the documentation for
the create payment endpoint for more details.
Restricted: You need your own Service User Number to specify a payment reference for Bacs payments.
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_customer_approval: the subscription is waiting for customer approval before becoming activecustomer_approval_denied: the customer did not approve the subscriptionactive: the subscription is currently active and will continue to create paymentsfinished: all of the payments scheduled for creation under this subscription have been createdcancelled: the subscription has been cancelled and will no longer create paymentspaused: the subscription has been paused and will not create payments
pending_customer_approvalcustomer_approval_deniedactivefinishedcancelledpausedupcoming_paymentsarray
Up to 10 upcoming payments with their amounts and charge dates.
2 properties
charge_datestring
The date on which this payment will be charged.
amountobject
The amount of this payment, in minor unit (e.g. pence in GBP, cents in EUR).
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).
linksobject
1 properties
mandatestring
ID of the associated mandate which the subscription will create payments against.
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.
earliest_charge_date_after_resumestring
The earliest date that will be used as a charge_date on payments
created for this subscription if it is resumed. Only present for paused subscriptions.
This value will change over time.
parent_plan_pausedboolean
Whether the parent plan of this subscription is paused.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectList subscriptions#
/subscriptionsReturns a cursor-paginated list of your subscriptions. Please note if the subscriptions are related to customers who have been removed, they will not be shown in the response.
Response 200
Successful response
subscriptionsarray21 properties
idstring
Unique identifier, beginning with "SB".
created_atstring
Fixed timestamp, recording when this resource was created.
amountobject
Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
namestring
Optional name for the subscription. This will be set as the description on each payment created. Must not exceed 255 characters.
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
end_datestring
Date on or after which no further payments should be created.
If this field is blank and count is not specified, the subscription will continue forever.
Deprecated: This field will be removed in a future API version. Use count to specify a number of payments instead.
intervalobject
Number of interval_units between customer charge dates. Must be greater than or equal to 1. Must result in at least one charge date per year. Defaults to 1.
interval_unitstring
The unit of time between customer charge dates. One of weekly, monthly or yearly.
weeklymonthlyyearlyday_of_monthobject
As per RFC 2445. The day of the month to charge customers on. 1-28 or -1 to indicate the last day of the month.
currencystring
ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
monthstring
Name of the month on which to charge a customer. Must be lowercase. Only applies
when the interval_unit is yearly.
januaryfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecembercountobject
The total number of payments that should be taken by this subscription.
payment_referencestring
An optional payment reference. This will be set as the reference on each payment
created and will appear on your customer's bank statement. See the documentation for
the create payment endpoint for more details.
Restricted: You need your own Service User Number to specify a payment reference for Bacs payments.
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_customer_approval: the subscription is waiting for customer approval before becoming activecustomer_approval_denied: the customer did not approve the subscriptionactive: the subscription is currently active and will continue to create paymentsfinished: all of the payments scheduled for creation under this subscription have been createdcancelled: the subscription has been cancelled and will no longer create paymentspaused: the subscription has been paused and will not create payments
pending_customer_approvalcustomer_approval_deniedactivefinishedcancelledpausedupcoming_paymentsarray
Up to 10 upcoming payments with their amounts and charge dates.
2 properties
charge_datestring
The date on which this payment will be charged.
amountobject
The amount of this payment, in minor unit (e.g. pence in GBP, cents in EUR).
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).
linksobject
1 properties
mandatestring
ID of the associated mandate which the subscription will create payments against.
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.
earliest_charge_date_after_resumestring
The earliest date that will be used as a charge_date on payments
created for this subscription if it is resumed. Only present for paused subscriptions.
This value will change over time.
parent_plan_pausedboolean
Whether the parent plan of this subscription is paused.
metaobject2 properties
limitintegercursorsobject
2 properties
beforestring
Cursor pointing to the end of the desired set.
afterstring
Cursor pointing to the start of the desired set.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectGet a single subscription#
/subscriptions/{subscription_id}Retrieves the details of a single subscription.
Path Parameters
| Name | Type | Description |
|---|---|---|
subscription_idrequired | string | The subscription id |
Response 200
Successful response
subscriptionsobject21 properties
idstring
Unique identifier, beginning with "SB".
created_atstring
Fixed timestamp, recording when this resource was created.
amountobject
Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
namestring
Optional name for the subscription. This will be set as the description on each payment created. Must not exceed 255 characters.
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
end_datestring
Date on or after which no further payments should be created.
If this field is blank and count is not specified, the subscription will continue forever.
Deprecated: This field will be removed in a future API version. Use count to specify a number of payments instead.
intervalobject
Number of interval_units between customer charge dates. Must be greater than or equal to 1. Must result in at least one charge date per year. Defaults to 1.
interval_unitstring
The unit of time between customer charge dates. One of weekly, monthly or yearly.
weeklymonthlyyearlyday_of_monthobject
As per RFC 2445. The day of the month to charge customers on. 1-28 or -1 to indicate the last day of the month.
currencystring
ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
monthstring
Name of the month on which to charge a customer. Must be lowercase. Only applies
when the interval_unit is yearly.
januaryfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecembercountobject
The total number of payments that should be taken by this subscription.
payment_referencestring
An optional payment reference. This will be set as the reference on each payment
created and will appear on your customer's bank statement. See the documentation for
the create payment endpoint for more details.
Restricted: You need your own Service User Number to specify a payment reference for Bacs payments.
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_customer_approval: the subscription is waiting for customer approval before becoming activecustomer_approval_denied: the customer did not approve the subscriptionactive: the subscription is currently active and will continue to create paymentsfinished: all of the payments scheduled for creation under this subscription have been createdcancelled: the subscription has been cancelled and will no longer create paymentspaused: the subscription has been paused and will not create payments
pending_customer_approvalcustomer_approval_deniedactivefinishedcancelledpausedupcoming_paymentsarray
Up to 10 upcoming payments with their amounts and charge dates.
2 properties
charge_datestring
The date on which this payment will be charged.
amountobject
The amount of this payment, in minor unit (e.g. pence in GBP, cents in EUR).
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).
linksobject
1 properties
mandatestring
ID of the associated mandate which the subscription will create payments against.
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.
earliest_charge_date_after_resumestring
The earliest date that will be used as a charge_date on payments
created for this subscription if it is resumed. Only present for paused subscriptions.
This value will change over time.
parent_plan_pausedboolean
Whether the parent plan of this subscription is paused.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectUpdate a subscription#
/subscriptions/{subscription_id}Updates a subscription object.
This fails with:
-
validation_failedif invalid data is provided when attempting to update a subscription. -
subscription_not_activeif the subscription is no longer active. -
subscription_already_endedif the subscription has taken all payments. -
mandate_payments_require_approvalif the amount is being changed and the mandate requires approval. -
number_of_subscription_amendments_exceedederror if the subscription amount has already been changed 10 times. -
forbiddenif 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_appif the app fee is being changed, and the subscription was created by an app other than the app you are authenticated as
Path Parameters
| Name | Type | Description |
|---|---|---|
subscription_idrequired | string | The subscription id |
Request Body
subscriptionsobject6 properties
namestring
Optional name for the subscription. This will be set as the description on each payment created. Must not exceed 255 characters.
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.
payment_referencestring
An optional payment reference. This will be set as the reference on each payment
created and will appear on your customer's bank statement. See the documentation for
the create payment endpoint for more details.
Restricted: You need your own Service User Number to specify a payment reference for Bacs payments.
amountobject
Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
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).
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.
Response 200
Successful response
subscriptionsobject21 properties
idstring
Unique identifier, beginning with "SB".
created_atstring
Fixed timestamp, recording when this resource was created.
amountobject
Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
namestring
Optional name for the subscription. This will be set as the description on each payment created. Must not exceed 255 characters.
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
end_datestring
Date on or after which no further payments should be created.
If this field is blank and count is not specified, the subscription will continue forever.
Deprecated: This field will be removed in a future API version. Use count to specify a number of payments instead.
intervalobject
Number of interval_units between customer charge dates. Must be greater than or equal to 1. Must result in at least one charge date per year. Defaults to 1.
interval_unitstring
The unit of time between customer charge dates. One of weekly, monthly or yearly.
weeklymonthlyyearlyday_of_monthobject
As per RFC 2445. The day of the month to charge customers on. 1-28 or -1 to indicate the last day of the month.
currencystring
ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
monthstring
Name of the month on which to charge a customer. Must be lowercase. Only applies
when the interval_unit is yearly.
januaryfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecembercountobject
The total number of payments that should be taken by this subscription.
payment_referencestring
An optional payment reference. This will be set as the reference on each payment
created and will appear on your customer's bank statement. See the documentation for
the create payment endpoint for more details.
Restricted: You need your own Service User Number to specify a payment reference for Bacs payments.
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_customer_approval: the subscription is waiting for customer approval before becoming activecustomer_approval_denied: the customer did not approve the subscriptionactive: the subscription is currently active and will continue to create paymentsfinished: all of the payments scheduled for creation under this subscription have been createdcancelled: the subscription has been cancelled and will no longer create paymentspaused: the subscription has been paused and will not create payments
pending_customer_approvalcustomer_approval_deniedactivefinishedcancelledpausedupcoming_paymentsarray
Up to 10 upcoming payments with their amounts and charge dates.
2 properties
charge_datestring
The date on which this payment will be charged.
amountobject
The amount of this payment, in minor unit (e.g. pence in GBP, cents in EUR).
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).
linksobject
1 properties
mandatestring
ID of the associated mandate which the subscription will create payments against.
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.
earliest_charge_date_after_resumestring
The earliest date that will be used as a charge_date on payments
created for this subscription if it is resumed. Only present for paused subscriptions.
This value will change over time.
parent_plan_pausedboolean
Whether the parent plan of this subscription is paused.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectPause a subscription#
/subscriptions/{subscription_id}/actions/pausePause a subscription object. No payments will be created until it is resumed.
This can only be used when a subscription is collecting a fixed number of payments (created using count),
when they continue forever (created without count or end_date) or
the subscription is already paused for a number of cycles.
When pause_cycles is omitted the subscription is paused until the resume endpoint is called.
If the subscription is collecting a fixed number of payments, end_date will be set to null.
When paused indefinitely, upcoming_payments will be empty.
When pause_cycles is provided the subscription will be paused for the number of cycles requested.
If the subscription is collecting a fixed number of payments, end_date will be set to a new value.
When paused for a number of cycles, upcoming_payments will still contain the upcoming charge dates.
This fails with:
-
forbiddenif 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 -
validation_failedif invalid data is provided when attempting to pause a subscription. -
subscription_paused_cannot_update_cyclesif the subscription is already paused for a number of cycles and the request provides a value forpause_cycle. -
subscription_cannot_be_pausedif the subscription cannot be paused. -
subscription_already_endedif the subscription has taken all payments. -
pause_cycles_must_be_greater_than_or_equal_toif the provided value forpause_cyclescannot be satisfied.
Path Parameters
| Name | Type | Description |
|---|---|---|
subscription_idrequired | string | The subscription id |
Request Body
subscriptionsobject2 properties
pause_cyclesinteger
The number of cycles to pause a subscription for. A cycle is one duration of interval and interval_unit. This should be a non zero positive value.
For AUD subscriptions with interval_unit: weekly the minimum value varies between 3 & 4 because of the mandatory minimum waiting period.
For NZD subscriptions with interval_unit: weekly the minimum value is 2 because of the mandatory minimum waiting period.
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
Action completed successfully
subscriptionsobject21 properties
idstring
Unique identifier, beginning with "SB".
created_atstring
Fixed timestamp, recording when this resource was created.
amountobject
Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
namestring
Optional name for the subscription. This will be set as the description on each payment created. Must not exceed 255 characters.
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
end_datestring
Date on or after which no further payments should be created.
If this field is blank and count is not specified, the subscription will continue forever.
Deprecated: This field will be removed in a future API version. Use count to specify a number of payments instead.
intervalobject
Number of interval_units between customer charge dates. Must be greater than or equal to 1. Must result in at least one charge date per year. Defaults to 1.
interval_unitstring
The unit of time between customer charge dates. One of weekly, monthly or yearly.
weeklymonthlyyearlyday_of_monthobject
As per RFC 2445. The day of the month to charge customers on. 1-28 or -1 to indicate the last day of the month.
currencystring
ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
monthstring
Name of the month on which to charge a customer. Must be lowercase. Only applies
when the interval_unit is yearly.
januaryfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecembercountobject
The total number of payments that should be taken by this subscription.
payment_referencestring
An optional payment reference. This will be set as the reference on each payment
created and will appear on your customer's bank statement. See the documentation for
the create payment endpoint for more details.
Restricted: You need your own Service User Number to specify a payment reference for Bacs payments.
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_customer_approval: the subscription is waiting for customer approval before becoming activecustomer_approval_denied: the customer did not approve the subscriptionactive: the subscription is currently active and will continue to create paymentsfinished: all of the payments scheduled for creation under this subscription have been createdcancelled: the subscription has been cancelled and will no longer create paymentspaused: the subscription has been paused and will not create payments
pending_customer_approvalcustomer_approval_deniedactivefinishedcancelledpausedupcoming_paymentsarray
Up to 10 upcoming payments with their amounts and charge dates.
2 properties
charge_datestring
The date on which this payment will be charged.
amountobject
The amount of this payment, in minor unit (e.g. pence in GBP, cents in EUR).
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).
linksobject
1 properties
mandatestring
ID of the associated mandate which the subscription will create payments against.
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.
earliest_charge_date_after_resumestring
The earliest date that will be used as a charge_date on payments
created for this subscription if it is resumed. Only present for paused subscriptions.
This value will change over time.
parent_plan_pausedboolean
Whether the parent plan of this subscription is paused.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectResume a subscription#
/subscriptions/{subscription_id}/actions/resumeResume a subscription object.
Payments will start to be created again based on the subscriptions recurrence rules.
The charge_date on the next payment will be the same as the subscriptions earliest_charge_date_after_resume
This fails with:
-
forbiddenif 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 -
validation_failedif invalid data is provided when attempting to resume a subscription. -
subscription_not_pausedif the subscription is not paused.
Path Parameters
| Name | Type | Description |
|---|---|---|
subscription_idrequired | string | The subscription id |
Request Body
subscriptionsobject1 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
Action completed successfully
subscriptionsobject21 properties
idstring
Unique identifier, beginning with "SB".
created_atstring
Fixed timestamp, recording when this resource was created.
amountobject
Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
namestring
Optional name for the subscription. This will be set as the description on each payment created. Must not exceed 255 characters.
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
end_datestring
Date on or after which no further payments should be created.
If this field is blank and count is not specified, the subscription will continue forever.
Deprecated: This field will be removed in a future API version. Use count to specify a number of payments instead.
intervalobject
Number of interval_units between customer charge dates. Must be greater than or equal to 1. Must result in at least one charge date per year. Defaults to 1.
interval_unitstring
The unit of time between customer charge dates. One of weekly, monthly or yearly.
weeklymonthlyyearlyday_of_monthobject
As per RFC 2445. The day of the month to charge customers on. 1-28 or -1 to indicate the last day of the month.
currencystring
ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
monthstring
Name of the month on which to charge a customer. Must be lowercase. Only applies
when the interval_unit is yearly.
januaryfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecembercountobject
The total number of payments that should be taken by this subscription.
payment_referencestring
An optional payment reference. This will be set as the reference on each payment
created and will appear on your customer's bank statement. See the documentation for
the create payment endpoint for more details.
Restricted: You need your own Service User Number to specify a payment reference for Bacs payments.
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_customer_approval: the subscription is waiting for customer approval before becoming activecustomer_approval_denied: the customer did not approve the subscriptionactive: the subscription is currently active and will continue to create paymentsfinished: all of the payments scheduled for creation under this subscription have been createdcancelled: the subscription has been cancelled and will no longer create paymentspaused: the subscription has been paused and will not create payments
pending_customer_approvalcustomer_approval_deniedactivefinishedcancelledpausedupcoming_paymentsarray
Up to 10 upcoming payments with their amounts and charge dates.
2 properties
charge_datestring
The date on which this payment will be charged.
amountobject
The amount of this payment, in minor unit (e.g. pence in GBP, cents in EUR).
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).
linksobject
1 properties
mandatestring
ID of the associated mandate which the subscription will create payments against.
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.
earliest_charge_date_after_resumestring
The earliest date that will be used as a charge_date on payments
created for this subscription if it is resumed. Only present for paused subscriptions.
This value will change over time.
parent_plan_pausedboolean
Whether the parent plan of this subscription is paused.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectCancel a subscription#
/subscriptions/{subscription_id}/actions/cancelImmediately cancels a subscription; no more payments will be created under it. Any metadata supplied to this endpoint will be stored on the payment cancellation event it causes.
This will fail with a cancellation_failed error if the subscription is already cancelled or finished.
Path Parameters
| Name | Type | Description |
|---|---|---|
subscription_idrequired | string | The subscription id |
Request Body
subscriptionsobject1 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
Action completed successfully
subscriptionsobject21 properties
idstring
Unique identifier, beginning with "SB".
created_atstring
Fixed timestamp, recording when this resource was created.
amountobject
Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
namestring
Optional name for the subscription. This will be set as the description on each payment created. Must not exceed 255 characters.
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
end_datestring
Date on or after which no further payments should be created.
If this field is blank and count is not specified, the subscription will continue forever.
Deprecated: This field will be removed in a future API version. Use count to specify a number of payments instead.
intervalobject
Number of interval_units between customer charge dates. Must be greater than or equal to 1. Must result in at least one charge date per year. Defaults to 1.
interval_unitstring
The unit of time between customer charge dates. One of weekly, monthly or yearly.
weeklymonthlyyearlyday_of_monthobject
As per RFC 2445. The day of the month to charge customers on. 1-28 or -1 to indicate the last day of the month.
currencystring
ISO 4217 currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
monthstring
Name of the month on which to charge a customer. Must be lowercase. Only applies
when the interval_unit is yearly.
januaryfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecembercountobject
The total number of payments that should be taken by this subscription.
payment_referencestring
An optional payment reference. This will be set as the reference on each payment
created and will appear on your customer's bank statement. See the documentation for
the create payment endpoint for more details.
Restricted: You need your own Service User Number to specify a payment reference for Bacs payments.
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_customer_approval: the subscription is waiting for customer approval before becoming activecustomer_approval_denied: the customer did not approve the subscriptionactive: the subscription is currently active and will continue to create paymentsfinished: all of the payments scheduled for creation under this subscription have been createdcancelled: the subscription has been cancelled and will no longer create paymentspaused: the subscription has been paused and will not create payments
pending_customer_approvalcustomer_approval_deniedactivefinishedcancelledpausedupcoming_paymentsarray
Up to 10 upcoming payments with their amounts and charge dates.
2 properties
charge_datestring
The date on which this payment will be charged.
amountobject
The amount of this payment, in minor unit (e.g. pence in GBP, cents in EUR).
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).
linksobject
1 properties
mandatestring
ID of the associated mandate which the subscription will create payments against.
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.
earliest_charge_date_after_resumestring
The earliest date that will be used as a charge_date on payments
created for this subscription if it is resumed. Only present for paused subscriptions.
This value will change over time.
parent_plan_pausedboolean
Whether the parent plan of this subscription is paused.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobject