diff --git a/package-lock.json b/package-lock.json
index 022e806b..619e6e7e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -773,9 +773,9 @@
}
},
"node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": {
- "version": "3.14.2",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz",
- "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==",
+ "version": "3.15.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.0.tgz",
+ "integrity": "sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1289,14 +1289,14 @@
}
},
"node_modules/@napi-rs/wasm-runtime": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.5.tgz",
- "integrity": "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==",
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz",
+ "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
- "@tybys/wasm-util": "^0.10.2"
+ "@tybys/wasm-util": "^0.10.3"
},
"funding": {
"type": "github",
@@ -1513,9 +1513,9 @@
}
},
"node_modules/@tybys/wasm-util": {
- "version": "0.10.2",
- "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz",
- "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==",
+ "version": "0.10.3",
+ "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz",
+ "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==",
"dev": true,
"license": "MIT",
"optional": true,
@@ -1911,9 +1911,9 @@
}
},
"node_modules/@ungap/structured-clone": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.1.tgz",
- "integrity": "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==",
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.2.tgz",
+ "integrity": "sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==",
"dev": true,
"license": "ISC"
},
@@ -2231,9 +2231,9 @@
]
},
"node_modules/acorn": {
- "version": "8.16.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
- "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
+ "version": "8.17.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz",
+ "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==",
"dev": true,
"license": "MIT",
"bin": {
@@ -2486,9 +2486,9 @@
"license": "MIT"
},
"node_modules/baseline-browser-mapping": {
- "version": "2.10.35",
- "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.35.tgz",
- "integrity": "sha512-honAfLBde0HAFLdNyBEfuuENkF6zR+ozxqxa/2zJKHBe1qzLqyTSeRKpdPEHAP03rlDGyQOPnCSxnVpVqQo9Mg==",
+ "version": "2.10.42",
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.42.tgz",
+ "integrity": "sha512-c/jurFrDLyui7o1J86yLkRu4LMsTYcBohveus7/I2Hzdn9KIP2bdJPTue/lR1KH46enoPbD77GKeSYNdyPoD3Q==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -2530,9 +2530,9 @@
}
},
"node_modules/browserslist": {
- "version": "4.28.2",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
- "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==",
+ "version": "4.28.5",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.5.tgz",
+ "integrity": "sha512-Cu2E6QejHWzuDMTkuwgpABFgDfZrXLQq5V13YOACZx4mFAG4IwGTbTfHPMr4WtxlHoXSM8FIuRwYYCz5XiabaQ==",
"dev": true,
"funding": [
{
@@ -2550,10 +2550,10 @@
],
"license": "MIT",
"dependencies": {
- "baseline-browser-mapping": "^2.10.12",
- "caniuse-lite": "^1.0.30001782",
- "electron-to-chromium": "^1.5.328",
- "node-releases": "^2.0.36",
+ "baseline-browser-mapping": "^2.10.42",
+ "caniuse-lite": "^1.0.30001800",
+ "electron-to-chromium": "^1.5.387",
+ "node-releases": "^2.0.50",
"update-browserslist-db": "^1.2.3"
},
"bin": {
@@ -2715,9 +2715,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001797",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001797.tgz",
- "integrity": "sha512-l8xKG+gwAIExZGl9FrF7KUwuOmk6wbEPC9Xoy/RtnWv1XG0Q4LFlagaLpUv3Kiza3W/wm27zy0yWJEieYKAP6w==",
+ "version": "1.0.30001803",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001803.tgz",
+ "integrity": "sha512-g/uHREV2ZpK9qMalCsWaxmA6ol+DX8GYhuf3T40RKoP+oL7vhRJh8LNt73PCjpnR6l14FzfPrB5Yux4PKm2meg==",
"dev": true,
"funding": [
{
@@ -3102,9 +3102,9 @@
"license": "MIT"
},
"node_modules/electron-to-chromium": {
- "version": "1.5.371",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.371.tgz",
- "integrity": "sha512-e9htk9mAYL6AzmkEhSvVVw7IWGSBJ/Bqdn2eRyRLrj1g6sncN4WbFt5qnILYoCktktr45pyjIrOiRvBThQ808w==",
+ "version": "1.5.388",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.388.tgz",
+ "integrity": "sha512-Pl/aJaqOOxYxda3vcx1IKSJimwYXHDkEnGn0F+kG2EE68dDtx2uCinaS+Vih8Z91B9t8CSAbiF/HKyWcnXjhzw==",
"dev": true,
"license": "ISC"
},
@@ -4917,9 +4917,9 @@
"license": "MIT"
},
"node_modules/js-yaml": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
- "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
+ "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
"dev": true,
"funding": [
{
@@ -5422,9 +5422,9 @@
"license": "MIT"
},
"node_modules/node-releases": {
- "version": "2.0.47",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.47.tgz",
- "integrity": "sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og==",
+ "version": "2.0.50",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.50.tgz",
+ "integrity": "sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5683,9 +5683,9 @@
"license": "ISC"
},
"node_modules/picomatch": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
- "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
+ "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6259,12 +6259,13 @@
"license": "MIT"
},
"node_modules/qs": {
- "version": "6.15.2",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz",
- "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==",
+ "version": "6.15.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz",
+ "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==",
"license": "BSD-3-Clause",
"dependencies": {
- "side-channel": "^1.1.0"
+ "es-define-property": "^1.0.1",
+ "side-channel": "^1.1.1"
},
"engines": {
"node": ">=0.6"
@@ -6489,9 +6490,9 @@
"license": "ISC"
},
"node_modules/semver": {
- "version": "7.8.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz",
- "integrity": "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==",
+ "version": "7.8.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
"dev": true,
"license": "ISC",
"bin": {
@@ -7160,9 +7161,9 @@
}
},
"node_modules/uuid": {
- "version": "14.0.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz",
- "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==",
+ "version": "14.0.1",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.1.tgz",
+ "integrity": "sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
@@ -7428,9 +7429,9 @@
"license": "ISC"
},
"node_modules/yargs": {
- "version": "17.7.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
- "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "version": "17.7.3",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz",
+ "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==",
"dev": true,
"license": "MIT",
"dependencies": {
diff --git a/src/services/billingRequestTemplateService.ts b/src/services/billingRequestTemplateService.ts
index 40404c3d..203e1b1b 100644
--- a/src/services/billingRequestTemplateService.ts
+++ b/src/services/billingRequestTemplateService.ts
@@ -64,33 +64,9 @@ interface BillingRequestTemplateCreateRequest {
mandate_request_scheme?: string;
- // Verification preference for the mandate. One of:
- //
- // - `minimum`: only verify if absolutely required, such as when part of
- // scheme rules
- // - `recommended`: in addition to `minimum`, use the GoCardless payment
- // intelligence solution to decide if a payer should be verified
- // - `when_available`: if verification mechanisms are available, use
- // them
- // - `always`: as `when_available`, but fail to create the Billing Request
- // if a mechanism isn't available
- //
- //
- // By default, all Billing Requests use the `recommended` verification
- // preference. It uses GoCardless payment intelligence solution to determine if
- // a payer is fraudulent or not. The verification mechanism is based on the
- // response and the payer may be asked to verify themselves. If the feature is
- // not available, `recommended` behaves like `minimum`.
- //
- // If you never wish to take advantage of our reduced risk products and Verified
- // Mandates as they are released in new schemes, please use the `minimum`
- // verification preference.
- //
- // See [Billing Requests: Creating Verified
- // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/)
- // for more information.
+ // Verification preference for the mandate.
- mandate_request_verify?: `${Types.BillingRequestTemplateMandateRequestVerify}`;
+ mandate_request_verify?: string;
// 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.
@@ -168,33 +144,9 @@ interface BillingRequestTemplateUpdateRequest {
mandate_request_scheme?: string;
- // Verification preference for the mandate. One of:
- //
- // - `minimum`: only verify if absolutely required, such as when part of
- // scheme rules
- // - `recommended`: in addition to `minimum`, use the GoCardless payment
- // intelligence solution to decide if a payer should be verified
- // - `when_available`: if verification mechanisms are available, use
- // them
- // - `always`: as `when_available`, but fail to create the Billing Request
- // if a mechanism isn't available
- //
- //
- // By default, all Billing Requests use the `recommended` verification
- // preference. It uses GoCardless payment intelligence solution to determine if
- // a payer is fraudulent or not. The verification mechanism is based on the
- // response and the payer may be asked to verify themselves. If the feature is
- // not available, `recommended` behaves like `minimum`.
- //
- // If you never wish to take advantage of our reduced risk products and Verified
- // Mandates as they are released in new schemes, please use the `minimum`
- // verification preference.
- //
- // See [Billing Requests: Creating Verified
- // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/)
- // for more information.
+ // Verification preference for the mandate.
- mandate_request_verify?: `${Types.BillingRequestTemplateMandateRequestVerify}`;
+ mandate_request_verify?: string;
// 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.
diff --git a/src/services/paymentService.ts b/src/services/paymentService.ts
index bbd3408d..40f6a47b 100644
--- a/src/services/paymentService.ts
+++ b/src/services/paymentService.ts
@@ -11,6 +11,10 @@ interface PaymentListResponse extends Types.APIResponse {
interface PaymentCreateRequest {
// Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents
// in EUR).
+ //
+ // For Variable Recurring Payments (VRP), this must not exceed the mandate's
+ // `max_amount_per_payment`
+ // constraint.
amount: string;
diff --git a/src/types/Types.ts b/src/types/Types.ts
index 6bd0d737..f8bbf7cb 100644
--- a/src/types/Types.ts
+++ b/src/types/Types.ts
@@ -698,6 +698,10 @@ export type BillingRequestInstalmentScheduleRequest = {
export type BillingRequestInstalmentScheduleRequestInstalmentsWithDate = {
// Amount, in the lowest denomination for the currency (e.g. pence in GBP,
// cents in EUR).
+ //
+ // For Variable Recurring Payments (VRP), this must not exceed the mandate's
+ // `max_amount_per_payment`
+ // constraint.
amount: string;
// A future date on which the payment should be collected. If the date
@@ -931,17 +935,27 @@ export type BillingRequestMandateRequestConstraints = {
//
end_date?: string;
- // The maximum amount that can be charged for a single payment. Required for
- // PayTo and VRP.
+ // The maximum amount that can be charged for a single payment in the lowest
+ // denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_
+ // Required for PayTo and VRP.
max_amount_per_payment?: number;
// A constraint where you can specify info (free text string) about how
- // payments are calculated. _Note:_ This is only supported for ACH and PAD
- // schemes.
+ // payments are calculated. For use when payments vary and cannot be expressed
+ // as a fixed amount and frequency. _Note:_ This is only supported for ACH and
+ // PAD schemes.
//
payment_method?: string;
- // List of periodic limits and constraints which apply to them
+ // Caps on the total amount and/or number of payments that can be collected
+ // within a
+ // repeating period (e.g. no more than a set amount per month), as opposed to
+ // `max_amount_per_payment` which caps a single payment.
+ //
+ // _Note:_ Required for VRP, where exactly one periodic limit must be
+ // provided. Optional for
+ // PayTo.
+ //
periodic_limits?: BillingRequestMandateRequestConstraintsPeriodicLimit[];
// The date from which payments can be taken.
@@ -955,32 +969,54 @@ export type BillingRequestMandateRequestConstraints = {
/** Type for a billingrequestmandaterequestconstraintsperiodiclimit resource. */
export type BillingRequestMandateRequestConstraintsPeriodicLimit = {
- // The alignment of the period.
- //
- // `calendar` - this will finish on the end of the current period. For example
- // this will expire on the Monday for the current week or the January for the
- // next year.
- //
- // `creation_date` - this will finish on the next instance of the current
- // period. For example Monthly it will expire on the same day of the next
- // month, or yearly the same day of the next year.
+ // The alignment of the period. Defaults to `creation_date` if not specified.
+ //
+ // `calendar` - the period follows fixed calendar boundaries, the same for
+ // every mandate:
+ // `week` runs Monday to Sunday, `month` runs from the 1st to the last day of
+ // the calendar
+ // month, and `year` runs from 1 January to 31 December. If the mandate starts
+ // partway
+ // through a period, the limit for that first period is reduced proportionally
+ // to the days
+ // remaining (e.g. a monthly limit starting on the 15th gives roughly half the
+ // limit for
+ // that first month).
+ //
+ // `creation_date` - the period follows the mandate's own start date rather
+ // than the
+ // calendar. For example, if the mandate starts on the 15th, each monthly
+ // period runs from
+ // the 15th to the 14th of the following month. The first period is a full
+ // period, not
+ // reduced proportionally.
+ //
+ // _Note:_ Has no effect when period is `flexible`.
//
alignment?: `${BillingRequestMandateRequestConstraintsPeriodicLimitAlignment}`;
// The maximum number of payments that can be collected in this periodic
// limit.
- // _Note:_ This is only supported for the PayTo scheme, where it is required.
+ //
+ // _Note:_ Only supported for the PayTo scheme, where it is optional.
//
max_payments?: number;
// The maximum total amount that can be charged for all payments in this
- // periodic limit.
- // Required for VRP.
+ // periodic limit,
+ // in the lowest denomination for the currency (e.g. pence in GBP, cents in
+ // EUR).
+ //
+ // _Note:_ Required for VRP. This is not permitted for the PayTo scheme.
//
max_total_amount?: number;
- // The repeating period for this mandate. Defaults to flexible for PayTo if
- // not specified.
+ // The repeating period for this mandate. Required whenever a periodic limit
+ // is provided
+ // (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo,
+ // this
+ // defaults to flexible.
+ //
period?: `${BillingRequestMandateRequestConstraintsPeriodicLimitPeriod}`;
};
@@ -1552,7 +1588,7 @@ export type BillingRequestTemplate = {
// [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency
// code.
- mandate_request_currency?: string;
+ mandate_request_currency?: string | null;
// A human-readable description of the payment and/or mandate. This will be
// displayed to the payer when authorising the billing request.
@@ -1571,32 +1607,8 @@ export type BillingRequestTemplate = {
// from a list of your available schemes.
mandate_request_scheme?: string | null;
- // Verification preference for the mandate. One of:
- //
- // - `minimum`: only verify if absolutely required, such as when part of
- // scheme rules
- // - `recommended`: in addition to `minimum`, use the GoCardless payment
- // intelligence solution to decide if a payer should be verified
- // - `when_available`: if verification mechanisms are available, use
- // them
- // - `always`: as `when_available`, but fail to create the Billing Request
- // if a mechanism isn't available
- //
- //
- // By default, all Billing Requests use the `recommended` verification
- // preference. It uses GoCardless payment intelligence solution to determine
- // if a payer is fraudulent or not. The verification mechanism is based on the
- // response and the payer may be asked to verify themselves. If the feature is
- // not available, `recommended` behaves like `minimum`.
- //
- // If you never wish to take advantage of our reduced risk products and
- // Verified Mandates as they are released in new schemes, please use the
- // `minimum` verification preference.
- //
- // See [Billing Requests: Creating Verified
- // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/)
- // for more information.
- mandate_request_verify?: `${BillingRequestTemplateMandateRequestVerify}`;
+ // Verification preference for the mandate.
+ mandate_request_verify?: string | null;
// 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.
@@ -1607,12 +1619,12 @@ export type BillingRequestTemplate = {
name?: string;
// Amount in full.
- payment_request_amount?: string;
+ payment_request_amount?: string | null;
// [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency
// code. `GBP` and `EUR` supported; `GBP` with your customers in the UK and
// for `EUR` with your customers in supported Eurozone countries only.
- payment_request_currency?: string;
+ payment_request_currency?: string | null;
// A human-readable description of the payment and/or mandate. This will be
// displayed to the payer when authorising the billing request.
@@ -1647,13 +1659,6 @@ export type BillingRequestTemplateCreateRequestLinks = {
creditor?: string;
};
-export enum BillingRequestTemplateMandateRequestVerify {
- Minimum = 'minimum',
- Recommended = 'recommended',
- WhenAvailable = 'when_available',
- Always = 'always',
-}
-
/** Type for a billingrequesttemplatemandaterequestconstraints resource. */
export type BillingRequestTemplateMandateRequestConstraints = {
// The latest date at which payments can be taken, must occur after start_date
@@ -1667,17 +1672,27 @@ export type BillingRequestTemplateMandateRequestConstraints = {
//
end_date?: string;
- // The maximum amount that can be charged for a single payment. Required for
- // PayTo and VRP.
+ // The maximum amount that can be charged for a single payment in the lowest
+ // denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_
+ // Required for PayTo and VRP.
max_amount_per_payment?: number;
// A constraint where you can specify info (free text string) about how
- // payments are calculated. _Note:_ This is only supported for ACH and PAD
- // schemes.
+ // payments are calculated. For use when payments vary and cannot be expressed
+ // as a fixed amount and frequency. _Note:_ This is only supported for ACH and
+ // PAD schemes.
//
payment_method?: string;
- // List of periodic limits and constraints which apply to them
+ // Caps on the total amount and/or number of payments that can be collected
+ // within a
+ // repeating period (e.g. no more than a set amount per month), as opposed to
+ // `max_amount_per_payment` which caps a single payment.
+ //
+ // _Note:_ Required for VRP, where exactly one periodic limit must be
+ // provided. Optional for
+ // PayTo.
+ //
periodic_limits?: BillingRequestTemplateMandateRequestConstraintsPeriodicLimit[];
// The date from which payments can be taken.
@@ -1691,32 +1706,54 @@ export type BillingRequestTemplateMandateRequestConstraints = {
/** Type for a billingrequesttemplatemandaterequestconstraintsperiodiclimit resource. */
export type BillingRequestTemplateMandateRequestConstraintsPeriodicLimit = {
- // The alignment of the period.
- //
- // `calendar` - this will finish on the end of the current period. For example
- // this will expire on the Monday for the current week or the January for the
- // next year.
- //
- // `creation_date` - this will finish on the next instance of the current
- // period. For example Monthly it will expire on the same day of the next
- // month, or yearly the same day of the next year.
+ // The alignment of the period. Defaults to `creation_date` if not specified.
+ //
+ // `calendar` - the period follows fixed calendar boundaries, the same for
+ // every mandate:
+ // `week` runs Monday to Sunday, `month` runs from the 1st to the last day of
+ // the calendar
+ // month, and `year` runs from 1 January to 31 December. If the mandate starts
+ // partway
+ // through a period, the limit for that first period is reduced proportionally
+ // to the days
+ // remaining (e.g. a monthly limit starting on the 15th gives roughly half the
+ // limit for
+ // that first month).
+ //
+ // `creation_date` - the period follows the mandate's own start date rather
+ // than the
+ // calendar. For example, if the mandate starts on the 15th, each monthly
+ // period runs from
+ // the 15th to the 14th of the following month. The first period is a full
+ // period, not
+ // reduced proportionally.
+ //
+ // _Note:_ Has no effect when period is `flexible`.
//
alignment?: `${BillingRequestTemplateMandateRequestConstraintsPeriodicLimitAlignment}`;
// The maximum number of payments that can be collected in this periodic
// limit.
- // _Note:_ This is only supported for the PayTo scheme, where it is required.
+ //
+ // _Note:_ Only supported for the PayTo scheme, where it is optional.
//
max_payments?: number;
// The maximum total amount that can be charged for all payments in this
- // periodic limit.
- // Required for VRP.
+ // periodic limit,
+ // in the lowest denomination for the currency (e.g. pence in GBP, cents in
+ // EUR).
+ //
+ // _Note:_ Required for VRP. This is not permitted for the PayTo scheme.
//
max_total_amount?: number;
- // The repeating period for this mandate. Defaults to flexible for PayTo if
- // not specified.
+ // The repeating period for this mandate. Required whenever a periodic limit
+ // is provided
+ // (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo,
+ // this
+ // defaults to flexible.
+ //
period?: `${BillingRequestTemplateMandateRequestConstraintsPeriodicLimitPeriod}`;
};
@@ -2089,17 +2126,27 @@ export type BillingRequestWithActionMandateRequestConstraints = {
//
end_date?: string;
- // The maximum amount that can be charged for a single payment. Required for
- // PayTo and VRP.
+ // The maximum amount that can be charged for a single payment in the lowest
+ // denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_
+ // Required for PayTo and VRP.
max_amount_per_payment?: number;
// A constraint where you can specify info (free text string) about how
- // payments are calculated. _Note:_ This is only supported for ACH and PAD
- // schemes.
+ // payments are calculated. For use when payments vary and cannot be expressed
+ // as a fixed amount and frequency. _Note:_ This is only supported for ACH and
+ // PAD schemes.
//
payment_method?: string;
- // List of periodic limits and constraints which apply to them
+ // Caps on the total amount and/or number of payments that can be collected
+ // within a
+ // repeating period (e.g. no more than a set amount per month), as opposed to
+ // `max_amount_per_payment` which caps a single payment.
+ //
+ // _Note:_ Required for VRP, where exactly one periodic limit must be
+ // provided. Optional for
+ // PayTo.
+ //
periodic_limits?: BillingRequestWithActionMandateRequestConstraintsPeriodicLimit[];
// The date from which payments can be taken.
@@ -2113,32 +2160,54 @@ export type BillingRequestWithActionMandateRequestConstraints = {
/** Type for a billingrequestwithactionmandaterequestconstraintsperiodiclimit resource. */
export type BillingRequestWithActionMandateRequestConstraintsPeriodicLimit = {
- // The alignment of the period.
- //
- // `calendar` - this will finish on the end of the current period. For example
- // this will expire on the Monday for the current week or the January for the
- // next year.
- //
- // `creation_date` - this will finish on the next instance of the current
- // period. For example Monthly it will expire on the same day of the next
- // month, or yearly the same day of the next year.
+ // The alignment of the period. Defaults to `creation_date` if not specified.
+ //
+ // `calendar` - the period follows fixed calendar boundaries, the same for
+ // every mandate:
+ // `week` runs Monday to Sunday, `month` runs from the 1st to the last day of
+ // the calendar
+ // month, and `year` runs from 1 January to 31 December. If the mandate starts
+ // partway
+ // through a period, the limit for that first period is reduced proportionally
+ // to the days
+ // remaining (e.g. a monthly limit starting on the 15th gives roughly half the
+ // limit for
+ // that first month).
+ //
+ // `creation_date` - the period follows the mandate's own start date rather
+ // than the
+ // calendar. For example, if the mandate starts on the 15th, each monthly
+ // period runs from
+ // the 15th to the 14th of the following month. The first period is a full
+ // period, not
+ // reduced proportionally.
+ //
+ // _Note:_ Has no effect when period is `flexible`.
//
alignment?: `${BillingRequestWithActionMandateRequestConstraintsPeriodicLimitAlignment}`;
// The maximum number of payments that can be collected in this periodic
// limit.
- // _Note:_ This is only supported for the PayTo scheme, where it is required.
+ //
+ // _Note:_ Only supported for the PayTo scheme, where it is optional.
//
max_payments?: number;
// The maximum total amount that can be charged for all payments in this
- // periodic limit.
- // Required for VRP.
+ // periodic limit,
+ // in the lowest denomination for the currency (e.g. pence in GBP, cents in
+ // EUR).
+ //
+ // _Note:_ Required for VRP. This is not permitted for the PayTo scheme.
//
max_total_amount?: number;
- // The repeating period for this mandate. Defaults to flexible for PayTo if
- // not specified.
+ // The repeating period for this mandate. Required whenever a periodic limit
+ // is provided
+ // (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo,
+ // this
+ // defaults to flexible.
+ //
period?: `${BillingRequestWithActionMandateRequestConstraintsPeriodicLimitPeriod}`;
};
@@ -2820,6 +2889,10 @@ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequest = {
export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithDate = {
// Amount, in the lowest denomination for the currency (e.g. pence in GBP,
// cents in EUR).
+ //
+ // For Variable Recurring Payments (VRP), this must not exceed the mandate's
+ // `max_amount_per_payment`
+ // constraint.
amount: string;
// A future date on which the payment should be collected. If the date
@@ -3053,17 +3126,27 @@ export type BillingRequestWithActionBillingRequestsMandateRequestConstraints = {
//
end_date?: string;
- // The maximum amount that can be charged for a single payment. Required for
- // PayTo and VRP.
+ // The maximum amount that can be charged for a single payment in the lowest
+ // denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_
+ // Required for PayTo and VRP.
max_amount_per_payment?: number;
// A constraint where you can specify info (free text string) about how
- // payments are calculated. _Note:_ This is only supported for ACH and PAD
- // schemes.
+ // payments are calculated. For use when payments vary and cannot be expressed
+ // as a fixed amount and frequency. _Note:_ This is only supported for ACH and
+ // PAD schemes.
//
payment_method?: string;
- // List of periodic limits and constraints which apply to them
+ // Caps on the total amount and/or number of payments that can be collected
+ // within a
+ // repeating period (e.g. no more than a set amount per month), as opposed to
+ // `max_amount_per_payment` which caps a single payment.
+ //
+ // _Note:_ Required for VRP, where exactly one periodic limit must be
+ // provided. Optional for
+ // PayTo.
+ //
periodic_limits?: BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimit[];
// The date from which payments can be taken.
@@ -3077,32 +3160,54 @@ export type BillingRequestWithActionBillingRequestsMandateRequestConstraints = {
/** Type for a billingrequestwithactionbillingrequestsmandaterequestconstraintsperiodiclimit resource. */
export type BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimit = {
- // The alignment of the period.
- //
- // `calendar` - this will finish on the end of the current period. For example
- // this will expire on the Monday for the current week or the January for the
- // next year.
- //
- // `creation_date` - this will finish on the next instance of the current
- // period. For example Monthly it will expire on the same day of the next
- // month, or yearly the same day of the next year.
+ // The alignment of the period. Defaults to `creation_date` if not specified.
+ //
+ // `calendar` - the period follows fixed calendar boundaries, the same for
+ // every mandate:
+ // `week` runs Monday to Sunday, `month` runs from the 1st to the last day of
+ // the calendar
+ // month, and `year` runs from 1 January to 31 December. If the mandate starts
+ // partway
+ // through a period, the limit for that first period is reduced proportionally
+ // to the days
+ // remaining (e.g. a monthly limit starting on the 15th gives roughly half the
+ // limit for
+ // that first month).
+ //
+ // `creation_date` - the period follows the mandate's own start date rather
+ // than the
+ // calendar. For example, if the mandate starts on the 15th, each monthly
+ // period runs from
+ // the 15th to the 14th of the following month. The first period is a full
+ // period, not
+ // reduced proportionally.
+ //
+ // _Note:_ Has no effect when period is `flexible`.
//
alignment?: `${BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimitAlignment}`;
// The maximum number of payments that can be collected in this periodic
// limit.
- // _Note:_ This is only supported for the PayTo scheme, where it is required.
+ //
+ // _Note:_ Only supported for the PayTo scheme, where it is optional.
//
max_payments?: number;
// The maximum total amount that can be charged for all payments in this
- // periodic limit.
- // Required for VRP.
+ // periodic limit,
+ // in the lowest denomination for the currency (e.g. pence in GBP, cents in
+ // EUR).
+ //
+ // _Note:_ Required for VRP. This is not permitted for the PayTo scheme.
//
max_total_amount?: number;
- // The repeating period for this mandate. Defaults to flexible for PayTo if
- // not specified.
+ // The repeating period for this mandate. Required whenever a periodic limit
+ // is provided
+ // (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo,
+ // this
+ // defaults to flexible.
+ //
period?: `${BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimitPeriod}`;
};
@@ -4574,6 +4679,7 @@ export enum ExportExportType {
PartnerFees = 'partner_fees',
PaymentsImportTemplate = 'payments_import_template',
PaymentAccountStatement = 'payment_account_statement',
+ OutboundPaymentsIndex = 'outbound_payments_index',
}
/** Type for a fundsavailability resource. */
@@ -4654,6 +4760,10 @@ export enum InstalmentScheduleCurrency {
export type InstalmentScheduleInstalment = {
// Amount, in the lowest denomination for the currency (e.g. pence in GBP,
// cents in EUR).
+ //
+ // For Variable Recurring Payments (VRP), this must not exceed the mandate's
+ // `max_amount_per_payment`
+ // constraint.
amount: string;
// A future date on which the payment should be collected. If the date
@@ -6028,6 +6138,10 @@ export type PayerThemeCreateForCreditorRequestLinks = {
export type Payment = {
// Amount, in the lowest denomination for the currency (e.g. pence in GBP,
// cents in EUR).
+ //
+ // For Variable Recurring Payments (VRP), this must not exceed the mandate's
+ // `max_amount_per_payment`
+ // constraint.
amount?: string;
// Amount [refunded](#core-endpoints-refunds), in the lowest denomination for
@@ -7498,6 +7612,9 @@ export type VerificationDetail = {
// The company's registration number.
company_number?: string;
+ // The country code of the company's address.
+ country_code?: string;
+
// A summary describing what the company does.
description?: string;
@@ -7512,6 +7629,9 @@ export type VerificationDetail = {
// The company's postal code.
postal_code?: string;
+
+ // The region of the company's address.
+ region?: string | null;
};
/** Type for a verificationdetailcreaterequestlinks resource. */