diff --git a/README.md b/README.md index 34b0ddd..1888674 100644 --- a/README.md +++ b/README.md @@ -86,4 +86,3 @@ for await (const payment of client.payments.all()) { ### Available client options - `raiseOnIdempotencyConflict`: set to `true` to raise exceptions on [idempotency](https://developer.gocardless.com/api-reference/#making-requests-idempotency-keys) conflicts. Defaults to `false`. - diff --git a/package-lock.json b/package-lock.json index b8a8cf3..621dd2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gocardless-nodejs", - "version": "7.0.0", + "version": "7.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gocardless-nodejs", - "version": "7.0.0", + "version": "7.1.0", "license": "MIT", "dependencies": { "buffer-equal-constant-time": "1.0.1", @@ -36,13 +36,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -51,9 +51,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", - "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", "dev": true, "license": "MIT", "engines": { @@ -61,22 +61,21 @@ } }, "node_modules/@babel/core": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", - "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.28.3", - "@babel/helpers": "^7.28.4", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.5", - "@babel/types": "^7.28.5", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -103,14 +102,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", - "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.5", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -120,13 +119,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", - "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.2", + "@babel/compat-data": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -157,29 +156,29 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", - "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", - "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.28.3" + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -189,9 +188,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", - "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", "dev": true, "license": "MIT", "engines": { @@ -229,27 +228,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", - "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz", + "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4" + "@babel/template": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", - "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz", + "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.28.5" + "@babel/types": "^7.29.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -314,13 +313,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", - "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", + "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -356,13 +355,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", - "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz", + "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -482,13 +481,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", - "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz", + "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -498,33 +497,33 @@ } }, "node_modules/@babel/template": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", - "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", - "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", "debug": "^4.3.1" }, "engines": { @@ -532,9 +531,9 @@ } }, "node_modules/@babel/types": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", - "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "dev": true, "license": "MIT", "dependencies": { @@ -553,9 +552,9 @@ "license": "MIT" }, "node_modules/@emnapi/core": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.7.1.tgz", - "integrity": "sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.8.1.tgz", + "integrity": "sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==", "dev": true, "license": "MIT", "optional": true, @@ -565,9 +564,9 @@ } }, "node_modules/@emnapi/runtime": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz", - "integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", + "integrity": "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==", "dev": true, "license": "MIT", "optional": true, @@ -587,9 +586,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1460,9 +1459,9 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.34.45", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.45.tgz", - "integrity": "sha512-qJcFVfCa5jxBFSuv7S5WYbA8XdeCPmhnaVVfX/2Y6L8WYg8sk3XY2+6W0zH+3mq1Cz+YC7Ki66HfqX6IHAwnkg==", + "version": "0.34.48", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.48.tgz", + "integrity": "sha512-kKJTNuK3AQOrgjjotVxMrCn1sUJwM76wMszfq1kdU4uYVJjvEWuFQ6HgvLt4Xz3fSmZlTOxJ/Ie13KnIcWQXFA==", "dev": true, "license": "MIT" }, @@ -1597,9 +1596,9 @@ "license": "MIT" }, "node_modules/@types/http-cache-semantics": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", - "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==", "license": "MIT" }, "node_modules/@types/istanbul-lib-coverage": { @@ -1753,7 +1752,6 @@ "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "5.62.0", "@typescript-eslint/types": "5.62.0", @@ -2191,7 +2189,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2429,9 +2426,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.9.11", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.11.tgz", - "integrity": "sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==", + "version": "2.9.19", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", + "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2489,7 +2486,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -2662,9 +2658,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001762", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001762.tgz", - "integrity": "sha512-PxZwGNvH7Ak8WX5iXzoK1KPZttBXNPuaOvI2ZYU7NrlM+d9Ov+TUvlLOBNGzVXAntMSMMlJPd+jY6ovrVjSmUw==", + "version": "1.0.30001769", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", + "integrity": "sha512-BCfFL1sHijQlBGWBMuJyhZUhzo7wer5sVj9hqekB/7xn0Ypy+pER/edCYQm4exbXj4WiySGp40P8UuTh6w1srg==", "dev": true, "funding": [ { @@ -2710,9 +2706,9 @@ } }, "node_modules/ci-info": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", - "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.4.0.tgz", + "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", "dev": true, "funding": [ { @@ -2726,9 +2722,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.1.1.tgz", - "integrity": "sha512-+CmxIZ/L2vNcEfvNtLdU0ZQ6mbq3FZnwAP2PPTiKP+1QOoKwlKlPgb8UKV0Dds7QVaMnHm+FwSft2VB0s/SLjQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz", + "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==", "dev": true, "license": "MIT" }, @@ -2862,9 +2858,9 @@ "license": "MIT" }, "node_modules/core-js": { - "version": "3.47.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.47.0.tgz", - "integrity": "sha512-c3Q2VVkGAUyupsjRnaNX6u8Dq2vAdzm9iuPj5FW0fRxzlxgq9Q39MDq10IvmQSpLgHQNyQzQmOo6bgGHmH3NNg==", + "version": "3.48.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.48.0.tgz", + "integrity": "sha512-zpEHTy1fjTMZCKLHUZoVeylt9XrzaIN2rbPXEt0k+q7JE5CkCZdo6bNq55bn24a69CH7ErAVLKijxJja4fw+UQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3049,9 +3045,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.267", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz", - "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==", + "version": "1.5.286", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", + "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", "dev": true, "license": "ISC" }, @@ -3154,7 +3150,6 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -3327,9 +3322,9 @@ } }, "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -3754,6 +3749,7 @@ "version": "10.5.0", "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -4282,7 +4278,6 @@ "integrity": "sha512-F26gjC0yWN8uAA5m5Ss8ZQf5nDHWGlN/xWZIh8S5SRbsEKBovwZhxGd6LJlbZYxBgCYOtreSUyb8hpXyGC5O4A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@jest/core": "30.2.0", "@jest/types": "30.2.0", @@ -5007,9 +5002,9 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", "license": "MIT" }, "node_modules/lodash.memoize": { @@ -5724,7 +5719,6 @@ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin-prettier.js" }, @@ -5865,7 +5859,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -6193,9 +6187,9 @@ "license": "MIT" }, "node_modules/qs": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", - "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -6354,7 +6348,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -6414,9 +6408,9 @@ "license": "ISC" }, "node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -6760,9 +6754,9 @@ } }, "node_modules/synckit": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", - "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", + "version": "0.11.12", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.12.tgz", + "integrity": "sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6794,7 +6788,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -6977,7 +6971,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index f24a9c3..68bf43b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gocardless-nodejs", - "version": "7.0.0", + "version": "7.1.0", "description": "Node.js client for the GoCardless API - a powerful, simple solution for the collection of recurring bank-to-bank payments", "author": "GoCardless Ltd ", "repository": { diff --git a/src/client.ts b/src/client.ts index dd5a774..ed1868c 100644 --- a/src/client.ts +++ b/src/client.ts @@ -20,6 +20,7 @@ import { CustomerBankAccountService } from './services/customerBankAccountServic import { CustomerNotificationService } from './services/customerNotificationService'; import { EventService } from './services/eventService'; import { ExportService } from './services/exportService'; +import { FundsAvailabilityService } from './services/fundsAvailabilityService'; import { InstalmentScheduleService } from './services/instalmentScheduleService'; import { InstitutionService } from './services/institutionService'; import { LogoService } from './services/logoService'; @@ -67,6 +68,7 @@ export class GoCardlessClient { private _customerNotifications: CustomerNotificationService; private _events: EventService; private _exports: ExportService; + private _fundsAvailabilities: FundsAvailabilityService; private _instalmentSchedules: InstalmentScheduleService; private _institutions: InstitutionService; private _logos: LogoService; @@ -114,6 +116,7 @@ export class GoCardlessClient { this._customerNotifications = undefined; this._events = undefined; this._exports = undefined; + this._fundsAvailabilities = undefined; this._instalmentSchedules = undefined; this._institutions = undefined; this._logos = undefined; @@ -285,6 +288,14 @@ export class GoCardlessClient { return this._exports; } + get fundsAvailabilities(): FundsAvailabilityService { + if (!this._fundsAvailabilities) { + this._fundsAvailabilities = new FundsAvailabilityService(this._api); + } + + return this._fundsAvailabilities; + } + get instalmentSchedules(): InstalmentScheduleService { if (!this._instalmentSchedules) { this._instalmentSchedules = new InstalmentScheduleService(this._api); diff --git a/src/constants.ts b/src/constants.ts index ecd1ac8..fbc1f54 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -5,7 +5,7 @@ enum Environments { Sandbox = 'SANDBOX', } -const CLIENT_VERSION = '7.0.0'; +const CLIENT_VERSION = '7.1.0'; const API_VERSION = '2015-07-06'; export { Environments, CLIENT_VERSION, API_VERSION }; diff --git a/src/services/balanceService.ts b/src/services/balanceService.ts index ba8dc4e..2c87c60 100644 --- a/src/services/balanceService.ts +++ b/src/services/balanceService.ts @@ -11,19 +11,19 @@ interface BalanceListResponse extends Types.APIResponse { } interface BalanceListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // ID of a [creditor](#core-endpoints-creditors). + // ID of a [creditor](#core-endpoints-creditors). creditor: string; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/bankAccountHolderVerificationService.ts b/src/services/bankAccountHolderVerificationService.ts index 273cc9c..32c1dd4 100644 --- a/src/services/bankAccountHolderVerificationService.ts +++ b/src/services/bankAccountHolderVerificationService.ts @@ -14,9 +14,9 @@ interface BankAccountHolderVerificationCreateRequest { // Resources linked to this BankAccountHolderVerification. links: Types.BankAccountHolderVerificationCreateRequestLinks; - // Type of the verification that has been performed - // eg. [Confirmation of - // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) + // Type of the verification that has been performed + // eg. [Confirmation of + // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) type: Types.BankAccountHolderVerificationType; } diff --git a/src/services/bankAuthorisationService.ts b/src/services/bankAuthorisationService.ts index b139d0d..d4bbc83 100644 --- a/src/services/bankAuthorisationService.ts +++ b/src/services/bankAuthorisationService.ts @@ -14,28 +14,28 @@ interface BankAuthorisationCreateRequest { // Resources linked to this BankAuthorisation. links: Types.BankAuthorisationCreateRequestLinks; - // URL that the payer can be redirected to after authorising the payment. + // URL that the payer can be redirected to after authorising the payment. // - // On completion of bank authorisation, the query parameter of either - // `outcome=success` or `outcome=failure` will be - // appended to the `redirect_uri` to indicate the result of the bank - // authorisation. If the bank authorisation is - // expired, the query parameter `outcome=timeout` will be appended to the - // `redirect_uri`, in which case you should - // prompt the user to try the bank authorisation step again. + // On completion of bank authorisation, the query parameter of either + // `outcome=success` or `outcome=failure` will be + // appended to the `redirect_uri` to indicate the result of the bank + // authorisation. If the bank authorisation is + // expired, the query parameter `outcome=timeout` will be appended to the + // `redirect_uri`, in which case you should + // prompt the user to try the bank authorisation step again. // - // Please note: bank authorisations can still fail despite an `outcome=success` - // on the `redirect_uri`. It is therefore recommended to wait for the relevant - // bank authorisation event, such as - // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), - // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), or - // [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) in - // order to show the correct outcome to the user. + // Please note: bank authorisations can still fail despite an `outcome=success` + // on the `redirect_uri`. It is therefore recommended to wait for the relevant + // bank authorisation event, such as + // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), + // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), or + // [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) in + // order to show the correct outcome to the user. // - // The BillingRequestFlow ID will also be appended to the `redirect_uri` as - // query parameter `id=BRF123`. + // The BillingRequestFlow ID will also be appended to the `redirect_uri` as + // query parameter `id=BRF123`. // - // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. + // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. redirect_uri?: string; } diff --git a/src/services/bankDetailsLookupService.ts b/src/services/bankDetailsLookupService.ts index e113f2f..c47c998 100644 --- a/src/services/bankDetailsLookupService.ts +++ b/src/services/bankDetailsLookupService.ts @@ -11,35 +11,35 @@ interface BankDetailsLookupListResponse extends Types.APIResponse { } interface BankDetailsLookupCreateRequest { - // The account holder name associated with the account number (if available). If - // provided and the country code is GB, a payer name verification will be - // performed. + // The account holder name associated with the account number (if available). + // If provided and the country code is GB, a payer name verification will be + // performed. account_holder_name?: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) for + // more information. Alternatively you can provide an `iban`. account_number?: string; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string; - // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // alpha-2 code. Must be provided if specifying local details. + // [ISO + // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // alpha-2 code. Must be provided if specifying local details. country_code?: string; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). iban?: string; } diff --git a/src/services/billingRequestFlowService.ts b/src/services/billingRequestFlowService.ts index 8a7d573..834e271 100644 --- a/src/services/billingRequestFlowService.ts +++ b/src/services/billingRequestFlowService.ts @@ -11,91 +11,92 @@ interface BillingRequestFlowListResponse extends Types.APIResponse { } interface BillingRequestFlowCreateRequest { - // (Experimental feature) Fulfil the Billing Request on completion of the flow - // (true by default). Disabling the auto_fulfil is not allowed currently. + // (Experimental feature) Fulfil the Billing Request on completion of the flow + // (true by default). Disabling the auto_fulfil is not allowed currently. auto_fulfil?: boolean; - // Identifies whether a Billing Request belongs to a specific customer + // Identifies whether a Billing Request belongs to a specific customer customer_details_captured?: boolean; - // URL that the payer can be taken to if there isn't a way to progress ahead in - // flow. + // URL that the payer can be taken to if there isn't a way to progress ahead in + // flow, for example if the customer searches for a bank that doesn't exist or + // isn't supported on the scheme. exit_uri?: string; - // Sets the default language of the Billing Request Flow and the customer. [ISO - // 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Sets the default language of the Billing Request Flow and the customer. [ISO + // 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. language?: string; // Resources linked to this BillingRequestFlow. links: Types.BillingRequestFlowCreateRequestLinks; - // If true, the payer will not be able to change their bank account within the - // flow. If the bank_account details are collected as part of bank_authorisation - // then GC will set this value to true mid flow. + // If true, the payer will not be able to change their bank account within the + // flow. If the bank_account details are collected as part of + // bank_authorisation then GC will set this value to true mid flow. // - // You can only lock bank account if these have already been completed as a part - // of the billing request. + // You can only lock bank account if these have already been completed as a + // part of the billing request. // lock_bank_account?: boolean; - // If true, the payer will not be able to change their currency/scheme manually - // within the flow. Note that this only applies to the mandate only flows - - // currency/scheme can never be changed when there is a specified subscription - // or payment. + // If true, the payer will not be able to change their currency/scheme manually + // within the flow. Note that this only applies to the mandate only flows - + // currency/scheme can never be changed when there is a specified subscription + // or payment. lock_currency?: boolean; - // If true, the payer will not be able to edit their customer details within the - // flow. If the customer details are collected as part of bank_authorisation - // then GC will set this value to true mid flow. + // If true, the payer will not be able to edit their customer details within + // the flow. If the customer details are collected as part of + // bank_authorisation then GC will set this value to true mid flow. // - // You can only lock customer details if these have already been completed as a - // part of the billing request. + // You can only lock customer details if these have already been completed as a + // part of the billing request. // lock_customer_details?: boolean; - // Bank account information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Bank account information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_bank_account?: Types.BillingRequestFlowPrefilledBankAccount; - // Customer information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Customer information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_customer?: Types.BillingRequestFlowPrefilledCustomer; - // URL that the payer can be redirected to after completing the request flow. + // URL that the payer can be redirected to after completing the request flow. redirect_uri?: string; - // If true, the payer will be able to see redirect action buttons on Thank You - // page. These action buttons will provide a way to connect back to the billing - // request flow app if opened within a mobile app. For successful flow, the - // button will take the payer back the billing request flow where they will see - // the success screen. For failure, button will take the payer to url being - // provided against exit_uri field. + // If true, the payer will be able to see redirect action buttons on Thank You + // page. These action buttons will provide a way to connect back to the billing + // request flow app if opened within a mobile app. For successful flow, the + // button will take the payer back the billing request flow where they will see + // the success screen. For failure, button will take the payer to url being + // provided against exit_uri field. show_redirect_buttons?: boolean; - // If true, the payer will be able to see a redirect action button on the - // Success page. This action button will provide a way to redirect the payer to - // the given redirect_uri. This functionality is helpful when merchants do not - // want payers to be automatically redirected or on Android devices, where - // automatic redirections are not possible. + // If true, the payer will be able to see a redirect action button on the + // Success page. This action button will provide a way to redirect the payer to + // the given redirect_uri. This functionality is helpful when merchants do not + // want payers to be automatically redirected or on Android devices, where + // automatic redirections are not possible. show_success_redirect_button?: boolean; - // If true, the payer will not be redirected to the success screen after - // completing the flow. A redirect_uri needs to be provided for this parameter - // to be taken into account. + // If true, the payer will not be redirected to the success screen after + // completing the flow. A redirect_uri needs to be provided for this parameter + // to be taken into account. skip_success_screen?: boolean; } diff --git a/src/services/billingRequestService.ts b/src/services/billingRequestService.ts index 455bb7c..c125549 100644 --- a/src/services/billingRequestService.ts +++ b/src/services/billingRequestService.ts @@ -11,13 +11,13 @@ interface BillingRequestListResponse extends Types.APIResponse { } interface BillingRequestCreateRequest { - // (Optional) If true, this billing request can fallback from instant payment to - // direct debit. - // Should not be set if GoCardless payment intelligence feature is used. + // (Optional) If true, this billing request can fallback from instant payment + // to direct debit. + // Should not be set if GoCardless payment intelligence feature is used. // - // See [Billing Requests: Retain customers with - // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) - // for more information. + // See [Billing Requests: Retain customers with + // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) + // for more information. fallback_enabled?: boolean; @@ -30,19 +30,37 @@ interface BillingRequestCreateRequest { // mandate_request?: Types.BillingRequestMandateRequest; - // 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. + // 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. metadata?: Types.JsonMap; + // Specifies the context or scenario in which the payment is being made. + // Defines whether the payment is for advance/arrears billing, point of sale + // transactions, ecommerce, or account transfers. This helps banks and payment + // processors understand the payment scenario and apply appropriate processing + // rules and risk controls. + + payment_context_code?: Types.BillingRequestPaymentContextCode; + + // Specifies the underlying purpose of the payment. Defines the specific reason + // or type of service/goods the payment relates to, improving straight-through + // processing and compliance. + // See [VRP Commercial Payment Purpose + // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) + // for the complete list of valid codes. + + payment_purpose_code?: string; + // payment_request?: Types.BillingRequestPaymentRequest; - // Specifies the high-level purpose of a mandate and/or payment using a set of - // pre-defined categories. Required for the PayTo scheme, optional for all - // others. Currently `mortgage`, `utility`, `loan`, `dependant_support`, - // `gambling`, `retail`, `salary`, `personal`, `government`, `pension`, `tax` - // and `other` are supported. + // Specifies the high-level purpose/category of a mandate and/or payment using + // a set of pre-defined categories. Provides context on the nature and reason + // for the payment to facilitate processing and compliance. + // See [Billing Request Purpose + // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for + // the complete list of valid codes. purpose_code?: Types.BillingRequestPurposeCode; @@ -59,168 +77,169 @@ interface BillingRequestCollectCustomerDetailsRequest { } interface BillingRequestCollectBankAccountRequest { - // Name of the account holder, as known by the bank. The full name provided when - // the customer is created is stored and is available via the API, but is - // transliterated, upcased, and truncated to 18 characters in bank submissions. - // This field is required unless the request includes a [customer bank account - // token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided + // when the customer is created is stored and is available via the API, but is + // transliterated, upcased, and truncated to 18 characters in bank submissions. + // This field is required unless the request includes a [customer bank account + // token](#javascript-flow-customer-bank-account-tokens). account_holder_name?: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) for + // more information. Alternatively you can provide an `iban`. account_number?: string; - // Account number suffix (only for bank accounts denominated in NZD) - see - // [local details](#local-bank-details-new-zealand) for more information. + // Account number suffix (only for bank accounts denominated in NZD) - see + // [local details](#local-bank-details-new-zealand) for more information. account_number_suffix?: string; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: Types.BillingRequestAccountType; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). IBANs are not accepted for Swedish - // bank accounts denominated in SEK - you must supply [local - // details](#local-bank-details-sweden). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). IBANs are not accepted for Swedish + // bank accounts denominated in SEK - you must supply [local + // details](#local-bank-details-sweden). iban?: 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. + // 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. metadata?: Types.JsonMap; - // A unique record such as an email address, mobile number or company number, - // that can be used to make and accept payments. + // A unique record such as an email address, mobile number or company number, + // that can be used to make and accept payments. pay_id?: string; } interface BillingRequestConfirmPayerDetailsRequest { - // 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. + // 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. metadata?: Types.JsonMap; - // This attribute can be set to true if the payer has indicated that multiple - // signatures are required for the mandate. As long as every other Billing - // Request actions have been completed, the payer will receive an email - // notification containing instructions on how to complete the additional - // signature. The dual signature flow can only be completed using GoCardless - // branded pages. + // This attribute can be set to true if the payer has indicated that multiple + // signatures are required for the mandate. As long as every other Billing + // Request actions have been completed, the payer will receive an email + // notification containing instructions on how to complete the additional + // signature. The dual signature flow can only be completed using GoCardless + // branded pages. payer_requested_dual_signature?: boolean; } interface BillingRequestFulfilRequest { - // 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. + // 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. metadata?: Types.JsonMap; } interface BillingRequestCancelRequest { - // 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. + // 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. metadata?: Types.JsonMap; } interface BillingRequestListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this BillingRequest. created_at?: Types.CreatedAtFilter; - // ID of a [customer](#core-endpoints-customers). If specified, this endpoint - // will return all requests for the given customer. + // ID of a [customer](#core-endpoints-customers). If specified, this endpoint + // will return all requests for the given customer. customer?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // One of: - // + // One of: + // status?: Types.BillingRequestStatus; } interface BillingRequestNotifyRequest { - // Currently, can only be `email`. + // Currently, can only be `email`. notification_type: Types.BillingRequestNotificationType; - // URL that the payer can be redirected to after authorising the payment. + // URL that the payer can be redirected to after authorising the payment. redirect_uri?: string; } interface BillingRequestChooseCurrencyRequest { - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency: 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. + // 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. metadata?: Types.JsonMap; } interface BillingRequestSelectInstitutionRequest { - // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // alpha-2 code. The country code of the institution. If nothing is provided, - // institutions with the country code 'GB' are returned by default. + // [ISO + // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // alpha-2 code. The country code of the institution. If nothing is provided, + // institutions with the country code 'GB' are returned by default. country_code: string; - // The unique identifier for this institution + // The unique identifier for this institution institution: string; } diff --git a/src/services/billingRequestTemplateService.ts b/src/services/billingRequestTemplateService.ts index 93c81e3..2dde7ac 100644 --- a/src/services/billingRequestTemplateService.ts +++ b/src/services/billingRequestTemplateService.ts @@ -11,24 +11,24 @@ interface BillingRequestTemplateListResponse extends Types.APIResponse { } interface BillingRequestTemplateListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // (Optional) A scheme used for Open Banking payments. Currently - // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` and - // `sepa_instant_credit_transfer` are supported in supported Eurozone countries - // (EUR). For Eurozone countries, `sepa_credit_transfer` is used as the default. - // Please be aware that `sepa_instant_credit_transfer` may incur an additional - // fee for your customer. + // (Optional) A scheme used for Open Banking payments. Currently + // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` + // and `sepa_instant_credit_transfer` are supported in supported Eurozone + // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as + // the default. Please be aware that `sepa_instant_credit_transfer` may incur + // an additional fee for your customer. payment_request_scheme?: string; } @@ -37,207 +37,209 @@ interface BillingRequestTemplateCreateRequest { // Resources linked to this BillingRequestTemplate. links?: Types.BillingRequestTemplateCreateRequestLinks; - // Constraints that will apply to the mandate_request. (Optional) Specifically - // required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) Specifically + // required for PayTo and VRP. mandate_request_constraints?: Types.BillingRequestTemplateMandateRequestConstraints; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. mandate_request_currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // mandate_request_description?: string; - // Key-value store of custom data that will be applied to the mandate created - // when this request is fulfilled. Up to 3 keys are permitted, with key names up - // to 50 characters and values up to 500 characters. + // Key-value store of custom data that will be applied to the mandate created + // when this request is fulfilled. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. mandate_request_metadata?: Types.JsonMap; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with from - // a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with from + // a list of your available schemes. mandate_request_scheme?: string; - // Verification preference for the mandate. One of: - // + // Verification preference for the mandate. One of: + // // - // 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`. + // 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. + // 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. + // See [Billing Requests: Creating Verified + // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) + // for more information. mandate_request_verify?: Types.BillingRequestTemplateMandateRequestVerify; - // 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. + // 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. metadata?: Types.JsonMap; - // Name for the template. Provides a friendly human name for the template, as it - // is shown in the dashboard. Must not exceed 255 characters. + // Name for the template. Provides a friendly human name for the template, as + // it is shown in the dashboard. Must not exceed 255 characters. name?: string; - // Amount in full. + // Amount in full. payment_request_amount?: string; - // [ISO 4217](http://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. + // [ISO 4217](http://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; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // payment_request_description?: string; - // Key-value store of custom data that will be applied to the payment created - // when this request is fulfilled. Up to 3 keys are permitted, with key names up - // to 50 characters and values up to 500 characters. + // Key-value store of custom data that will be applied to the payment created + // when this request is fulfilled. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. payment_request_metadata?: Types.JsonMap; - // (Optional) A scheme used for Open Banking payments. Currently - // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` and - // `sepa_instant_credit_transfer` are supported in supported Eurozone countries - // (EUR). For Eurozone countries, `sepa_credit_transfer` is used as the default. - // Please be aware that `sepa_instant_credit_transfer` may incur an additional - // fee for your customer. + // (Optional) A scheme used for Open Banking payments. Currently + // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` + // and `sepa_instant_credit_transfer` are supported in supported Eurozone + // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as + // the default. Please be aware that `sepa_instant_credit_transfer` may incur + // an additional fee for your customer. payment_request_scheme?: string; - // URL that the payer can be redirected to after completing the request flow. + // URL that the payer can be redirected to after completing the request flow. redirect_uri?: string; } interface BillingRequestTemplateUpdateRequest { - // Constraints that will apply to the mandate_request. (Optional) Specifically - // required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) Specifically + // required for PayTo and VRP. mandate_request_constraints?: Types.BillingRequestTemplateMandateRequestConstraints; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. mandate_request_currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // mandate_request_description?: string; - // Key-value store of custom data that will be applied to the mandate created - // when this request is fulfilled. Up to 3 keys are permitted, with key names up - // to 50 characters and values up to 500 characters. + // Key-value store of custom data that will be applied to the mandate created + // when this request is fulfilled. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. mandate_request_metadata?: Types.JsonMap; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with from - // a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with from + // a list of your available schemes. mandate_request_scheme?: string; - // Verification preference for the mandate. One of: - // + // Verification preference for the mandate. One of: + // // - // 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`. + // 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. + // 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. + // See [Billing Requests: Creating Verified + // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) + // for more information. mandate_request_verify?: Types.BillingRequestTemplateMandateRequestVerify; - // 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. + // 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. metadata?: Types.JsonMap; - // Name for the template. Provides a friendly human name for the template, as it - // is shown in the dashboard. Must not exceed 255 characters. + // Name for the template. Provides a friendly human name for the template, as + // it is shown in the dashboard. Must not exceed 255 characters. name?: string; - // Amount in full. + // Amount in full. payment_request_amount?: string; - // [ISO 4217](http://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. + // [ISO 4217](http://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; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // payment_request_description?: string; - // Key-value store of custom data that will be applied to the payment created - // when this request is fulfilled. Up to 3 keys are permitted, with key names up - // to 50 characters and values up to 500 characters. + // Key-value store of custom data that will be applied to the payment created + // when this request is fulfilled. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. payment_request_metadata?: Types.JsonMap; - // (Optional) A scheme used for Open Banking payments. Currently - // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` and - // `sepa_instant_credit_transfer` are supported in supported Eurozone countries - // (EUR). For Eurozone countries, `sepa_credit_transfer` is used as the default. - // Please be aware that `sepa_instant_credit_transfer` may incur an additional - // fee for your customer. + // (Optional) A scheme used for Open Banking payments. Currently + // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` + // and `sepa_instant_credit_transfer` are supported in supported Eurozone + // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as + // the default. Please be aware that `sepa_instant_credit_transfer` may incur + // an additional fee for your customer. payment_request_scheme?: string; - // URL that the payer can be redirected to after completing the request flow. + // URL that the payer can be redirected to after completing the request flow. redirect_uri?: string; } diff --git a/src/services/billingRequestWithActionService.ts b/src/services/billingRequestWithActionService.ts index 7a68c88..94bce47 100644 --- a/src/services/billingRequestWithActionService.ts +++ b/src/services/billingRequestWithActionService.ts @@ -11,16 +11,16 @@ interface BillingRequestWithActionListResponse extends Types.APIResponse { } interface BillingRequestWithActionCreateWithActionsRequest { - // Action payloads + // Action payloads actions?: Types.BillingRequestWithActionActions; - // (Optional) If true, this billing request can fallback from instant payment to - // direct debit. - // Should not be set if GoCardless payment intelligence feature is used. + // (Optional) If true, this billing request can fallback from instant payment + // to direct debit. + // Should not be set if GoCardless payment intelligence feature is used. // - // See [Billing Requests: Retain customers with - // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) - // for more information. + // See [Billing Requests: Retain customers with + // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) + // for more information. fallback_enabled?: boolean; @@ -30,19 +30,37 @@ interface BillingRequestWithActionCreateWithActionsRequest { // mandate_request?: Types.BillingRequestWithActionMandateRequest; - // 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. + // 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. metadata?: Types.JsonMap; + // Specifies the context or scenario in which the payment is being made. + // Defines whether the payment is for advance/arrears billing, point of sale + // transactions, ecommerce, or account transfers. This helps banks and payment + // processors understand the payment scenario and apply appropriate processing + // rules and risk controls. + + payment_context_code?: Types.BillingRequestWithActionPaymentContextCode; + + // Specifies the underlying purpose of the payment. Defines the specific reason + // or type of service/goods the payment relates to, improving straight-through + // processing and compliance. + // See [VRP Commercial Payment Purpose + // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) + // for the complete list of valid codes. + + payment_purpose_code?: string; + // payment_request?: Types.BillingRequestWithActionPaymentRequest; - // Specifies the high-level purpose of a mandate and/or payment using a set of - // pre-defined categories. Required for the PayTo scheme, optional for all - // others. Currently `mortgage`, `utility`, `loan`, `dependant_support`, - // `gambling`, `retail`, `salary`, `personal`, `government`, `pension`, `tax` - // and `other` are supported. + // Specifies the high-level purpose/category of a mandate and/or payment using + // a set of pre-defined categories. Provides context on the nature and reason + // for the payment to facilitate processing and compliance. + // See [Billing Request Purpose + // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for + // the complete list of valid codes. purpose_code?: Types.BillingRequestWithActionPurposeCode; } diff --git a/src/services/blockService.ts b/src/services/blockService.ts index 140e0a7..aad4dd2 100644 --- a/src/services/blockService.ts +++ b/src/services/blockService.ts @@ -11,124 +11,129 @@ interface BlockListResponse extends Types.APIResponse { } interface BlockCreateRequest { - // Shows if the block is active or disabled. Only active blocks will be used - // when deciding - // if a mandate should be blocked. + // Shows if the block is active or disabled. Only active blocks will be used + // when deciding + // if a mandate should be blocked. active?: boolean; - // Type of entity we will seek to match against when blocking the mandate. This - // can currently be one of 'email', 'email_domain', 'bank_account', or - // 'bank_name'. + // Type of entity we will seek to match against when blocking the mandate. This + // can currently be one of 'email', 'email_domain', 'bank_account', or + // 'bank_name'. block_type?: Types.BlockBlockType; - // This field is required if the reason_type is other. It should be a - // description of - // the reason for why you wish to block this payer and why it does not align - // with the - // given reason_types. This is intended to help us improve our knowledge of - // types of - // fraud. + // This field is required if the reason_type is other. It should be a + // description of + // the reason for why you wish to block this payer and why it does not align + // with the + // given reason_types. This is intended to help us improve our knowledge of + // types of + // fraud. reason_description?: string; - // The reason you wish to block this payer, can currently be one of - // 'identity_fraud', - // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by one - // of the - // above then 'other' can be selected but you must provide a reason description. + // The reason you wish to block this payer, can currently be one of + // 'identity_fraud', + // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by one + // of the + // above then 'other' can be selected but you must provide a reason + // description. reason_type?: Types.BlockReasonType; - // This field is a reference to the value you wish to block. This may be the raw - // value - // (in the case of emails or email domains) or the ID of the resource (in the - // case of - // bank accounts and bank names). This means in order to block a specific bank - // account - // (even if you wish to block generically by name) it must already have been - // created as - // a resource. + // This field is a reference to the value you wish to block. This may be the + // raw value + // (in the case of emails or email domains) or the ID of the resource (in the + // case of + // bank accounts and bank names). This means in order to block a specific bank + // account + // (even if you wish to block generically by name) it must already have been + // created as + // a resource. resource_reference?: string; } interface BlockListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // ID of a [Block](#core-endpoints-blocks). + // ID of a [Block](#core-endpoints-blocks). block?: string; - // Type of entity we will seek to match against when blocking the mandate. This - // can currently be one of 'email', 'email_domain', 'bank_account', or - // 'bank_name'. + // Type of entity we will seek to match against when blocking the mandate. This + // can currently be one of 'email', 'email_domain', 'bank_account', or + // 'bank_name'. block_type?: Types.BlockBlockType; // The creation date of this Block. created_at?: Types.CreatedAtFilter; - // Number of records to return. + // Number of records to return. limit?: string; - // The reason you wish to block this payer, can currently be one of - // 'identity_fraud', - // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by one - // of the - // above then 'other' can be selected but you must provide a reason description. + // The reason you wish to block this payer, can currently be one of + // 'identity_fraud', + // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by one + // of the + // above then 'other' can be selected but you must provide a reason + // description. reason_type?: Types.BlockReasonType; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // resource was updated. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was updated. updated_at?: string; } interface BlockBlockByRefRequest { - // Shows if the block is active or disabled. Only active blocks will be used - // when deciding - // if a mandate should be blocked. + // Shows if the block is active or disabled. Only active blocks will be used + // when deciding + // if a mandate should be blocked. active?: boolean; - // This field is required if the reason_type is other. It should be a - // description of - // the reason for why you wish to block this payer and why it does not align - // with the - // given reason_types. This is intended to help us improve our knowledge of - // types of - // fraud. + // This field is required if the reason_type is other. It should be a + // description of + // the reason for why you wish to block this payer and why it does not align + // with the + // given reason_types. This is intended to help us improve our knowledge of + // types of + // fraud. reason_description?: string; - // The reason you wish to block this payer, can currently be one of - // 'identity_fraud', - // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by one - // of the - // above then 'other' can be selected but you must provide a reason description. + // The reason you wish to block this payer, can currently be one of + // 'identity_fraud', + // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by one + // of the + // above then 'other' can be selected but you must provide a reason + // description. reason_type?: Types.BlockReasonType; - // Type of entity we will seek to get the associated emails and bank accounts to - // create blocks from. This can currently be one of 'customer' or 'mandate'. + // Type of entity we will seek to get the associated emails and bank accounts + // to + // create blocks from. This can currently be one of 'customer' or 'mandate'. reference_type?: Types.BlockReferenceType; - // This field is a reference to the entity you wish to block based on its emails - // and bank accounts. This may be the ID of a customer or a mandate. This means - // in - // order to block by reference the entity must have already been created as a - // resource. + // This field is a reference to the entity you wish to block based on its + // emails + // and bank accounts. This may be the ID of a customer or a mandate. This means + // in + // order to block by reference the entity must have already been created as a + // resource. reference_value?: string; } diff --git a/src/services/creditorBankAccountService.ts b/src/services/creditorBankAccountService.ts index 918c961..a831504 100644 --- a/src/services/creditorBankAccountService.ts +++ b/src/services/creditorBankAccountService.ts @@ -11,89 +11,89 @@ interface CreditorBankAccountListResponse extends Types.APIResponse { } interface CreditorBankAccountCreateRequest { - // Name of the account holder, as known by the bank. Usually this is the same as - // the name stored with the linked [creditor](#core-endpoints-creditors). This - // field will be transliterated, upcased and truncated to 18 characters. + // Name of the account holder, as known by the bank. Usually this is the same + // as the name stored with the linked [creditor](#core-endpoints-creditors). + // This field will be transliterated, upcased and truncated to 18 characters. account_holder_name: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) for + // more information. Alternatively you can provide an `iban`. account_number?: string; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: Types.CreditorBankAccountAccountType; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). IBANs are not accepted for Swedish - // bank accounts denominated in SEK - you must supply [local - // details](#local-bank-details-sweden). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). IBANs are not accepted for Swedish + // bank accounts denominated in SEK - you must supply [local + // details](#local-bank-details-sweden). iban?: string; // Resources linked to this CreditorBankAccount. links: Types.CreditorBankAccountCreateRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; - // Defaults to `true`. When this is set to `true`, it will cause this bank - // account to be set as the account that GoCardless will pay out to. + // Defaults to `true`. When this is set to `true`, it will cause this bank + // account to be set as the account that GoCardless will pay out to. set_as_default_payout_account?: boolean; } interface CreditorBankAccountListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this CreditorBankAccount. created_at?: Types.CreatedAtFilter; - // Unique identifier, beginning with "CR". + // Unique identifier, beginning with "CR". creditor?: string; - // If `true`, only return enabled bank accounts. If `false`, only return - // disabled bank accounts. + // If `true`, only return enabled bank accounts. If `false`, only return + // disabled bank accounts. enabled?: boolean; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/creditorService.ts b/src/services/creditorService.ts index 7843618..97a3513 100644 --- a/src/services/creditorService.ts +++ b/src/services/creditorService.ts @@ -11,94 +11,94 @@ interface CreditorListResponse extends Types.APIResponse { } interface CreditorCreateRequest { - // Prefix for the bank reference of payouts sent to this creditor. For instance, - // if - // the creditor's `bank_reference_prefix` was `ACME`, the bank reference of a - // payout - // sent to that creditor could be `ACME-8G7Q8`. + // Prefix for the bank reference of payouts sent to this creditor. For + // instance, if + // the creditor's `bank_reference_prefix` was `ACME`, the bank reference of a + // payout + // sent to that creditor could be `ACME-8G7Q8`. // - // This prefix is also used for refunds in EUR and GBP. + // This prefix is also used for refunds in EUR and GBP. // bank_reference_prefix?: string; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code: string; - // The type of business of the creditor. Currently, `individual`, `company`, - // `charity`, `partnership`, and `trust` are supported. + // The type of business of the creditor. Currently, `individual`, `company`, + // `charity`, `partnership`, and `trust` are supported. creditor_type: Types.CreditorCreditorType; - // The creditor's trading name. + // The creditor's trading name. name: string; } interface CreditorListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Creditor. created_at?: Types.CreatedAtFilter; - // Number of records to return. + // Number of records to return. limit?: string; } interface CreditorUpdateRequest { - // The first line of the creditor's address. + // The first line of the creditor's address. address_line1?: string; - // The second line of the creditor's address. + // The second line of the creditor's address. address_line2?: string; - // The third line of the creditor's address. + // The third line of the creditor's address. address_line3?: string; - // Prefix for the bank reference of payouts sent to this creditor. For instance, - // if - // the creditor's `bank_reference_prefix` was `ACME`, the bank reference of a - // payout - // sent to that creditor could be `ACME-8G7Q8`. + // Prefix for the bank reference of payouts sent to this creditor. For + // instance, if + // the creditor's `bank_reference_prefix` was `ACME`, the bank reference of a + // payout + // sent to that creditor could be `ACME-8G7Q8`. // - // This prefix is also used for refunds in EUR and GBP. + // This prefix is also used for refunds in EUR and GBP. // bank_reference_prefix?: string; - // The city of the creditor's address. + // The city of the creditor's address. city?: string; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; // Resources linked to this Creditor. links?: Types.CreditorUpdateRequestLinks; - // The creditor's trading name. + // The creditor's trading name. name?: string; - // The creditor's postal code. + // The creditor's postal code. postal_code?: string; - // The creditor's address region, county or department. + // The creditor's address region, county or department. region?: string; } diff --git a/src/services/currencyExchangeRateService.ts b/src/services/currencyExchangeRateService.ts index 010e28e..a0f3d57 100644 --- a/src/services/currencyExchangeRateService.ts +++ b/src/services/currencyExchangeRateService.ts @@ -11,23 +11,23 @@ interface CurrencyExchangeRateListResponse extends Types.APIResponse { } interface CurrencyExchangeRateListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // Source currency + // Source currency source?: string; - // Target currency + // Target currency target?: string; } diff --git a/src/services/customerBankAccountService.ts b/src/services/customerBankAccountService.ts index ec939a6..cf542e7 100644 --- a/src/services/customerBankAccountService.ts +++ b/src/services/customerBankAccountService.ts @@ -11,92 +11,92 @@ interface CustomerBankAccountListResponse extends Types.APIResponse { } interface CustomerBankAccountCreateRequest { - // Name of the account holder, as known by the bank. The full name provided when - // the customer is created is stored and is available via the API, but is - // transliterated, upcased, and truncated to 18 characters in bank submissions. - // This field is required unless the request includes a [customer bank account - // token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided + // when the customer is created is stored and is available via the API, but is + // transliterated, upcased, and truncated to 18 characters in bank submissions. + // This field is required unless the request includes a [customer bank account + // token](#javascript-flow-customer-bank-account-tokens). account_holder_name?: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) for + // more information. Alternatively you can provide an `iban`. account_number?: string; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: Types.CustomerBankAccountAccountType; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). IBANs are not accepted for Swedish - // bank accounts denominated in SEK - you must supply [local - // details](#local-bank-details-sweden). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). IBANs are not accepted for Swedish + // bank accounts denominated in SEK - you must supply [local + // details](#local-bank-details-sweden). iban?: string; // Resources linked to this CustomerBankAccount. links: Types.CustomerBankAccountCreateRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; } interface CustomerBankAccountListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this CustomerBankAccount. created_at?: Types.CreatedAtFilter; - // Unique identifier, beginning with "CU". + // Unique identifier, beginning with "CU". customer?: string; - // Get enabled or disabled customer bank accounts. + // Get enabled or disabled customer bank accounts. enabled?: boolean; - // Number of records to return. + // Number of records to return. limit?: string; } interface CustomerBankAccountUpdateRequest { - // 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. + // 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. metadata?: Types.JsonMap; } diff --git a/src/services/customerService.ts b/src/services/customerService.ts index 2dbc305..c8f74db 100644 --- a/src/services/customerService.ts +++ b/src/services/customerService.ts @@ -11,217 +11,217 @@ interface CustomerListResponse extends Types.APIResponse { } interface CustomerCreateRequest { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string; - // The city of the customer's address. + // The city of the customer's address. city?: string; - // Customer's company name. Required unless a `given_name` and `family_name` are - // provided. For Canadian customers, the use of a `company_name` value will mean - // that any mandate created from this customer will be considered to be a - // "Business PAD" (otherwise, any mandate will be considered to be a "Personal - // PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value will + // mean that any mandate created from this customer will be considered to be a + // "Business PAD" (otherwise, any mandate will be considered to be a "Personal + // PAD"). company_name?: string; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated in + // Danish krone (DKK). danish_identity_number?: string; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows GoCardless + // to send notifications to this customer. email?: string; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used - // as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", "fr", - // "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this - // is not provided, the language will be chosen based on the `country_code` (if - // supplied) or default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used + // as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If + // this is not provided, the language will be chosen based on the + // `country_code` (if supplied) or default to "en". language?: 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. + // 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. metadata?: Types.JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string; - // The customer's postal code. + // The customer's postal code. postal_code?: string; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code - // is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be supplied - // if the customer's bank account is denominated in Swedish krona (SEK). This - // field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be supplied + // if the customer's bank account is denominated in Swedish krona (SEK). This + // field cannot be changed once it has been set. swedish_identity_number?: string; } interface CustomerListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Customer. created_at?: Types.CreatedAtFilter; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: Types.CustomerCurrency; - // Number of records to return. + // Number of records to return. limit?: string; - // The direction to sort in. - // One of: - // + // The direction to sort in. + // One of: + // sort_direction?: Types.CustomerSortDirection; - // Field by which to sort records. - // One of: - // + // Field by which to sort records. + // One of: + // sort_field?: Types.CustomerSortField; } interface CustomerUpdateRequest { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string; - // The city of the customer's address. + // The city of the customer's address. city?: string; - // Customer's company name. Required unless a `given_name` and `family_name` are - // provided. For Canadian customers, the use of a `company_name` value will mean - // that any mandate created from this customer will be considered to be a - // "Business PAD" (otherwise, any mandate will be considered to be a "Personal - // PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value will + // mean that any mandate created from this customer will be considered to be a + // "Business PAD" (otherwise, any mandate will be considered to be a "Personal + // PAD"). company_name?: string; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated in + // Danish krone (DKK). danish_identity_number?: string; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows GoCardless + // to send notifications to this customer. email?: string; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used - // as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", "fr", - // "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this - // is not provided, the language will be chosen based on the `country_code` (if - // supplied) or default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used + // as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If + // this is not provided, the language will be chosen based on the + // `country_code` (if supplied) or default to "en". language?: 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. + // 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. metadata?: Types.JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string; - // The customer's postal code. + // The customer's postal code. postal_code?: string; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code - // is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be supplied - // if the customer's bank account is denominated in Swedish krona (SEK). This - // field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be supplied + // if the customer's bank account is denominated in Swedish krona (SEK). This + // field cannot be changed once it has been set. swedish_identity_number?: string; } diff --git a/src/services/eventService.ts b/src/services/eventService.ts index 25b85b9..39e16b8 100644 --- a/src/services/eventService.ts +++ b/src/services/eventService.ts @@ -11,129 +11,129 @@ interface EventListResponse extends Types.APIResponse { } interface EventListRequest { - // Limit to events with a given `action`. + // Limit to events with a given `action`. action?: string; - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // ID of a [billing request](#billing-requests-billing-requests). If specified, - // this endpoint will return all events for the given billing request. + // ID of a [billing request](#billing-requests-billing-requests). If specified, + // this endpoint will return all events for the given billing request. billing_request?: string; // The creation date of this Event. created_at?: Types.CreatedAtFilter; - // ID of an [creditor](#core-endpoints-creditors). If specified, this endpoint - // will return all events for the given creditor. + // ID of an [creditor](#core-endpoints-creditors). If specified, this endpoint + // will return all events for the given creditor. creditor?: string; - // ID of an export. If specified, this endpoint will return all events for the - // given export. + // ID of an export. If specified, this endpoint will return all events for the + // given export. export?: string; - // Includes linked resources in the response. Must be used with the - // `resource_type` parameter specified. The include should be one of: - // + // Includes linked resources in the response. Must be used with the + // `resource_type` parameter specified. The include should be one of: + // include?: Types.EventInclude; - // ID of an [instalment schedule](#core-endpoints-instalment-schedules). If - // specified, this endpoint will return all events for the given instalment - // schedule. + // ID of an [instalment schedule](#core-endpoints-instalment-schedules). If + // specified, this endpoint will return all events for the given instalment + // schedule. instalment_schedule?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // ID of a [mandate](#core-endpoints-mandates). If specified, this endpoint will - // return all events for the given mandate. + // ID of a [mandate](#core-endpoints-mandates). If specified, this endpoint + // will return all events for the given mandate. mandate?: string; - // ID of an outbound_payment. If specified, this endpoint will return all events - // for the given payment. + // ID of an [outbound_payment](#core-endpoints-outbound-payments). If + // specified, this endpoint will return all events for the given payment. outbound_payment?: string; - // ID of an event. If specified, this endpoint will return all events whose - // parent_event is the given event ID. + // ID of an event. If specified, this endpoint will return all events whose + // parent_event is the given event ID. parent_event?: string; - // ID of a [payer authorisation](#core-endpoints-payer-authorisations). + // ID of a [payer authorisation](#core-endpoints-payer-authorisations). payer_authorisation?: string; - // ID of a [payment](#core-endpoints-payments). If specified, this endpoint will - // return all events for the given payment. + // ID of a [payment](#core-endpoints-payments). If specified, this endpoint + // will return all events for the given payment. payment?: string; - // ID of a [payout](#core-endpoints-payouts). If specified, this endpoint will - // return all events for the given payout. + // ID of a [payout](#core-endpoints-payouts). If specified, this endpoint will + // return all events for the given payout. payout?: string; - // ID of a [refund](#core-endpoints-refunds). If specified, this endpoint will - // return all events for the given refund. + // ID of a [refund](#core-endpoints-refunds). If specified, this endpoint will + // return all events for the given refund. refund?: string; - // Type of resource that you'd like to get all events for. - // Cannot be used together with the `billing_request`, `creditor`, - // `export`,`instalment_schedule`, `mandate`, `payer_authorisation`, `payment`, - // `payout`, `refund`, `scheme_identifier`, `subscription` or `outbound_payment` - // parameters. - // The type can be one of: - // + // Type of resource that you'd like to get all events for. + // Cannot be used together with the `billing_request`, `creditor`, + // `export`,`instalment_schedule`, `mandate`, `payer_authorisation`, `payment`, + // `payout`, `refund`, `scheme_identifier`, `subscription` or + // `outbound_payment` parameters. + // The type can be one of: + // resource_type?: Types.EventResourceType; - // ID of a [scheme identifier](#core-endpoints-scheme-identifiers). If - // specified, this endpoint will return all events for the given scheme - // identifier. + // ID of a [scheme identifier](#core-endpoints-scheme-identifiers). If + // specified, this endpoint will return all events for the given scheme + // identifier. scheme_identifier?: string; - // ID of a [subscription](#core-endpoints-subscriptions). If specified, this - // endpoint will return all events for the given subscription. + // ID of a [subscription](#core-endpoints-subscriptions). If specified, this + // endpoint will return all events for the given subscription. subscription?: string; } diff --git a/src/services/exportService.ts b/src/services/exportService.ts index 410fd8a..99cb2db 100644 --- a/src/services/exportService.ts +++ b/src/services/exportService.ts @@ -11,15 +11,15 @@ interface ExportListResponse extends Types.APIResponse { } interface ExportListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/fundsAvailabilityService.ts b/src/services/fundsAvailabilityService.ts new file mode 100644 index 0000000..339ad5e --- /dev/null +++ b/src/services/fundsAvailabilityService.ts @@ -0,0 +1,50 @@ +'use strict'; + +import { Api } from '../api/api'; +import * as Types from '../types/Types'; + +interface FundsAvailabilityResponse extends Types.FundsAvailability, Types.APIResponse {} + +interface FundsAvailabilityListResponse extends Types.APIResponse { + funds_availability: Array; + meta: Types.ListMeta; +} + +interface FundsAvailabilityCheckRequest { + // The amount of the payment + + amount?: string; +} + +export class FundsAvailabilityService { + private api: Api; + + constructor(api) { + this.api = api; + } + + public async check( + identity: string, + requestParameters: FundsAvailabilityCheckRequest, + customHeaders: Types.JsonMap = {}, + ): Promise { + const urlParameters = [{ key: 'identity', value: identity }]; + const requestParams = { + path: '/funds_availability/:identity', + method: 'get', + urlParameters, + requestParameters, + payloadKey: null, + fetch: null, + customHeaders, + }; + + const response = await this.api.request(requestParams); + const formattedResponse: FundsAvailabilityResponse = { + ...response.body['funds_availability'], + __response__: response.__response__, + }; + + return formattedResponse; + } +} diff --git a/src/services/instalmentScheduleService.ts b/src/services/instalmentScheduleService.ts index 08675cd..6762153 100644 --- a/src/services/instalmentScheduleService.ts +++ b/src/services/instalmentScheduleService.ts @@ -11,181 +11,183 @@ interface InstalmentScheduleListResponse extends Types.APIResponse { } interface InstalmentScheduleCreateWithDatesRequest { - // 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). + // 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). app_fee?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency: Types.InstalmentScheduleCurrency; - // An explicit array of instalment payments, each specifying at least an - // `amount` and `charge_date`. See [create (with - // dates)](#instalment-schedules-create-with-dates) + // An explicit array of instalment payments, each specifying at least an + // `amount` and `charge_date`. See [create (with + // dates)](#instalment-schedules-create-with-dates) instalments: Types.InstalmentScheduleInstalment[]; // Resources linked to this InstalmentSchedule. links: Types.InstalmentScheduleCreateWithDatesRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; - // 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. + // 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. name: string; - // 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.

+ // 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.

payment_reference?: string; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; - // 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. + // 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. total_amount: string; } interface InstalmentScheduleCreateWithScheduleRequest { - // 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). + // 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). app_fee?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency: Types.InstalmentScheduleCurrency; - // 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)](#instalment-schedules-create-with-schedule) + // 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)](#instalment-schedules-create-with-schedule) // instalments: Types.InstalmentScheduleInstalments; // Resources linked to this InstalmentSchedule. links: Types.InstalmentScheduleCreateWithScheduleRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; - // 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. + // 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. name: string; - // 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.

+ // 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.

payment_reference?: string; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; - // 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. + // 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. total_amount: string; } interface InstalmentScheduleListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this InstalmentSchedule. created_at?: Types.CreatedAtFilter; - // ID of the associated [customer](#core-endpoints-customers). + // ID of the associated [customer](#core-endpoints-customers). customer?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // ID of the associated [mandate](#core-endpoints-mandates) which the instalment - // schedule will create payments against. + // ID of the associated [mandate](#core-endpoints-mandates) which the + // instalment schedule will create payments against. mandate?: string; - // At most five valid status values + // At most five valid status values status?: Types.InstalmentScheduleStatus[]; } interface InstalmentScheduleUpdateRequest { - // 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. + // 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. metadata?: Types.JsonMap; } diff --git a/src/services/institutionService.ts b/src/services/institutionService.ts index ed19abb..83e76c6 100644 --- a/src/services/institutionService.ts +++ b/src/services/institutionService.ts @@ -11,54 +11,55 @@ interface InstitutionListResponse extends Types.APIResponse { } interface InstitutionListRequest { - // (Currently only supports UK sort-codes) The six-digit number that identifies - // both the bank and the specific branch where an account is held, eg. '601234'. + // (Currently only supports UK sort-codes) The six-digit number that identifies + // both the bank and the specific branch where an account is held, eg. + // '601234'. branch_code?: string; - // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // alpha-2 code. The country code of the institution. If nothing is provided, - // institutions with the country code 'GB' are returned by default. + // [ISO + // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // alpha-2 code. The country code of the institution. If nothing is provided, + // institutions with the country code 'GB' are returned by default. country_code?: string; - // The feature that institutions support. The available options include `pis`, - // and `vrp_sweeping`. If nothing is provided, institutions supporting 'pis' are - // returned by default. + // The feature that institutions support. The available options include `pis`, + // and `vrp_sweeping`. If nothing is provided, institutions supporting 'pis' + // are returned by default. feature?: string; - // The scheme that institutions support. The available options include - // `faster_payments`, `sepa_credit_transfer`, and - // `sepa_instant_credit_transfer`. If nothing is provided, institutions - // supporting 'faster_payments' are returned by default. + // The scheme that institutions support. The available options include + // `faster_payments`, `sepa_credit_transfer`, and + // `sepa_instant_credit_transfer`. If nothing is provided, institutions + // supporting 'faster_payments' are returned by default. scheme?: string; } interface InstitutionListForBillingRequestRequest { - // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // alpha-2 code. The country code of the institution. If nothing is provided, - // institutions with the country code 'GB' are returned by default. + // [ISO + // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // alpha-2 code. The country code of the institution. If nothing is provided, + // institutions with the country code 'GB' are returned by default. country_code: string; - // ID(s) of the institution(s) to retrieve. More than one ID can be specified - // using a comma-separated string. + // ID(s) of the institution(s) to retrieve. More than one ID can be specified + // using a comma-separated string. ids?: string[]; - // Indicates whether to include temporarily disabled institutions in the - // response. - // If not provided or set to false, only enabled institutions will be returned. + // Indicates whether to include temporarily disabled institutions in the + // response. + // If not provided or set to false, only enabled institutions will be returned. // include_disabled?: boolean; - // A search substring for retrieving institution(s), based on the institution's - // name. + // A search substring for retrieving institution(s), based on the institution's + // name. search?: string; } diff --git a/src/services/logoService.ts b/src/services/logoService.ts index 9803052..52e7930 100644 --- a/src/services/logoService.ts +++ b/src/services/logoService.ts @@ -11,7 +11,7 @@ interface LogoListResponse extends Types.APIResponse { } interface LogoCreateForCreditorRequest { - // Base64 encoded string. + // Base64 encoded string. image: string; diff --git a/src/services/mandateImportEntryService.ts b/src/services/mandateImportEntryService.ts index 794adb5..540f2e7 100644 --- a/src/services/mandateImportEntryService.ts +++ b/src/services/mandateImportEntryService.ts @@ -26,40 +26,40 @@ interface MandateImportEntryCreateRequest { // mandate?: Types.MandateImportEntryMandate; - // A unique identifier for this entry, which you can use (once the import has - // been - // processed by GoCardless) to identify the records that have been created. - // Limited - // to 255 characters. + // A unique identifier for this entry, which you can use (once the import has + // been + // processed by GoCardless) to identify the records that have been created. + // Limited + // to 255 characters. // record_identifier?: string; } interface MandateImportEntryListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // Unique identifier, beginning with "IM". + // Unique identifier, beginning with "IM". mandate_import: string; - // One of: - //
    - //
  • `sucessfully_processed`: the entry has been imported and the associated - // records created.
  • - //
  • `unsuccessfully_processed`: the entry could not be processed due to an - // error, see the 'processing_errors' value
  • - //
+ // One of: + //
    + //
  • `sucessfully_processed`: the entry has been imported and the associated + // records created.
  • + //
  • `unsuccessfully_processed`: the entry could not be processed due to an + // error, see the 'processing_errors' value
  • + //
status?: Types.MandateImportEntryStatus; } diff --git a/src/services/mandateImportService.ts b/src/services/mandateImportService.ts index c97be23..77c75cb 100644 --- a/src/services/mandateImportService.ts +++ b/src/services/mandateImportService.ts @@ -14,9 +14,9 @@ interface MandateImportCreateRequest { // Resources linked to this MandateImport. links?: Types.MandateImportCreateRequestLinks; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. scheme: Types.MandateImportScheme; } diff --git a/src/services/mandatePdfService.ts b/src/services/mandatePdfService.ts index a635462..64cdf2f 100644 --- a/src/services/mandatePdfService.ts +++ b/src/services/mandatePdfService.ts @@ -11,142 +11,142 @@ interface MandatePdfListResponse extends Types.APIResponse { } interface MandatePdfCreateRequest { - // Name of the account holder, as known by the bank. Usually this matches the - // name of the [customer](#core-endpoints-customers). This field cannot exceed - // 18 characters. + // Name of the account holder, as known by the bank. Usually this matches the + // name of the [customer](#core-endpoints-customers). This field cannot exceed + // 18 characters. account_holder_name?: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) for + // more information. Alternatively you can provide an `iban`. account_number?: string; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: Types.MandatePdfAccountType; - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string; - // SWIFT BIC. Will be derived automatically if a valid `iban` or [local - // details](#appendix-local-bank-details) are provided. + // SWIFT BIC. Will be derived automatically if a valid `iban` or [local + // details](#appendix-local-bank-details) are provided. bic?: string; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string; - // The city of the customer's address. + // The city of the customer's address. city?: string; - // The customer's company name. Used to populate the "Customer Name or Company - // name" field on the PDF. + // The customer's company name. Used to populate the "Customer Name or Company + // name" field on the PDF. company_name?: string; - // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // alpha-2 code. Required if providing local details. + // [ISO + // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // alpha-2 code. Required if providing local details. country_code?: string; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Should only be supplied for Betalingsservice mandates. + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Should only be supplied for Betalingsservice mandates. danish_identity_number?: string; - // The customer's family name (i.e. last name). Used to populate the "Customer - // Name or Company name" field on the PDF. Ignored if `company_name` is - // provided. + // The customer's family name (i.e. last name). Used to populate the "Customer + // Name or Company name" field on the PDF. Ignored if `company_name` is + // provided. family_name?: string; - // The customer's given name (i.e. first name). Used to populate the "Customer - // Name or Company name" field on the PDF. Ignored if `company_name` is - // provided. + // The customer's given name (i.e. first name). Used to populate the "Customer + // Name or Company name" field on the PDF. Ignored if `company_name` is + // provided. given_name?: string; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). IBANs cannot be provided for Autogiro - // mandates. + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). IBANs cannot be provided for + // Autogiro mandates. iban?: string; // Resources linked to this MandatePdf. links?: Types.MandatePdfCreateRequestLinks; - // Unique 6 to 18 character reference. This may be left blank at the point of - // signing. + // Unique 6 to 18 character reference. This may be left blank at the point of + // signing. mandate_reference?: string; - // For American customers only. IP address of the computer used by the customer - // to set up the mandate. This is required in order to create compliant Mandate - // PDFs according to the ACH scheme rules. + // For American customers only. IP address of the computer used by the customer + // to set up the mandate. This is required in order to create compliant Mandate + // PDFs according to the ACH scheme rules. payer_ip_address?: string; - // The customer phone number. Should only be provided for BECS NZ mandates. + // The customer phone number. Should only be provided for BECS NZ mandates. phone_number?: string; - // The customer's postal code. + // The customer's postal code. postal_code?: string; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code - // is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string; - // Direct Debit scheme. Can be supplied or automatically detected from the bank - // account details provided. If you do not provide a scheme, you must provide - // either a mandate, an `iban`, or [local details](#appendix-local-bank-details) - // including a `country_code`. + // Direct Debit scheme. Can be supplied or automatically detected from the bank + // account details provided. If you do not provide a scheme, you must provide + // either a mandate, an `iban`, or [local + // details](#appendix-local-bank-details) including a `country_code`. scheme?: string; - // If provided, a form will be generated with this date and no signature field. + // If provided, a form will be generated with this date and no signature field. signature_date?: string; - // For American customers only. Subscription amount being authorised by the - // mandate. In the lowest denomination for the currency (cents in USD). Is - // required if `subscription_frequency` has been provided. + // For American customers only. Subscription amount being authorised by the + // mandate. In the lowest denomination for the currency (cents in USD). Is + // required if `subscription_frequency` has been provided. subscription_amount?: string; - // For American customers only. Frequency of the subscription being authorised - // by the mandate. One of `weekly`, `monthly` or `yearly`. Is required if - // `subscription_amount` has been provided. + // For American customers only. Frequency of the subscription being authorised + // by the mandate. One of `weekly`, `monthly` or `yearly`. Is required if + // `subscription_amount` has been provided. subscription_frequency?: Types.MandatePdfSubscriptionFrequency; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Should only be - // supplied for Autogiro mandates. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Should only be + // supplied for Autogiro mandates. swedish_identity_number?: string; } diff --git a/src/services/mandateService.ts b/src/services/mandateService.ts index 2203775..f7f0795 100644 --- a/src/services/mandateService.ts +++ b/src/services/mandateService.ts @@ -11,16 +11,16 @@ interface MandateListResponse extends Types.APIResponse { } interface MandateCreateRequest { - // This field is ACH specific, sometimes referred to as [SEC - // code](https://www.moderntreasury.com/learn/sec-codes). + // This field is ACH specific, sometimes referred to as [SEC + // code](https://www.moderntreasury.com/learn/sec-codes). // - // This is the way that the payer gives authorisation to the merchant. - // web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC - // code: WEB) - // telephone: Authorisation is provided orally over telephone (maps to SEC - // code: TEL) - // paper: Authorisation is provided in writing and signed, or similarly - // authenticated (maps to SEC code: PPD) + // This is the way that the payer gives authorisation to the merchant. + // web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC + // code: WEB) + // telephone: Authorisation is provided orally over telephone (maps to SEC + // code: TEL) + // paper: Authorisation is provided in writing and signed, or similarly + // authenticated (maps to SEC code: PPD) // authorisation_source?: Types.MandateAuthorisationSource; @@ -28,106 +28,106 @@ interface MandateCreateRequest { // Resources linked to this Mandate. links: Types.MandateCreateRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; - // For ACH customers only. Required for ACH customers. A string containing the - // IP address of the payer to whom the mandate belongs (i.e. as a result of - // their completion of a mandate setup flow in their browser). + // For ACH customers only. Required for ACH customers. A string containing the + // IP address of the payer to whom the mandate belongs (i.e. as a result of + // their completion of a mandate setup flow in their browser). // - // Not required for creating offline mandates where `authorisation_source` is - // set to telephone or paper. + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. // payer_ip_address?: string; - // Unique reference. Different schemes have different length and [character - // set](#appendix-character-sets) requirements. GoCardless will generate a - // unique reference satisfying the different scheme requirements if this field - // is left blank. + // Unique reference. Different schemes have different length and [character + // set](#appendix-character-sets) requirements. GoCardless will generate a + // unique reference satisfying the different scheme requirements if this field + // is left blank. reference?: string; - // Bank payment scheme to which this mandate and - // associated payments are submitted. Can be supplied or automatically detected - // from the customer's bank account. + // Bank payment scheme to which this mandate and + // associated payments are submitted. Can be supplied or automatically detected + // from the customer's bank account. scheme?: string; } interface MandateListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Mandate. created_at?: Types.CreatedAtFilter; - // ID of a [creditor](#core-endpoints-creditors). If specified, this endpoint - // will return all mandates for the given creditor. Cannot be used in - // conjunction with `customer` or `customer_bank_account` + // ID of a [creditor](#core-endpoints-creditors). If specified, this endpoint + // will return all mandates for the given creditor. Cannot be used in + // conjunction with `customer` or `customer_bank_account` creditor?: string; - // ID of a [customer](#core-endpoints-customers). If specified, this endpoint - // will return all mandates for the given customer. Cannot be used in - // conjunction with `customer_bank_account` or `creditor` + // ID of a [customer](#core-endpoints-customers). If specified, this endpoint + // will return all mandates for the given customer. Cannot be used in + // conjunction with `customer_bank_account` or `creditor` customer?: string; - // ID of a [customer bank account](#core-endpoints-customer-bank-accounts). If - // specified, this endpoint will return all mandates for the given bank account. - // Cannot be used in conjunction with `customer` or `creditor` + // ID of a [customer bank account](#core-endpoints-customer-bank-accounts). If + // specified, this endpoint will return all mandates for the given bank + // account. Cannot be used in conjunction with `customer` or `creditor` customer_bank_account?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // Mandate type + // Mandate type mandate_type?: string; - // Unique reference. Different schemes have different length and [character - // set](#appendix-character-sets) requirements. GoCardless will generate a - // unique reference satisfying the different scheme requirements if this field - // is left blank. + // Unique reference. Different schemes have different length and [character + // set](#appendix-character-sets) requirements. GoCardless will generate a + // unique reference satisfying the different scheme requirements if this field + // is left blank. reference?: string; - // Scheme you'd like to retrieve mandates for + // Scheme you'd like to retrieve mandates for scheme?: string[]; - // One or more valid statuses + // One or more valid statuses status?: Types.MandateStatus[]; } interface MandateUpdateRequest { - // 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. + // 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. metadata?: Types.JsonMap; } interface MandateCancelRequest { - // 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. + // 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. metadata?: Types.JsonMap; } interface MandateReinstateRequest { - // 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. + // 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. metadata?: Types.JsonMap; } diff --git a/src/services/negativeBalanceLimitService.ts b/src/services/negativeBalanceLimitService.ts index 1bed3b9..7b1c48a 100644 --- a/src/services/negativeBalanceLimitService.ts +++ b/src/services/negativeBalanceLimitService.ts @@ -11,25 +11,25 @@ interface NegativeBalanceLimitListResponse extends Types.APIResponse { } interface NegativeBalanceLimitListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Unique identifier, beginning with "CR". + // Unique identifier, beginning with "CR". creditor?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: Types.NegativeBalanceLimitCurrency; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/outboundPaymentService.ts b/src/services/outboundPaymentService.ts index c1307b4..758b9f1 100644 --- a/src/services/outboundPaymentService.ts +++ b/src/services/outboundPaymentService.ts @@ -11,132 +11,132 @@ interface OutboundPaymentListResponse extends Types.APIResponse { } interface OutboundPaymentCreateRequest { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents - // in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount: number; - // A human-readable description of the outbound payment + // A human-readable description of the outbound payment description?: string; - // A future date on which the outbound payment should be sent. - // If not specified, the payment will be sent as soon as possible. + // A future date on which the outbound payment should be sent. + // If not specified, the payment will be sent as soon as possible. execution_date?: string; // Resources linked to this OutboundPayment. links: Types.OutboundPaymentCreateRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; - // An optional reference that will appear on your customer's bank statement. - // The character limit for this reference is dependent on the scheme.
- // Faster Payments - 18 characters, including: - // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
+ // An optional reference that will appear on your customer's bank statement. + // The character limit for this reference is dependent on the scheme.
+ // Faster Payments - 18 characters, including: + // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
reference?: string; - // Bank payment scheme to process the outbound payment. Currently only - // "faster_payments" (GBP) is supported. + // Bank payment scheme to process the outbound payment. Currently only + // "faster_payments" (GBP) is supported. scheme: Types.OutboundPaymentScheme; } interface OutboundPaymentWithdrawRequest { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents - // in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount: number; - // A human-readable description of the outbound payment + // A human-readable description of the outbound payment description?: string; - // A future date on which the outbound payment should be sent. - // If not specified, the payment will be sent as soon as possible. + // A future date on which the outbound payment should be sent. + // If not specified, the payment will be sent as soon as possible. execution_date?: string; // Resources linked to this OutboundPayment. links?: Types.OutboundPaymentWithdrawRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; - // An optional reference that will appear on your customer's bank statement. - // The character limit for this reference is dependent on the scheme.
- // Faster Payments - 18 characters, including: - // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
+ // An optional reference that will appear on your customer's bank statement. + // The character limit for this reference is dependent on the scheme.
+ // Faster Payments - 18 characters, including: + // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
reference?: string; - // Bank payment scheme to process the outbound payment. Currently only - // "faster_payments" (GBP) is supported. + // Bank payment scheme to process the outbound payment. Currently only + // "faster_payments" (GBP) is supported. scheme: Types.OutboundPaymentScheme; } interface OutboundPaymentCancelRequest { - // 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. + // 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. metadata?: Types.JsonMap; } interface OutboundPaymentListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // The beginning of query period + // The beginning of query period created_from?: string; - // The end of query period + // The end of query period created_to?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // One of: - //
    - //
  • `verifying`: The payment has been - // [created](#outbound-payments-create-an-outbound-payment) and the verification - // process has begun.
  • - //
  • `pending_approval`: The payment is awaiting - // [approval](#outbound-payments-approve-an-outbound-payment).
  • - //
  • `scheduled`: The payment has passed verification & - // [approval](#outbound-payments-approve-an-outbound-payment), but processing - // has not yet begun.
  • - //
  • `executing`: The execution date has arrived and the payment has been - // placed in queue for processing.
  • - //
  • `executed`: The payment has been accepted by the scheme and is now on its - // way to the recipient.
  • - //
  • `cancelled`: The payment has been - // [cancelled](#outbound-payments-cancel-an-outbound-payment) or was not - // [approved](#outbound-payments-approve-an-outbound-payment) on time.
  • - //
  • `failed`: The payment was not sent, usually due to an error while or - // after executing.
  • - //
+ // One of: + //
    + //
  • `verifying`: The payment has been + // [created](#outbound-payments-create-an-outbound-payment) and the + // verification process has begun.
  • + //
  • `pending_approval`: The payment is awaiting + // [approval](#outbound-payments-approve-an-outbound-payment).
  • + //
  • `scheduled`: The payment has passed verification & + // [approval](#outbound-payments-approve-an-outbound-payment), but processing + // has not yet begun.
  • + //
  • `executing`: The execution date has arrived and the payment has been + // placed in queue for processing.
  • + //
  • `executed`: The payment has been accepted by the scheme and is now on + // its way to the recipient.
  • + //
  • `cancelled`: The payment has been + // [cancelled](#outbound-payments-cancel-an-outbound-payment) or was not + // [approved](#outbound-payments-approve-an-outbound-payment) on time.
  • + //
  • `failed`: The payment was not sent, usually due to an error while or + // after executing.
  • + //
status?: Types.OutboundPaymentStatus; } interface OutboundPaymentUpdateRequest { - // 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. + // 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. metadata?: Types.JsonMap; } diff --git a/src/services/payerAuthorisationService.ts b/src/services/payerAuthorisationService.ts index 9cf0609..a59badb 100644 --- a/src/services/payerAuthorisationService.ts +++ b/src/services/payerAuthorisationService.ts @@ -11,30 +11,30 @@ interface PayerAuthorisationListResponse extends Types.APIResponse { } interface PayerAuthorisationCreateRequest { - // All details required for the creation of a - // [Customer Bank Account](#core-endpoints-customer-bank-accounts). + // All details required for the creation of a + // [Customer Bank Account](#core-endpoints-customer-bank-accounts). bank_account: Types.PayerAuthorisationBankAccount; - // All details required for the creation of a - // [Customer](#core-endpoints-customers). + // All details required for the creation of a + // [Customer](#core-endpoints-customers). customer: Types.PayerAuthorisationCustomer; - // All details required for the creation of a - // [Mandate](#core-endpoints-mandates). + // All details required for the creation of a + // [Mandate](#core-endpoints-mandates). mandate: Types.PayerAuthorisationMandate; } interface PayerAuthorisationUpdateRequest { - // All details required for the creation of a - // [Customer Bank Account](#core-endpoints-customer-bank-accounts). + // All details required for the creation of a + // [Customer Bank Account](#core-endpoints-customer-bank-accounts). bank_account: Types.PayerAuthorisationBankAccount; - // All details required for the creation of a - // [Customer](#core-endpoints-customers). + // All details required for the creation of a + // [Customer](#core-endpoints-customers). customer: Types.PayerAuthorisationCustomer; - // All details required for the creation of a - // [Mandate](#core-endpoints-mandates). + // All details required for the creation of a + // [Mandate](#core-endpoints-mandates). mandate: Types.PayerAuthorisationMandate; } diff --git a/src/services/payerThemeService.ts b/src/services/payerThemeService.ts index 158c189..486c00d 100644 --- a/src/services/payerThemeService.ts +++ b/src/services/payerThemeService.ts @@ -11,19 +11,19 @@ interface PayerThemeListResponse extends Types.APIResponse { } interface PayerThemeCreateForCreditorRequest { - // Colour for buttons background (hexcode) + // Colour for buttons background (hexcode) button_background_colour?: string; - // Colour for content box border (hexcode) + // Colour for content box border (hexcode) content_box_border_colour?: string; - // Colour for header background (hexcode) + // Colour for header background (hexcode) header_background_colour?: string; - // Colour for text links (hexcode) + // Colour for text links (hexcode) link_text_colour?: string; diff --git a/src/services/paymentAccountService.ts b/src/services/paymentAccountService.ts index 2c73ecd..66f3561 100644 --- a/src/services/paymentAccountService.ts +++ b/src/services/paymentAccountService.ts @@ -11,15 +11,15 @@ interface PaymentAccountListResponse extends Types.APIResponse { } interface PaymentAccountListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/paymentAccountTransactionService.ts b/src/services/paymentAccountTransactionService.ts index 21d2c7e..0124e3c 100644 --- a/src/services/paymentAccountTransactionService.ts +++ b/src/services/paymentAccountTransactionService.ts @@ -11,29 +11,29 @@ interface PaymentAccountTransactionListResponse extends Types.APIResponse { } interface PaymentAccountTransactionListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // The direction of the transaction. Debits mean money leaving the account (e.g. - // outbound payment), while credits signify money coming in (e.g. manual - // top-up). + // The direction of the transaction. Debits mean money leaving the account + // (e.g. outbound payment), while credits signify money coming in (e.g. manual + // top-up). direction?: Types.PaymentAccountTransactionDirection; - // Number of records to return. + // Number of records to return. limit?: string; - // The beginning of query period + // The beginning of query period value_date_from: string; - // The end of query period + // The end of query period value_date_to: string; } diff --git a/src/services/paymentService.ts b/src/services/paymentService.ts index aa6cfef..14ae99c 100644 --- a/src/services/paymentService.ts +++ b/src/services/paymentService.ts @@ -11,86 +11,99 @@ interface PaymentListResponse extends Types.APIResponse { } interface PaymentCreateRequest { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents - // in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount: string; - // The amount to be deducted from the payment as the OAuth app's fee, in the - // lowest denomination for the currency (e.g. pence in GBP, cents in EUR). + // The amount to be deducted from the payment as the OAuth app's fee, in the + // lowest denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string; - // A future date on which the payment should be collected. If not specified, the - // payment will be collected as soon as possible. If the value is before the - // [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` creation - // will fail. If the value is not a working day it will be rolled forwards to - // the next available one. + // A future date on which the payment should be collected. If not specified, + // the payment will be collected as soon as possible. If the value is before + // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` + // creation will fail. If the value is not a working day it will be rolled + // forwards to the next available one. charge_date?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency: Types.PaymentCurrency; - // A human-readable description of the payment. This will be included in the - // notification email GoCardless sends to your customer if your organisation - // does not send its own notifications (see [compliance - // requirements](#appendix-compliance-requirements)). + // A human-readable description of the payment. This will be included in the + // notification email GoCardless sends to your customer if your organisation + // does not send its own notifications (see [compliance + // requirements](#appendix-compliance-requirements)). description?: string; - // Set this to true or false in the request to create an ACH payment to - // explicitly choose whether the payment should be processed through Faster - // ACH or standard ACH, rather than relying on the presence or absence of the - // charge date to indicate that. + // Set this to true or false in the request to create an ACH payment to + // explicitly choose whether the payment should be processed through Faster + // ACH or standard ACH, rather than relying on the presence or absence of the + // charge date to indicate that. faster_ach?: boolean; // Resources linked to this Payment. links: Types.PaymentCreateRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; - // 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.

+ // Indicates how a Variable Recurring Payment (VRP) is initiated, by or on + // behalf of the payer. + //
    + //
  • `in_session`: The payer is actively participating in the payment + // creation session.
  • + //
  • `off_session`: The payer is not present during the transaction, and the + // payment is initiated by the merchant based on an established consent (e.g., + // a recurring subscription payment).
  • + //
+ + psu_interaction_type?: Types.PaymentPsuInteractionType; + + // 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.

reference?: string; - // On failure, automatically retry the payment using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry the payment using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; } interface PaymentListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; @@ -100,113 +113,114 @@ interface PaymentListRequest { // The creation date of this Payment. created_at?: Types.CreatedAtFilter; - // ID of a creditor to filter payments by. If you pass this parameter, you - // cannot also pass `customer`. + // ID of a creditor to filter payments by. If you pass this parameter, you + // cannot also pass `customer`. creditor?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: Types.PaymentCurrency; - // ID of a customer to filter payments by. If you pass this parameter, you - // cannot also pass `creditor`. + // ID of a customer to filter payments by. If you pass this parameter, you + // cannot also pass `creditor`. customer?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // Unique identifier, beginning with "MD". Note that this prefix may not apply - // to mandates created before 2016. + // Unique identifier, beginning with "MD". Note that this prefix may not apply + // to mandates created before 2016. mandate?: string; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. scheme?: string; - // The direction to sort in. - // One of: - //
    - //
  • `asc`
  • - //
  • `desc`
  • - //
+ // The direction to sort in. + // One of: + //
    + //
  • `asc`
  • + //
  • `desc`
  • + //
sort_direction?: Types.PaymentSortDirection; - // Field by which to sort records. - // One of: - //
    - //
  • `charge_date`
  • - //
  • `amount`
  • - //
+ // Field by which to sort records. + // One of: + //
    + //
  • `charge_date`
  • + //
  • `amount`
  • + //
sort_field?: Types.PaymentSortField; - // One of: - //
    - //
  • `pending_customer_approval`: we're waiting for the customer to approve - // this payment
  • - //
  • `pending_submission`: the payment has been created, but not yet submitted - // to the banks
  • - //
  • `submitted`: the payment has been submitted to the banks
  • - //
  • `confirmed`: the payment has been confirmed as collected
  • - //
  • `paid_out`: the payment has been included in a - // [payout](#core-endpoints-payouts)
  • - //
  • `cancelled`: the payment has been cancelled
  • - //
  • `customer_approval_denied`: the customer has denied approval for the - // payment. You should contact the customer directly
  • - //
  • `failed`: the payment failed to be processed. Note that payments can fail - // after being confirmed if the failure message is sent late by the banks.
  • - //
  • `charged_back`: the payment has been charged back
  • - //
+ // One of: + //
    + //
  • `pending_customer_approval`: we're waiting for the customer to approve + // this payment
  • + //
  • `pending_submission`: the payment has been created, but not yet + // submitted to the banks
  • + //
  • `submitted`: the payment has been submitted to the banks
  • + //
  • `confirmed`: the payment has been confirmed as collected
  • + //
  • `paid_out`: the payment has been included in a + // [payout](#core-endpoints-payouts)
  • + //
  • `cancelled`: the payment has been cancelled
  • + //
  • `customer_approval_denied`: the customer has denied approval for the + // payment. You should contact the customer directly
  • + //
  • `failed`: the payment failed to be processed. Note that payments can + // fail after being confirmed if the failure message is sent late by the + // banks.
  • + //
  • `charged_back`: the payment has been charged back
  • + //
status?: Types.PaymentStatus; - // Unique identifier, beginning with "SB". + // Unique identifier, beginning with "SB". subscription?: string; } interface PaymentUpdateRequest { - // 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. + // 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. metadata?: Types.JsonMap; - // On failure, automatically retry the payment using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry the payment using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; } interface PaymentCancelRequest { - // 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. + // 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. metadata?: Types.JsonMap; } interface PaymentRetryRequest { - // A future date on which the payment should be collected. If not specified, the - // payment will be collected as soon as possible. If the value is before the - // [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` creation - // will fail. If the value is not a working day it will be rolled forwards to - // the next available one. + // A future date on which the payment should be collected. If not specified, + // the payment will be collected as soon as possible. If the value is before + // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` + // creation will fail. If the value is not a working day it will be rolled + // forwards to the next available one. charge_date?: 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. + // 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. metadata?: Types.JsonMap; } diff --git a/src/services/payoutItemService.ts b/src/services/payoutItemService.ts index ff0dba5..92f0b81 100644 --- a/src/services/payoutItemService.ts +++ b/src/services/payoutItemService.ts @@ -11,24 +11,24 @@ interface PayoutItemListResponse extends Types.APIResponse { } interface PayoutItemListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Boolean value indicating whether the API should return tax data for the - // cutover period of April to August 2020. Defaults to false. + // Boolean value indicating whether the API should return tax data for the + // cutover period of April to August 2020. Defaults to false. include_2020_tax_cutover?: Types.PayoutItemInclude2020TaxCutover; - // Number of records to return. + // Number of records to return. limit?: string; - // Unique identifier, beginning with "PO". + // Unique identifier, beginning with "PO". payout: string; } diff --git a/src/services/payoutService.ts b/src/services/payoutService.ts index 020cb95..0a69303 100644 --- a/src/services/payoutService.ts +++ b/src/services/payoutService.ts @@ -11,64 +11,64 @@ interface PayoutListResponse extends Types.APIResponse { } interface PayoutListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Payout. created_at?: Types.CreatedAtFilter; - // Unique identifier, beginning with "CR". + // Unique identifier, beginning with "CR". creditor?: string; - // Unique identifier, beginning with "BA". + // Unique identifier, beginning with "BA". creditor_bank_account?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: Types.PayoutCurrency; - // Number of records to return. + // Number of records to return. limit?: 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. _Note:_ This should not be - // used for storing PII data. + // 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. _Note:_ This should not + // be used for storing PII data. metadata?: Types.JsonMap; - // Whether a payout contains merchant revenue or partner fees. + // Whether a payout contains merchant revenue or partner fees. payout_type?: Types.PayoutPayoutType; - // Reference which appears on the creditor's bank statement. + // Reference which appears on the creditor's bank statement. reference?: string; - // One of: - //
    - //
  • `pending`: the payout has been created, but not yet sent to your bank or - // it is in the process of being exchanged through our FX provider.
  • - //
  • `paid`: the payout has been sent to the your bank. FX payouts will become - // `paid` after we emit the `fx_rate_confirmed` webhook.
  • - //
  • `bounced`: the payout bounced when sent, the payout can be retried.
  • - //
+ // One of: + //
    + //
  • `pending`: the payout has been created, but not yet sent to your bank or + // it is in the process of being exchanged through our FX provider.
  • + //
  • `paid`: the payout has been sent to the your bank. FX payouts will + // become `paid` after we emit the `fx_rate_confirmed` webhook.
  • + //
  • `bounced`: the payout bounced when sent, the payout can be retried.
  • + //
status?: Types.PayoutStatus; } interface PayoutUpdateRequest { - // 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. + // 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. metadata?: Types.JsonMap; } diff --git a/src/services/redirectFlowService.ts b/src/services/redirectFlowService.ts index a4a628f..9de0db6 100644 --- a/src/services/redirectFlowService.ts +++ b/src/services/redirectFlowService.ts @@ -11,57 +11,57 @@ interface RedirectFlowListResponse extends Types.APIResponse { } interface RedirectFlowCreateRequest { - // A description of the item the customer is paying for. This will be shown on - // the hosted payment pages. + // A description of the item the customer is paying for. This will be shown on + // the hosted payment pages. description?: string; // Resources linked to this RedirectFlow. links?: Types.RedirectFlowCreateRequestLinks; - // 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. _Note:_ This should not be - // used for storing PII data. + // 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. _Note:_ This should not + // be used for storing PII data. metadata?: Types.JsonMap; - // Bank account information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Bank account information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_bank_account?: Types.RedirectFlowPrefilledBankAccount; - // Customer information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Customer information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_customer?: Types.RedirectFlowPrefilledCustomer; - // The Direct Debit scheme of the mandate. If specified, the payment pages will - // only allow the set-up of a mandate for the specified scheme. It is - // recommended that you leave this blank so the most appropriate scheme is - // picked based on the customer's bank account. + // The Direct Debit scheme of the mandate. If specified, the payment pages will + // only allow the set-up of a mandate for the specified scheme. It is + // recommended that you leave this blank so the most appropriate scheme is + // picked based on the customer's bank account. scheme?: Types.RedirectFlowScheme; - // The customer's session ID must be provided when the redirect flow is set up - // and again when it is completed. This allows integrators to ensure that the - // user who was originally sent to the GoCardless payment pages is the one who - // has completed them. + // The customer's session ID must be provided when the redirect flow is set up + // and again when it is completed. This allows integrators to ensure that the + // user who was originally sent to the GoCardless payment pages is the one who + // has completed them. session_token: string; - // The URL to redirect to upon successful mandate setup. You must use a URL - // beginning `https` in the live environment. + // The URL to redirect to upon successful mandate setup. You must use a URL + // beginning `https` in the live environment. success_redirect_url: string; } interface RedirectFlowCompleteRequest { - // The customer's session ID must be provided when the redirect flow is set up - // and again when it is completed. This allows integrators to ensure that the - // user who was originally sent to the GoCardless payment pages is the one who - // has completed them. + // The customer's session ID must be provided when the redirect flow is set up + // and again when it is completed. This allows integrators to ensure that the + // user who was originally sent to the GoCardless payment pages is the one who + // has completed them. session_token: string; } diff --git a/src/services/refundService.ts b/src/services/refundService.ts index 186e24d..c228d45 100644 --- a/src/services/refundService.ts +++ b/src/services/refundService.ts @@ -11,90 +11,91 @@ interface RefundListResponse extends Types.APIResponse { } interface RefundCreateRequest { - // Amount in minor unit (e.g. pence in GBP, cents in EUR). + // Amount in minor unit (e.g. pence in GBP, cents in EUR). amount: string; // Resources linked to this Refund. links: Types.RefundCreateRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; - // 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.

+ // 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.

reference?: string; - // Total expected refunded amount in minor unit (e.g. pence/cents/öre). If there - // are - // other partial refunds against this payment, this value should be the sum of - // the - // existing refunds plus the amount of the refund being created. - //
- // Must be supplied if `links[payment]` is present. - //

It is possible to opt out of requiring - // `total_amount_confirmation`, please contact our support team for more - // information.

+ // Total expected refunded amount in minor unit (e.g. pence/cents/öre). If + // there are + // other partial refunds against this payment, this value should be the sum of + // the + // existing refunds plus the amount of the refund being created. + //
+ // Must be supplied if `links[payment]` is present. + //

It is possible to opt out of requiring + // `total_amount_confirmation`, please contact our support team for more + // information.

total_amount_confirmation?: string; } interface RefundListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Refund. created_at?: Types.CreatedAtFilter; - // Number of records to return. + // Number of records to return. limit?: string; - // Unique identifier, beginning with "MD". Note that this prefix may not apply - // to mandates created before 2016. + // Unique identifier, beginning with "MD". Note that this prefix may not apply + // to mandates created before 2016. mandate?: string; - // Unique identifier, beginning with "PM". + // Unique identifier, beginning with "PM". payment?: string; - // Whether a refund was issued against a mandate or a payment. One of: - //
    - //
  • `payment`: default returns refunds created against payments - // only
  • - //
  • `mandate`: returns refunds created against mandates only
  • - //
+ // Whether a refund was issued against a mandate or a payment. One of: + //
    + //
  • `payment`: default returns refunds created against payments + // only
  • + //
  • `mandate`: returns refunds created against mandates only
  • + //
refund_type?: Types.RefundRefundType; } interface RefundUpdateRequest { - // 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. + // 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. metadata?: Types.JsonMap; } diff --git a/src/services/schemeIdentifierService.ts b/src/services/schemeIdentifierService.ts index f6e6753..4828264 100644 --- a/src/services/schemeIdentifierService.ts +++ b/src/services/schemeIdentifierService.ts @@ -14,30 +14,30 @@ interface SchemeIdentifierCreateRequest { // Resources linked to this SchemeIdentifier. links?: Types.SchemeIdentifierCreateRequestLinks; - // The name which appears on customers' bank statements. This should usually be - // the merchant's trading name. + // The name which appears on customers' bank statements. This should usually be + // the merchant's trading name. name: string; - // The scheme which this scheme identifier applies to. + // The scheme which this scheme identifier applies to. scheme: Types.SchemeIdentifierScheme; } interface SchemeIdentifierListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Unique identifier, beginning with "CR". + // Unique identifier, beginning with "CR". creditor?: string; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/subscriptionService.ts b/src/services/subscriptionService.ts index 36a1e9e..6c67130 100644 --- a/src/services/subscriptionService.ts +++ b/src/services/subscriptionService.ts @@ -11,211 +11,211 @@ interface SubscriptionListResponse extends Types.APIResponse { } interface SubscriptionCreateRequest { - // Amount in the lowest denomination for the currency (e.g. pence in GBP, cents - // in EUR). + // Amount in the lowest denomination for the currency (e.g. pence in GBP, cents + // in EUR). amount: string; - // 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). + // 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). app_fee?: string; - // The total number of payments that should be taken by this subscription. + // The total number of payments that should be taken by this subscription. count?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency: string; - // 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. + // 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. day_of_month?: string; - // 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.

+ // 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.

end_date?: string; - // 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`. + // 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?: string; - // The unit of time between customer charge dates. One of `weekly`, `monthly` or - // `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit: Types.SubscriptionIntervalUnit; // Resources linked to this Subscription. links: Types.SubscriptionCreateRequestLinks; - // 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. + // 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. metadata?: Types.JsonMap; - // Name of the month on which to charge a customer. Must be lowercase. Only - // applies - // when the interval_unit is `yearly`. + // Name of the month on which to charge a customer. Must be lowercase. Only + // applies + // when the interval_unit is `yearly`. // month?: Types.SubscriptionMonth; - // Optional name for the subscription. This will be set as the description on - // each payment created. Must not exceed 255 characters. + // Optional name for the subscription. This will be set as the description on + // each payment created. Must not exceed 255 characters. name?: string; - // 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](#payments-create-a-payment) for more details. - //
- //

Restricted: You need your own - // Service User Number to specify a payment reference for Bacs payments.

+ // 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](#payments-create-a-payment) for more details. + //
+ //

Restricted: You need your own + // Service User Number to specify a payment reference for Bacs payments.

payment_reference?: string; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; - // The date on which the first payment should be charged. Must be on or after - // the [mandate](#core-endpoints-mandates)'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` + // The date on which the first payment should be charged. Must be on or after + // the [mandate](#core-endpoints-mandates)'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` start_date?: string; } interface SubscriptionListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Subscription. created_at?: Types.CreatedAtFilter; - // Unique identifier, beginning with "CU". + // Unique identifier, beginning with "CU". customer?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // Unique identifier, beginning with "MD". Note that this prefix may not apply - // to mandates created before 2016. + // Unique identifier, beginning with "MD". Note that this prefix may not apply + // to mandates created before 2016. mandate?: string; - // Upto 5 of: - //
    - //
  • `pending_customer_approval`
  • - //
  • `customer_approval_denied`
  • - //
  • `active`
  • - //
  • `finished`
  • - //
  • `cancelled`
  • - //
  • `paused`
  • - //
- // Omit entirely to include subscriptions in all states. + // Upto 5 of: + //
    + //
  • `pending_customer_approval`
  • + //
  • `customer_approval_denied`
  • + //
  • `active`
  • + //
  • `finished`
  • + //
  • `cancelled`
  • + //
  • `paused`
  • + //
+ // Omit entirely to include subscriptions in all states. status?: Types.SubscriptionStatus[]; } interface SubscriptionUpdateRequest { - // Amount in the lowest denomination for the currency (e.g. pence in GBP, cents - // in EUR). + // Amount in the lowest denomination for the currency (e.g. pence in GBP, cents + // in EUR). amount?: string; - // 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). + // 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). app_fee?: 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. + // 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. metadata?: Types.JsonMap; - // Optional name for the subscription. This will be set as the description on - // each payment created. Must not exceed 255 characters. + // Optional name for the subscription. This will be set as the description on + // each payment created. Must not exceed 255 characters. name?: string; - // 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](#payments-create-a-payment) for more details. - //
- //

Restricted: You need your own - // Service User Number to specify a payment reference for Bacs payments.

+ // 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](#payments-create-a-payment) for more details. + //
+ //

Restricted: You need your own + // Service User Number to specify a payment reference for Bacs payments.

payment_reference?: string; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; } interface SubscriptionPauseRequest { - // 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. + // 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. metadata?: Types.JsonMap; - // 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](#subscriptions-resume-a-subscription). - // For NZD subscriptions with `interval_unit: weekly` the minimum value is `2` - // because of the [mandatory minimum waiting - // period](#subscriptions-resume-a-subscription). + // 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](#subscriptions-resume-a-subscription). + // For NZD subscriptions with `interval_unit: weekly` the minimum value is `2` + // because of the [mandatory minimum waiting + // period](#subscriptions-resume-a-subscription). pause_cycles?: number; } interface SubscriptionResumeRequest { - // 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. + // 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. metadata?: Types.JsonMap; } interface SubscriptionCancelRequest { - // 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. + // 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. metadata?: Types.JsonMap; } diff --git a/src/services/taxRateService.ts b/src/services/taxRateService.ts index 562de1e..d259106 100644 --- a/src/services/taxRateService.ts +++ b/src/services/taxRateService.ts @@ -11,19 +11,19 @@ interface TaxRateListResponse extends Types.APIResponse { } interface TaxRateListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // The jurisdiction this tax rate applies to + // The jurisdiction this tax rate applies to jurisdiction?: string; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/verificationDetailService.ts b/src/services/verificationDetailService.ts index 85d6875..8604939 100644 --- a/src/services/verificationDetailService.ts +++ b/src/services/verificationDetailService.ts @@ -11,60 +11,60 @@ interface VerificationDetailListResponse extends Types.APIResponse { } interface VerificationDetailCreateRequest { - // The first line of the company's address. + // The first line of the company's address. address_line1: string; - // The second line of the company's address. + // The second line of the company's address. address_line2?: string; - // The third line of the company's address. + // The third line of the company's address. address_line3?: string; - // The city of the company's address. + // The city of the company's address. city: string; - // The company's registration number. + // The company's registration number. company_number: string; - // A summary describing what the company does. + // A summary describing what the company does. description: string; - // The company's directors. + // The company's directors. directors: Types.VerificationDetailDirector[]; // Resources linked to this VerificationDetail. links: Types.VerificationDetailCreateRequestLinks; - // The company's legal name. + // The company's legal name. name: string; - // The company's postal code. + // The company's postal code. postal_code: string; } interface VerificationDetailListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Unique identifier, beginning with "CR". + // Unique identifier, beginning with "CR". creditor: string; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/webhookService.ts b/src/services/webhookService.ts index e4620a3..22b3fac 100644 --- a/src/services/webhookService.ts +++ b/src/services/webhookService.ts @@ -11,26 +11,26 @@ interface WebhookListResponse extends Types.APIResponse { } interface WebhookListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Webhook. created_at?: Types.CreatedAtFilter; - // Show only test/non test webhooks + // Show only test/non test webhooks is_test?: boolean; - // Number of records to return. + // Number of records to return. limit?: string; - // Show only successful/failed webhooks + // Show only successful/failed webhooks successful?: boolean; } diff --git a/src/types/Types.ts b/src/types/Types.ts index 548c0c3..821a5a1 100644 --- a/src/types/Types.ts +++ b/src/types/Types.ts @@ -1,35 +1,35 @@ /** Type for a balance resource. */ export type Balance = { - // The total amount in the balance, defined as the sum of all debits - // subtracted from the sum of all credits, - // in the lowest denomination for the currency (e.g. pence in GBP, cents in - // EUR). + // The total amount in the balance, defined as the sum of all debits + // subtracted from the sum of all credits, + // in the lowest denomination for the currency (e.g. pence in GBP, cents in + // EUR). amount?: number; - // Type of the balance. Could be one of - //
    - //
  • pending_payments_submitted: Payments we have submitted to the scheme - // but not yet confirmed. This does not exactly correspond to Pending - // payments in the dashboard, because this balance does not include - // payments that are pending submission.
  • - //
  • confirmed_funds: Payments that have been confirmed minus fees and - // unclaimed debits for refunds, failures and chargebacks. These funds have - // not yet been moved into a payout.
  • - //
  • pending_payouts: Confirmed payments that have been moved into a payout. - // This is the total due to be paid into your bank account in the next payout - // run (payouts happen once every business day). - // pending_payouts will only be non-zero while we are generating and - // submitting the payouts to our partner bank.
  • - //
+ // Type of the balance. Could be one of + //
    + //
  • pending_payments_submitted: Payments we have submitted to the scheme + // but not yet confirmed. This does not exactly correspond to Pending + // payments in the dashboard, because this balance does not include + // payments that are pending submission.
  • + //
  • confirmed_funds: Payments that have been confirmed minus fees and + // unclaimed debits for refunds, failures and chargebacks. These funds have + // not yet been moved into a payout.
  • + //
  • pending_payouts: Confirmed payments that have been moved into a + // payout. This is the total due to be paid into your bank account in the + // next payout run (payouts happen once every business day). + // pending_payouts will only be non-zero while we are generating and + // submitting the payouts to our partner bank.
  • + //
balance_type?: BalanceBalanceType; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: BalanceCurrency; - // Dynamic [timestamp](#api-usage-dates-and-times) recording when this - // resource was last updated. + // Dynamic [timestamp](#api-usage-dates-and-times) recording when this + // resource was last updated. last_updated_at?: string; // Resources linked to this Balance. @@ -55,78 +55,78 @@ export enum BalanceCurrency { /** Type for a balancelinks resource. */ export type BalanceLinks = { - // ID of the associated [creditor](#core-endpoints-creditors). + // ID of the associated [creditor](#core-endpoints-creditors). creditor?: string; }; /** Type for a bankaccountdetail resource. */ export type BankAccountDetail = { - // Base64 URL encoded encrypted payload, in this case bank details. + // Base64 URL encoded encrypted payload, in this case bank details. ciphertext?: string; - // Base64 URL encoded symmetric content encryption key, encrypted with the - // asymmetric key from your JWKS. + // Base64 URL encoded symmetric content encryption key, encrypted with the + // asymmetric key from your JWKS. encrypted_key?: string; - // Base64 URL encoded initialization vector, used during content encryption. + // Base64 URL encoded initialization vector, used during content encryption. iv?: string; - // Base64 URL encoded JWE header values, containing the following keys: + // Base64 URL encoded JWE header values, containing the following keys: // - // - `alg`: the asymmetric encryption type used to encrypt symmetric key, - // e.g: `RSA-OAEP`. - // - `enc`: the content encryption type, e.g: `A256GCM`. - // - `kid`: the ID of an RSA-2048 public key, from your JWKS, used to - // encrypt the AES key. + // - `alg`: the asymmetric encryption type used to encrypt symmetric key, + // e.g: `RSA-OAEP`. + // - `enc`: the content encryption type, e.g: `A256GCM`. + // - `kid`: the ID of an RSA-2048 public key, from your JWKS, used to + // encrypt the AES key. protected?: string; - // Base64 URL encoded authentication tag, used to verify payload integrity - // during decryption. + // Base64 URL encoded authentication tag, used to verify payload integrity + // during decryption. tag?: string; }; /** Type for a bankaccountholderverification resource. */ export type BankAccountHolderVerification = { - // The actual account name returned by the recipient's bank, populated only in - // the case of a partial match. + // The actual account name returned by the recipient's bank, populated only + // in the case of a partial match. actual_account_name?: string | null; - // The unique identifier for the bank account holder verification resource, - // e.g. "BAHV123". + // The unique identifier for the bank account holder verification resource, + // e.g. "BAHV123". id: string; - // Result of the verification, could be one of - //
    - //
  • `full_match`: The verification has confirmed that the account name - // exactly matches the details provided.
  • - //
  • `partial_match`: The verification has confirmed that the account - // name is similar but does not match to the details provided.
  • - //
  • `no_match`: The verification concludes the provided name does not - // match the account details.
  • - //
  • `unable_to_match`: The verification could not be performed due to - // recipient bank issues or technical issues
  • - //
+ // Result of the verification, could be one of + //
    + //
  • `full_match`: The verification has confirmed that the account name + // exactly matches the details provided.
  • + //
  • `partial_match`: The verification has confirmed that the account + // name is similar but does not match to the details provided.
  • + //
  • `no_match`: The verification concludes the provided name does not + // match the account details.
  • + //
  • `unable_to_match`: The verification could not be performed due to + // recipient bank issues or technical issues
  • + //
result?: BankAccountHolderVerificationResult; - // The status of the bank account holder verification. - //
    - //
  • `pending`: We have triggered the verification, but the result has not - // come back yet.
  • - //
  • `completed`: The verification is complete and is ready to be - // used.
  • - //
+ // The status of the bank account holder verification. + //
    + //
  • `pending`: We have triggered the verification, but the result has + // not come back yet.
  • + //
  • `completed`: The verification is complete and is ready to be + // used.
  • + //
// status: BankAccountHolderVerificationStatus; - // Type of the verification that has been performed - // eg. [Confirmation of - // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) + // Type of the verification that has been performed + // eg. [Confirmation of + // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) type: BankAccountHolderVerificationType; }; /** Type for a bankaccountholderverificationcreaterequestlinks resource. */ export type BankAccountHolderVerificationCreateRequestLinks = { - // The ID of the bank account to verify, e.g. "BA123". + // The ID of the bank account to verify, e.g. "BA123". bank_account: string; }; @@ -148,67 +148,67 @@ export enum BankAccountHolderVerificationStatus { /** Type for a bankauthorisation resource. */ export type BankAuthorisation = { - // Type of authorisation, can be either 'mandate' or 'payment'. + // Type of authorisation, can be either 'mandate' or 'payment'. authorisation_type?: BankAuthorisationAuthorisationType; - // Fixed [timestamp](#api-usage-dates-and-times), recording when the user has - // been authorised. + // Fixed [timestamp](#api-usage-dates-and-times), recording when the user has + // been authorised. authorised_at?: string | null; - // Timestamp when the flow was created + // Timestamp when the flow was created created_at?: string; - // Timestamp when the url will expire. Each authorisation url currently lasts - // for 15 minutes, but this can vary by bank. + // Timestamp when the url will expire. Each authorisation url currently lasts + // for 15 minutes, but this can vary by bank. expires_at?: string; - // Unique identifier, beginning with "BAU". + // Unique identifier, beginning with "BAU". id: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when the - // authorisation URL has been visited. + // Fixed [timestamp](#api-usage-dates-and-times), recording when the + // authorisation URL has been visited. last_visited_at?: string | null; // Resources linked to this BankAuthorisation. links?: BankAuthorisationLinks; - // URL to a QR code PNG image of the bank authorisation url. - // This QR code can be used as an alternative to providing the `url` to the - // payer to allow them to authorise with their mobile devices. + // URL to a QR code PNG image of the bank authorisation url. + // This QR code can be used as an alternative to providing the `url` to the + // payer to allow them to authorise with their mobile devices. qr_code_url?: string | null; - // URL that the payer can be redirected to after authorising the payment. + // URL that the payer can be redirected to after authorising the payment. // - // On completion of bank authorisation, the query parameter of either - // `outcome=success` or `outcome=failure` will be - // appended to the `redirect_uri` to indicate the result of the bank - // authorisation. If the bank authorisation is - // expired, the query parameter `outcome=timeout` will be appended to the - // `redirect_uri`, in which case you should - // prompt the user to try the bank authorisation step again. + // On completion of bank authorisation, the query parameter of either + // `outcome=success` or `outcome=failure` will be + // appended to the `redirect_uri` to indicate the result of the bank + // authorisation. If the bank authorisation is + // expired, the query parameter `outcome=timeout` will be appended to the + // `redirect_uri`, in which case you should + // prompt the user to try the bank authorisation step again. // - // Please note: bank authorisations can still fail despite an - // `outcome=success` on the `redirect_uri`. It is therefore recommended to - // wait for the relevant bank authorisation event, such as - // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), - // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), or - // [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) in - // order to show the correct outcome to the user. + // Please note: bank authorisations can still fail despite an + // `outcome=success` on the `redirect_uri`. It is therefore recommended to + // wait for the relevant bank authorisation event, such as + // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), + // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), + // or [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) + // in order to show the correct outcome to the user. // - // The BillingRequestFlow ID will also be appended to the `redirect_uri` as - // query parameter `id=BRF123`. + // The BillingRequestFlow ID will also be appended to the `redirect_uri` as + // query parameter `id=BRF123`. // - // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. + // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. redirect_uri?: string; - // URL for an oauth flow that will allow the user to authorise the payment + // URL for an oauth flow that will allow the user to authorise the payment url?: string; }; /** Type for a bankauthorisationcreaterequestlinks resource. */ export type BankAuthorisationCreateRequestLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this authorisation was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this authorisation was created. billing_request?: string; }; @@ -219,29 +219,30 @@ export enum BankAuthorisationAuthorisationType { /** Type for a bankauthorisationlinks resource. */ export type BankAuthorisationLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this authorisation was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this authorisation was created. billing_request?: string; - // ID of the [institution](#billing-requests-institutions) against which this - // authorisation was created. + // ID of the [institution](#billing-requests-institutions) against which this + // authorisation was created. institution?: string; }; /** Type for a bankdetailslookup resource. */ export type BankDetailsLookup = { - // Array of [schemes](#mandates_scheme) supported for this bank account. This - // will be an empty array if the bank account is not reachable by any schemes. + // Array of [schemes](#mandates_scheme) supported for this bank account. This + // will be an empty array if the bank account is not reachable by any + // schemes. available_debit_schemes?: BankDetailsLookupAvailableDebitScheme[]; - // The name of the bank with which the account is held (if available). + // The name of the bank with which the account is held (if available). bank_name?: string | null; - // ISO 9362 SWIFT BIC of the bank with which the account is held. + // ISO 9362 SWIFT BIC of the bank with which the account is held. // - //

Even if no BIC is returned for an account, GoCardless may - // still be able to collect payments from it - you should refer to the - // `available_debit_schemes` attribute to determine reachability.

+ //

Even if no BIC is returned for an account, GoCardless + // may still be able to collect payments from it - you should refer to the + // `available_debit_schemes` attribute to determine reachability.

bic?: string | null; }; @@ -260,91 +261,116 @@ export enum BankDetailsLookupAvailableDebitScheme { /** Type for a billingrequest resource. */ export type BillingRequest = { - // List of actions that can be performed before this billing request can be - // fulfilled. + // List of actions that can be performed before this billing request can be + // fulfilled. actions?: BillingRequestAction[]; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // (Optional) If true, this billing request can fallback from instant payment - // to direct debit. - // Should not be set if GoCardless payment intelligence feature is used. + // (Optional) If true, this billing request can fallback from instant payment + // to direct debit. + // Should not be set if GoCardless payment intelligence feature is used. // - // See [Billing Requests: Retain customers with - // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) - // for more information. + // See [Billing Requests: Retain customers with + // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) + // for more information. fallback_enabled?: boolean; - // True if the billing request was completed with direct debit. + // True if the billing request was completed with direct debit. fallback_occurred?: boolean; - // Unique identifier, beginning with "BRQ". + // Unique identifier, beginning with "BRQ". id: string; - // Request for an instalment schedule. Has to contain either - // `instalments_with_schedule` object or an array of `instalments_with_dates` - // objects + // Request for an instalment schedule. Has to contain either + // `instalments_with_schedule` object or an array of `instalments_with_dates` + // objects instalment_schedule_request?: BillingRequestInstalmentScheduleRequest | null; // Resources linked to this BillingRequest. links?: BillingRequestLinks; - // Request for a mandate + // Request for a mandate mandate_request?: BillingRequestMandateRequest; - // 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. + // 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. metadata?: JsonMap; - // Request for a one-off strongly authorised payment + // Specifies the context or scenario in which the payment is being made. + // Defines whether the payment is for advance/arrears billing, point of sale + // transactions, ecommerce, or account transfers. This helps banks and + // payment processors understand the payment scenario and apply appropriate + // processing rules and risk controls. + payment_context_code?: BillingRequestPaymentContextCode; + + // Specifies the underlying purpose of the payment. Defines the specific + // reason or type of service/goods the payment relates to, improving + // straight-through processing and compliance. + // See [VRP Commercial Payment Purpose + // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) + // for the complete list of valid codes. + payment_purpose_code?: string; + + // Request for a one-off strongly authorised payment payment_request?: BillingRequestPaymentRequest; - // Specifies the high-level purpose of a mandate and/or payment using a set of - // pre-defined categories. Required for the PayTo scheme, optional for all - // others. Currently `mortgage`, `utility`, `loan`, `dependant_support`, - // `gambling`, `retail`, `salary`, `personal`, `government`, `pension`, `tax` - // and `other` are supported. + // Specifies the high-level purpose/category of a mandate and/or payment + // using a set of pre-defined categories. Provides context on the nature and + // reason for the payment to facilitate processing and compliance. + // See [Billing Request Purpose + // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) + // for the complete list of valid codes. purpose_code?: BillingRequestPurposeCode; // resources?: BillingRequestResources; - // One of: - //
    - //
  • `pending`: the billing request is pending and can be used
  • - //
  • `ready_to_fulfil`: the billing request is ready to fulfil
  • - //
  • `fulfilling`: the billing request is currently undergoing - // fulfilment
  • - //
  • `fulfilled`: the billing request has been fulfilled and a payment - // created
  • - //
  • `cancelled`: the billing request has been cancelled and cannot be - // used
  • - //
+ // One of: + //
    + //
  • `pending`: the billing request is pending and can be used
  • + //
  • `ready_to_fulfil`: the billing request is ready to fulfil
  • + //
  • `fulfilling`: the billing request is currently undergoing + // fulfilment
  • + //
  • `fulfilled`: the billing request has been fulfilled and a payment + // created
  • + //
  • `cancelled`: the billing request has been cancelled and cannot be + // used
  • + //
status?: BillingRequestStatus; - // Request for a subscription + // Request for a subscription subscription_request?: BillingRequestSubscriptionRequest | null; }; /** Type for a billingrequestcreaterequestlinks resource. */ export type BillingRequestCreateRequestLinks = { - // ID of the associated [creditor](#core-endpoints-creditors). Only required - // if your account manages multiple creditors. + // ID of the associated [creditor](#core-endpoints-creditors). Only required + // if your account manages multiple creditors. creditor?: string; - // ID of the [customer](#core-endpoints-customers) against which this request - // should be made. + // ID of the [customer](#core-endpoints-customers) against which this request + // should be made. customer?: string; - // (Optional) ID of the - // [customer_bank_account](#core-endpoints-customer-bank-accounts) against - // which this request should be made. + // (Optional) ID of the + // [customer_bank_account](#core-endpoints-customer-bank-accounts) against + // which this request should be made. // customer_bank_account?: string; }; +export enum BillingRequestPaymentContextCode { + BillingGoodsAndServicesInAdvance = 'billing_goods_and_services_in_advance', + BillingGoodsAndServicesInArrears = 'billing_goods_and_services_in_arrears', + FaceToFacePointOfSale = 'face_to_face_point_of_sale', + EcommerceMerchantInitiatedPayment = 'ecommerce_merchant_initiated_payment', + TransferToSelf = 'transfer_to_self', + TransferToThirdParty = 'transfer_to_third_party', +} + export enum BillingRequestPurposeCode { Mortgage = 'mortgage', Utility = 'utility', @@ -358,94 +384,133 @@ export enum BillingRequestPurposeCode { Pension = 'pension', Tax = 'tax', Other = 'other', - Epayment = 'Epayment', - Commercial = 'Commercial', - OtherPayment = 'OtherPayment', - Trade = 'Trade', + BonusPayment = 'bonus_payment', + CashManagementTransfer = 'cash_management_transfer', + CardBulkClearing = 'card_bulk_clearing', + CreditCardPayment = 'credit_card_payment', + TradeSettlementPayment = 'trade_settlement_payment', + DebitCardPayment = 'debit_card_payment', + Dividend = 'dividend', + DeliverAgainstPayment = 'deliver_against_payment', + Epayment = 'epayment', + FeeCollectionAndInterest = 'fee_collection_and_interest', + FeeCollection = 'fee_collection', + PersonToPersonPayment = 'person_to_person_payment', + GovernmentPayment = 'government_payment', + HedgingTransaction = 'hedging_transaction', + IrrevocableCreditCardPayment = 'irrevocable_credit_card_payment', + IrrevocableDebitCardPayment = 'irrevocable_debit_card_payment', + IntraCompanyPayment = 'intra_company_payment', + Interest = 'interest', + LockboxTransactions = 'lockbox_transactions', + Commercial = 'commercial', + Consumer = 'consumer', + OtherPayment = 'other_payment', + PensionPayment = 'pension_payment', + Represented = 'represented', + ReimbursementReceivedCreditTransfer = 'reimbursement_received_credit_transfer', + ReceiveAgainstPayment = 'receive_against_payment', + SalaryPayment = 'salary_payment', + Securities = 'securities', + SocialSecurityBenefit = 'social_security_benefit', + SupplierPayment = 'supplier_payment', + TaxPayment = 'tax_payment', + Trade = 'trade', + TreasuryPayment = 'treasury_payment', + ValueAddedTaxPayment = 'value_added_tax_payment', + WithHolding = 'with_holding', + CashManagementSweepAccount = 'cash_management_sweep_account', + CashManagementTopAccount = 'cash_management_top_account', + CashManagementZeroBalanceAccount = 'cash_management_zero_balance_account', + CrossborderMiPayments = 'crossborder_mi_payments', + ForeignCurrencyDomesticTransfer = 'foreign_currency_domestic_transfer', + CashInPreCredit = 'cash_in_pre_credit', + CashOutNotesCoins = 'cash_out_notes_coins', + CarrierGuardedWholesaleValuables = 'carrier_guarded_wholesale_valuables', } /** Type for a billingrequestcustomer resource. */ export type BillingRequestCustomer = { - // Customer's company name. Required unless a `given_name` and `family_name` - // are provided. For Canadian customers, the use of a `company_name` value - // will mean that any mandate created from this customer will be considered to - // be a "Business PAD" (otherwise, any mandate will be considered to be a - // "Personal PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value + // will mean that any mandate created from this customer will be considered + // to be a "Business PAD" (otherwise, any mandate will be considered to be a + // "Personal PAD"). company_name?: string | null; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows + // GoCardless to send notifications to this customer. email?: string | null; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string | null; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. - // Used as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", - // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. - // If this is not provided and a customer was linked during billing request - // creation, the linked customer language will be used. Otherwise, the - // language is default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Used as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. + // If this is not provided and a customer was linked during billing request + // creation, the linked customer language will be used. Otherwise, the + // language is default to "en". language?: 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. + // 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. metadata?: JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string | null; }; /** Type for a billingrequestcustomerbillingdetail resource. */ export type BillingRequestCustomerBillingDetail = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated + // in Danish krone (DKK). danish_identity_number?: string | null; - // For ACH customers only. Required for ACH customers. A string containing the - // IP address of the payer to whom the mandate belongs (i.e. as a result of - // their completion of a mandate setup flow in their browser). + // For ACH customers only. Required for ACH customers. A string containing + // the IP address of the payer to whom the mandate belongs (i.e. as a result + // of their completion of a mandate setup flow in their browser). // - // Not required for creating offline mandates where `authorisation_source` is - // set to telephone or paper. + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. // ip_address?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state - // code is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be - // supplied if the customer's bank account is denominated in Swedish krona - // (SEK). This field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be + // supplied if the customer's bank account is denominated in Swedish krona + // (SEK). This field cannot be changed once it has been set. swedish_identity_number?: string | null; }; @@ -468,53 +533,53 @@ export enum BillingRequestNotificationType { /** Type for a billingrequestaction resource. */ export type BillingRequestAction = { - // List of currencies the current mandate supports + // List of currencies the current mandate supports available_currencies?: string[]; - // Describes the behaviour of bank authorisations, for the bank_authorisation - // action + // Describes the behaviour of bank authorisations, for the bank_authorisation + // action bank_authorisation?: BillingRequestActionBankAuthorisation; - // Additional parameters to help complete the collect_customer_details action + // Additional parameters to help complete the collect_customer_details action collect_customer_details?: BillingRequestActionCollectCustomerDetails; - // Which other action types this action can complete. + // Which other action types this action can complete. completes_actions?: string[]; - // Describes whether we inferred the institution from the provided bank - // account details. One of: - // - `not_needed`: we won't attempt to infer the institution as it is not - // needed. Either because it was manually selected or the billing request does - // not support this feature - // - `pending`: we are waiting on the bank details in order to infer the - // institution - // - `failed`: we weren't able to infer the institution - // - `success`: we inferred the institution and added it to the resources of a - // Billing Request + // Describes whether we inferred the institution from the provided bank + // account details. One of: + // - `not_needed`: we won't attempt to infer the institution as it is not + // needed. Either because it was manually selected or the billing request + // does not support this feature + // - `pending`: we are waiting on the bank details in order to infer the + // institution + // - `failed`: we weren't able to infer the institution + // - `success`: we inferred the institution and added it to the resources of + // a Billing Request // institution_guess_status?: BillingRequestActionInstitutionGuessStatus; - // Informs you whether the action is required to fulfil the billing request or - // not. + // Informs you whether the action is required to fulfil the billing request + // or not. required?: boolean; - // Requires completing these actions before this action can be completed. + // Requires completing these actions before this action can be completed. requires_actions?: string[]; - // Status of the action + // Status of the action status?: BillingRequestActionStatus; - // Unique identifier for the action. + // Unique identifier for the action. type?: BillingRequestActionType; }; /** Type for a billingrequestactionbankauthorisation resource. */ export type BillingRequestActionBankAuthorisation = { - // Which authorisation adapter will be used to power these authorisations - // (GoCardless internal use only) + // Which authorisation adapter will be used to power these authorisations + // (GoCardless internal use only) adapter?: BillingRequestActionBankAuthorisationAdapter; - // What type of bank authorisations are supported on this billing request + // What type of bank authorisations are supported on this billing request authorisation_type?: BillingRequestActionBankAuthorisationAuthorisationType; }; @@ -533,7 +598,7 @@ export enum BillingRequestActionBankAuthorisationAuthorisationType { /** Type for a billingrequestactioncollectcustomerdetails resource. */ export type BillingRequestActionCollectCustomerDetails = { - // Default customer country code, as determined by scheme and payer location + // Default customer country code, as determined by scheme and payer location default_country_code?: string; // @@ -573,104 +638,107 @@ export enum BillingRequestActionType { /** Type for a billingrequestinstalmentschedulerequest resource. */ export type BillingRequestInstalmentScheduleRequest = { - // 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). + // 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). app_fee?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "USD" and "CAD" are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "USD" and "CAD" are supported. currency?: string; - // An explicit array of instalment payments, each specifying at least an - // `amount` and `charge_date`. See [create (with - // dates)](#instalment-schedules-create-with-dates) + // An explicit array of instalment payments, each specifying at least an + // `amount` and `charge_date`. See [create (with + // dates)](#instalment-schedules-create-with-dates) instalments_with_dates?: BillingRequestInstalmentScheduleRequestInstalmentsWithDate[] | null; - // 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)](#instalment-schedules-create-with-schedule) + // 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)](#instalment-schedules-create-with-schedule) // instalments_with_schedule?: BillingRequestInstalmentScheduleRequestInstalmentsWithSchedule | null; // Resources linked to this BillingRequestInstalmentScheduleRequest. links?: BillingRequestInstalmentScheduleRequestLinks; - // 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. + // 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. metadata?: JsonMap; - // 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. + // 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. name?: string; - // 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](#payments-create-a-payment) for more details. - //
+ // 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](#payments-create-a-payment) for more + // details. + //
payment_reference?: string | null; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; - // 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. + // 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. total_amount?: string; }; /** Type for a billingrequestinstalmentschedulerequestinstalmentswithdate resource. */ export type BillingRequestInstalmentScheduleRequestInstalmentsWithDate = { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount: string; - // A future date on which the payment should be collected. If the date - // is before the next_possible_charge_date on the - // [mandate](#core-endpoints-mandates), it will be automatically rolled - // forwards to that date. + // A future date on which the payment should be collected. If the date + // is before the next_possible_charge_date on the + // [mandate](#core-endpoints-mandates), it will be automatically rolled + // forwards to that date. charge_date: string | null; - // A human-readable description of the payment. This will be included in the - // notification email GoCardless sends to your customer if your organisation - // does not send its own notifications (see [compliance - // requirements](#appendix-compliance-requirements)). + // A human-readable description of the payment. This will be included in the + // notification email GoCardless sends to your customer if your organisation + // does not send its own notifications (see [compliance + // requirements](#appendix-compliance-requirements)). description?: string | null; }; /** Type for a billingrequestinstalmentschedulerequestinstalmentswithschedule resource. */ export type BillingRequestInstalmentScheduleRequestInstalmentsWithSchedule = { - // List of amounts of each instalment, in the lowest denomination for the - // currency (e.g. cents in USD). + // List of amounts of each instalment, in the lowest denomination for the + // currency (e.g. cents in USD). // amounts: string[]; - // Number of `interval_units` between charge dates. Must be greater than or - // equal to `1`. + // Number of `interval_units` between charge dates. Must be greater than or + // equal to `1`. // interval: number; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit: BillingRequestInstalmentScheduleRequestInstalmentsWithScheduleIntervalUnit; - // The date on which the first payment should be charged. Must be on or after - // the [mandate](#core-endpoints-mandates)'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` + // The date on which the first payment should be charged. Must be on or after + // the [mandate](#core-endpoints-mandates)'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` start_date?: string | null; }; @@ -682,170 +750,170 @@ export enum BillingRequestInstalmentScheduleRequestInstalmentsWithScheduleInterv /** Type for a billingrequestinstalmentschedulerequestlinks resource. */ export type BillingRequestInstalmentScheduleRequestLinks = { - // (Optional) ID of the - // [instalment_schedule](#core-endpoints-instalment-schedules) that was - // created from this instalment schedule request. + // (Optional) ID of the + // [instalment_schedule](#core-endpoints-instalment-schedules) that was + // created from this instalment schedule request. // instalment_schedule?: string; }; /** Type for a billingrequestlinks resource. */ export type BillingRequestLinks = { - // (Optional) ID of the [bank - // authorisation](#billing-requests-bank-authorisations) that was used to - // verify this request. + // (Optional) ID of the [bank + // authorisation](#billing-requests-bank-authorisations) that was used to + // verify this request. bank_authorisation?: string; - // ID of the associated [creditor](#core-endpoints-creditors). + // ID of the associated [creditor](#core-endpoints-creditors). creditor?: string; - // ID of the [customer](#core-endpoints-customers) that will be used for this - // request + // ID of the [customer](#core-endpoints-customers) that will be used for this + // request customer?: string; - // (Optional) ID of the - // [customer_bank_account](#core-endpoints-customer-bank-accounts) that will - // be used for this request + // (Optional) ID of the + // [customer_bank_account](#core-endpoints-customer-bank-accounts) that will + // be used for this request customer_bank_account?: string; - // ID of the customer billing detail that will be used for this request + // ID of the customer billing detail that will be used for this request customer_billing_detail?: string; - // (Optional) ID of the associated instalment schedule request + // (Optional) ID of the associated instalment schedule request instalment_schedule_request?: string; - // (Optional) ID of the - // [instalment_schedule](#core-endpoints-instalment-schedules) that was - // created from this instalment schedule request. + // (Optional) ID of the + // [instalment_schedule](#core-endpoints-instalment-schedules) that was + // created from this instalment schedule request. instalment_schedule_request_instalment_schedule?: string; - // (Optional) ID of the associated mandate request + // (Optional) ID of the associated mandate request mandate_request?: string; - // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created - // from this mandate request. this mandate request. + // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created + // from this mandate request. this mandate request. mandate_request_mandate?: string; - // ID of the associated organisation. + // ID of the associated organisation. organisation?: string; - // (Optional) ID of the associated payment provider + // (Optional) ID of the associated payment provider payment_provider?: string; - // (Optional) ID of the associated payment request + // (Optional) ID of the associated payment request payment_request?: string; - // (Optional) ID of the [payment](#core-endpoints-payments) that was created - // from this payment request. + // (Optional) ID of the [payment](#core-endpoints-payments) that was created + // from this payment request. payment_request_payment?: string; - // (Optional) ID of the associated subscription request + // (Optional) ID of the associated subscription request subscription_request?: string; - // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was - // created from this subscription request. + // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that + // was created from this subscription request. subscription_request_subscription?: string; }; /** Type for a billingrequestmandaterequest resource. */ export type BillingRequestMandateRequest = { - // This field is ACH specific, sometimes referred to as [SEC - // code](https://www.moderntreasury.com/learn/sec-codes). + // This field is ACH specific, sometimes referred to as [SEC + // code](https://www.moderntreasury.com/learn/sec-codes). // - // This is the way that the payer gives authorisation to the merchant. - // web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC - // code: WEB) - // telephone: Authorisation is provided orally over telephone (maps to SEC - // code: TEL) - // paper: Authorisation is provided in writing and signed, or similarly - // authenticated (maps to SEC code: PPD) + // This is the way that the payer gives authorisation to the merchant. + // web: Authorisation is Internet Initiated or via Mobile Entry (maps to + // SEC code: WEB) + // telephone: Authorisation is provided orally over telephone (maps to SEC + // code: TEL) + // paper: Authorisation is provided in writing and signed, or similarly + // authenticated (maps to SEC code: PPD) // authorisation_source?: BillingRequestMandateRequestAuthorisationSource; - // This attribute represents the authorisation type between the payer and - // merchant. It can be set to `one_off`, - // `recurring` or `standing` for ACH scheme. And `single`, `recurring` and - // `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and PAD - // schemes. + // This attribute represents the authorisation type between the payer and + // merchant. It can be set to `one_off`, + // `recurring` or `standing` for ACH scheme. And `single`, `recurring` and + // `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and PAD + // schemes. // consent_type?: string | null; - // Constraints that will apply to the mandate_request. (Optional) Specifically - // required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) + // Specifically required for PayTo and VRP. constraints?: BillingRequestMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // description?: string | null; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: BillingRequestMandateRequestFundsSettlement; // Resources linked to this BillingRequestMandateRequest. links?: BillingRequestMandateRequestLinks; - // 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. + // 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. metadata?: JsonMap; - // This attribute can be set to true if the payer has indicated that multiple - // signatures are required for the mandate. As long as every other Billing - // Request actions have been completed, the payer will receive an email - // notification containing instructions on how to complete the additional - // signature. The dual signature flow can only be completed using GoCardless - // branded pages. + // This attribute can be set to true if the payer has indicated that multiple + // signatures are required for the mandate. As long as every other Billing + // Request actions have been completed, the payer will receive an email + // notification containing instructions on how to complete the additional + // signature. The dual signature flow can only be completed using GoCardless + // branded pages. payer_requested_dual_signature?: boolean; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with - // from a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with + // from a list of your available schemes. scheme?: string | null; - // If true, this billing request would be used to set up a mandate solely for - // moving (or sweeping) money from one account owned by the payer to another - // account that the payer also owns. This is required for Faster Payments + // If true, this billing request would be used to set up a mandate solely for + // moving (or sweeping) money from one account owned by the payer to another + // account that the payer also owns. This is required for Faster Payments sweeping?: boolean; - // 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. 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. verify?: BillingRequestMandateRequestVerify; }; @@ -857,65 +925,65 @@ export enum BillingRequestMandateRequestAuthorisationSource { /** Type for a billingrequestmandaterequestconstraints resource. */ export type BillingRequestMandateRequestConstraints = { - // The latest date at which payments can be taken, must occur after start_date - // if present + // The latest date at which payments can be taken, must occur after + // start_date if present // - // This is an optional field and if it is not supplied the agreement will be - // considered open and - // will not have an end date. Keep in mind the end date must take into account - // how long it will - // take the user to set up this agreement via the Billing Request. + // This is an optional field and if it is not supplied the agreement will be + // considered open and + // will not have an end date. Keep in mind the end date must take into + // account how long it will + // take the user to set up this agreement via the Billing Request. // 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. 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. + // 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. // payment_method?: string; - // List of periodic limits and constraints which apply to them + // List of periodic limits and constraints which apply to them periodic_limits?: BillingRequestMandateRequestConstraintsPeriodicLimit[]; - // The date from which payments can be taken. + // The date from which payments can be taken. // - // This is an optional field and if it is not supplied the start date will be - // set to the day - // authorisation happens. + // This is an optional field and if it is not supplied the start date will be + // set to the day + // authorisation happens. // start_date?: string; }; /** Type for a billingrequestmandaterequestconstraintsperiodiclimit resource. */ export type BillingRequestMandateRequestConstraintsPeriodicLimit = { - // The alignment of the period. + // 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. + // `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. + // `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. // alignment?: BillingRequestMandateRequestConstraintsPeriodicLimitAlignment; - // (Optional) The maximum number of payments that can be collected in this - // periodic limit. + // (Optional) The maximum number of payments that can be collected in this + // periodic limit. max_payments?: number; - // The maximum total amount that can be charged for all payments in this - // periodic limit. - // Required for VRP. + // The maximum total amount that can be charged for all payments in this + // periodic limit. + // Required for VRP. // max_total_amount?: number; - // The repeating period for this mandate. Defaults to flexible for PayTo if - // not specified. + // The repeating period for this mandate. Defaults to flexible for PayTo if + // not specified. period?: BillingRequestMandateRequestConstraintsPeriodicLimitPeriod; }; @@ -939,8 +1007,8 @@ export enum BillingRequestMandateRequestFundsSettlement { /** Type for a billingrequestmandaterequestlinks resource. */ export type BillingRequestMandateRequestLinks = { - // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created - // from this mandate request. this mandate request. + // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created + // from this mandate request. this mandate request. // mandate?: string; }; @@ -954,54 +1022,54 @@ export enum BillingRequestMandateRequestVerify { /** Type for a billingrequestpaymentrequest resource. */ export type BillingRequestPaymentRequest = { - // Amount in minor unit (e.g. pence in GBP, cents in EUR). + // Amount in minor unit (e.g. pence in GBP, cents in EUR). amount?: string; - // The amount to be deducted from the payment as an app fee, to be paid to the - // partner integration which created the billing request, in the lowest - // denomination for the currency (e.g. pence in GBP, cents in EUR). + // The amount to be deducted from the payment as an app fee, to be paid to + // the partner integration which created the billing request, in the lowest + // denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string | null; - // [ISO 4217](http://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. + // [ISO 4217](http://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. currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // description?: string | null; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: BillingRequestPaymentRequestFundsSettlement; // Resources linked to this BillingRequestPaymentRequest. links?: BillingRequestPaymentRequestLinks; - // 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. + // 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. metadata?: JsonMap; - // A custom payment reference defined by the merchant. It is only available - // for payments on the PayTo scheme or payments using the Direct Funds - // settlement model on the Faster Payments scheme. + // A custom payment reference defined by the merchant. It is only available + // for payments on the PayTo scheme or payments using the Direct Funds + // settlement model on the Faster Payments scheme. // reference?: string | null; - // (Optional) A scheme used for Open Banking payments. Currently - // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` - // and `sepa_instant_credit_transfer` are supported in supported Eurozone - // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as - // the default. Please be aware that `sepa_instant_credit_transfer` may incur - // an additional fee for your customer. + // (Optional) A scheme used for Open Banking payments. Currently + // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` + // and `sepa_instant_credit_transfer` are supported in supported Eurozone + // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as + // the default. Please be aware that `sepa_instant_credit_transfer` may incur + // an additional fee for your customer. scheme?: string | null; }; @@ -1012,118 +1080,119 @@ export enum BillingRequestPaymentRequestFundsSettlement { /** Type for a billingrequestpaymentrequestlinks resource. */ export type BillingRequestPaymentRequestLinks = { - // (Optional) ID of the [payment](#core-endpoints-payments) that was created - // from this payment request. + // (Optional) ID of the [payment](#core-endpoints-payments) that was created + // from this payment request. payment?: string; }; /** Type for a billingrequestresources resource. */ export type BillingRequestResources = { - // Embedded customer + // Embedded customer customer?: BillingRequestResourcesCustomer; - // Embedded customer bank account, only if a bank account is linked + // Embedded customer bank account, only if a bank account is linked customer_bank_account?: BillingRequestResourcesCustomerBankAccount | null; - // Embedded customer billing detail + // Embedded customer billing detail customer_billing_detail?: BillingRequestResourcesCustomerBillingDetail; }; /** Type for a billingrequestresourcescustomer resource. */ export type BillingRequestResourcesCustomer = { - // Customer's company name. Required unless a `given_name` and `family_name` - // are provided. For Canadian customers, the use of a `company_name` value - // will mean that any mandate created from this customer will be considered to - // be a "Business PAD" (otherwise, any mandate will be considered to be a - // "Personal PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value + // will mean that any mandate created from this customer will be considered + // to be a "Business PAD" (otherwise, any mandate will be considered to be a + // "Personal PAD"). company_name?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows + // GoCardless to send notifications to this customer. email?: string | null; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string | null; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // Unique identifier, beginning with "CU". + // Unique identifier, beginning with "CU". id?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. - // Used as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", - // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. - // If this is not provided, the language will be chosen based on the - // `country_code` (if supplied) or default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Used as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. + // If this is not provided, the language will be chosen based on the + // `country_code` (if supplied) or default to "en". language?: 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. + // 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. metadata?: JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string | null; }; /** Type for a billingrequestresourcescustomerbankaccount resource. */ export type BillingRequestResourcesCustomerBankAccount = { - // Name of the account holder, as known by the bank. The full name provided - // when the customer is created is stored and is available via the API, but is - // transliterated, upcased, and truncated to 18 characters in bank - // submissions. This field is required unless the request includes a [customer - // bank account token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided + // when the customer is created is stored and is available via the API, but + // is transliterated, upcased, and truncated to 18 characters in bank + // submissions. This field is required unless the request includes a + // [customer bank account + // token](#javascript-flow-customer-bank-account-tokens). account_holder_name?: string; - // The last few digits of the account number. Currently 4 digits for NZD bank - // accounts and 2 digits for other currencies. + // The last few digits of the account number. Currently 4 digits for NZD bank + // accounts and 2 digits for other currencies. account_number_ending?: string; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: BillingRequestResourcesCustomerBankAccountAccountType; - // A token to uniquely refer to a set of bank account details. This feature is - // still in early access and is only available for certain organisations. + // A token to uniquely refer to a set of bank account details. This feature + // is still in early access and is only available for certain organisations. bank_account_token?: string | null; - // Name of bank, taken from the bank details. + // Name of bank, taken from the bank details. bank_name?: string; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string | null; - // Boolean value showing whether the bank account is enabled or disabled. + // Boolean value showing whether the bank account is enabled or disabled. enabled?: boolean; - // Unique identifier, beginning with "BA". + // Unique identifier, beginning with "BA". id?: string; // Resources linked to this BillingRequestResourcesCustomerBankAccount. links?: BillingRequestResourcesCustomerBankAccountLinks; - // 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. + // 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. metadata?: JsonMap; }; @@ -1134,137 +1203,138 @@ export enum BillingRequestResourcesCustomerBankAccountAccountType { /** Type for a billingrequestresourcescustomerbankaccountlinks resource. */ export type BillingRequestResourcesCustomerBankAccountLinks = { - // ID of the [customer](#core-endpoints-customers) that owns this bank - // account. + // ID of the [customer](#core-endpoints-customers) that owns this bank + // account. customer?: string; }; /** Type for a billingrequestresourcescustomerbillingdetail resource. */ export type BillingRequestResourcesCustomerBillingDetail = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated + // in Danish krone (DKK). danish_identity_number?: string | null; - // Unique identifier, beginning with "CU". + // Unique identifier, beginning with "CU". id?: string; - // For ACH customers only. Required for ACH customers. A string containing the - // IP address of the payer to whom the mandate belongs (i.e. as a result of - // their completion of a mandate setup flow in their browser). + // For ACH customers only. Required for ACH customers. A string containing + // the IP address of the payer to whom the mandate belongs (i.e. as a result + // of their completion of a mandate setup flow in their browser). // - // Not required for creating offline mandates where `authorisation_source` is - // set to telephone or paper. + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. // ip_address?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state - // code is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string | null; - // The schemes associated with this customer billing detail + // The schemes associated with this customer billing detail schemes?: string[]; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be - // supplied if the customer's bank account is denominated in Swedish krona - // (SEK). This field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be + // supplied if the customer's bank account is denominated in Swedish krona + // (SEK). This field cannot be changed once it has been set. swedish_identity_number?: string | null; }; /** Type for a billingrequestsubscriptionrequest resource. */ export type BillingRequestSubscriptionRequest = { - // Amount in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount?: string; - // 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). + // 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). app_fee?: string | null; - // The total number of payments that should be taken by this subscription. + // The total number of payments that should be taken by this subscription. count?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "USD" and "CAD" are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "USD" and "CAD" are supported. currency?: string; - // 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. + // 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. day_of_month?: string | null; - // 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`. + // 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?: string; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit?: BillingRequestSubscriptionRequestIntervalUnit; // Resources linked to this BillingRequestSubscriptionRequest. links?: BillingRequestSubscriptionRequestLinks; - // 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. + // 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. metadata?: JsonMap; - // Name of the month on which to charge a customer. Must be lowercase. Only - // applies - // when the interval_unit is `yearly`. + // Name of the month on which to charge a customer. Must be lowercase. Only + // applies + // when the interval_unit is `yearly`. // month?: BillingRequestSubscriptionRequestMonth; - // Optional name for the subscription. This will be set as the description on - // each payment created. Must not exceed 255 characters. + // Optional name for the subscription. This will be set as the description on + // each payment created. Must not exceed 255 characters. name?: string | null; - // 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](#payments-create-a-payment) for more details. - //
+ // 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](#payments-create-a-payment) for more + // details. + //
payment_reference?: string | null; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; - // The date on which the first payment should be charged. If fulfilled after - // this date, this will be set as 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`. + // The date on which the first payment should be charged. If fulfilled after + // this date, this will be set as 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`. // start_date?: string | null; }; @@ -1277,8 +1347,8 @@ export enum BillingRequestSubscriptionRequestIntervalUnit { /** Type for a billingrequestsubscriptionrequestlinks resource. */ export type BillingRequestSubscriptionRequestLinks = { - // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was - // created from this subscription request. + // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that + // was created from this subscription request. // subscription?: string; }; @@ -1300,119 +1370,121 @@ export enum BillingRequestSubscriptionRequestMonth { /** Type for a billingrequestflow resource. */ export type BillingRequestFlow = { - // URL for a GC-controlled flow which will allow the payer to fulfil the - // billing request + // URL for a GC-controlled flow which will allow the payer to fulfil the + // billing request authorisation_url?: string; - // (Experimental feature) Fulfil the Billing Request on completion of the flow - // (true by default). Disabling the auto_fulfil is not allowed currently. + // (Experimental feature) Fulfil the Billing Request on completion of the + // flow (true by default). Disabling the auto_fulfil is not allowed + // currently. auto_fulfil?: boolean; - // Timestamp when the flow was created + // Timestamp when the flow was created created_at?: string; - // Identifies whether a Billing Request belongs to a specific customer + // Identifies whether a Billing Request belongs to a specific customer customer_details_captured?: boolean; - // URL that the payer can be taken to if there isn't a way to progress ahead - // in flow. + // URL that the payer can be taken to if there isn't a way to progress ahead + // in flow, for example if the customer searches for a bank that doesn't + // exist or isn't supported on the scheme. exit_uri?: string | null; - // Timestamp when the flow will expire. Each flow currently lasts for 7 days. + // Timestamp when the flow will expire. Each flow currently lasts for 7 days. expires_at?: string; - // Unique identifier, beginning with "BRF". + // Unique identifier, beginning with "BRF". id: string; - // Sets the default language of the Billing Request Flow and the customer. - // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Sets the default language of the Billing Request Flow and the customer. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. language?: string | null; // Resources linked to this BillingRequestFlow. links?: BillingRequestFlowLinks; - // If true, the payer will not be able to change their bank account within the - // flow. If the bank_account details are collected as part of - // bank_authorisation then GC will set this value to true mid flow. + // If true, the payer will not be able to change their bank account within + // the flow. If the bank_account details are collected as part of + // bank_authorisation then GC will set this value to true mid flow. // - // You can only lock bank account if these have already been completed as a - // part of the billing request. + // You can only lock bank account if these have already been completed as a + // part of the billing request. // lock_bank_account?: boolean; - // If true, the payer will not be able to change their currency/scheme - // manually within the flow. Note that this only applies to the mandate only - // flows - currency/scheme can never be changed when there is a specified - // subscription or payment. + // If true, the payer will not be able to change their currency/scheme + // manually within the flow. Note that this only applies to the mandate only + // flows - currency/scheme can never be changed when there is a specified + // subscription or payment. lock_currency?: boolean; - // If true, the payer will not be able to edit their customer details within - // the flow. If the customer details are collected as part of - // bank_authorisation then GC will set this value to true mid flow. + // If true, the payer will not be able to edit their customer details within + // the flow. If the customer details are collected as part of + // bank_authorisation then GC will set this value to true mid flow. // - // You can only lock customer details if these have already been completed as - // a part of the billing request. + // You can only lock customer details if these have already been completed as + // a part of the billing request. // lock_customer_details?: boolean; - // Bank account information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Bank account information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_bank_account?: BillingRequestFlowPrefilledBankAccount | null; - // Customer information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Customer information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_customer?: BillingRequestFlowPrefilledCustomer | null; - // URL that the payer can be redirected to after completing the request flow. + // URL that the payer can be redirected to after completing the request flow. redirect_uri?: string | null; - // Session token populated when responding to the initialise action + // Session token populated when responding to the initialise action session_token?: string | null; - // If true, the payer will be able to see redirect action buttons on Thank You - // page. These action buttons will provide a way to connect back to the - // billing request flow app if opened within a mobile app. For successful - // flow, the button will take the payer back the billing request flow where - // they will see the success screen. For failure, button will take the payer - // to url being provided against exit_uri field. + // If true, the payer will be able to see redirect action buttons on Thank + // You page. These action buttons will provide a way to connect back to the + // billing request flow app if opened within a mobile app. For successful + // flow, the button will take the payer back the billing request flow where + // they will see the success screen. For failure, button will take the payer + // to url being provided against exit_uri field. show_redirect_buttons?: boolean; - // If true, the payer will be able to see a redirect action button on the - // Success page. This action button will provide a way to redirect the payer - // to the given redirect_uri. This functionality is helpful when merchants do - // not want payers to be automatically redirected or on Android devices, where - // automatic redirections are not possible. + // If true, the payer will be able to see a redirect action button on the + // Success page. This action button will provide a way to redirect the payer + // to the given redirect_uri. This functionality is helpful when merchants do + // not want payers to be automatically redirected or on Android devices, + // where automatic redirections are not possible. show_success_redirect_button?: boolean; - // If true, the payer will not be redirected to the success screen after - // completing the flow. A redirect_uri needs to be provided for this parameter - // to be taken into account. + // If true, the payer will not be redirected to the success screen after + // completing the flow. A redirect_uri needs to be provided for this + // parameter to be taken into account. skip_success_screen?: boolean; }; /** Type for a billingrequestflowcreaterequestlinks resource. */ export type BillingRequestFlowCreateRequestLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this flow was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this flow was created. billing_request: string; }; /** Type for a billingrequestflowlinks resource. */ export type BillingRequestFlowLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this flow was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this flow was created. billing_request: string; }; /** Type for a billingrequestflowprefilledbankaccount resource. */ export type BillingRequestFlowPrefilledBankAccount = { - // Bank account type for USD-denominated bank accounts. Must not be provided - // for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type for USD-denominated bank accounts. Must not be provided + // for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: BillingRequestFlowPrefilledBankAccountAccountType; }; @@ -1423,161 +1495,161 @@ export enum BillingRequestFlowPrefilledBankAccountAccountType { /** Type for a billingrequestflowprefilledcustomer resource. */ export type BillingRequestFlowPrefilledCustomer = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // Customer's company name. Company name should only be provided if - // `given_name` and `family_name` are null. + // Customer's company name. Company name should only be provided if + // `given_name` and `family_name` are null. company_name?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. danish_identity_number?: string | null; - // Customer's email address. + // Customer's email address. email?: string | null; - // Customer's surname. + // Customer's surname. family_name?: string | null; - // Customer's first name. + // Customer's first name. given_name?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. + // The customer's address region, county or department. region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. swedish_identity_number?: string | null; }; /** Type for a billingrequesttemplate resource. */ export type BillingRequestTemplate = { - // Permanent URL that customers can visit to allow them to complete a flow - // based on this template, before being returned to the `redirect_uri`. + // Permanent URL that customers can visit to allow them to complete a flow + // based on this template, before being returned to the `redirect_uri`. authorisation_url?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // Unique identifier, beginning with "BRT". + // Unique identifier, beginning with "BRT". id?: string; - // Constraints that will apply to the mandate_request. (Optional) Specifically - // required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) + // Specifically required for PayTo and VRP. mandate_request_constraints?: BillingRequestTemplateMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. mandate_request_currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // mandate_request_description?: string | null; - // Key-value store of custom data that will be applied to the mandate created - // when this request is fulfilled. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data that will be applied to the mandate created + // when this request is fulfilled. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. mandate_request_metadata?: JsonMap | null; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with - // from a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with + // 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. + // 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; - // 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. + // 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. metadata?: JsonMap; - // Name for the template. Provides a friendly human name for the template, as - // it is shown in the dashboard. Must not exceed 255 characters. + // Name for the template. Provides a friendly human name for the template, as + // it is shown in the dashboard. Must not exceed 255 characters. name?: string; - // Amount in full. + // Amount in full. payment_request_amount?: string; - // [ISO 4217](http://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. + // [ISO 4217](http://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; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // payment_request_description?: string | null; - // Key-value store of custom data that will be applied to the payment created - // when this request is fulfilled. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data that will be applied to the payment created + // when this request is fulfilled. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. payment_request_metadata?: JsonMap | null; - // (Optional) A scheme used for Open Banking payments. Currently - // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` - // and `sepa_instant_credit_transfer` are supported in supported Eurozone - // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as - // the default. Please be aware that `sepa_instant_credit_transfer` may incur - // an additional fee for your customer. + // (Optional) A scheme used for Open Banking payments. Currently + // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` + // and `sepa_instant_credit_transfer` are supported in supported Eurozone + // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as + // the default. Please be aware that `sepa_instant_credit_transfer` may incur + // an additional fee for your customer. payment_request_scheme?: string | null; - // URL that the payer can be redirected to after completing the request flow. + // URL that the payer can be redirected to after completing the request flow. redirect_uri?: string | null; - // Dynamic [timestamp](#api-usage-dates-and-times) recording when this - // resource was last updated. + // Dynamic [timestamp](#api-usage-dates-and-times) recording when this + // resource was last updated. updated_at?: string; }; /** Type for a billingrequesttemplatecreaterequestlinks resource. */ export type BillingRequestTemplateCreateRequestLinks = { - // ID of the associated [creditor](#core-endpoints-creditors). Only required - // if your account manages multiple creditors. + // ID of the associated [creditor](#core-endpoints-creditors). Only required + // if your account manages multiple creditors. creditor?: string; }; @@ -1590,65 +1662,65 @@ export enum BillingRequestTemplateMandateRequestVerify { /** Type for a billingrequesttemplatemandaterequestconstraints resource. */ export type BillingRequestTemplateMandateRequestConstraints = { - // The latest date at which payments can be taken, must occur after start_date - // if present + // The latest date at which payments can be taken, must occur after + // start_date if present // - // This is an optional field and if it is not supplied the agreement will be - // considered open and - // will not have an end date. Keep in mind the end date must take into account - // how long it will - // take the user to set up this agreement via the Billing Request. + // This is an optional field and if it is not supplied the agreement will be + // considered open and + // will not have an end date. Keep in mind the end date must take into + // account how long it will + // take the user to set up this agreement via the Billing Request. // 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. 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. + // 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. // payment_method?: string; - // List of periodic limits and constraints which apply to them + // List of periodic limits and constraints which apply to them periodic_limits?: BillingRequestTemplateMandateRequestConstraintsPeriodicLimit[]; - // The date from which payments can be taken. + // The date from which payments can be taken. // - // This is an optional field and if it is not supplied the start date will be - // set to the day - // authorisation happens. + // This is an optional field and if it is not supplied the start date will be + // set to the day + // authorisation happens. // start_date?: string; }; /** Type for a billingrequesttemplatemandaterequestconstraintsperiodiclimit resource. */ export type BillingRequestTemplateMandateRequestConstraintsPeriodicLimit = { - // The alignment of the period. + // 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. + // `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. + // `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. // alignment?: BillingRequestTemplateMandateRequestConstraintsPeriodicLimitAlignment; - // (Optional) The maximum number of payments that can be collected in this - // periodic limit. + // (Optional) The maximum number of payments that can be collected in this + // periodic limit. max_payments?: number; - // The maximum total amount that can be charged for all payments in this - // periodic limit. - // Required for VRP. + // The maximum total amount that can be charged for all payments in this + // periodic limit. + // Required for VRP. // max_total_amount?: number; - // The repeating period for this mandate. Defaults to flexible for PayTo if - // not specified. + // The repeating period for this mandate. Defaults to flexible for PayTo if + // not specified. period?: BillingRequestTemplateMandateRequestConstraintsPeriodicLimitPeriod; }; @@ -1667,35 +1739,35 @@ export enum BillingRequestTemplateMandateRequestConstraintsPeriodicLimitPeriod { /** Type for a billingrequestwithaction resource. */ export type BillingRequestWithAction = { - // Bank Authorisations can be used to authorise Billing Requests. - // Authorisations - // are created against a specific bank, usually the bank that provides the - // payer's - // account. - // - // Creation of Bank Authorisations is only permitted from GoCardless hosted - // UIs - // (see Billing Request Flows) to ensure we meet regulatory requirements for - // checkout flows. + // Bank Authorisations can be used to authorise Billing Requests. + // Authorisations + // are created against a specific bank, usually the bank that provides the + // payer's + // account. + // + // Creation of Bank Authorisations is only permitted from GoCardless hosted + // UIs + // (see Billing Request Flows) to ensure we meet regulatory requirements for + // checkout flows. bank_authorisations?: BillingRequestWithActionBankAuthorisations; - // Billing Requests help create resources that require input or action from a - // customer. An example of required input might be additional customer billing - // details, while an action would be asking a customer to authorise a payment - // using their mobile banking app. - // - // See [Billing Requests: - // Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/) - // for how-to's, explanations and tutorials.

Important: All properties associated with - // `subscription_request` and `instalment_schedule_request` are only supported - // for ACH and PAD schemes.

+ // Billing Requests help create resources that require input or action from + // a customer. An example of required input might be additional customer + // billing details, while an action would be asking a customer to authorise a + // payment using their mobile banking app. + // + // See [Billing Requests: + // Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/) + // for how-to's, explanations and tutorials.

Important: All properties associated with + // `subscription_request` and `instalment_schedule_request` are only + // supported for ACH and PAD schemes.

billing_requests: BillingRequestWithActionBillingRequests; }; /** Type for a billingrequestwithactionactions resource. */ export type BillingRequestWithActionActions = { - // URL for an oauth flow that will allow the user to authorise the payment + // URL for an oauth flow that will allow the user to authorise the payment bank_authorisation_redirect_uri?: string; // @@ -1707,7 +1779,7 @@ export type BillingRequestWithActionActions = { // confirm_payer_details?: BillingRequestWithActionActionsConfirmPayerDetails; - // Create a bank authorisation object as part of this request + // Create a bank authorisation object as part of this request create_bank_authorisation?: boolean; // @@ -1716,57 +1788,58 @@ export type BillingRequestWithActionActions = { /** Type for a billingrequestwithactionactionscollectbankaccount resource. */ export type BillingRequestWithActionActionsCollectBankAccount = { - // Name of the account holder, as known by the bank. The full name provided - // when the customer is created is stored and is available via the API, but is - // transliterated, upcased, and truncated to 18 characters in bank - // submissions. This field is required unless the request includes a [customer - // bank account token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided + // when the customer is created is stored and is available via the API, but + // is transliterated, upcased, and truncated to 18 characters in bank + // submissions. This field is required unless the request includes a + // [customer bank account + // token](#javascript-flow-customer-bank-account-tokens). account_holder_name?: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) + // for more information. Alternatively you can provide an `iban`. account_number?: string | null; - // Account number suffix (only for bank accounts denominated in NZD) - see - // [local details](#local-bank-details-new-zealand) for more information. + // Account number suffix (only for bank accounts denominated in NZD) - see + // [local details](#local-bank-details-new-zealand) for more information. account_number_suffix?: string | null; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: BillingRequestWithActionActionsCollectBankAccountAccountType; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string | null; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string | null; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string | null; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). IBANs are not accepted for Swedish - // bank accounts denominated in SEK - you must supply [local - // details](#local-bank-details-sweden). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). IBANs are not accepted for Swedish + // bank accounts denominated in SEK - you must supply [local + // details](#local-bank-details-sweden). iban?: 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. + // 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. metadata?: JsonMap; - // A unique record such as an email address, mobile number or company number, - // that can be used to make and accept payments. + // A unique record such as an email address, mobile number or company number, + // that can be used to make and accept payments. pay_id?: string; }; @@ -1786,219 +1859,219 @@ export type BillingRequestWithActionActionsCollectCustomerDetails = { /** Type for a billingrequestwithactionactionscollectcustomerdetailscustomer resource. */ export type BillingRequestWithActionActionsCollectCustomerDetailsCustomer = { - // Customer's company name. Required unless a `given_name` and `family_name` - // are provided. For Canadian customers, the use of a `company_name` value - // will mean that any mandate created from this customer will be considered to - // be a "Business PAD" (otherwise, any mandate will be considered to be a - // "Personal PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value + // will mean that any mandate created from this customer will be considered + // to be a "Business PAD" (otherwise, any mandate will be considered to be a + // "Personal PAD"). company_name?: string | null; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows + // GoCardless to send notifications to this customer. email?: string | null; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string | null; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. - // Used as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", - // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. - // If this is not provided and a customer was linked during billing request - // creation, the linked customer language will be used. Otherwise, the - // language is default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Used as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. + // If this is not provided and a customer was linked during billing request + // creation, the linked customer language will be used. Otherwise, the + // language is default to "en". language?: 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. + // 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. metadata?: JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string | null; }; /** Type for a billingrequestwithactionactionscollectcustomerdetailscustomerbillingdetail resource. */ export type BillingRequestWithActionActionsCollectCustomerDetailsCustomerBillingDetail = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated + // in Danish krone (DKK). danish_identity_number?: string | null; - // For ACH customers only. Required for ACH customers. A string containing the - // IP address of the payer to whom the mandate belongs (i.e. as a result of - // their completion of a mandate setup flow in their browser). + // For ACH customers only. Required for ACH customers. A string containing + // the IP address of the payer to whom the mandate belongs (i.e. as a result + // of their completion of a mandate setup flow in their browser). // - // Not required for creating offline mandates where `authorisation_source` is - // set to telephone or paper. + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. // ip_address?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state - // code is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be - // supplied if the customer's bank account is denominated in Swedish krona - // (SEK). This field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be + // supplied if the customer's bank account is denominated in Swedish krona + // (SEK). This field cannot be changed once it has been set. swedish_identity_number?: string | null; }; /** Type for a billingrequestwithactionactionsconfirmpayerdetails resource. */ export type BillingRequestWithActionActionsConfirmPayerDetails = { - // 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. + // 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. metadata?: JsonMap; - // This attribute can be set to true if the payer has indicated that multiple - // signatures are required for the mandate. As long as every other Billing - // Request actions have been completed, the payer will receive an email - // notification containing instructions on how to complete the additional - // signature. The dual signature flow can only be completed using GoCardless - // branded pages. + // This attribute can be set to true if the payer has indicated that multiple + // signatures are required for the mandate. As long as every other Billing + // Request actions have been completed, the payer will receive an email + // notification containing instructions on how to complete the additional + // signature. The dual signature flow can only be completed using GoCardless + // branded pages. payer_requested_dual_signature?: boolean; }; /** Type for a billingrequestwithactionactionsselectinstitution resource. */ export type BillingRequestWithActionActionsSelectInstitution = { - // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // alpha-2 code. The country code of the institution. If nothing is provided, - // institutions with the country code 'GB' are returned by default. + // [ISO + // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // alpha-2 code. The country code of the institution. If nothing is provided, + // institutions with the country code 'GB' are returned by default. country_code: string; - // The unique identifier for this institution + // The unique identifier for this institution institution: string; }; /** Type for a billingrequestwithactioncreatewithactionsrequestlinks resource. */ export type BillingRequestWithActionCreateWithActionsRequestLinks = { - // ID of the associated [creditor](#core-endpoints-creditors). Only required - // if your account manages multiple creditors. + // ID of the associated [creditor](#core-endpoints-creditors). Only required + // if your account manages multiple creditors. creditor?: string; - // ID of the [customer](#core-endpoints-customers) against which this request - // should be made. + // ID of the [customer](#core-endpoints-customers) against which this request + // should be made. customer?: string; - // (Optional) ID of the - // [customer_bank_account](#core-endpoints-customer-bank-accounts) against - // which this request should be made. + // (Optional) ID of the + // [customer_bank_account](#core-endpoints-customer-bank-accounts) against + // which this request should be made. // customer_bank_account?: string; }; /** Type for a billingrequestwithactionmandaterequest resource. */ export type BillingRequestWithActionMandateRequest = { - // This field is ACH specific, sometimes referred to as [SEC - // code](https://www.moderntreasury.com/learn/sec-codes). + // This field is ACH specific, sometimes referred to as [SEC + // code](https://www.moderntreasury.com/learn/sec-codes). // - // This is the way that the payer gives authorisation to the merchant. - // web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC - // code: WEB) - // telephone: Authorisation is provided orally over telephone (maps to SEC - // code: TEL) - // paper: Authorisation is provided in writing and signed, or similarly - // authenticated (maps to SEC code: PPD) + // This is the way that the payer gives authorisation to the merchant. + // web: Authorisation is Internet Initiated or via Mobile Entry (maps to + // SEC code: WEB) + // telephone: Authorisation is provided orally over telephone (maps to SEC + // code: TEL) + // paper: Authorisation is provided in writing and signed, or similarly + // authenticated (maps to SEC code: PPD) // authorisation_source?: BillingRequestWithActionMandateRequestAuthorisationSource; - // Constraints that will apply to the mandate_request. (Optional) Specifically - // required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) + // Specifically required for PayTo and VRP. constraints?: BillingRequestWithActionMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // description?: string | null; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: BillingRequestWithActionMandateRequestFundsSettlement; - // 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. + // 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. metadata?: JsonMap; - // Unique reference. Different schemes have different length and [character - // set](#appendix-character-sets) requirements. GoCardless will generate a - // unique reference satisfying the different scheme requirements if this field - // is left blank. + // Unique reference. Different schemes have different length and [character + // set](#appendix-character-sets) requirements. GoCardless will generate a + // unique reference satisfying the different scheme requirements if this + // field is left blank. reference?: string | null; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with - // from a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with + // from a list of your available schemes. scheme?: string | null; - // If true, this billing request would be used to set up a mandate solely for - // moving (or sweeping) money from one account owned by the payer to another - // account that the payer also owns. This is required for Faster Payments + // If true, this billing request would be used to set up a mandate solely for + // moving (or sweeping) money from one account owned by the payer to another + // account that the payer also owns. This is required for Faster Payments sweeping?: boolean; - // 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. 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. verify?: BillingRequestWithActionMandateRequestVerify; }; @@ -2010,65 +2083,65 @@ export enum BillingRequestWithActionMandateRequestAuthorisationSource { /** Type for a billingrequestwithactionmandaterequestconstraints resource. */ export type BillingRequestWithActionMandateRequestConstraints = { - // The latest date at which payments can be taken, must occur after start_date - // if present + // The latest date at which payments can be taken, must occur after + // start_date if present // - // This is an optional field and if it is not supplied the agreement will be - // considered open and - // will not have an end date. Keep in mind the end date must take into account - // how long it will - // take the user to set up this agreement via the Billing Request. + // This is an optional field and if it is not supplied the agreement will be + // considered open and + // will not have an end date. Keep in mind the end date must take into + // account how long it will + // take the user to set up this agreement via the Billing Request. // 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. 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. + // 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. // payment_method?: string; - // List of periodic limits and constraints which apply to them + // List of periodic limits and constraints which apply to them periodic_limits?: BillingRequestWithActionMandateRequestConstraintsPeriodicLimit[]; - // The date from which payments can be taken. + // The date from which payments can be taken. // - // This is an optional field and if it is not supplied the start date will be - // set to the day - // authorisation happens. + // This is an optional field and if it is not supplied the start date will be + // set to the day + // authorisation happens. // start_date?: string; }; /** Type for a billingrequestwithactionmandaterequestconstraintsperiodiclimit resource. */ export type BillingRequestWithActionMandateRequestConstraintsPeriodicLimit = { - // The alignment of the period. + // 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. + // `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. + // `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. // alignment?: BillingRequestWithActionMandateRequestConstraintsPeriodicLimitAlignment; - // (Optional) The maximum number of payments that can be collected in this - // periodic limit. + // (Optional) The maximum number of payments that can be collected in this + // periodic limit. max_payments?: number; - // The maximum total amount that can be charged for all payments in this - // periodic limit. - // Required for VRP. + // The maximum total amount that can be charged for all payments in this + // periodic limit. + // Required for VRP. // max_total_amount?: number; - // The repeating period for this mandate. Defaults to flexible for PayTo if - // not specified. + // The repeating period for this mandate. Defaults to flexible for PayTo if + // not specified. period?: BillingRequestWithActionMandateRequestConstraintsPeriodicLimitPeriod; }; @@ -2097,62 +2170,71 @@ export enum BillingRequestWithActionMandateRequestVerify { Always = 'always', } +export enum BillingRequestWithActionPaymentContextCode { + BillingGoodsAndServicesInAdvance = 'billing_goods_and_services_in_advance', + BillingGoodsAndServicesInArrears = 'billing_goods_and_services_in_arrears', + FaceToFacePointOfSale = 'face_to_face_point_of_sale', + EcommerceMerchantInitiatedPayment = 'ecommerce_merchant_initiated_payment', + TransferToSelf = 'transfer_to_self', + TransferToThirdParty = 'transfer_to_third_party', +} + /** Type for a billingrequestwithactionpaymentrequest resource. */ export type BillingRequestWithActionPaymentRequest = { - // Amount in minor unit (e.g. pence in GBP, cents in EUR). + // Amount in minor unit (e.g. pence in GBP, cents in EUR). amount?: string; - // The amount to be deducted from the payment as an app fee, to be paid to the - // partner integration which created the billing request, in the lowest - // denomination for the currency (e.g. pence in GBP, cents in EUR). + // The amount to be deducted from the payment as an app fee, to be paid to + // the partner integration which created the billing request, in the lowest + // denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string | null; - // [ISO 4217](http://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. + // [ISO 4217](http://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. currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // description?: string | null; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: BillingRequestWithActionPaymentRequestFundsSettlement; - // 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. + // 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. metadata?: JsonMap; - // A custom payment reference defined by the merchant. It is only available - // for payments on the PayTo scheme or payments using the Direct Funds - // settlement model on the Faster Payments scheme. + // A custom payment reference defined by the merchant. It is only available + // for payments on the PayTo scheme or payments using the Direct Funds + // settlement model on the Faster Payments scheme. // reference?: string | null; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

Important: This is not applicable to IBP - // and VRP payments.

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

Important: This is not applicable to IBP + // and VRP payments.

retry_if_possible?: boolean; - // (Optional) A scheme used for Open Banking payments. Currently - // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` - // and `sepa_instant_credit_transfer` are supported in supported Eurozone - // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as - // the default. Please be aware that `sepa_instant_credit_transfer` may incur - // an additional fee for your customer. + // (Optional) A scheme used for Open Banking payments. Currently + // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` + // and `sepa_instant_credit_transfer` are supported in supported Eurozone + // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as + // the default. Please be aware that `sepa_instant_credit_transfer` may incur + // an additional fee for your customer. scheme?: string | null; }; @@ -2174,75 +2256,114 @@ export enum BillingRequestWithActionPurposeCode { Pension = 'pension', Tax = 'tax', Other = 'other', - Epayment = 'Epayment', - Commercial = 'Commercial', - OtherPayment = 'OtherPayment', - Trade = 'Trade', + BonusPayment = 'bonus_payment', + CashManagementTransfer = 'cash_management_transfer', + CardBulkClearing = 'card_bulk_clearing', + CreditCardPayment = 'credit_card_payment', + TradeSettlementPayment = 'trade_settlement_payment', + DebitCardPayment = 'debit_card_payment', + Dividend = 'dividend', + DeliverAgainstPayment = 'deliver_against_payment', + Epayment = 'epayment', + FeeCollectionAndInterest = 'fee_collection_and_interest', + FeeCollection = 'fee_collection', + PersonToPersonPayment = 'person_to_person_payment', + GovernmentPayment = 'government_payment', + HedgingTransaction = 'hedging_transaction', + IrrevocableCreditCardPayment = 'irrevocable_credit_card_payment', + IrrevocableDebitCardPayment = 'irrevocable_debit_card_payment', + IntraCompanyPayment = 'intra_company_payment', + Interest = 'interest', + LockboxTransactions = 'lockbox_transactions', + Commercial = 'commercial', + Consumer = 'consumer', + OtherPayment = 'other_payment', + PensionPayment = 'pension_payment', + Represented = 'represented', + ReimbursementReceivedCreditTransfer = 'reimbursement_received_credit_transfer', + ReceiveAgainstPayment = 'receive_against_payment', + SalaryPayment = 'salary_payment', + Securities = 'securities', + SocialSecurityBenefit = 'social_security_benefit', + SupplierPayment = 'supplier_payment', + TaxPayment = 'tax_payment', + Trade = 'trade', + TreasuryPayment = 'treasury_payment', + ValueAddedTaxPayment = 'value_added_tax_payment', + WithHolding = 'with_holding', + CashManagementSweepAccount = 'cash_management_sweep_account', + CashManagementTopAccount = 'cash_management_top_account', + CashManagementZeroBalanceAccount = 'cash_management_zero_balance_account', + CrossborderMiPayments = 'crossborder_mi_payments', + ForeignCurrencyDomesticTransfer = 'foreign_currency_domestic_transfer', + CashInPreCredit = 'cash_in_pre_credit', + CashOutNotesCoins = 'cash_out_notes_coins', + CarrierGuardedWholesaleValuables = 'carrier_guarded_wholesale_valuables', } /** Type for a billingrequestwithactionbankauthorisations resource. */ export type BillingRequestWithActionBankAuthorisations = { - // Type of authorisation, can be either 'mandate' or 'payment'. + // Type of authorisation, can be either 'mandate' or 'payment'. authorisation_type?: BillingRequestWithActionBankAuthorisationsAuthorisationType; - // Fixed [timestamp](#api-usage-dates-and-times), recording when the user has - // been authorised. + // Fixed [timestamp](#api-usage-dates-and-times), recording when the user has + // been authorised. authorised_at?: string | null; - // Timestamp when the flow was created + // Timestamp when the flow was created created_at?: string; - // Timestamp when the url will expire. Each authorisation url currently lasts - // for 15 minutes, but this can vary by bank. + // Timestamp when the url will expire. Each authorisation url currently lasts + // for 15 minutes, but this can vary by bank. expires_at?: string; - // Unique identifier, beginning with "BAU". + // Unique identifier, beginning with "BAU". id: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when the - // authorisation URL has been visited. + // Fixed [timestamp](#api-usage-dates-and-times), recording when the + // authorisation URL has been visited. last_visited_at?: string | null; // Resources linked to this BillingRequestWithActionBankAuthorisations. links?: BillingRequestWithActionBankAuthorisationsLinks; - // URL to a QR code PNG image of the bank authorisation url. - // This QR code can be used as an alternative to providing the `url` to the - // payer to allow them to authorise with their mobile devices. + // URL to a QR code PNG image of the bank authorisation url. + // This QR code can be used as an alternative to providing the `url` to the + // payer to allow them to authorise with their mobile devices. qr_code_url?: string | null; - // URL that the payer can be redirected to after authorising the payment. + // URL that the payer can be redirected to after authorising the payment. // - // On completion of bank authorisation, the query parameter of either - // `outcome=success` or `outcome=failure` will be - // appended to the `redirect_uri` to indicate the result of the bank - // authorisation. If the bank authorisation is - // expired, the query parameter `outcome=timeout` will be appended to the - // `redirect_uri`, in which case you should - // prompt the user to try the bank authorisation step again. + // On completion of bank authorisation, the query parameter of either + // `outcome=success` or `outcome=failure` will be + // appended to the `redirect_uri` to indicate the result of the bank + // authorisation. If the bank authorisation is + // expired, the query parameter `outcome=timeout` will be appended to the + // `redirect_uri`, in which case you should + // prompt the user to try the bank authorisation step again. // - // Please note: bank authorisations can still fail despite an - // `outcome=success` on the `redirect_uri`. It is therefore recommended to - // wait for the relevant bank authorisation event, such as - // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), - // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), or - // [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) in - // order to show the correct outcome to the user. + // Please note: bank authorisations can still fail despite an + // `outcome=success` on the `redirect_uri`. It is therefore recommended to + // wait for the relevant bank authorisation event, such as + // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), + // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), + // or [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) + // in order to show the correct outcome to the user. // - // The BillingRequestFlow ID will also be appended to the `redirect_uri` as - // query parameter `id=BRF123`. + // The BillingRequestFlow ID will also be appended to the `redirect_uri` as + // query parameter `id=BRF123`. // - // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. + // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. redirect_uri?: string; - // URL for an oauth flow that will allow the user to authorise the payment + // URL for an oauth flow that will allow the user to authorise the payment url?: string; }; /** Type for a billingrequestwithactionbankauthorisationscreaterequestlinks resource. */ export type BillingRequestWithActionBankAuthorisationsCreateRequestLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this authorisation was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this authorisation was created. billing_request?: string; }; @@ -2253,102 +2374,127 @@ export enum BillingRequestWithActionBankAuthorisationsAuthorisationType { /** Type for a billingrequestwithactionbankauthorisationslinks resource. */ export type BillingRequestWithActionBankAuthorisationsLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this authorisation was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this authorisation was created. billing_request?: string; - // ID of the [institution](#billing-requests-institutions) against which this - // authorisation was created. + // ID of the [institution](#billing-requests-institutions) against which this + // authorisation was created. institution?: string; }; /** Type for a billingrequestwithactionbillingrequests resource. */ export type BillingRequestWithActionBillingRequests = { - // List of actions that can be performed before this billing request can be - // fulfilled. + // List of actions that can be performed before this billing request can be + // fulfilled. actions?: BillingRequestWithActionBillingRequestsAction[]; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // (Optional) If true, this billing request can fallback from instant payment - // to direct debit. - // Should not be set if GoCardless payment intelligence feature is used. + // (Optional) If true, this billing request can fallback from instant payment + // to direct debit. + // Should not be set if GoCardless payment intelligence feature is used. // - // See [Billing Requests: Retain customers with - // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) - // for more information. + // See [Billing Requests: Retain customers with + // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) + // for more information. fallback_enabled?: boolean; - // True if the billing request was completed with direct debit. + // True if the billing request was completed with direct debit. fallback_occurred?: boolean; - // Unique identifier, beginning with "BRQ". + // Unique identifier, beginning with "BRQ". id: string; - // Request for an instalment schedule. Has to contain either - // `instalments_with_schedule` object or an array of `instalments_with_dates` - // objects + // Request for an instalment schedule. Has to contain either + // `instalments_with_schedule` object or an array of `instalments_with_dates` + // objects instalment_schedule_request?: BillingRequestWithActionBillingRequestsInstalmentScheduleRequest | null; // Resources linked to this BillingRequestWithActionBillingRequests. links?: BillingRequestWithActionBillingRequestsLinks; - // Request for a mandate + // Request for a mandate mandate_request?: BillingRequestWithActionBillingRequestsMandateRequest; - // 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. + // 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. metadata?: JsonMap; - // Request for a one-off strongly authorised payment + // Specifies the context or scenario in which the payment is being made. + // Defines whether the payment is for advance/arrears billing, point of sale + // transactions, ecommerce, or account transfers. This helps banks and + // payment processors understand the payment scenario and apply appropriate + // processing rules and risk controls. + payment_context_code?: BillingRequestWithActionBillingRequestsPaymentContextCode; + + // Specifies the underlying purpose of the payment. Defines the specific + // reason or type of service/goods the payment relates to, improving + // straight-through processing and compliance. + // See [VRP Commercial Payment Purpose + // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) + // for the complete list of valid codes. + payment_purpose_code?: string; + + // Request for a one-off strongly authorised payment payment_request?: BillingRequestWithActionBillingRequestsPaymentRequest; - // Specifies the high-level purpose of a mandate and/or payment using a set of - // pre-defined categories. Required for the PayTo scheme, optional for all - // others. Currently `mortgage`, `utility`, `loan`, `dependant_support`, - // `gambling`, `retail`, `salary`, `personal`, `government`, `pension`, `tax` - // and `other` are supported. + // Specifies the high-level purpose/category of a mandate and/or payment + // using a set of pre-defined categories. Provides context on the nature and + // reason for the payment to facilitate processing and compliance. + // See [Billing Request Purpose + // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) + // for the complete list of valid codes. purpose_code?: BillingRequestWithActionBillingRequestsPurposeCode; // resources?: BillingRequestWithActionBillingRequestsResources; - // One of: - //
    - //
  • `pending`: the billing request is pending and can be used
  • - //
  • `ready_to_fulfil`: the billing request is ready to fulfil
  • - //
  • `fulfilling`: the billing request is currently undergoing - // fulfilment
  • - //
  • `fulfilled`: the billing request has been fulfilled and a payment - // created
  • - //
  • `cancelled`: the billing request has been cancelled and cannot be - // used
  • - //
+ // One of: + //
    + //
  • `pending`: the billing request is pending and can be used
  • + //
  • `ready_to_fulfil`: the billing request is ready to fulfil
  • + //
  • `fulfilling`: the billing request is currently undergoing + // fulfilment
  • + //
  • `fulfilled`: the billing request has been fulfilled and a payment + // created
  • + //
  • `cancelled`: the billing request has been cancelled and cannot be + // used
  • + //
status?: BillingRequestWithActionBillingRequestsStatus; - // Request for a subscription + // Request for a subscription subscription_request?: BillingRequestWithActionBillingRequestsSubscriptionRequest | null; }; /** Type for a billingrequestwithactionbillingrequestscreaterequestlinks resource. */ export type BillingRequestWithActionBillingRequestsCreateRequestLinks = { - // ID of the associated [creditor](#core-endpoints-creditors). Only required - // if your account manages multiple creditors. + // ID of the associated [creditor](#core-endpoints-creditors). Only required + // if your account manages multiple creditors. creditor?: string; - // ID of the [customer](#core-endpoints-customers) against which this request - // should be made. + // ID of the [customer](#core-endpoints-customers) against which this request + // should be made. customer?: string; - // (Optional) ID of the - // [customer_bank_account](#core-endpoints-customer-bank-accounts) against - // which this request should be made. + // (Optional) ID of the + // [customer_bank_account](#core-endpoints-customer-bank-accounts) against + // which this request should be made. // customer_bank_account?: string; }; +export enum BillingRequestWithActionBillingRequestsPaymentContextCode { + BillingGoodsAndServicesInAdvance = 'billing_goods_and_services_in_advance', + BillingGoodsAndServicesInArrears = 'billing_goods_and_services_in_arrears', + FaceToFacePointOfSale = 'face_to_face_point_of_sale', + EcommerceMerchantInitiatedPayment = 'ecommerce_merchant_initiated_payment', + TransferToSelf = 'transfer_to_self', + TransferToThirdParty = 'transfer_to_third_party', +} + export enum BillingRequestWithActionBillingRequestsPurposeCode { Mortgage = 'mortgage', Utility = 'utility', @@ -2362,94 +2508,133 @@ export enum BillingRequestWithActionBillingRequestsPurposeCode { Pension = 'pension', Tax = 'tax', Other = 'other', - Epayment = 'Epayment', - Commercial = 'Commercial', - OtherPayment = 'OtherPayment', - Trade = 'Trade', + BonusPayment = 'bonus_payment', + CashManagementTransfer = 'cash_management_transfer', + CardBulkClearing = 'card_bulk_clearing', + CreditCardPayment = 'credit_card_payment', + TradeSettlementPayment = 'trade_settlement_payment', + DebitCardPayment = 'debit_card_payment', + Dividend = 'dividend', + DeliverAgainstPayment = 'deliver_against_payment', + Epayment = 'epayment', + FeeCollectionAndInterest = 'fee_collection_and_interest', + FeeCollection = 'fee_collection', + PersonToPersonPayment = 'person_to_person_payment', + GovernmentPayment = 'government_payment', + HedgingTransaction = 'hedging_transaction', + IrrevocableCreditCardPayment = 'irrevocable_credit_card_payment', + IrrevocableDebitCardPayment = 'irrevocable_debit_card_payment', + IntraCompanyPayment = 'intra_company_payment', + Interest = 'interest', + LockboxTransactions = 'lockbox_transactions', + Commercial = 'commercial', + Consumer = 'consumer', + OtherPayment = 'other_payment', + PensionPayment = 'pension_payment', + Represented = 'represented', + ReimbursementReceivedCreditTransfer = 'reimbursement_received_credit_transfer', + ReceiveAgainstPayment = 'receive_against_payment', + SalaryPayment = 'salary_payment', + Securities = 'securities', + SocialSecurityBenefit = 'social_security_benefit', + SupplierPayment = 'supplier_payment', + TaxPayment = 'tax_payment', + Trade = 'trade', + TreasuryPayment = 'treasury_payment', + ValueAddedTaxPayment = 'value_added_tax_payment', + WithHolding = 'with_holding', + CashManagementSweepAccount = 'cash_management_sweep_account', + CashManagementTopAccount = 'cash_management_top_account', + CashManagementZeroBalanceAccount = 'cash_management_zero_balance_account', + CrossborderMiPayments = 'crossborder_mi_payments', + ForeignCurrencyDomesticTransfer = 'foreign_currency_domestic_transfer', + CashInPreCredit = 'cash_in_pre_credit', + CashOutNotesCoins = 'cash_out_notes_coins', + CarrierGuardedWholesaleValuables = 'carrier_guarded_wholesale_valuables', } /** Type for a billingrequestwithactionbillingrequestscustomer resource. */ export type BillingRequestWithActionBillingRequestsCustomer = { - // Customer's company name. Required unless a `given_name` and `family_name` - // are provided. For Canadian customers, the use of a `company_name` value - // will mean that any mandate created from this customer will be considered to - // be a "Business PAD" (otherwise, any mandate will be considered to be a - // "Personal PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value + // will mean that any mandate created from this customer will be considered + // to be a "Business PAD" (otherwise, any mandate will be considered to be a + // "Personal PAD"). company_name?: string | null; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows + // GoCardless to send notifications to this customer. email?: string | null; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string | null; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. - // Used as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", - // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. - // If this is not provided and a customer was linked during billing request - // creation, the linked customer language will be used. Otherwise, the - // language is default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Used as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. + // If this is not provided and a customer was linked during billing request + // creation, the linked customer language will be used. Otherwise, the + // language is default to "en". language?: 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. + // 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. metadata?: JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string | null; }; /** Type for a billingrequestwithactionbillingrequestscustomerbillingdetail resource. */ export type BillingRequestWithActionBillingRequestsCustomerBillingDetail = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated + // in Danish krone (DKK). danish_identity_number?: string | null; - // For ACH customers only. Required for ACH customers. A string containing the - // IP address of the payer to whom the mandate belongs (i.e. as a result of - // their completion of a mandate setup flow in their browser). + // For ACH customers only. Required for ACH customers. A string containing + // the IP address of the payer to whom the mandate belongs (i.e. as a result + // of their completion of a mandate setup flow in their browser). // - // Not required for creating offline mandates where `authorisation_source` is - // set to telephone or paper. + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. // ip_address?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state - // code is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be - // supplied if the customer's bank account is denominated in Swedish krona - // (SEK). This field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be + // supplied if the customer's bank account is denominated in Swedish krona + // (SEK). This field cannot be changed once it has been set. swedish_identity_number?: string | null; }; @@ -2472,53 +2657,53 @@ export enum BillingRequestWithActionBillingRequestsNotificationType { /** Type for a billingrequestwithactionbillingrequestsaction resource. */ export type BillingRequestWithActionBillingRequestsAction = { - // List of currencies the current mandate supports + // List of currencies the current mandate supports available_currencies?: string[]; - // Describes the behaviour of bank authorisations, for the bank_authorisation - // action + // Describes the behaviour of bank authorisations, for the bank_authorisation + // action bank_authorisation?: BillingRequestWithActionBillingRequestsActionBankAuthorisation; - // Additional parameters to help complete the collect_customer_details action + // Additional parameters to help complete the collect_customer_details action collect_customer_details?: BillingRequestWithActionBillingRequestsActionCollectCustomerDetails; - // Which other action types this action can complete. + // Which other action types this action can complete. completes_actions?: string[]; - // Describes whether we inferred the institution from the provided bank - // account details. One of: - // - `not_needed`: we won't attempt to infer the institution as it is not - // needed. Either because it was manually selected or the billing request does - // not support this feature - // - `pending`: we are waiting on the bank details in order to infer the - // institution - // - `failed`: we weren't able to infer the institution - // - `success`: we inferred the institution and added it to the resources of a - // Billing Request + // Describes whether we inferred the institution from the provided bank + // account details. One of: + // - `not_needed`: we won't attempt to infer the institution as it is not + // needed. Either because it was manually selected or the billing request + // does not support this feature + // - `pending`: we are waiting on the bank details in order to infer the + // institution + // - `failed`: we weren't able to infer the institution + // - `success`: we inferred the institution and added it to the resources of + // a Billing Request // institution_guess_status?: BillingRequestWithActionBillingRequestsActionInstitutionGuessStatus; - // Informs you whether the action is required to fulfil the billing request or - // not. + // Informs you whether the action is required to fulfil the billing request + // or not. required?: boolean; - // Requires completing these actions before this action can be completed. + // Requires completing these actions before this action can be completed. requires_actions?: string[]; - // Status of the action + // Status of the action status?: BillingRequestWithActionBillingRequestsActionStatus; - // Unique identifier for the action. + // Unique identifier for the action. type?: BillingRequestWithActionBillingRequestsActionType; }; /** Type for a billingrequestwithactionbillingrequestsactionbankauthorisation resource. */ export type BillingRequestWithActionBillingRequestsActionBankAuthorisation = { - // Which authorisation adapter will be used to power these authorisations - // (GoCardless internal use only) + // Which authorisation adapter will be used to power these authorisations + // (GoCardless internal use only) adapter?: BillingRequestWithActionBillingRequestsActionBankAuthorisationAdapter; - // What type of bank authorisations are supported on this billing request + // What type of bank authorisations are supported on this billing request authorisation_type?: BillingRequestWithActionBillingRequestsActionBankAuthorisationAuthorisationType; }; @@ -2537,7 +2722,7 @@ export enum BillingRequestWithActionBillingRequestsActionBankAuthorisationAuthor /** Type for a billingrequestwithactionbillingrequestsactioncollectcustomerdetails resource. */ export type BillingRequestWithActionBillingRequestsActionCollectCustomerDetails = { - // Default customer country code, as determined by scheme and payer location + // Default customer country code, as determined by scheme and payer location default_country_code?: string; // @@ -2577,104 +2762,107 @@ export enum BillingRequestWithActionBillingRequestsActionType { /** Type for a billingrequestwithactionbillingrequestsinstalmentschedulerequest resource. */ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequest = { - // 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). + // 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). app_fee?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "USD" and "CAD" are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "USD" and "CAD" are supported. currency?: string; - // An explicit array of instalment payments, each specifying at least an - // `amount` and `charge_date`. See [create (with - // dates)](#instalment-schedules-create-with-dates) + // An explicit array of instalment payments, each specifying at least an + // `amount` and `charge_date`. See [create (with + // dates)](#instalment-schedules-create-with-dates) instalments_with_dates?: BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithDate[] | null; - // 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)](#instalment-schedules-create-with-schedule) + // 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)](#instalment-schedules-create-with-schedule) // instalments_with_schedule?: BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithSchedule | null; // Resources linked to this BillingRequestWithActionBillingRequestsInstalmentScheduleRequest. links?: BillingRequestWithActionBillingRequestsInstalmentScheduleRequestLinks; - // 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. + // 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. metadata?: JsonMap; - // 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. + // 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. name?: string; - // 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](#payments-create-a-payment) for more details. - //
+ // 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](#payments-create-a-payment) for more + // details. + //
payment_reference?: string | null; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; - // 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. + // 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. total_amount?: string; }; /** Type for a billingrequestwithactionbillingrequestsinstalmentschedulerequestinstalmentswithdate resource. */ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithDate = { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount: string; - // A future date on which the payment should be collected. If the date - // is before the next_possible_charge_date on the - // [mandate](#core-endpoints-mandates), it will be automatically rolled - // forwards to that date. + // A future date on which the payment should be collected. If the date + // is before the next_possible_charge_date on the + // [mandate](#core-endpoints-mandates), it will be automatically rolled + // forwards to that date. charge_date: string | null; - // A human-readable description of the payment. This will be included in the - // notification email GoCardless sends to your customer if your organisation - // does not send its own notifications (see [compliance - // requirements](#appendix-compliance-requirements)). + // A human-readable description of the payment. This will be included in the + // notification email GoCardless sends to your customer if your organisation + // does not send its own notifications (see [compliance + // requirements](#appendix-compliance-requirements)). description?: string | null; }; /** Type for a billingrequestwithactionbillingrequestsinstalmentschedulerequestinstalmentswithschedule resource. */ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithSchedule = { - // List of amounts of each instalment, in the lowest denomination for the - // currency (e.g. cents in USD). + // List of amounts of each instalment, in the lowest denomination for the + // currency (e.g. cents in USD). // amounts: string[]; - // Number of `interval_units` between charge dates. Must be greater than or - // equal to `1`. + // Number of `interval_units` between charge dates. Must be greater than or + // equal to `1`. // interval: number; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit: BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithScheduleIntervalUnit; - // The date on which the first payment should be charged. Must be on or after - // the [mandate](#core-endpoints-mandates)'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` + // The date on which the first payment should be charged. Must be on or after + // the [mandate](#core-endpoints-mandates)'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` start_date?: string | null; }; @@ -2686,170 +2874,170 @@ export enum BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInst /** Type for a billingrequestwithactionbillingrequestsinstalmentschedulerequestlinks resource. */ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequestLinks = { - // (Optional) ID of the - // [instalment_schedule](#core-endpoints-instalment-schedules) that was - // created from this instalment schedule request. + // (Optional) ID of the + // [instalment_schedule](#core-endpoints-instalment-schedules) that was + // created from this instalment schedule request. // instalment_schedule?: string; }; /** Type for a billingrequestwithactionbillingrequestslinks resource. */ export type BillingRequestWithActionBillingRequestsLinks = { - // (Optional) ID of the [bank - // authorisation](#billing-requests-bank-authorisations) that was used to - // verify this request. + // (Optional) ID of the [bank + // authorisation](#billing-requests-bank-authorisations) that was used to + // verify this request. bank_authorisation?: string; - // ID of the associated [creditor](#core-endpoints-creditors). + // ID of the associated [creditor](#core-endpoints-creditors). creditor?: string; - // ID of the [customer](#core-endpoints-customers) that will be used for this - // request + // ID of the [customer](#core-endpoints-customers) that will be used for this + // request customer?: string; - // (Optional) ID of the - // [customer_bank_account](#core-endpoints-customer-bank-accounts) that will - // be used for this request + // (Optional) ID of the + // [customer_bank_account](#core-endpoints-customer-bank-accounts) that will + // be used for this request customer_bank_account?: string; - // ID of the customer billing detail that will be used for this request + // ID of the customer billing detail that will be used for this request customer_billing_detail?: string; - // (Optional) ID of the associated instalment schedule request + // (Optional) ID of the associated instalment schedule request instalment_schedule_request?: string; - // (Optional) ID of the - // [instalment_schedule](#core-endpoints-instalment-schedules) that was - // created from this instalment schedule request. + // (Optional) ID of the + // [instalment_schedule](#core-endpoints-instalment-schedules) that was + // created from this instalment schedule request. instalment_schedule_request_instalment_schedule?: string; - // (Optional) ID of the associated mandate request + // (Optional) ID of the associated mandate request mandate_request?: string; - // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created - // from this mandate request. this mandate request. + // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created + // from this mandate request. this mandate request. mandate_request_mandate?: string; - // ID of the associated organisation. + // ID of the associated organisation. organisation?: string; - // (Optional) ID of the associated payment provider + // (Optional) ID of the associated payment provider payment_provider?: string; - // (Optional) ID of the associated payment request + // (Optional) ID of the associated payment request payment_request?: string; - // (Optional) ID of the [payment](#core-endpoints-payments) that was created - // from this payment request. + // (Optional) ID of the [payment](#core-endpoints-payments) that was created + // from this payment request. payment_request_payment?: string; - // (Optional) ID of the associated subscription request + // (Optional) ID of the associated subscription request subscription_request?: string; - // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was - // created from this subscription request. + // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that + // was created from this subscription request. subscription_request_subscription?: string; }; /** Type for a billingrequestwithactionbillingrequestsmandaterequest resource. */ export type BillingRequestWithActionBillingRequestsMandateRequest = { - // This field is ACH specific, sometimes referred to as [SEC - // code](https://www.moderntreasury.com/learn/sec-codes). + // This field is ACH specific, sometimes referred to as [SEC + // code](https://www.moderntreasury.com/learn/sec-codes). // - // This is the way that the payer gives authorisation to the merchant. - // web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC - // code: WEB) - // telephone: Authorisation is provided orally over telephone (maps to SEC - // code: TEL) - // paper: Authorisation is provided in writing and signed, or similarly - // authenticated (maps to SEC code: PPD) + // This is the way that the payer gives authorisation to the merchant. + // web: Authorisation is Internet Initiated or via Mobile Entry (maps to + // SEC code: WEB) + // telephone: Authorisation is provided orally over telephone (maps to SEC + // code: TEL) + // paper: Authorisation is provided in writing and signed, or similarly + // authenticated (maps to SEC code: PPD) // authorisation_source?: BillingRequestWithActionBillingRequestsMandateRequestAuthorisationSource; - // This attribute represents the authorisation type between the payer and - // merchant. It can be set to `one_off`, - // `recurring` or `standing` for ACH scheme. And `single`, `recurring` and - // `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and PAD - // schemes. + // This attribute represents the authorisation type between the payer and + // merchant. It can be set to `one_off`, + // `recurring` or `standing` for ACH scheme. And `single`, `recurring` and + // `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and PAD + // schemes. // consent_type?: string | null; - // Constraints that will apply to the mandate_request. (Optional) Specifically - // required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) + // Specifically required for PayTo and VRP. constraints?: BillingRequestWithActionBillingRequestsMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // description?: string | null; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: BillingRequestWithActionBillingRequestsMandateRequestFundsSettlement; // Resources linked to this BillingRequestWithActionBillingRequestsMandateRequest. links?: BillingRequestWithActionBillingRequestsMandateRequestLinks; - // 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. + // 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. metadata?: JsonMap; - // This attribute can be set to true if the payer has indicated that multiple - // signatures are required for the mandate. As long as every other Billing - // Request actions have been completed, the payer will receive an email - // notification containing instructions on how to complete the additional - // signature. The dual signature flow can only be completed using GoCardless - // branded pages. + // This attribute can be set to true if the payer has indicated that multiple + // signatures are required for the mandate. As long as every other Billing + // Request actions have been completed, the payer will receive an email + // notification containing instructions on how to complete the additional + // signature. The dual signature flow can only be completed using GoCardless + // branded pages. payer_requested_dual_signature?: boolean; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with - // from a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with + // from a list of your available schemes. scheme?: string | null; - // If true, this billing request would be used to set up a mandate solely for - // moving (or sweeping) money from one account owned by the payer to another - // account that the payer also owns. This is required for Faster Payments + // If true, this billing request would be used to set up a mandate solely for + // moving (or sweeping) money from one account owned by the payer to another + // account that the payer also owns. This is required for Faster Payments sweeping?: boolean; - // 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. 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. verify?: BillingRequestWithActionBillingRequestsMandateRequestVerify; }; @@ -2861,65 +3049,65 @@ export enum BillingRequestWithActionBillingRequestsMandateRequestAuthorisationSo /** Type for a billingrequestwithactionbillingrequestsmandaterequestconstraints resource. */ export type BillingRequestWithActionBillingRequestsMandateRequestConstraints = { - // The latest date at which payments can be taken, must occur after start_date - // if present + // The latest date at which payments can be taken, must occur after + // start_date if present // - // This is an optional field and if it is not supplied the agreement will be - // considered open and - // will not have an end date. Keep in mind the end date must take into account - // how long it will - // take the user to set up this agreement via the Billing Request. + // This is an optional field and if it is not supplied the agreement will be + // considered open and + // will not have an end date. Keep in mind the end date must take into + // account how long it will + // take the user to set up this agreement via the Billing Request. // 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. 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. + // 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. // payment_method?: string; - // List of periodic limits and constraints which apply to them + // List of periodic limits and constraints which apply to them periodic_limits?: BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimit[]; - // The date from which payments can be taken. + // The date from which payments can be taken. // - // This is an optional field and if it is not supplied the start date will be - // set to the day - // authorisation happens. + // This is an optional field and if it is not supplied the start date will be + // set to the day + // authorisation happens. // start_date?: string; }; /** Type for a billingrequestwithactionbillingrequestsmandaterequestconstraintsperiodiclimit resource. */ export type BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimit = { - // The alignment of the period. + // 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. + // `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. + // `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. // alignment?: BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimitAlignment; - // (Optional) The maximum number of payments that can be collected in this - // periodic limit. + // (Optional) The maximum number of payments that can be collected in this + // periodic limit. max_payments?: number; - // The maximum total amount that can be charged for all payments in this - // periodic limit. - // Required for VRP. + // The maximum total amount that can be charged for all payments in this + // periodic limit. + // Required for VRP. // max_total_amount?: number; - // The repeating period for this mandate. Defaults to flexible for PayTo if - // not specified. + // The repeating period for this mandate. Defaults to flexible for PayTo if + // not specified. period?: BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimitPeriod; }; @@ -2943,8 +3131,8 @@ export enum BillingRequestWithActionBillingRequestsMandateRequestFundsSettlement /** Type for a billingrequestwithactionbillingrequestsmandaterequestlinks resource. */ export type BillingRequestWithActionBillingRequestsMandateRequestLinks = { - // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created - // from this mandate request. this mandate request. + // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created + // from this mandate request. this mandate request. // mandate?: string; }; @@ -2958,54 +3146,54 @@ export enum BillingRequestWithActionBillingRequestsMandateRequestVerify { /** Type for a billingrequestwithactionbillingrequestspaymentrequest resource. */ export type BillingRequestWithActionBillingRequestsPaymentRequest = { - // Amount in minor unit (e.g. pence in GBP, cents in EUR). + // Amount in minor unit (e.g. pence in GBP, cents in EUR). amount?: string; - // The amount to be deducted from the payment as an app fee, to be paid to the - // partner integration which created the billing request, in the lowest - // denomination for the currency (e.g. pence in GBP, cents in EUR). + // The amount to be deducted from the payment as an app fee, to be paid to + // the partner integration which created the billing request, in the lowest + // denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string | null; - // [ISO 4217](http://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. + // [ISO 4217](http://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. currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // description?: string | null; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: BillingRequestWithActionBillingRequestsPaymentRequestFundsSettlement; // Resources linked to this BillingRequestWithActionBillingRequestsPaymentRequest. links?: BillingRequestWithActionBillingRequestsPaymentRequestLinks; - // 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. + // 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. metadata?: JsonMap; - // A custom payment reference defined by the merchant. It is only available - // for payments on the PayTo scheme or payments using the Direct Funds - // settlement model on the Faster Payments scheme. + // A custom payment reference defined by the merchant. It is only available + // for payments on the PayTo scheme or payments using the Direct Funds + // settlement model on the Faster Payments scheme. // reference?: string | null; - // (Optional) A scheme used for Open Banking payments. Currently - // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` - // and `sepa_instant_credit_transfer` are supported in supported Eurozone - // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as - // the default. Please be aware that `sepa_instant_credit_transfer` may incur - // an additional fee for your customer. + // (Optional) A scheme used for Open Banking payments. Currently + // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` + // and `sepa_instant_credit_transfer` are supported in supported Eurozone + // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as + // the default. Please be aware that `sepa_instant_credit_transfer` may incur + // an additional fee for your customer. scheme?: string | null; }; @@ -3016,118 +3204,119 @@ export enum BillingRequestWithActionBillingRequestsPaymentRequestFundsSettlement /** Type for a billingrequestwithactionbillingrequestspaymentrequestlinks resource. */ export type BillingRequestWithActionBillingRequestsPaymentRequestLinks = { - // (Optional) ID of the [payment](#core-endpoints-payments) that was created - // from this payment request. + // (Optional) ID of the [payment](#core-endpoints-payments) that was created + // from this payment request. payment?: string; }; /** Type for a billingrequestwithactionbillingrequestsresources resource. */ export type BillingRequestWithActionBillingRequestsResources = { - // Embedded customer + // Embedded customer customer?: BillingRequestWithActionBillingRequestsResourcesCustomer; - // Embedded customer bank account, only if a bank account is linked + // Embedded customer bank account, only if a bank account is linked customer_bank_account?: BillingRequestWithActionBillingRequestsResourcesCustomerBankAccount | null; - // Embedded customer billing detail + // Embedded customer billing detail customer_billing_detail?: BillingRequestWithActionBillingRequestsResourcesCustomerBillingDetail; }; /** Type for a billingrequestwithactionbillingrequestsresourcescustomer resource. */ export type BillingRequestWithActionBillingRequestsResourcesCustomer = { - // Customer's company name. Required unless a `given_name` and `family_name` - // are provided. For Canadian customers, the use of a `company_name` value - // will mean that any mandate created from this customer will be considered to - // be a "Business PAD" (otherwise, any mandate will be considered to be a - // "Personal PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value + // will mean that any mandate created from this customer will be considered + // to be a "Business PAD" (otherwise, any mandate will be considered to be a + // "Personal PAD"). company_name?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows + // GoCardless to send notifications to this customer. email?: string | null; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string | null; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // Unique identifier, beginning with "CU". + // Unique identifier, beginning with "CU". id?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. - // Used as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", - // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. - // If this is not provided, the language will be chosen based on the - // `country_code` (if supplied) or default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Used as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. + // If this is not provided, the language will be chosen based on the + // `country_code` (if supplied) or default to "en". language?: 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. + // 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. metadata?: JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string | null; }; /** Type for a billingrequestwithactionbillingrequestsresourcescustomerbankaccount resource. */ export type BillingRequestWithActionBillingRequestsResourcesCustomerBankAccount = { - // Name of the account holder, as known by the bank. The full name provided - // when the customer is created is stored and is available via the API, but is - // transliterated, upcased, and truncated to 18 characters in bank - // submissions. This field is required unless the request includes a [customer - // bank account token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided + // when the customer is created is stored and is available via the API, but + // is transliterated, upcased, and truncated to 18 characters in bank + // submissions. This field is required unless the request includes a + // [customer bank account + // token](#javascript-flow-customer-bank-account-tokens). account_holder_name?: string; - // The last few digits of the account number. Currently 4 digits for NZD bank - // accounts and 2 digits for other currencies. + // The last few digits of the account number. Currently 4 digits for NZD bank + // accounts and 2 digits for other currencies. account_number_ending?: string; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: BillingRequestWithActionBillingRequestsResourcesCustomerBankAccountAccountType; - // A token to uniquely refer to a set of bank account details. This feature is - // still in early access and is only available for certain organisations. + // A token to uniquely refer to a set of bank account details. This feature + // is still in early access and is only available for certain organisations. bank_account_token?: string | null; - // Name of bank, taken from the bank details. + // Name of bank, taken from the bank details. bank_name?: string; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string | null; - // Boolean value showing whether the bank account is enabled or disabled. + // Boolean value showing whether the bank account is enabled or disabled. enabled?: boolean; - // Unique identifier, beginning with "BA". + // Unique identifier, beginning with "BA". id?: string; // Resources linked to this BillingRequestWithActionBillingRequestsResourcesCustomerBankAccount. links?: BillingRequestWithActionBillingRequestsResourcesCustomerBankAccountLinks; - // 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. + // 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. metadata?: JsonMap; }; @@ -3138,137 +3327,138 @@ export enum BillingRequestWithActionBillingRequestsResourcesCustomerBankAccountA /** Type for a billingrequestwithactionbillingrequestsresourcescustomerbankaccountlinks resource. */ export type BillingRequestWithActionBillingRequestsResourcesCustomerBankAccountLinks = { - // ID of the [customer](#core-endpoints-customers) that owns this bank - // account. + // ID of the [customer](#core-endpoints-customers) that owns this bank + // account. customer?: string; }; /** Type for a billingrequestwithactionbillingrequestsresourcescustomerbillingdetail resource. */ export type BillingRequestWithActionBillingRequestsResourcesCustomerBillingDetail = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated + // in Danish krone (DKK). danish_identity_number?: string | null; - // Unique identifier, beginning with "CU". + // Unique identifier, beginning with "CU". id?: string; - // For ACH customers only. Required for ACH customers. A string containing the - // IP address of the payer to whom the mandate belongs (i.e. as a result of - // their completion of a mandate setup flow in their browser). + // For ACH customers only. Required for ACH customers. A string containing + // the IP address of the payer to whom the mandate belongs (i.e. as a result + // of their completion of a mandate setup flow in their browser). // - // Not required for creating offline mandates where `authorisation_source` is - // set to telephone or paper. + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. // ip_address?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state - // code is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string | null; - // The schemes associated with this customer billing detail + // The schemes associated with this customer billing detail schemes?: string[]; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be - // supplied if the customer's bank account is denominated in Swedish krona - // (SEK). This field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be + // supplied if the customer's bank account is denominated in Swedish krona + // (SEK). This field cannot be changed once it has been set. swedish_identity_number?: string | null; }; /** Type for a billingrequestwithactionbillingrequestssubscriptionrequest resource. */ export type BillingRequestWithActionBillingRequestsSubscriptionRequest = { - // Amount in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount?: string; - // 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). + // 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). app_fee?: string | null; - // The total number of payments that should be taken by this subscription. + // The total number of payments that should be taken by this subscription. count?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "USD" and "CAD" are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "USD" and "CAD" are supported. currency?: string; - // 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. + // 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. day_of_month?: string | null; - // 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`. + // 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?: string; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit?: BillingRequestWithActionBillingRequestsSubscriptionRequestIntervalUnit; // Resources linked to this BillingRequestWithActionBillingRequestsSubscriptionRequest. links?: BillingRequestWithActionBillingRequestsSubscriptionRequestLinks; - // 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. + // 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. metadata?: JsonMap; - // Name of the month on which to charge a customer. Must be lowercase. Only - // applies - // when the interval_unit is `yearly`. + // Name of the month on which to charge a customer. Must be lowercase. Only + // applies + // when the interval_unit is `yearly`. // month?: BillingRequestWithActionBillingRequestsSubscriptionRequestMonth; - // Optional name for the subscription. This will be set as the description on - // each payment created. Must not exceed 255 characters. + // Optional name for the subscription. This will be set as the description on + // each payment created. Must not exceed 255 characters. name?: string | null; - // 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](#payments-create-a-payment) for more details. - //
+ // 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](#payments-create-a-payment) for more + // details. + //
payment_reference?: string | null; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; - // The date on which the first payment should be charged. If fulfilled after - // this date, this will be set as 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`. + // The date on which the first payment should be charged. If fulfilled after + // this date, this will be set as 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`. // start_date?: string | null; }; @@ -3281,8 +3471,8 @@ export enum BillingRequestWithActionBillingRequestsSubscriptionRequestIntervalUn /** Type for a billingrequestwithactionbillingrequestssubscriptionrequestlinks resource. */ export type BillingRequestWithActionBillingRequestsSubscriptionRequestLinks = { - // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was - // created from this subscription request. + // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that + // was created from this subscription request. // subscription?: string; }; @@ -3304,54 +3494,54 @@ export enum BillingRequestWithActionBillingRequestsSubscriptionRequestMonth { /** Type for a block resource. */ export type Block = { - // Shows if the block is active or disabled. Only active blocks will be used - // when deciding - // if a mandate should be blocked. + // Shows if the block is active or disabled. Only active blocks will be used + // when deciding + // if a mandate should be blocked. active?: boolean | null; - // Type of entity we will seek to match against when blocking the mandate. - // This - // can currently be one of 'email', 'email_domain', 'bank_account', or - // 'bank_name'. + // Type of entity we will seek to match against when blocking the mandate. + // This + // can currently be one of 'email', 'email_domain', 'bank_account', or + // 'bank_name'. block_type?: BlockBlockType; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // resource was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // Unique identifier, beginning with "BLC". + // Unique identifier, beginning with "BLC". id?: string; - // This field is required if the reason_type is other. It should be a - // description of - // the reason for why you wish to block this payer and why it does not align - // with the - // given reason_types. This is intended to help us improve our knowledge of - // types of - // fraud. + // This field is required if the reason_type is other. It should be a + // description of + // the reason for why you wish to block this payer and why it does not align + // with the + // given reason_types. This is intended to help us improve our knowledge of + // types of + // fraud. reason_description?: string | null; - // The reason you wish to block this payer, can currently be one of - // 'identity_fraud', - // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by - // one of the - // above then 'other' can be selected but you must provide a reason - // description. + // The reason you wish to block this payer, can currently be one of + // 'identity_fraud', + // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by + // one of the + // above then 'other' can be selected but you must provide a reason + // description. reason_type?: BlockReasonType; - // This field is a reference to the value you wish to block. This may be the - // raw value - // (in the case of emails or email domains) or the ID of the resource (in the - // case of - // bank accounts and bank names). This means in order to block a specific bank - // account - // (even if you wish to block generically by name) it must already have been - // created as - // a resource. + // This field is a reference to the value you wish to block. This may be the + // raw value + // (in the case of emails or email domains) or the ID of the resource (in the + // case of + // bank accounts and bank names). This means in order to block a specific + // bank account + // (even if you wish to block generically by name) it must already have been + // created as + // a resource. resource_reference?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // resource was updated. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was updated. updated_at?: string; }; @@ -3376,111 +3566,112 @@ export enum BlockReferenceType { /** Type for a creditor resource. */ export type Creditor = { - // The first line of the creditor's address. + // The first line of the creditor's address. address_line1?: string | null; - // The second line of the creditor's address. + // The second line of the creditor's address. address_line2?: string | null; - // The third line of the creditor's address. + // The third line of the creditor's address. address_line3?: string | null; - // Prefix for the bank reference of payouts sent to this creditor. For - // instance, if - // the creditor's `bank_reference_prefix` was `ACME`, the bank reference of a - // payout - // sent to that creditor could be `ACME-8G7Q8`. + // Prefix for the bank reference of payouts sent to this creditor. For + // instance, if + // the creditor's `bank_reference_prefix` was `ACME`, the bank reference of a + // payout + // sent to that creditor could be `ACME-8G7Q8`. // - // This prefix is also used for refunds in EUR and GBP. + // This prefix is also used for refunds in EUR and GBP. // bank_reference_prefix?: string; - // Boolean indicating whether the creditor is permitted to create refunds. + // Boolean indicating whether the creditor is permitted to create refunds. can_create_refunds?: boolean; - // The city of the creditor's address. + // The city of the creditor's address. city?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // The type of business of the creditor. Currently, `individual`, `company`, - // `charity`, `partnership`, and `trust` are supported. + // The type of business of the creditor. Currently, `individual`, `company`, + // `charity`, `partnership`, and `trust` are supported. creditor_type?: CreditorCreditorType; - // Boolean value indicating whether creditor has the [Custom Payment - // Pages](https://hub.gocardless.com/s/article/Custom-payment-pages) - // functionality enabled. + // Boolean value indicating whether creditor has the [Custom Payment + // Pages](https://hub.gocardless.com/s/article/Custom-payment-pages) + // functionality enabled. custom_payment_pages_enabled?: boolean; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which amounts will be paid out (after foreign exchange). - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. Present only if payouts will be (or were) made via foreign - // exchange. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which amounts will be paid out (after foreign exchange). + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. Present only if payouts will be (or were) made via foreign + // exchange. fx_payout_currency?: CreditorFxPayoutCurrency; - // Unique identifier, beginning with "CR". + // Unique identifier, beginning with "CR". id?: string; // Resources linked to this Creditor. links?: CreditorLinks; - // URL for the creditor's logo, which may be shown on their payment pages. + // URL for the creditor's logo, which may be shown on their payment pages. logo_url?: string | null; - // Boolean value indicating whether creditor has the [Mandate - // Imports](#core-endpoints-mandate-imports) functionality enabled. + // Boolean value indicating whether creditor has the [Mandate + // Imports](#core-endpoints-mandate-imports) functionality enabled. mandate_imports_enabled?: boolean; - // Boolean value indicating whether the organisation is responsible for - // sending all customer notifications (note this is separate from the - // functionality described - // [here](/getting-started/api/handling-customer-notifications/)). If you are - // a partner app, and this value is true, you should not send notifications on - // behalf of this organisation. + // Boolean value indicating whether the organisation is responsible for + // sending all customer notifications (note this is separate from the + // functionality described + // [here](/getting-started/api/handling-customer-notifications/)). If you are + // a partner app, and this value is true, you should not send notifications + // on behalf of this organisation. merchant_responsible_for_notifications?: boolean; - // The creditor's trading name. + // The creditor's trading name. name?: string; - // The creditor's postal code. + // The creditor's postal code. postal_code?: string | null; - // The creditor's address region, county or department. + // The creditor's address region, county or department. region?: string | null; - // An array of the scheme identifiers this creditor can create mandates - // against. + // An array of the scheme identifiers this creditor can create mandates + // against. // - // The support address, `phone_number` and `email` fields are for customers to - // contact the merchant for support purposes. They must be displayed on the - // payment page, please see our [compliance - // requirements](#appendix-compliance-requirements) for more details. + // The support address, `phone_number` and `email` fields are for customers + // to contact the merchant for support purposes. They must be displayed on + // the payment page, please see our [compliance + // requirements](#appendix-compliance-requirements) for more details. scheme_identifiers?: CreditorSchemeIdentifier[]; - // The creditor's verification status, indicating whether they can yet receive - // payouts. For more details on handling verification as a partner, see our - // ["Helping your users get verified" - // guide](/getting-started/partners/helping-your-users-get-verified/). One of: - //
    - //
  • `successful`: The creditor's account is fully verified, and they can - // receive payouts. Once a creditor has been successfully verified, they may - // in the future require further verification - for example, if they change - // their payout bank account, we will have to check that they own the new bank - // account before they can receive payouts again.
  • - //
  • `in_review`: The creditor has provided all of the information currently - // requested, and it is awaiting review by GoCardless before they can be - // verified and receive payouts.
  • - //
  • `action_required`: The creditor needs to provide further information to - // verify their account so they can receive payouts, and should visit the - // verification flow.
  • - //
+ // The creditor's verification status, indicating whether they can yet + // receive payouts. For more details on handling verification as a partner, + // see our ["Helping your users get verified" + // guide](/getting-started/partners/helping-your-users-get-verified/). One + // of: + //
    + //
  • `successful`: The creditor's account is fully verified, and they can + // receive payouts. Once a creditor has been successfully verified, they may + // in the future require further verification - for example, if they change + // their payout bank account, we will have to check that they own the new + // bank account before they can receive payouts again.
  • + //
  • `in_review`: The creditor has provided all of the information + // currently requested, and it is awaiting review by GoCardless before they + // can be verified and receive payouts.
  • + //
  • `action_required`: The creditor needs to provide further information + // to verify their account so they can receive payouts, and should visit the + // verification flow.
  • + //
verification_status?: CreditorVerificationStatus; }; @@ -3494,36 +3685,36 @@ export enum CreditorCreditorType { /** Type for a creditorupdaterequestlinks resource. */ export type CreditorUpdateRequestLinks = { - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in AUD. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in AUD. default_aud_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in CAD. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in CAD. default_cad_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in DKK. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in DKK. default_dkk_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in EUR. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in EUR. default_eur_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in GBP. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in GBP. default_gbp_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in NZD. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in NZD. default_nzd_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in SEK. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in SEK. default_sek_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in USD. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in USD. default_usd_payout_account?: string | null; }; @@ -3540,104 +3731,104 @@ export enum CreditorFxPayoutCurrency { /** Type for a creditorlinks resource. */ export type CreditorLinks = { - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in AUD. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in AUD. default_aud_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in CAD. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in CAD. default_cad_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in DKK. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in DKK. default_dkk_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in EUR. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in EUR. default_eur_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in GBP. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in GBP. default_gbp_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in NZD. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in NZD. default_nzd_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in SEK. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in SEK. default_sek_payout_account?: string | null; - // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is - // set up to receive payouts in USD. + // ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is + // set up to receive payouts in USD. default_usd_payout_account?: string | null; }; /** Type for a creditorschemeidentifier resource. */ export type CreditorSchemeIdentifier = { - // The first line of the scheme identifier's support address. + // The first line of the scheme identifier's support address. address_line1?: string; - // The second line of the scheme identifier's support address. + // The second line of the scheme identifier's support address. address_line2?: string | null; - // The third line of the scheme identifier's support address. + // The third line of the scheme identifier's support address. address_line3?: string | null; - // Whether a custom reference can be submitted for mandates using this scheme - // identifier. + // Whether a custom reference can be submitted for mandates using this scheme + // identifier. can_specify_mandate_reference?: boolean; - // The city of the scheme identifier's support address. + // The city of the scheme identifier's support address. city?: string; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // The currency of the scheme identifier. + // The currency of the scheme identifier. currency?: CreditorSchemeIdentifierCurrency; - // Scheme identifier's support email address. + // Scheme identifier's support email address. email?: string; - // Unique identifier, usually beginning with "SU". + // Unique identifier, usually beginning with "SU". id?: string; - // The minimum interval, in working days, between the sending of a - // pre-notification to the customer, and the charge date of a payment using - // this scheme identifier. + // The minimum interval, in working days, between the sending of a + // pre-notification to the customer, and the charge date of a payment using + // this scheme identifier. // - // By default, GoCardless sends these notifications automatically. Please see - // our [compliance requirements](#appendix-compliance-requirements) for more - // details. + // By default, GoCardless sends these notifications automatically. Please see + // our [compliance requirements](#appendix-compliance-requirements) for more + // details. minimum_advance_notice?: number; - // The name which appears on customers' bank statements. This should usually - // be the merchant's trading name. + // The name which appears on customers' bank statements. This should usually + // be the merchant's trading name. name?: string; - // Scheme identifier's support phone number. + // Scheme identifier's support phone number. phone_number?: string; - // The scheme identifier's support postal code. + // The scheme identifier's support postal code. postal_code?: string; - // The scheme-unique identifier against which payments are submitted. + // The scheme-unique identifier against which payments are submitted. reference?: string; - // The scheme identifier's support address region, county or department. + // The scheme identifier's support address region, county or department. region?: string | null; - // The scheme which this scheme identifier applies to. + // The scheme which this scheme identifier applies to. scheme?: CreditorSchemeIdentifierScheme; - // The status of the scheme identifier. Only `active` scheme identifiers will - // be applied to a creditor and used against payments. + // The status of the scheme identifier. Only `active` scheme identifiers will + // be applied to a creditor and used against payments. status?: CreditorSchemeIdentifierStatus; }; @@ -3680,53 +3871,53 @@ export enum CreditorVerificationStatus { /** Type for a creditorbankaccount resource. */ export type CreditorBankAccount = { - // Name of the account holder, as known by the bank. Usually this is the same - // as the name stored with the linked [creditor](#core-endpoints-creditors). - // This field will be transliterated, upcased and truncated to 18 characters. + // Name of the account holder, as known by the bank. Usually this is the same + // as the name stored with the linked [creditor](#core-endpoints-creditors). + // This field will be transliterated, upcased and truncated to 18 characters. account_holder_name?: string; - // The last few digits of the account number. Currently 4 digits for NZD bank - // accounts and 2 digits for other currencies. + // The last few digits of the account number. Currently 4 digits for NZD bank + // accounts and 2 digits for other currencies. account_number_ending?: string; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: CreditorBankAccountAccountType; - // Name of bank, taken from the bank details. + // Name of bank, taken from the bank details. bank_name?: string; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string | null; - // Boolean value showing whether the bank account is enabled or disabled. + // Boolean value showing whether the bank account is enabled or disabled. enabled?: boolean; - // Unique identifier, beginning with "BA". + // Unique identifier, beginning with "BA". id?: string; // Resources linked to this CreditorBankAccount. links?: CreditorBankAccountLinks; - // 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. + // 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. metadata?: JsonMap; - // Verification status of the Bank Account. Can be one of `pending`, - // `in_review` or `successful` + // Verification status of the Bank Account. Can be one of `pending`, + // `in_review` or `successful` verification_status?: CreditorBankAccountVerificationStatus; }; @@ -3737,15 +3928,15 @@ export enum CreditorBankAccountAccountType { /** Type for a creditorbankaccountcreaterequestlinks resource. */ export type CreditorBankAccountCreateRequestLinks = { - // ID of the [creditor](#core-endpoints-creditors) that owns this bank - // account. + // ID of the [creditor](#core-endpoints-creditors) that owns this bank + // account. creditor: string; }; /** Type for a creditorbankaccountlinks resource. */ export type CreditorBankAccountLinks = { - // ID of the [creditor](#core-endpoints-creditors) that owns this bank - // account. + // ID of the [creditor](#core-endpoints-creditors) that owns this bank + // account. creditor?: string; }; @@ -3758,96 +3949,96 @@ export enum CreditorBankAccountVerificationStatus { /** Type for a currencyexchangerate resource. */ export type CurrencyExchangeRate = { - // The exchange rate from the source to target currencies provided with up to - // 10 decimal places. + // The exchange rate from the source to target currencies provided with up to + // 10 decimal places. rate?: string; - // Source currency + // Source currency source?: string; - // Target currency + // Target currency target?: string; - // Time at which the rate was retrieved from the provider. + // Time at which the rate was retrieved from the provider. time?: string; }; /** Type for a customer resource. */ export type Customer = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // Customer's company name. Required unless a `given_name` and `family_name` - // are provided. For Canadian customers, the use of a `company_name` value - // will mean that any mandate created from this customer will be considered to - // be a "Business PAD" (otherwise, any mandate will be considered to be a - // "Personal PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value + // will mean that any mandate created from this customer will be considered + // to be a "Business PAD" (otherwise, any mandate will be considered to be a + // "Personal PAD"). company_name?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated + // in Danish krone (DKK). danish_identity_number?: string | null; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows + // GoCardless to send notifications to this customer. email?: string | null; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string | null; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // Unique identifier, beginning with "CU". + // Unique identifier, beginning with "CU". id?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. - // Used as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", - // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. - // If this is not provided, the language will be chosen based on the - // `country_code` (if supplied) or default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Used as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. + // If this is not provided, the language will be chosen based on the + // `country_code` (if supplied) or default to "en". language?: 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. + // 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. metadata?: JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state - // code is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be - // supplied if the customer's bank account is denominated in Swedish krona - // (SEK). This field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be + // supplied if the customer's bank account is denominated in Swedish krona + // (SEK). This field cannot be changed once it has been set. swedish_identity_number?: string | null; }; @@ -3875,55 +4066,56 @@ export enum CustomerSortField { /** Type for a customerbankaccount resource. */ export type CustomerBankAccount = { - // Name of the account holder, as known by the bank. The full name provided - // when the customer is created is stored and is available via the API, but is - // transliterated, upcased, and truncated to 18 characters in bank - // submissions. This field is required unless the request includes a [customer - // bank account token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided + // when the customer is created is stored and is available via the API, but + // is transliterated, upcased, and truncated to 18 characters in bank + // submissions. This field is required unless the request includes a + // [customer bank account + // token](#javascript-flow-customer-bank-account-tokens). account_holder_name?: string; - // The last few digits of the account number. Currently 4 digits for NZD bank - // accounts and 2 digits for other currencies. + // The last few digits of the account number. Currently 4 digits for NZD bank + // accounts and 2 digits for other currencies. account_number_ending?: string; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: CustomerBankAccountAccountType; - // A token to uniquely refer to a set of bank account details. This feature is - // still in early access and is only available for certain organisations. + // A token to uniquely refer to a set of bank account details. This feature + // is still in early access and is only available for certain organisations. bank_account_token?: string | null; - // Name of bank, taken from the bank details. + // Name of bank, taken from the bank details. bank_name?: string; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string | null; - // Boolean value showing whether the bank account is enabled or disabled. + // Boolean value showing whether the bank account is enabled or disabled. enabled?: boolean; - // Unique identifier, beginning with "BA". + // Unique identifier, beginning with "BA". id?: string; // Resources linked to this CustomerBankAccount. links?: CustomerBankAccountLinks; - // 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. + // 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. metadata?: JsonMap; }; @@ -3934,57 +4126,57 @@ export enum CustomerBankAccountAccountType { /** Type for a customerbankaccountcreaterequestlinks resource. */ export type CustomerBankAccountCreateRequestLinks = { - // ID of the [customer](#core-endpoints-customers) that owns this bank - // account. + // ID of the [customer](#core-endpoints-customers) that owns this bank + // account. customer: string; - // ID of a [customer bank account - // token](#javascript-flow-customer-bank-account-tokens) to use in place of - // bank account parameters. + // ID of a [customer bank account + // token](#javascript-flow-customer-bank-account-tokens) to use in place of + // bank account parameters. customer_bank_account_token?: string; }; /** Type for a customerbankaccountlinks resource. */ export type CustomerBankAccountLinks = { - // ID of the [customer](#core-endpoints-customers) that owns this bank - // account. + // ID of the [customer](#core-endpoints-customers) that owns this bank + // account. customer?: string; }; /** Type for a customernotification resource. */ export type CustomerNotification = { - // The action that was taken on the notification. Currently this can only be - // `handled`, - // which means the integrator sent the notification themselves. + // The action that was taken on the notification. Currently this can only be + // `handled`, + // which means the integrator sent the notification themselves. // action_taken?: CustomerNotificationActionTaken; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // action was taken. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // action was taken. action_taken_at?: string | null; - // A string identifying the integrator who was able to handle this - // notification. + // A string identifying the integrator who was able to handle this + // notification. action_taken_by?: string | null; - // The id of the notification. + // The id of the notification. id?: string; // Resources linked to this CustomerNotification. links?: CustomerNotificationLinks; - // The type of notification the customer shall receive. - // One of: - //
    - //
  • `payment_created`
  • - //
  • `payment_cancelled`
  • - //
  • `mandate_created`
  • - //
  • `mandate_blocked`
  • - //
  • `subscription_created`
  • - //
  • `subscription_cancelled`
  • - //
  • `instalment_schedule_created`
  • - //
  • `instalment_schedule_cancelled`
  • - //
+ // The type of notification the customer shall receive. + // One of: + //
    + //
  • `payment_created`
  • + //
  • `payment_cancelled`
  • + //
  • `mandate_created`
  • + //
  • `mandate_blocked`
  • + //
  • `subscription_created`
  • + //
  • `subscription_cancelled`
  • + //
  • `instalment_schedule_created`
  • + //
  • `instalment_schedule_cancelled`
  • + //
type?: CustomerNotificationType; }; @@ -3994,22 +4186,22 @@ export enum CustomerNotificationActionTaken { /** Type for a customernotificationlinks resource. */ export type CustomerNotificationLinks = { - // The customer who should be contacted with this notification. + // The customer who should be contacted with this notification. customer: string; - // The event that triggered the notification to be scheduled. + // The event that triggered the notification to be scheduled. event: string; - // The identifier of the related mandate. + // The identifier of the related mandate. mandate?: string; - // The identifier of the related payment. + // The identifier of the related payment. payment?: string; - // The identifier of the related refund. + // The identifier of the related refund. refund?: string; - // The identifier of the related subscription. + // The identifier of the related subscription. subscription?: string; }; @@ -4026,64 +4218,65 @@ export enum CustomerNotificationType { /** Type for a event resource. */ export type Event = { - // What has happened to the resource. See [Event Types](#event-types) for the - // possible actions. + // What has happened to the resource. See [Event Types](#event-types) for the + // possible actions. action?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // Present only in webhooks when an integrator is authorised to send their own - // notifications. See - // [here](/getting-started/api/handling-customer-notifications/) - // for further information. + // Present only in webhooks when an integrator is authorised to send their + // own + // notifications. See + // [here](/getting-started/api/handling-customer-notifications/) + // for further information. // customer_notifications?: EventCustomerNotification[] | null; // details?: EventDetails; - // Unique identifier, beginning with "EV". + // Unique identifier, beginning with "EV". id?: string; // Resources linked to this Event. links?: EventLinks; - // The metadata that was passed when making the API request that triggered the - // event - // (for instance, cancelling a mandate). + // The metadata that was passed when making the API request that triggered + // the event + // (for instance, cancelling a mandate). // - // This field will only be populated if the `details[origin]` field is `api` - // otherwise it will be an empty object. + // This field will only be populated if the `details[origin]` field is `api` + // otherwise it will be an empty object. // metadata?: JsonMap; - // The metadata of the resource that the event is for. For example, this field - // will have the same - // value of the `mandate[metadata]` field on the response you would receive - // from performing a GET request on a mandate. + // The metadata of the resource that the event is for. For example, this + // field will have the same + // value of the `mandate[metadata]` field on the response you would receive + // from performing a GET request on a mandate. // resource_metadata?: JsonMap; - // The resource type for this event. One of: - //
    - //
  • `billing_requests`
  • - //
  • `creditors`
  • - //
  • `exports`
  • - //
  • `instalment_schedules`
  • - //
  • `mandates`
  • - //
  • `payer_authorisations`
  • - //
  • `payments`
  • - //
  • `payouts`
  • - //
  • `refunds`
  • - //
  • `scheme_identifiers`
  • - //
  • `subscriptions`
  • - //
  • `outbound_payments`
  • - //
+ // The resource type for this event. One of: + //
    + //
  • `billing_requests`
  • + //
  • `creditors`
  • + //
  • `exports`
  • + //
  • `instalment_schedules`
  • + //
  • `mandates`
  • + //
  • `payer_authorisations`
  • + //
  • `payments`
  • + //
  • `payouts`
  • + //
  • `refunds`
  • + //
  • `scheme_identifiers`
  • + //
  • `subscriptions`
  • + //
  • `outbound_payments`
  • + //
resource_type?: EventResourceType; - // Audit information about the source of the event. + // Audit information about the source of the event. source?: EventSource; }; @@ -4104,78 +4297,81 @@ export enum EventInclude { /** Type for a eventcustomernotification resource. */ export type EventCustomerNotification = { - // Time after which GoCardless will send the notification by email. + // Time after which GoCardless will send the notification by email. deadline?: string; - // The id of the notification. + // The id of the notification. id?: string; - // Whether or not the notification must be sent. + // Whether or not the notification must be sent. mandatory?: boolean; - // See [here](#core-endpoints-customer-notifications) for a complete list of - // customer notification types. + // See [here](#core-endpoints-customer-notifications) for a complete list of + // customer notification types. type?: string; }; /** Type for a eventdetails resource. */ export type EventDetails = { - // When we send a creditor `new_payout_currency_added` webhook, we also send - // the bank account id of the new account + // When we send a creditor `new_payout_currency_added` webhook, we also send + // the bank account id of the new account bank_account_id?: string; - // What triggered the event. _Note:_ `cause` is our simplified and predictable - // key indicating what triggered the event. + // What triggered the event. _Note:_ `cause` is our simplified and + // predictable key indicating what triggered the event. cause?: string; - // When we send a creditor `new_payout_currency_added` webhook, we also send - // the currency of the new account + // When we send a creditor `new_payout_currency_added` webhook, we also send + // the currency of the new account currency?: string; - // Human readable description of the cause. _Note:_ Changes to event - // descriptions are not considered breaking. + // Human readable description of the cause. _Note:_ Changes to event + // descriptions are not considered breaking. description?: string; - // Count of rows in the csv. This is sent for export events + // Count of rows in the csv. This is sent for export events item_count?: number; - // When will_attempt_retry is set to false, this field will contain - // the reason the payment was not retried. This can be one of: - //
    - //
  • `failure_filter_applied`: The payment won't be intelligently retried as - // there is a high likelihood of failure on retry.
  • - //
  • `other`: The payment won't be intelligently retried due to any other - // reason.
  • - //
+ // When will_attempt_retry is set to false, this field will contain + // the reason the payment was not retried. This can be one of: + //
    + //
  • `failure_filter_applied`: The payment won't be intelligently retried + // as + // there is a high likelihood of failure on retry.
  • + //
  • `other`: The payment won't be intelligently retried due to any other + // reason.
  • + //
not_retried_reason?: string; - // Who initiated the event. One of: - //
    - //
  • `bank`: this event was triggered by a report from the banks
  • - //
  • `gocardless`: this event was performed by GoCardless automatically
  • - //
  • `api`: this event was triggered by an API endpoint
  • - //
  • `customer`: this event was triggered by a Customer
  • - //
  • `payer`: this event was triggered by a Payer
  • - //
+ // Who initiated the event. One of: + //
    + //
  • `bank`: this event was triggered by a report from the banks
  • + //
  • `gocardless`: this event was performed by GoCardless + // automatically
  • + //
  • `api`: this event was triggered by an API endpoint
  • + //
  • `customer`: this event was triggered by a Customer
  • + //
  • `payer`: this event was triggered by a Payer
  • + //
origin?: EventDetailsOrigin; - // When we send a creditor `creditor_updated` webhook, this tells you which - // property on the creditor has been updated + // When we send a creditor `creditor_updated` webhook, this tells you which + // property on the creditor has been updated property?: string; - // Set when a `bank` is the origin of the event. This is the reason code - // received in the report from the customer's bank. See the [GoCardless Direct - // Debit guide](https://gocardless.com/direct-debit/receiving-messages) for - // information on the meanings of different reason codes. _Note:_ - // `reason_code` is payment scheme-specific and can be inconsistent between - // banks. + // Set when a `bank` is the origin of the event. This is the reason code + // received in the report from the customer's bank. See the [GoCardless + // Direct Debit + // guide](https://gocardless.com/direct-debit/receiving-messages) for + // information on the meanings of different reason codes. _Note:_ + // `reason_code` is payment scheme-specific and can be inconsistent between + // banks. reason_code?: string; - // A bank payment scheme. Set when a bank is the origin of the event. + // A bank payment scheme. Set when a bank is the origin of the event. scheme?: EventDetailsScheme; - // Whether the payment will be retried automatically. Set on a payment failed - // event. + // Whether the payment will be retried automatically. Set on a payment failed + // event. will_attempt_retry?: boolean; }; @@ -4203,92 +4399,97 @@ export enum EventDetailsScheme { /** Type for a eventlinks resource. */ export type EventLinks = { - // ID of a [bank authorisation](#billing-requests-bank-authorisations). + // ID of a [bank authorisation](#billing-requests-bank-authorisations). bank_authorisation?: string; - // ID of a [billing request](#billing-requests-billing-requests). + // ID of a [billing request](#billing-requests-billing-requests). billing_request?: string; - // ID of a [billing request flow](#billing-requests-billing-request-flows). + // ID of a [billing request flow](#billing-requests-billing-request-flows). billing_request_flow?: string; - // If `resource_type` is `creditor`, this is the ID of the - // [creditor](#core-endpoints-creditors) which has been updated. + // If `resource_type` is `creditor`, this is the ID of the + // [creditor](#core-endpoints-creditors) which has been updated. creditor?: string; - // ID of a [customer](#core-endpoints-customers). + // ID of a [customer](#core-endpoints-customers). customer?: string; - // ID of a [customer bank account](#core-endpoints-customer-bank-accounts). + // ID of a [customer bank account](#core-endpoints-customer-bank-accounts). customer_bank_account?: string; - // If `resource_type` is `instalment_schedule`, this is the ID of the - // [instalment schedule](#core-endpoints-instalment-schedules) which has been - // updated. + // If `resource_type` is `instalment_schedule`, this is the ID of the + // [instalment schedule](#core-endpoints-instalment-schedules) which has been + // updated. instalment_schedule?: string; - // If `resource_type` is `mandates`, this is the ID of the - // [mandate](#core-endpoints-mandates) which has been updated. + // If `resource_type` is `mandates`, this is the ID of the + // [mandate](#core-endpoints-mandates) which has been updated. mandate?: string; - // This is the id of the mandate request associated to this event + // This is the id of the mandate request associated to this event mandate_request?: string; - // If `resource_type` is `billing_requests`, this is the ID of the - // [mandate](#core-endpoints-mandates) which has been created. + // If `resource_type` is `billing_requests`, this is the ID of the + // [mandate](#core-endpoints-mandates) which has been created. mandate_request_mandate?: string; - // This is only included for mandate transfer events, when it is the ID of the - // [customer bank account](#core-endpoints-customer-bank-accounts) which the - // mandate is being transferred to. + // This is only included for mandate transfer events, when it is the ID of + // the [customer bank account](#core-endpoints-customer-bank-accounts) which + // the mandate is being transferred to. new_customer_bank_account?: string; - // This is only included for mandate replaced events, when it is the ID of the - // new [mandate](#core-endpoints-mandates) that replaces the existing mandate. + // This is only included for mandate replaced events, when it is the ID of + // the new [mandate](#core-endpoints-mandates) that replaces the existing + // mandate. new_mandate?: string; - // If the event is included in a [webhook](#webhooks-overview) to an [OAuth - // app](#appendix-oauth), this is the ID of the account to which it belongs. + // If the event is included in a [webhook](#webhooks-overview) to an [OAuth + // app](#appendix-oauth), this is the ID of the account to which it belongs. organisation?: string; - // If this event was caused by another, this is the ID of the cause. For - // example, if a mandate is cancelled it automatically cancels all pending - // payments associated with it; in this case, the payment cancellation events - // would have the ID of the mandate cancellation event in this field. + // If `resource_type` is `outbound_payments`, this is the ID of the + // outbound_payment which has been updated. + outbound_payment?: string; + + // If this event was caused by another, this is the ID of the cause. For + // example, if a mandate is cancelled it automatically cancels all pending + // payments associated with it; in this case, the payment cancellation events + // would have the ID of the mandate cancellation event in this field. parent_event?: string; - // ID of a [payer authorisation](#core-endpoints-payer-authorisations). + // ID of a [payer authorisation](#core-endpoints-payer-authorisations). payer_authorisation?: string; - // If `resource_type` is `payments`, this is the ID of the - // [payment](#core-endpoints-payments) which has been updated. + // If `resource_type` is `payments`, this is the ID of the + // [payment](#core-endpoints-payments) which has been updated. payment?: string; - // If `resource_type` is `billing_requests`, this is the ID of the - // [payment](#core-endpoints-payments) which has been created for Instant Bank - // Payment. + // If `resource_type` is `billing_requests`, this is the ID of the + // [payment](#core-endpoints-payments) which has been created for Instant + // Bank Payment. payment_request_payment?: string; - // If `resource_type` is `payouts`, this is the ID of the - // [payout](#core-endpoints-payouts) which has been updated. + // If `resource_type` is `payouts`, this is the ID of the + // [payout](#core-endpoints-payouts) which has been updated. payout?: string; - // This is only included for mandate transfer events, when it is the ID of the - // [customer bank account](#core-endpoints-customer-bank-accounts) which the - // mandate is being transferred from. + // This is only included for mandate transfer events, when it is the ID of + // the [customer bank account](#core-endpoints-customer-bank-accounts) which + // the mandate is being transferred from. previous_customer_bank_account?: string; - // If `resource_type` is `refunds`, this is the ID of the - // [refund](#core-endpoints-refunds) which has been updated. + // If `resource_type` is `refunds`, this is the ID of the + // [refund](#core-endpoints-refunds) which has been updated. refund?: string; - // If `resource_type` is `scheme_identifiers`, this is the ID of the - // [scheme_identifier](#core-endpoints-scheme-identifiers) which has been - // updated. + // If `resource_type` is `scheme_identifiers`, this is the ID of the + // [scheme_identifier](#core-endpoints-scheme-identifiers) which has been + // updated. scheme_identifier?: string; - // If `resource_type` is `subscription`, this is the ID of the - // [subscription](#core-endpoints-subscriptions) which has been updated. + // If `resource_type` is `subscription`, this is the ID of the + // [subscription](#core-endpoints-subscriptions) which has been updated. subscription?: string; }; @@ -4311,10 +4512,10 @@ export enum EventResourceType { /** Type for a eventsource resource. */ export type EventSource = { - // The name of the event's source. + // The name of the event's source. name?: string; - // The type of the event's source. + // The type of the event's source. type?: EventSourceType; }; @@ -4327,20 +4528,20 @@ export enum EventSourceType { /** Type for a export resource. */ export type Export = { - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // The currency of the export (if applicable) + // The currency of the export (if applicable) currency?: string; - // Download url for the export file. Subject to expiry. + // Download url for the export file. Subject to expiry. download_url?: string | null; - // The type of the export + // The type of the export export_type?: ExportExportType; - // Unique identifier, beginning with "EX". + // Unique identifier, beginning with "EX". id?: string; }; @@ -4370,60 +4571,66 @@ export enum ExportExportType { PaymentAccountStatement = 'payment_account_statement', } +/** Type for a fundsavailability resource. */ +export type FundsAvailability = { + // Indicates if the amount is available + available?: boolean; +}; + /** Type for a instalmentschedule resource. */ export type InstalmentSchedule = { - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: InstalmentScheduleCurrency; - // Unique identifier, beginning with "IS". + // Unique identifier, beginning with "IS". id?: string; // Resources linked to this InstalmentSchedule. links?: InstalmentScheduleLinks; - // 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. + // 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. metadata?: JsonMap; - // 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. + // 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. name?: string; - // 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. + // 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. // payment_errors?: JsonMap; - // 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
  • - //
+ // 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
  • + //
status?: InstalmentScheduleStatus; - // 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. + // 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. total_amount?: string; }; @@ -4440,51 +4647,52 @@ export enum InstalmentScheduleCurrency { /** Type for a instalmentscheduleinstalment resource. */ export type InstalmentScheduleInstalment = { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount: string; - // A future date on which the payment should be collected. If the date - // is before the next_possible_charge_date on the - // [mandate](#core-endpoints-mandates), it will be automatically rolled - // forwards to that date. + // A future date on which the payment should be collected. If the date + // is before the next_possible_charge_date on the + // [mandate](#core-endpoints-mandates), it will be automatically rolled + // forwards to that date. charge_date: string | null; - // A human-readable description of the payment. This will be included in the - // notification email GoCardless sends to your customer if your organisation - // does not send its own notifications (see [compliance - // requirements](#appendix-compliance-requirements)). + // A human-readable description of the payment. This will be included in the + // notification email GoCardless sends to your customer if your organisation + // does not send its own notifications (see [compliance + // requirements](#appendix-compliance-requirements)). description?: string | null; }; /** Type for a instalmentschedulecreatewithdatesrequestlinks resource. */ export type InstalmentScheduleCreateWithDatesRequestLinks = { - // ID of the associated [mandate](#core-endpoints-mandates) which the - // instalment schedule will create payments against. + // ID of the associated [mandate](#core-endpoints-mandates) which the + // instalment schedule will create payments against. mandate: string; }; /** Type for a instalmentscheduleinstalments resource. */ export type InstalmentScheduleInstalments = { - // List of amounts of each instalment, in the lowest denomination for the - // currency (e.g. pence in GBP, cents in EUR). + // List of amounts of each instalment, in the lowest denomination for the + // currency (e.g. pence in GBP, cents in EUR). // amounts: string[]; - // Number of `interval_units` between charge dates. Must be greater than or - // equal to `1`. + // Number of `interval_units` between charge dates. Must be greater than or + // equal to `1`. // interval: number; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit: InstalmentScheduleInstalmentsIntervalUnit; - // The date on which the first payment should be charged. Must be on or after - // the [mandate](#core-endpoints-mandates)'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` + // The date on which the first payment should be charged. Must be on or after + // the [mandate](#core-endpoints-mandates)'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` start_date?: string | null; }; @@ -4496,21 +4704,21 @@ export enum InstalmentScheduleInstalmentsIntervalUnit { /** Type for a instalmentschedulecreatewithschedulerequestlinks resource. */ export type InstalmentScheduleCreateWithScheduleRequestLinks = { - // ID of the associated [mandate](#core-endpoints-mandates) which the - // instalment schedule will create payments against. + // ID of the associated [mandate](#core-endpoints-mandates) which the + // instalment schedule will create payments against. mandate: string; }; /** Type for a instalmentschedulelinks resource. */ export type InstalmentScheduleLinks = { - // ID of the associated [customer](#core-endpoints-customers). + // ID of the associated [customer](#core-endpoints-customers). customer: string; - // ID of the associated [mandate](#core-endpoints-mandates) which the - // instalment schedule will create payments against. + // ID of the associated [mandate](#core-endpoints-mandates) which the + // instalment schedule will create payments against. mandate: string; - // Array of IDs of the associated [payments](#core-endpoints-payments) + // Array of IDs of the associated [payments](#core-endpoints-payments) payments?: string[]; }; @@ -4525,33 +4733,33 @@ export enum InstalmentScheduleStatus { /** Type for a institution resource. */ export type Institution = { - // Flag to show if selecting this institution in the select_institution action - // can auto-complete the collect_bank_account action. The bank can return the - // payer's bank account details to GoCardless. + // Flag to show if selecting this institution in the select_institution + // action can auto-complete the collect_bank_account action. The bank can + // return the payer's bank account details to GoCardless. autocompletes_collect_bank_account?: boolean; - // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // alpha-2 code. The country code of the institution. If nothing is provided, - // institutions with the country code 'GB' are returned by default. + // [ISO + // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // alpha-2 code. The country code of the institution. If nothing is provided, + // institutions with the country code 'GB' are returned by default. country_code?: string; - // A URL pointing to the icon for this institution + // A URL pointing to the icon for this institution icon_url?: string; - // The unique identifier for this institution + // The unique identifier for this institution id?: string; - // Defines individual limits for business and personal accounts. + // Defines individual limits for business and personal accounts. limits?: InstitutionLimits | null; - // A URL pointing to the logo for this institution + // A URL pointing to the logo for this institution logo_url?: string; - // A human readable name for this institution + // A human readable name for this institution name?: string; - // The status of the institution + // The status of the institution status?: InstitutionStatus; }; @@ -4569,15 +4777,15 @@ export type InstitutionId = {}; /** Type for a institutionlimits resource. */ export type InstitutionLimits = { - // Daily limit details for this institution, in the lowest denomination for - // the currency (e.g. pence in GBP, cents in EUR). The 'limits' property is - // only available via an authenticated request with a generated access token + // Daily limit details for this institution, in the lowest denomination for + // the currency (e.g. pence in GBP, cents in EUR). The 'limits' property is + // only available via an authenticated request with a generated access token daily?: JsonMap | null; - // Single transaction limit details for this institution, in the lowest - // denomination for the currency (e.g. pence in GBP, cents in EUR). The - // 'limits' property is only available via an authenticated request with a - // generated access token + // Single transaction limit details for this institution, in the lowest + // denomination for the currency (e.g. pence in GBP, cents in EUR). The + // 'limits' property is only available via an authenticated request with a + // generated access token single?: JsonMap | null; }; @@ -4589,114 +4797,114 @@ export enum InstitutionStatus { /** Type for a logo resource. */ export type Logo = { - // Unique identifier, beginning with "LO". + // Unique identifier, beginning with "LO". id?: string; }; /** Type for a logocreateforcreditorrequestlinks resource. */ export type LogoCreateForCreditorRequestLinks = { - // ID of the creditor the logo belongs to + // ID of the creditor the logo belongs to creditor?: string; }; /** Type for a mandate resource. */ export type Mandate = { - // This field is ACH specific, sometimes referred to as [SEC - // code](https://www.moderntreasury.com/learn/sec-codes). + // This field is ACH specific, sometimes referred to as [SEC + // code](https://www.moderntreasury.com/learn/sec-codes). // - // This is the way that the payer gives authorisation to the merchant. - // web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC - // code: WEB) - // telephone: Authorisation is provided orally over telephone (maps to SEC - // code: TEL) - // paper: Authorisation is provided in writing and signed, or similarly - // authenticated (maps to SEC code: PPD) + // This is the way that the payer gives authorisation to the merchant. + // web: Authorisation is Internet Initiated or via Mobile Entry (maps to + // SEC code: WEB) + // telephone: Authorisation is provided orally over telephone (maps to SEC + // code: TEL) + // paper: Authorisation is provided in writing and signed, or similarly + // authenticated (maps to SEC code: PPD) // authorisation_source?: MandateAuthorisationSource; - // (Optional) Payto and VRP Scheme specific information + // (Optional) Payto and VRP Scheme specific information consent_parameters?: MandateConsentParameters | null; - // (Optional) Specifies the type of authorisation agreed between the payer and - // merchant. It can be set to one-off, recurring or standing for ACH, or - // single, recurring and sporadic for PAD. + // (Optional) Specifies the type of authorisation agreed between the payer + // and merchant. It can be set to one-off, recurring or standing for ACH, or + // single, recurring and sporadic for PAD. consent_type?: MandateConsentType | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: MandateFundsSettlement; - // Unique identifier, beginning with "MD". Note that this prefix may not apply - // to mandates created before 2016. + // Unique identifier, beginning with "MD". Note that this prefix may not + // apply to mandates created before 2016. id?: string; // Resources linked to this Mandate. links?: MandateLinks; - // 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. + // 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. metadata?: JsonMap; - // The earliest date that can be used as a `charge_date` on any newly created - // payment for this mandate. This value will change over time. + // The earliest date that can be used as a `charge_date` on any newly created + // payment for this mandate. This value will change over time. next_possible_charge_date?: string | null; - // If this is an an ACH mandate, the earliest date that can be used as a - // `charge_date` on any newly created payment to be charged through standard - // ACH, rather than Faster ACH. This value will change over time. + // If this is an an ACH mandate, the earliest date that can be used as a + // `charge_date` on any newly created payment to be charged through standard + // ACH, rather than Faster ACH. This value will change over time. // - // It is only present in the API response for ACH mandates. + // It is only present in the API response for ACH mandates. next_possible_standard_ach_charge_date?: string | null; - // Boolean value showing whether payments and subscriptions under this mandate - // require approval via an automated email before being processed. + // Boolean value showing whether payments and subscriptions under this + // mandate require approval via an automated email before being processed. payments_require_approval?: boolean; - // Unique reference. Different schemes have different length and [character - // set](#appendix-character-sets) requirements. GoCardless will generate a - // unique reference satisfying the different scheme requirements if this field - // is left blank. + // Unique reference. Different schemes have different length and [character + // set](#appendix-character-sets) requirements. GoCardless will generate a + // unique reference satisfying the different scheme requirements if this + // field is left blank. reference?: string | null; - // Bank payment scheme to which this mandate and - // associated payments are submitted. Can be supplied or automatically - // detected from the customer's bank account. + // Bank payment scheme to which this mandate + // and associated payments are submitted. Can be supplied or automatically + // detected from the customer's bank account. scheme?: string | null; - // One of: - //
    - //
  • `pending_customer_approval`: the mandate has not yet been signed by the - // second customer
  • - //
  • `pending_submission`: the mandate has not yet been submitted to the - // customer's bank
  • - //
  • `submitted`: the mandate has been submitted to the customer's bank but - // has not been processed yet
  • - //
  • `active`: the mandate has been successfully set up by the customer's - // bank
  • - //
  • `suspended_by_payer`: the mandate has been suspended by payer
  • - //
  • `failed`: the mandate could not be created
  • - //
  • `cancelled`: the mandate has been cancelled
  • - //
  • `expired`: the mandate has expired due to dormancy
  • - //
  • `consumed`: the mandate has been consumed and cannot be reused (note - // that this only applies to schemes that are per-payment authorised)
  • - //
  • `blocked`: the mandate has been blocked and payments cannot be - // created
  • - //
+ // One of: + //
    + //
  • `pending_customer_approval`: the mandate has not yet been signed by + // the second customer
  • + //
  • `pending_submission`: the mandate has not yet been submitted to the + // customer's bank
  • + //
  • `submitted`: the mandate has been submitted to the customer's bank but + // has not been processed yet
  • + //
  • `active`: the mandate has been successfully set up by the customer's + // bank
  • + //
  • `suspended_by_payer`: the mandate has been suspended by payer
  • + //
  • `failed`: the mandate could not be created
  • + //
  • `cancelled`: the mandate has been cancelled
  • + //
  • `expired`: the mandate has expired due to dormancy
  • + //
  • `consumed`: the mandate has been consumed and cannot be reused (note + // that this only applies to schemes that are per-payment authorised)
  • + //
  • `blocked`: the mandate has been blocked and payments cannot be + // created
  • + //
status?: MandateStatus; - // [Timestamp](#api-usage-dates-and-times) recording when this mandate was - // verified. + // [Timestamp](#api-usage-dates-and-times) recording when this mandate was + // verified. verified_at?: string | null; }; @@ -4708,36 +4916,36 @@ export enum MandateAuthorisationSource { /** Type for a mandatecreaterequestlinks resource. */ export type MandateCreateRequestLinks = { - // ID of the associated [creditor](#core-endpoints-creditors). Only required - // if your account manages multiple creditors. + // ID of the associated [creditor](#core-endpoints-creditors). Only required + // if your account manages multiple creditors. creditor?: string; - // ID of the associated [customer bank - // account](#core-endpoints-customer-bank-accounts) which the mandate is - // created and submits payments against. + // ID of the associated [customer bank + // account](#core-endpoints-customer-bank-accounts) which the mandate is + // created and submits payments against. customer_bank_account: string; }; /** Type for a mandateconsentparameters resource. */ export type MandateConsentParameters = { - // The latest date at which payments can be taken, must occur after start_date - // if present + // The latest date at which payments can be taken, must occur after + // start_date if present end_date?: string; - // The maximum amount that can be charged for a single payment + // The maximum amount that can be charged for a single payment max_amount_per_payment?: number; - // The maximum total amount that can be charged for all payments in this - // period + // The maximum total amount that can be charged for all payments in this + // period max_amount_per_period?: number; - // The maximum number of payments that can be collected in this period + // The maximum number of payments that can be collected in this period max_payments_per_period?: number; - // The repeating period for this mandate + // The repeating period for this mandate period?: MandateConsentParametersPeriod; - // The date from which payments can be taken + // The date from which payments can be taken start_date?: string; }; @@ -4764,18 +4972,18 @@ export enum MandateFundsSettlement { /** Type for a mandatelinks resource. */ export type MandateLinks = { - // ID of the associated [creditor](#core-endpoints-creditors). + // ID of the associated [creditor](#core-endpoints-creditors). creditor?: string; - // ID of the associated [customer](#core-endpoints-customers) + // ID of the associated [customer](#core-endpoints-customers) customer?: string; - // ID of the associated [customer bank - // account](#core-endpoints-customer-bank-accounts) which the mandate is - // created and submits payments against. + // ID of the associated [customer bank + // account](#core-endpoints-customer-bank-accounts) which the mandate is + // created and submits payments against. customer_bank_account?: string; - // ID of the new mandate if this mandate has been replaced. + // ID of the new mandate if this mandate has been replaced. new_mandate?: string; }; @@ -4794,47 +5002,47 @@ export enum MandateStatus { /** Type for a mandateimport resource. */ export type MandateImport = { - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // Unique identifier, beginning with "IM". + // Unique identifier, beginning with "IM". id?: string; // Resources linked to this MandateImport. links?: MandateImportLinks; - // The scheme of the mandates to be imported.
All mandates in a single - // mandate - // import must be for the same scheme. + // The scheme of the mandates to be imported.
All mandates in a single + // mandate + // import must be for the same scheme. scheme?: MandateImportScheme; - // The status of the mandate import. - //
    - //
  • `created`: A new mandate import.
  • - //
  • `submitted`: After the integrator has finished adding mandates and submitted the - // import.
  • - //
  • `cancelled`: If the integrator cancelled the mandate - // import.
  • - //
  • `processing`: Once a mandate import has been approved by a GoCardless - // team member it will be in this state while mandates are imported.
  • - //
  • `processed`: When all mandates have been imported successfully.
  • - //
+ // The status of the mandate import. + //
    + //
  • `created`: A new mandate import.
  • + //
  • `submitted`: After the integrator has finished adding mandates and submitted the + // import.
  • + //
  • `cancelled`: If the integrator cancelled the mandate + // import.
  • + //
  • `processing`: Once a mandate import has been approved by a GoCardless + // team member it will be in this state while mandates are imported.
  • + //
  • `processed`: When all mandates have been imported successfully.
  • + //
status?: MandateImportStatus; }; /** Type for a mandateimportcreaterequestlinks resource. */ export type MandateImportCreateRequestLinks = { - // ID of the associated creditor. Only required if your account manages - // multiple creditors. + // ID of the associated creditor. Only required if your account manages + // multiple creditors. creditor?: string; }; /** Type for a mandateimportlinks resource. */ export type MandateImportLinks = { - // ID of the associated creditor. + // ID of the associated creditor. creditor?: string; }; @@ -4861,83 +5069,85 @@ export enum MandateImportStatus { /** Type for a mandateimportentry resource. */ export type MandateImportEntry = { - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; // Resources linked to this MandateImportEntry. links?: MandateImportEntryLinks; - // Per-resource processing errors + // Per-resource processing errors processing_errors?: JsonMap | null; - // A unique identifier for this entry, which you can use (once the import has - // been - // processed by GoCardless) to identify the records that have been created. - // Limited - // to 255 characters. + // A unique identifier for this entry, which you can use (once the import has + // been + // processed by GoCardless) to identify the records that have been created. + // Limited + // to 255 characters. // record_identifier?: string | null; }; /** Type for a mandateimportentryamendment resource. */ export type MandateImportEntryAmendment = { - // The creditor identifier of the direct debit originator. Required if mandate - // import scheme is `sepa`. + // The creditor identifier of the direct debit originator. Required if + // mandate + // import scheme is `sepa`. // original_creditor_id: string; - // Data about the original mandate to be moved or modified. + // Data about the original mandate to be moved or modified. // original_creditor_name: string; - // The unique SEPA reference for the mandate being amended. Required if - // mandate - // import scheme is `sepa`. + // The unique SEPA reference for the mandate being amended. Required if + // mandate + // import scheme is `sepa`. // original_mandate_reference: string; }; /** Type for a mandateimportentrybankaccount resource. */ export type MandateImportEntryBankAccount = { - // Name of the account holder, as known by the bank. The full name provided - // when the customer is created is stored and is available via the API, but is - // transliterated, upcased, and truncated to 18 characters in bank - // submissions. This field is required unless the request includes a [customer - // bank account token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided + // when the customer is created is stored and is available via the API, but + // is transliterated, upcased, and truncated to 18 characters in bank + // submissions. This field is required unless the request includes a + // [customer bank account + // token](#javascript-flow-customer-bank-account-tokens). account_holder_name: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) + // for more information. Alternatively you can provide an `iban`. account_number?: string | null; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: MandateImportEntryBankAccountAccountType; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string | null; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string | null; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string | null; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). IBANs are not accepted for Swedish - // bank accounts denominated in SEK - you must supply [local - // details](#local-bank-details-sweden). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). IBANs are not accepted for Swedish + // bank accounts denominated in SEK - you must supply [local + // details](#local-bank-details-sweden). iban?: 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. + // 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. metadata?: JsonMap; }; @@ -4948,99 +5158,118 @@ export enum MandateImportEntryBankAccountAccountType { /** Type for a mandateimportentrycustomer resource. */ export type MandateImportEntryCustomer = { - // The first line of the customer's address. Required if mandate import scheme - // is either `bacs` or `sepa`. + // The first line of the customer's address. Required if mandate import + // scheme is either `bacs` or `sepa`. // address_line1?: string; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // Customer's company name. Required unless a `given_name` and `family_name` - // are provided. For Canadian customers, the use of a `company_name` value - // will mean that any mandate created from this customer will be considered to - // be a "Business PAD" (otherwise, any mandate will be considered to be a - // "Personal PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value + // will mean that any mandate created from this customer will be considered + // to be a "Business PAD" (otherwise, any mandate will be considered to be a + // "Personal PAD"). company_name?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated + // in Danish krone (DKK). danish_identity_number?: string | null; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows + // GoCardless to send notifications to this customer. email?: string | null; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string | null; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. - // Used as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", - // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. - // If this is not provided, the language will be chosen based on the - // `country_code` (if supplied) or default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Used as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. + // If this is not provided, the language will be chosen based on the + // `country_code` (if supplied) or default to "en". language?: 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. + // 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. metadata?: JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string | null; - // The customer's postal code. Required if mandate import scheme is either - // `bacs` or `sepa`. + // The customer's postal code. Required if mandate import scheme is either + // `bacs` or `sepa`. // postal_code?: string; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state - // code is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be - // supplied if the customer's bank account is denominated in Swedish krona - // (SEK). This field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be + // supplied if the customer's bank account is denominated in Swedish krona + // (SEK). This field cannot be changed once it has been set. swedish_identity_number?: string | null; }; /** Type for a mandateimportentrycreaterequestlinks resource. */ export type MandateImportEntryCreateRequestLinks = { - // Unique identifier, beginning with "IM". + // Unique identifier, beginning with "IM". mandate_import: string; }; /** Type for a mandateimportentrymandate resource. */ export type MandateImportEntryMandate = { - // 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. + // This field is ACH specific, sometimes referred to as [SEC + // code](https://www.moderntreasury.com/learn/sec-codes). + // + // This is the way that the payer gives authorisation to the merchant. + // web: Authorisation is Internet Initiated or via Mobile Entry (maps to + // SEC code: WEB) + // telephone: Authorisation is provided orally over telephone (maps to SEC + // code: TEL) + // paper: Authorisation is provided in writing and signed, or similarly + // authenticated (maps to SEC code: PPD) + // + authorisation_source?: MandateImportEntryMandateAuthorisationSource; + + // 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. metadata?: JsonMap; - // Unique reference. Different schemes have different length and [character - // set](#appendix-character-sets) requirements. GoCardless will generate a - // unique reference satisfying the different scheme requirements if this field - // is left blank. + // Unique reference. Different schemes have different length and [character + // set](#appendix-character-sets) requirements. GoCardless will generate a + // unique reference satisfying the different scheme requirements if this + // field is left blank. reference?: string | null; }; +export enum MandateImportEntryMandateAuthorisationSource { + Web = 'web', + Telephone = 'telephone', + Paper = 'paper', +} + export enum MandateImportEntryStatus { SuccessfullyProcessed = 'successfully_processed', UnsuccessfullyProcessed = 'unsuccessfully_processed', @@ -5048,34 +5277,34 @@ export enum MandateImportEntryStatus { /** Type for a mandateimportentrylinks resource. */ export type MandateImportEntryLinks = { - // The ID of the customer which was created when the mandate import was - // processed. + // The ID of the customer which was created when the mandate import was + // processed. customer?: string; - // The ID of the customer bank account which was created when the mandate - // import - // was processed. + // The ID of the customer bank account which was created when the mandate + // import + // was processed. customer_bank_account?: string; - // The ID of the mandate which was created when the mandate import was - // processed. + // The ID of the mandate which was created when the mandate import was + // processed. mandate?: string; - // The ID of the mandate import. This is returned when you - // [create a Mandate Import](#mandate-imports-create-a-new-mandate-import). + // The ID of the mandate import. This is returned when you + // [create a Mandate Import](#mandate-imports-create-a-new-mandate-import). // mandate_import: string; }; /** Type for a mandatepdf resource. */ export type MandatePdf = { - // The date and time at which the `url` will expire (10 minutes after the - // original request). + // The date and time at which the `url` will expire (10 minutes after the + // original request). expires_at?: string; - // The URL at which this mandate PDF can be viewed until it expires at the - // date and time specified by `expires_at`. You should not store this URL or - // rely on its structure remaining the same. + // The URL at which this mandate PDF can be viewed until it expires at the + // date and time specified by `expires_at`. You should not store this URL or + // rely on its structure remaining the same. url?: string; }; @@ -5086,13 +5315,13 @@ export enum MandatePdfAccountType { /** Type for a mandatepdfcreaterequestlinks resource. */ export type MandatePdfCreateRequestLinks = { - // ID of an existing [creditor](#core-endpoints-creditors). Only required if - // your account manages multiple creditors. + // ID of an existing [creditor](#core-endpoints-creditors). Only required if + // your account manages multiple creditors. creditor?: string; - // ID of an existing [mandate](#core-endpoints-mandates) to build the PDF - // from. The customer's bank details will be censored in the generated PDF. No - // other parameters may be provided alongside this. + // ID of an existing [mandate](#core-endpoints-mandates) to build the PDF + // from. The customer's bank details will be censored in the generated PDF. + // No other parameters may be provided alongside this. mandate?: string; }; @@ -5104,19 +5333,19 @@ export enum MandatePdfSubscriptionFrequency { /** Type for a negativebalancelimit resource. */ export type NegativeBalanceLimit = { - // The limit amount in pence (e.g. 10000 for a -100 GBP limit). + // The limit amount in pence (e.g. 10000 for a -100 GBP limit). balance_limit?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this limit - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this limit + // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: NegativeBalanceLimitCurrency; - // Unique identifier, beginning with "NBL". + // Unique identifier, beginning with "NBL". id?: string; // Resources linked to this NegativeBalanceLimit. @@ -5136,90 +5365,91 @@ export enum NegativeBalanceLimitCurrency { /** Type for a negativebalancelimitlinks resource. */ export type NegativeBalanceLimitLinks = { - // ID of the creator_user who created this limit + // ID of the creator_user who created this limit creator_user?: string; - // ID of [creditor](#core-endpoints-creditors) which this limit relates to + // ID of [creditor](#core-endpoints-creditors) which this limit relates to creditor?: string; }; /** Type for a outboundpayment resource. */ export type OutboundPayment = { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount?: number; - // Fixed [timestamp](#api-usage-dates-and-times), recording when the outbound - // payment was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when the outbound + // payment was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency. - // Currently only "GBP" is supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency. + // Currently only "GBP" is supported. currency?: OutboundPaymentCurrency; - // A human-readable description of the outbound payment + // A human-readable description of the outbound payment description?: string; - // A future date on which the outbound payment should be sent. - // If not specified, the payment will be sent as soon as possible. + // A future date on which the outbound payment should be sent. + // If not specified, the payment will be sent as soon as possible. execution_date?: string; - // Unique identifier of the outbound payment. + // Unique identifier of the outbound payment. id: string; - // Indicates whether the outbound payment is a withdrawal to your verified - // business bank account. + // Indicates whether the outbound payment is a withdrawal to your verified + // business bank account. is_withdrawal?: boolean; // Resources linked to this OutboundPayment. links?: OutboundPaymentLinks; - // 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. + // 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. metadata?: JsonMap; - // An optional reference that will appear on your customer's bank statement. - // The character limit for this reference is dependent on the scheme.
- // Faster Payments - 18 characters, including: - // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
+ // An optional reference that will appear on your customer's bank statement. + // The character limit for this reference is dependent on the scheme.
+ // Faster Payments - 18 characters, including: + // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
reference?: string; - // Bank payment scheme to process the outbound payment. Currently only - // "faster_payments" (GBP) is supported. + // Bank payment scheme to process the outbound payment. Currently only + // "faster_payments" (GBP) is supported. scheme?: OutboundPaymentScheme; - // One of: - //
    - //
  • `verifying`: The payment has been - // [created](#outbound-payments-create-an-outbound-payment) and the - // verification process has begun.
  • - //
  • `pending_approval`: The payment is awaiting - // [approval](#outbound-payments-approve-an-outbound-payment).
  • - //
  • `scheduled`: The payment has passed verification & - // [approval](#outbound-payments-approve-an-outbound-payment), but processing - // has not yet begun.
  • - //
  • `executing`: The execution date has arrived and the payment has been - // placed in queue for processing.
  • - //
  • `executed`: The payment has been accepted by the scheme and is now on - // its way to the recipient.
  • - //
  • `cancelled`: The payment has been - // [cancelled](#outbound-payments-cancel-an-outbound-payment) or was not - // [approved](#outbound-payments-approve-an-outbound-payment) on time.
  • - //
  • `failed`: The payment was not sent, usually due to an error while or - // after executing.
  • - //
+ // One of: + //
    + //
  • `verifying`: The payment has been + // [created](#outbound-payments-create-an-outbound-payment) and the + // verification process has begun.
  • + //
  • `pending_approval`: The payment is awaiting + // [approval](#outbound-payments-approve-an-outbound-payment).
  • + //
  • `scheduled`: The payment has passed verification & + // [approval](#outbound-payments-approve-an-outbound-payment), but processing + // has not yet begun.
  • + //
  • `executing`: The execution date has arrived and the payment has been + // placed in queue for processing.
  • + //
  • `executed`: The payment has been accepted by the scheme and is now on + // its way to the recipient.
  • + //
  • `cancelled`: The payment has been + // [cancelled](#outbound-payments-cancel-an-outbound-payment) or was not + // [approved](#outbound-payments-approve-an-outbound-payment) on time.
  • + //
  • `failed`: The payment was not sent, usually due to an error while or + // after executing.
  • + //
status?: OutboundPaymentStatus; - // Contains details of the verifications performed for the outbound payment + // Contains details of the verifications performed for the outbound payment verifications?: OutboundPaymentVerifications | null; }; /** Type for a outboundpaymentcreaterequestlinks resource. */ export type OutboundPaymentCreateRequestLinks = { - // ID of the creditor who sends the outbound payment. + // ID of the creditor who sends the outbound payment. creditor?: string; - // ID of the customer bank account which receives the outbound payment. + // ID of the customer bank account which receives the outbound payment. recipient_bank_account: string; }; @@ -5229,7 +5459,7 @@ export enum OutboundPaymentScheme { /** Type for a outboundpaymentwithdrawrequestlinks resource. */ export type OutboundPaymentWithdrawRequestLinks = { - // ID of the creditor who sends the outbound payment. + // ID of the creditor who sends the outbound payment. creditor?: string; }; @@ -5249,45 +5479,45 @@ export enum OutboundPaymentCurrency { /** Type for a outboundpaymentlinks resource. */ export type OutboundPaymentLinks = { - // ID of the creditor who sends the outbound payment. + // ID of the creditor who sends the outbound payment. creditor?: string; - // ID of the [customer](#core-endpoints-customers) that receives this outbound - // payment + // ID of the [customer](#core-endpoints-customers) that receives this + // outbound payment customer?: string; - // ID of the customer bank account which receives the outbound payment. + // ID of the customer bank account which receives the outbound payment. recipient_bank_account?: string; }; /** Type for a outboundpaymentverifications resource. */ export type OutboundPaymentVerifications = { - // Checks if the recipient owns the provided bank account + // Checks if the recipient owns the provided bank account recipient_bank_account_holder_verification?: OutboundPaymentVerificationsRecipientBankAccountHolderVerification | null; }; /** Type for a outboundpaymentverificationsrecipientbankaccountholderverification resource. */ export type OutboundPaymentVerificationsRecipientBankAccountHolderVerification = { - // The actual account name returned by the recipient's bank, populated only in - // the case of a partial match. + // The actual account name returned by the recipient's bank, populated only + // in the case of a partial match. actual_account_name?: string | null; - // Result of the verification, could be one of - //
    - //
  • `full_match`: The verification has confirmed that the account name - // exactly matches the details provided.
  • - //
  • `partial_match`: The verification has confirmed that the account - // name is similar but does not match to the details provided.
  • - //
  • `no_match`: The verification concludes the provided name does not - // match the account details.
  • - //
  • `unable_to_match`: The verification could not be performed due to - // recipient bank issues or technical issues
  • - //
+ // Result of the verification, could be one of + //
    + //
  • `full_match`: The verification has confirmed that the account name + // exactly matches the details provided.
  • + //
  • `partial_match`: The verification has confirmed that the account + // name is similar but does not match to the details provided.
  • + //
  • `no_match`: The verification concludes the provided name does not + // match the account details.
  • + //
  • `unable_to_match`: The verification could not be performed due to + // recipient bank issues or technical issues
  • + //
result?: OutboundPaymentVerificationsRecipientBankAccountHolderVerificationResult; - // Type of the verification that has been performed - // eg. [Confirmation of - // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) + // Type of the verification that has been performed + // eg. [Confirmation of + // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) type?: OutboundPaymentVerificationsRecipientBankAccountHolderVerificationType; }; @@ -5304,99 +5534,101 @@ export enum OutboundPaymentVerificationsRecipientBankAccountHolderVerificationTy /** Type for a payerauthorisation resource. */ export type PayerAuthorisation = { - // All details required for the creation of a - // [Customer Bank Account](#core-endpoints-customer-bank-accounts). + // All details required for the creation of a + // [Customer Bank Account](#core-endpoints-customer-bank-accounts). bank_account?: PayerAuthorisationBankAccount; - // [Timestamp](#api-usage-dates-and-times), recording when this Payer - // Authorisation was created. + // [Timestamp](#api-usage-dates-and-times), recording when this Payer + // Authorisation was created. created_at?: string | null; - // All details required for the creation of a - // [Customer](#core-endpoints-customers). + // All details required for the creation of a + // [Customer](#core-endpoints-customers). customer?: PayerAuthorisationCustomer; - // Unique identifier, beginning with "PA". + // Unique identifier, beginning with "PA". id?: string; - // An array of fields which are missing and is required to set up the mandate. + // An array of fields which are missing and is required to set up the + // mandate. incomplete_fields?: PayerAuthorisationIncompleteField[]; // Resources linked to this PayerAuthorisation. links?: PayerAuthorisationLinks; - // All details required for the creation of a - // [Mandate](#core-endpoints-mandates). + // All details required for the creation of a + // [Mandate](#core-endpoints-mandates). mandate?: PayerAuthorisationMandate; - // One of: - //
    - //
  • `created`: The PayerAuthorisation has been created, and not been - // confirmed yet
  • - //
  • `submitted`: The payer information has been submitted
  • - //
  • `confirmed`: PayerAuthorisation is confirmed and resources are ready to - // be created
  • - //
  • `completed`: The PayerAuthorisation has been completed and customer, - // bank_account and mandate has been created
  • - //
  • `failed`: The PayerAuthorisation has failed and customer, bank_account - // and mandate is not created
  • - //
+ // One of: + //
    + //
  • `created`: The PayerAuthorisation has been created, and not been + // confirmed yet
  • + //
  • `submitted`: The payer information has been submitted
  • + //
  • `confirmed`: PayerAuthorisation is confirmed and resources are ready + // to be created
  • + //
  • `completed`: The PayerAuthorisation has been completed and customer, + // bank_account and mandate has been created
  • + //
  • `failed`: The PayerAuthorisation has failed and customer, bank_account + // and mandate is not created
  • + //
status?: PayerAuthorisationStatus; }; /** Type for a payerauthorisationbankaccount resource. */ export type PayerAuthorisationBankAccount = { - // Name of the account holder, as known by the bank. The full name provided - // when the customer is created is stored and is available via the API, but is - // transliterated, upcased, and truncated to 18 characters in bank - // submissions. This field is required unless the request includes a [customer - // bank account token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided + // when the customer is created is stored and is available via the API, but + // is transliterated, upcased, and truncated to 18 characters in bank + // submissions. This field is required unless the request includes a + // [customer bank account + // token](#javascript-flow-customer-bank-account-tokens). account_holder_name?: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) + // for more information. Alternatively you can provide an `iban`. account_number?: string | null; - // The last few digits of the account number. Currently 4 digits for NZD bank - // accounts and 2 digits for other currencies. + // The last few digits of the account number. Currently 4 digits for NZD bank + // accounts and 2 digits for other currencies. account_number_ending?: string; - // Account number suffix (only for bank accounts denominated in NZD) - see - // [local details](#local-bank-details-new-zealand) for more information. + // Account number suffix (only for bank accounts denominated in NZD) - see + // [local details](#local-bank-details-new-zealand) for more information. account_number_suffix?: string | null; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: PayerAuthorisationBankAccountAccountType; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string | null; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string | null; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string | null; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). IBANs are not accepted for Swedish - // bank accounts denominated in SEK - you must supply [local - // details](#local-bank-details-sweden). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). IBANs are not accepted for Swedish + // bank accounts denominated in SEK - you must supply [local + // details](#local-bank-details-sweden). iban?: 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. + // 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. metadata?: JsonMap; }; @@ -5407,118 +5639,118 @@ export enum PayerAuthorisationBankAccountAccountType { /** Type for a payerauthorisationcustomer resource. */ export type PayerAuthorisationCustomer = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // Customer's company name. Required unless a `given_name` and `family_name` - // are provided. For Canadian customers, the use of a `company_name` value - // will mean that any mandate created from this customer will be considered to - // be a "Business PAD" (otherwise, any mandate will be considered to be a - // "Personal PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value + // will mean that any mandate created from this customer will be considered + // to be a "Business PAD" (otherwise, any mandate will be considered to be a + // "Personal PAD"). company_name?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated in - // Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated + // in Danish krone (DKK). danish_identity_number?: string | null; - // Customer's email address. Required in most cases, as this allows GoCardless - // to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows + // GoCardless to send notifications to this customer. email?: string | null; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string | null; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), used for both - // language - // and regional variations of our product. + // An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), used for both + // language + // and regional variations of our product. // locale?: 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. + // 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. metadata?: JsonMap; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state - // code is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be - // supplied if the customer's bank account is denominated in Swedish krona - // (SEK). This field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be + // supplied if the customer's bank account is denominated in Swedish krona + // (SEK). This field cannot be changed once it has been set. swedish_identity_number?: string | null; }; /** Type for a payerauthorisationincompletefield resource. */ export type PayerAuthorisationIncompleteField = { - // The root resource. + // The root resource. field?: string; - // A localised error message + // A localised error message message?: string; - // The path to the field e.g. "/payer_authorisations/customer/city" + // The path to the field e.g. "/payer_authorisations/customer/city" request_pointer?: string; }; /** Type for a payerauthorisationlinks resource. */ export type PayerAuthorisationLinks = { - // Unique identifier, beginning with "BA". + // Unique identifier, beginning with "BA". bank_account?: string; - // Unique identifier, beginning with "CU". + // Unique identifier, beginning with "CU". customer?: string; - // Unique identifier, beginning with "MD". Note that this prefix may not apply - // to mandates created before 2016. + // Unique identifier, beginning with "MD". Note that this prefix may not + // apply to mandates created before 2016. mandate?: string; }; /** Type for a payerauthorisationmandate resource. */ export type PayerAuthorisationMandate = { - // 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. + // 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. metadata?: JsonMap; - // For ACH customers only. Required for ACH customers. A string containing the - // IP address of the payer to whom the mandate belongs (i.e. as a result of - // their completion of a mandate setup flow in their browser). + // For ACH customers only. Required for ACH customers. A string containing + // the IP address of the payer to whom the mandate belongs (i.e. as a result + // of their completion of a mandate setup flow in their browser). // - // Not required for creating offline mandates where `authorisation_source` is - // set to telephone or paper. + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. // payer_ip_address?: string | null; - // Unique reference. Different schemes have different length and [character - // set](#appendix-character-sets) requirements. GoCardless will generate a - // unique reference satisfying the different scheme requirements if this field - // is left blank. + // Unique reference. Different schemes have different length and [character + // set](#appendix-character-sets) requirements. GoCardless will generate a + // unique reference satisfying the different scheme requirements if this + // field is left blank. reference?: string | null; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. scheme?: PayerAuthorisationMandateScheme; }; @@ -5545,116 +5777,117 @@ export enum PayerAuthorisationStatus { /** Type for a payertheme resource. */ export type PayerTheme = { - // Unique identifier, beginning with "PTH". + // Unique identifier, beginning with "PTH". id?: string; }; /** Type for a payerthemecreateforcreditorrequestlinks resource. */ export type PayerThemeCreateForCreditorRequestLinks = { - // ID of the creditor the payer theme belongs to + // ID of the creditor the payer theme belongs to creditor?: string | null; }; /** Type for a payment resource. */ export type Payment = { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount?: string; - // Amount [refunded](#core-endpoints-refunds), in the lowest denomination for - // the currency (e.g. pence in GBP, cents in EUR). + // Amount [refunded](#core-endpoints-refunds), in the lowest denomination for + // the currency (e.g. pence in GBP, cents in EUR). amount_refunded?: string; - // A future date on which the payment should be collected. If not specified, - // the payment will be collected as soon as possible. If the value is before - // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` - // creation will fail. If the value is not a working day it will be rolled - // forwards to the next available one. + // A future date on which the payment should be collected. If not specified, + // the payment will be collected as soon as possible. If the value is before + // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` + // creation will fail. If the value is not a working day it will be rolled + // forwards to the next available one. charge_date?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: PaymentCurrency; - // A human-readable description of the payment. This will be included in the - // notification email GoCardless sends to your customer if your organisation - // does not send its own notifications (see [compliance - // requirements](#appendix-compliance-requirements)). + // A human-readable description of the payment. This will be included in the + // notification email GoCardless sends to your customer if your organisation + // does not send its own notifications (see [compliance + // requirements](#appendix-compliance-requirements)). description?: string | null; - // This field indicates whether the ACH payment is processed through Faster - // ACH or standard ACH. + // This field indicates whether the ACH payment is processed through Faster + // ACH or standard ACH. // - // It is only present in the API response for ACH payments. + // It is only present in the API response for ACH payments. faster_ach?: boolean | null; // fx?: PaymentFx; - // Unique identifier, beginning with "PM". + // Unique identifier, beginning with "PM". id?: string; // Resources linked to this Payment. links?: PaymentLinks; - // 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. + // 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. metadata?: JsonMap; - // 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.

+ // 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.

reference?: string | null; - // On failure, automatically retry the payment using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry the payment using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. scheme?: string | null; - // One of: - //
    - //
  • `pending_customer_approval`: we're waiting for the customer to approve - // this payment
  • - //
  • `pending_submission`: the payment has been created, but not yet - // submitted to the banks
  • - //
  • `submitted`: the payment has been submitted to the banks
  • - //
  • `confirmed`: the payment has been confirmed as collected
  • - //
  • `paid_out`: the payment has been included in a - // [payout](#core-endpoints-payouts)
  • - //
  • `cancelled`: the payment has been cancelled
  • - //
  • `customer_approval_denied`: the customer has denied approval for the - // payment. You should contact the customer directly
  • - //
  • `failed`: the payment failed to be processed. Note that payments can - // fail after being confirmed if the failure message is sent late by the - // banks.
  • - //
  • `charged_back`: the payment has been charged back
  • - //
+ // One of: + //
    + //
  • `pending_customer_approval`: we're waiting for the customer to approve + // this payment
  • + //
  • `pending_submission`: the payment has been created, but not yet + // submitted to the banks
  • + //
  • `submitted`: the payment has been submitted to the banks
  • + //
  • `confirmed`: the payment has been confirmed as collected
  • + //
  • `paid_out`: the payment has been included in a + // [payout](#core-endpoints-payouts)
  • + //
  • `cancelled`: the payment has been cancelled
  • + //
  • `customer_approval_denied`: the customer has denied approval for the + // payment. You should contact the customer directly
  • + //
  • `failed`: the payment failed to be processed. Note that payments can + // fail after being confirmed if the failure message is sent late by the + // banks.
  • + //
  • `charged_back`: the payment has been charged back
  • + //
status?: PaymentStatus; }; @@ -5671,27 +5904,32 @@ export enum PaymentCurrency { /** Type for a paymentcreaterequestlinks resource. */ export type PaymentCreateRequestLinks = { - // ID of the [mandate](#core-endpoints-mandates) against which this payment - // should be collected. + // ID of the [mandate](#core-endpoints-mandates) against which this payment + // should be collected. mandate: string; }; +export enum PaymentPsuInteractionType { + InSession = 'in_session', + OffSession = 'off_session', +} + /** Type for a paymentchargedate resource. */ export type PaymentChargeDate = { - // Limit to records where the payment was or will be collected from the - // customer's bank account after the specified date. + // Limit to records where the payment was or will be collected from the + // customer's bank account after the specified date. gt?: string; - // Limit to records where the payment was or will be collected from the - // customer's bank account on or after the specified date. + // Limit to records where the payment was or will be collected from the + // customer's bank account on or after the specified date. gte?: string; - // Limit to records where the payment was or will be collected from the - // customer's bank account before the specified date. + // Limit to records where the payment was or will be collected from the + // customer's bank account before the specified date. lt?: string; - // Limit to records where the payment was or will be collected from the - // customer's bank account on or before the specified date. + // Limit to records where the payment was or will be collected from the + // customer's bank account on or before the specified date. lte?: string; }; @@ -5719,26 +5957,26 @@ export enum PaymentStatus { /** Type for a paymentfx resource. */ export type PaymentFx = { - // Estimated rate that will be used in the foreign exchange of the `amount` - // into the `fx_currency`. - // This will vary based on the prevailing market rate until the moment that it - // is paid out. - // Present only before a resource is paid out. Has up to 10 decimal places. + // Estimated rate that will be used in the foreign exchange of the `amount` + // into the `fx_currency`. + // This will vary based on the prevailing market rate until the moment that + // it is paid out. + // Present only before a resource is paid out. Has up to 10 decimal places. estimated_exchange_rate?: string | null; - // Rate used in the foreign exchange of the `amount` into the `fx_currency`. - // Present only after a resource is paid out. Has up to 10 decimal places. + // Rate used in the foreign exchange of the `amount` into the `fx_currency`. + // Present only after a resource is paid out. Has up to 10 decimal places. exchange_rate?: string | null; - // Amount that was paid out in the `fx_currency` after foreign exchange. - // Present only after the resource has been paid out. + // Amount that was paid out in the `fx_currency` after foreign exchange. + // Present only after the resource has been paid out. fx_amount?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which amounts will be paid out (after foreign exchange). - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. Present only if payouts will be (or were) made via foreign - // exchange. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which amounts will be paid out (after foreign exchange). + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. Present only if payouts will be (or were) made via foreign + // exchange. fx_currency?: PaymentFxFxCurrency; }; @@ -5755,55 +5993,55 @@ export enum PaymentFxFxCurrency { /** Type for a paymentlinks resource. */ export type PaymentLinks = { - // ID of [creditor](#core-endpoints-creditors) to which the collected payment - // will be sent. + // ID of [creditor](#core-endpoints-creditors) to which the collected payment + // will be sent. creditor?: string; - // ID of [instalment_schedule](#core-endpoints-instalment-schedules) from - // which this payment was created.
**Note**: this property will only be - // present if this payment is part of an instalment schedule. + // ID of [instalment_schedule](#core-endpoints-instalment-schedules) from + // which this payment was created.
**Note**: this property will only be + // present if this payment is part of an instalment schedule. instalment_schedule?: string; - // ID of the [mandate](#core-endpoints-mandates) against which this payment - // should be collected. + // ID of the [mandate](#core-endpoints-mandates) against which this payment + // should be collected. mandate?: string; - // ID of [payout](#core-endpoints-payouts) which contains the funds from this - // payment.
_Note_: this property will not be present until the payment - // has been successfully collected. + // ID of [payout](#core-endpoints-payouts) which contains the funds from this + // payment.
_Note_: this property will not be present until the payment + // has been successfully collected. payout?: string; - // ID of [subscription](#core-endpoints-subscriptions) from which this payment - // was created.
_Note_: this property will only be present if this payment - // is part of a subscription. + // ID of [subscription](#core-endpoints-subscriptions) from which this + // payment was created.
_Note_: this property will only be present if + // this payment is part of a subscription. subscription?: string; }; /** Type for a paymentaccount resource. */ export type PaymentAccount = { - // Current balance on a payment account in the lowest denomination for the - // currency (e.g. pence in GBP, cents in EUR). - // It is time-sensitive as it is ever changing. + // Current balance on a payment account in the lowest denomination for the + // currency (e.g. pence in GBP, cents in EUR). + // It is time-sensitive as it is ever changing. account_balance?: number; - // Name of the account holder, as known by the bank. Usually this is the same - // as the name stored with the linked [creditor](#core-endpoints-creditors). - // This field will be transliterated, upcased and truncated to 18 characters. + // Name of the account holder, as known by the bank. Usually this is the same + // as the name stored with the linked [creditor](#core-endpoints-creditors). + // This field will be transliterated, upcased and truncated to 18 characters. account_holder_name?: string; - // The last few digits of the account number. Currently 4 digits for NZD bank - // accounts and 2 digits for other currencies. + // The last few digits of the account number. Currently 4 digits for NZD bank + // accounts and 2 digits for other currencies. account_number_ending?: string; - // Name of bank, taken from the bank details. + // Name of bank, taken from the bank details. bank_name?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string | null; - // Unique identifier, beginning with "BA". + // Unique identifier, beginning with "BA". id?: string; // Resources linked to this PaymentAccount. @@ -5812,46 +6050,47 @@ export type PaymentAccount = { /** Type for a paymentaccountlinks resource. */ export type PaymentAccountLinks = { - // ID of the [creditor](#core-endpoints-creditors) that owns this bank - // account. + // ID of the [creditor](#core-endpoints-creditors) that owns this bank + // account. creditor?: string; }; /** Type for a paymentaccounttransaction resource. */ export type PaymentAccountTransaction = { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount?: number; - // Balance after transaction, in the lowest denomination for the currency - // (e.g. pence in GBP, cents in EUR). + // Balance after transaction, in the lowest denomination for the currency + // (e.g. pence in GBP, cents in EUR). balance_after_transaction?: number; - // The name of the counterparty of the transaction. The counterparty is the - // recipient for a credit, or the sender for a debit. + // The name of the counterparty of the transaction. The counterparty is the + // recipient for a credit, or the sender for a debit. counterparty_name?: string; - // The currency of the transaction. + // The currency of the transaction. currency?: PaymentAccountTransactionCurrency; - // The description of the transaction, if available + // The description of the transaction, if available description?: string; - // The direction of the transaction. Debits mean money leaving the account - // (e.g. outbound payment), while credits signify money coming in (e.g. manual - // top-up). + // The direction of the transaction. Debits mean money leaving the account + // (e.g. outbound payment), while credits signify money coming in (e.g. + // manual top-up). direction?: PaymentAccountTransactionDirection; - // The unique ID of the payment account transaction. + // The unique ID of the payment account transaction. id?: string; // Resources linked to this PaymentAccountTransaction. links?: PaymentAccountTransactionLinks; - // The reference of the transaction. This is typically supplied by the sender. + // The reference of the transaction. This is typically supplied by the + // sender. reference?: string; - // The date of when the transaction occurred. + // The date of when the transaction occurred. value_date?: string; }; @@ -5866,91 +6105,91 @@ export enum PaymentAccountTransactionCurrency { /** Type for a paymentaccounttransactionlinks resource. */ export type PaymentAccountTransactionLinks = { - // ID of the [outbound_payment](#core-endpoints-outbound-payments) linked to - // the transaction + // ID of the [outbound_payment](#core-endpoints-outbound-payments) linked to + // the transaction outbound_payment?: string; - // ID of the payment bank account. + // ID of the payment bank account. payment_bank_account?: string; - // ID of the [payout](#core-endpoints-payouts) linked to the transaction. + // ID of the [payout](#core-endpoints-payouts) linked to the transaction. payout?: string; }; /** Type for a payout resource. */ export type Payout = { - // Amount in minor unit (e.g. pence in GBP, cents in EUR). + // Amount in minor unit (e.g. pence in GBP, cents in EUR). amount?: string; - // Date the payout is due to arrive in the creditor's bank account. - // One of: - //
    - //
  • `yyyy-mm-dd`: the payout has been paid and is due to arrive in the - // creditor's bank - // account on this day
  • - //
  • `null`: the payout hasn't been paid yet
  • - //
+ // Date the payout is due to arrive in the creditor's bank account. + // One of: + //
    + //
  • `yyyy-mm-dd`: the payout has been paid and is due to arrive in the + // creditor's bank + // account on this day
  • + //
  • `null`: the payout hasn't been paid yet
  • + //
// arrival_date?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: PayoutCurrency; - // Fees that have already been deducted from the payout amount in minor unit - // (e.g. pence in GBP, cents in EUR), inclusive of tax if applicable. - //
- // For each `late_failure_settled` or `chargeback_settled` action, we refund - // the transaction fees in a payout. This means that a payout can have a - // negative `deducted_fees` value. - //
- // This field is calculated as `(GoCardless fees + app fees + surcharge fees) - // - (refunded fees)` - //
- // If the merchant is invoiced for fees separately from the payout, then - // `deducted_fees` will be 0. + // Fees that have already been deducted from the payout amount in minor unit + // (e.g. pence in GBP, cents in EUR), inclusive of tax if applicable. + //
+ // For each `late_failure_settled` or `chargeback_settled` action, we refund + // the transaction fees in a payout. This means that a payout can have a + // negative `deducted_fees` value. + //
+ // This field is calculated as `(GoCardless fees + app fees + surcharge fees) + // - (refunded fees)` + //
+ // If the merchant is invoiced for fees separately from the payout, then + // `deducted_fees` will be 0. deducted_fees?: string; // fx?: PayoutFx; - // Unique identifier, beginning with "PO". + // Unique identifier, beginning with "PO". id?: string; // Resources linked to this Payout. links?: PayoutLinks; - // 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. _Note:_ This should - // not be used for storing PII data. + // 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. _Note:_ This should + // not be used for storing PII data. metadata?: JsonMap; - // Whether a payout contains merchant revenue or partner fees. + // Whether a payout contains merchant revenue or partner fees. payout_type?: PayoutPayoutType; - // Reference which appears on the creditor's bank statement. + // Reference which appears on the creditor's bank statement. reference?: string; - // One of: - //
    - //
  • `pending`: the payout has been created, but not yet sent to your bank - // or it is in the process of being exchanged through our FX provider.
  • - //
  • `paid`: the payout has been sent to the your bank. FX payouts will - // become `paid` after we emit the `fx_rate_confirmed` webhook.
  • - //
  • `bounced`: the payout bounced when sent, the payout can be - // retried.
  • - //
+ // One of: + //
    + //
  • `pending`: the payout has been created, but not yet sent to your bank + // or it is in the process of being exchanged through our FX provider.
  • + //
  • `paid`: the payout has been sent to the your bank. FX payouts will + // become `paid` after we emit the `fx_rate_confirmed` webhook.
  • + //
  • `bounced`: the payout bounced when sent, the payout can be + // retried.
  • + //
status?: PayoutStatus; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which tax is paid out to the tax authorities of your tax - // jurisdiction. Currently “EUR”, “GBP”, for French or British merchants, this - // will be `null` if tax is not applicable beta + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which tax is paid out to the tax authorities of your tax + // jurisdiction. Currently “EUR”, “GBP”, for French or British merchants, + // this will be `null` if tax is not applicable beta tax_currency?: string | null; }; @@ -5978,26 +6217,26 @@ export enum PayoutStatus { /** Type for a payoutfx resource. */ export type PayoutFx = { - // Estimated rate that will be used in the foreign exchange of the `amount` - // into the `fx_currency`. - // This will vary based on the prevailing market rate until the moment that it - // is paid out. - // Present only before a resource is paid out. Has up to 10 decimal places. + // Estimated rate that will be used in the foreign exchange of the `amount` + // into the `fx_currency`. + // This will vary based on the prevailing market rate until the moment that + // it is paid out. + // Present only before a resource is paid out. Has up to 10 decimal places. estimated_exchange_rate?: string | null; - // Rate used in the foreign exchange of the `amount` into the `fx_currency`. - // Present only after a resource is paid out. Has up to 10 decimal places. + // Rate used in the foreign exchange of the `amount` into the `fx_currency`. + // Present only after a resource is paid out. Has up to 10 decimal places. exchange_rate?: string | null; - // Amount that was paid out in the `fx_currency` after foreign exchange. - // Present only after the resource has been paid out. + // Amount that was paid out in the `fx_currency` after foreign exchange. + // Present only after the resource has been paid out. fx_amount?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which amounts will be paid out (after foreign exchange). - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. Present only if payouts will be (or were) made via foreign - // exchange. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which amounts will be paid out (after foreign exchange). + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. Present only if payouts will be (or were) made via foreign + // exchange. fx_currency?: PayoutFxFxCurrency; }; @@ -6014,65 +6253,66 @@ export enum PayoutFxFxCurrency { /** Type for a payoutlinks resource. */ export type PayoutLinks = { - // ID of [creditor](#core-endpoints-creditors) who will receive this payout, - // i.e. the owner of the `creditor_bank_account`. + // ID of [creditor](#core-endpoints-creditors) who will receive this payout, + // i.e. the owner of the `creditor_bank_account`. creditor?: string; - // ID of [bank account](#core-endpoints-creditor-bank-accounts) which this - // will be sent to. + // ID of [bank account](#core-endpoints-creditor-bank-accounts) which this + // will be sent to. creditor_bank_account?: string; }; /** Type for a payoutitem resource. */ export type PayoutItem = { - // The positive (credit) or negative (debit) value of the item, in fractional - // currency; - // the lowest denomination for the currency (e.g. pence in GBP, cents in EUR), - // to one decimal place. - //

For accuracy, we store some of our fees to greater - // precision than we can actually pay out (for example, a GoCardless fee we - // record might come to 0.5 pence, but it is not possible to send a payout via - // bank transfer including a half penny).

To calculate the final amount - // of the payout, we sum all of the items and then round to the nearest - // currency unit.

+ // The positive (credit) or negative (debit) value of the item, in fractional + // currency; + // the lowest denomination for the currency (e.g. pence in GBP, cents in + // EUR), to one decimal place. + //

For accuracy, we store some of our fees to greater + // precision than we can actually pay out (for example, a GoCardless fee we + // record might come to 0.5 pence, but it is not possible to send a payout + // via bank transfer including a half penny).

To calculate the final + // amount of the payout, we sum all of the items and then round to the + // nearest currency unit.

amount?: string; // Resources linked to this PayoutItem. links?: PayoutItemLinks; - // An array of tax items beta + // An array of tax items beta // - // _Note_: VAT applies to transaction and surcharge fees for merchants - // operating in the UK and France. + // _Note_: VAT applies to transaction and surcharge fees for merchants + // operating in the UK and France. taxes?: PayoutItemTaxis[]; - // The type of the credit (positive) or debit (negative) item in the payout - // (inclusive of VAT if applicable). One of: - //
    - //
  • `payment_paid_out` (credit)
  • - //
  • `payment_failed` (debit): The payment failed to be processed.
  • - //
  • `payment_charged_back` (debit): The payment has been charged back.
  • - //
  • `payment_refunded` (debit): The payment has been refunded to the - // customer.
  • - //
  • `refund` (debit): A refund sent to a customer, not linked to a - // payment.
  • - //
  • `refund_funds_returned` (credit): The refund could not be sent to the - // customer, and the funds have been returned to you.
  • - //
  • `gocardless_fee` (credit/debit): The fees that GoCardless charged for a - // payment. In the case of a payment failure or chargeback, these will appear - // as credits. Will include taxes if applicable for merchants.
  • - //
  • `app_fee` (credit/debit): The optional fees that a partner may have - // taken for a payment. In the case of a payment failure or chargeback, these - // will appear as credits.
  • - //
  • `revenue_share` (credit/debit): A share of the fees that GoCardless - // collected which some partner integrations receive when their users take - // payments. Only shown in partner payouts. In the case of a payment failure - // or chargeback, these will appear as credits.
  • - //
  • `surcharge_fee` (credit/debit): GoCardless deducted a surcharge fee as - // the payment failed or was charged back, or refunded a surcharge fee as the - // bank or customer cancelled the chargeback. Will include taxes if applicable - // for merchants.
  • - //
+ // The type of the credit (positive) or debit (negative) item in the payout + // (inclusive of VAT if applicable). One of: + //
    + //
  • `payment_paid_out` (credit)
  • + //
  • `payment_failed` (debit): The payment failed to be processed.
  • + //
  • `payment_charged_back` (debit): The payment has been charged + // back.
  • + //
  • `payment_refunded` (debit): The payment has been refunded to the + // customer.
  • + //
  • `refund` (debit): A refund sent to a customer, not linked to a + // payment.
  • + //
  • `refund_funds_returned` (credit): The refund could not be sent to the + // customer, and the funds have been returned to you.
  • + //
  • `gocardless_fee` (credit/debit): The fees that GoCardless charged for + // a payment. In the case of a payment failure or chargeback, these will + // appear as credits. Will include taxes if applicable for merchants.
  • + //
  • `app_fee` (credit/debit): The optional fees that a partner may have + // taken for a payment. In the case of a payment failure or chargeback, these + // will appear as credits.
  • + //
  • `revenue_share` (credit/debit): A share of the fees that GoCardless + // collected which some partner integrations receive when their users take + // payments. Only shown in partner payouts. In the case of a payment failure + // or chargeback, these will appear as credits.
  • + //
  • `surcharge_fee` (credit/debit): GoCardless deducted a surcharge fee as + // the payment failed or was charged back, or refunded a surcharge fee as the + // bank or customer cancelled the chargeback. Will include taxes if + // applicable for merchants.
  • + //
// type?: PayoutItemType; }; @@ -6084,58 +6324,58 @@ export enum PayoutItemInclude2020TaxCutover { /** Type for a payoutitemlinks resource. */ export type PayoutItemLinks = { - // Unique identifier, beginning with "MD". Note that this prefix may not apply - // to mandates created before 2016. Present only for the items of type - // `payment_refunded`, `refund` and `refund_funds_returned`. + // Unique identifier, beginning with "MD". Note that this prefix may not + // apply to mandates created before 2016. Present only for the items of type + // `payment_refunded`, `refund` and `refund_funds_returned`. mandate?: string; - // Unique identifier, beginning with "PM". + // Unique identifier, beginning with "PM". payment?: string; - // Unique identifier, beginning with "RF". Present only for the items of type - // `payment_refunded`, `refund` and `refund_funds_returned`. + // Unique identifier, beginning with "RF". Present only for the items of type + // `payment_refunded`, `refund` and `refund_funds_returned`. refund?: string; }; /** Type for a payoutitemtaxis resource. */ export type PayoutItemTaxis = { - // The amount of tax applied to a fee in fractional currency; the lowest - // denomination for the currency (e.g. pence in GBP, cents in EUR), to one - // decimal place. + // The amount of tax applied to a fee in fractional currency; the lowest + // denomination for the currency (e.g. pence in GBP, cents in EUR), to one + // decimal place. amount?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: PayoutItemTaxisCurrency; - // The amount of tax to be paid out to the tax authorities in fractional - // currency; the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR), to one decimal place. + // The amount of tax to be paid out to the tax authorities in fractional + // currency; the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR), to one decimal place. // - // When `currency` and `destination_currency` don't match this will be `null` - // until the `exchange_rate` has been finalised. + // When `currency` and `destination_currency` don't match this will be `null` + // until the `exchange_rate` has been finalised. destination_amount?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which tax is paid out to the tax authorities of your tax - // jurisdiction. Currently “EUR” for French merchants and “GBP” for British - // merchants. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which tax is paid out to the tax authorities of your tax + // jurisdiction. Currently “EUR” for French merchants and “GBP” for British + // merchants. destination_currency?: string; - // The exchange rate for the tax from the currency into the destination - // currency. + // The exchange rate for the tax from the currency into the destination + // currency. // - // Present only if the currency and the destination currency don't match and - // the exchange rate has been finalised. + // Present only if the currency and the destination currency don't match and + // the exchange rate has been finalised. // - // You can listen for the payout's [`tax_exchange_rates_confirmed` - // webhook](https://developer.gocardless.com/api-reference/#event-types-payout) - // to know when the exchange rate has been finalised for all fees in the - // payout. + // You can listen for the payout's [`tax_exchange_rates_confirmed` + // webhook](https://developer.gocardless.com/api-reference/#event-types-payout) + // to know when the exchange rate has been finalised for all fees in the + // payout. exchange_rate?: string | null; - // The unique identifier created by the jurisdiction, tax type and version + // The unique identifier created by the jurisdiction, tax type and version tax_rate_id?: string; }; @@ -6165,73 +6405,73 @@ export enum PayoutItemType { /** Type for a redirectflow resource. */ export type RedirectFlow = { - // The URL of a confirmation page, which you may optionally redirect the - // customer to rather than use your own page, that confirms in their chosen - // language that their Direct Debit has been set up successfully. Only - // returned once the customer has set up their mandate via the payment pages - // and the redirect flow has been - // [completed](#redirect-flows-complete-a-redirect-flow), and only available - // for 15 minutes from when you complete the redirect flow. The structure of - // this URL may change at any time, so you should read it directly from the - // API response. + // The URL of a confirmation page, which you may optionally redirect the + // customer to rather than use your own page, that confirms in their chosen + // language that their Direct Debit has been set up successfully. Only + // returned once the customer has set up their mandate via the payment pages + // and the redirect flow has been + // [completed](#redirect-flows-complete-a-redirect-flow), and only available + // for 15 minutes from when you complete the redirect flow. The structure of + // this URL may change at any time, so you should read it directly from the + // API response. confirmation_url?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // A description of the item the customer is paying for. This will be shown on - // the hosted payment pages. + // A description of the item the customer is paying for. This will be shown + // on the hosted payment pages. description?: string; - // Unique identifier, beginning with "RE". + // Unique identifier, beginning with "RE". id?: string; // Resources linked to this RedirectFlow. links?: RedirectFlowLinks; - // Mandate reference generated by GoCardless or submitted by an integrator. + // Mandate reference generated by GoCardless or submitted by an integrator. mandate_reference?: 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. _Note:_ This should - // not be used for storing PII data. + // 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. _Note:_ This should + // not be used for storing PII data. metadata?: JsonMap; - // The URL of the hosted payment pages for this redirect flow. This is the URL - // you should redirect your customer to. + // The URL of the hosted payment pages for this redirect flow. This is the + // URL you should redirect your customer to. redirect_url?: string; - // The Direct Debit scheme of the mandate. If specified, the payment pages - // will only allow the set-up of a mandate for the specified scheme. It is - // recommended that you leave this blank so the most appropriate scheme is - // picked based on the customer's bank account. + // The Direct Debit scheme of the mandate. If specified, the payment pages + // will only allow the set-up of a mandate for the specified scheme. It is + // recommended that you leave this blank so the most appropriate scheme is + // picked based on the customer's bank account. scheme?: RedirectFlowScheme; - // The customer's session ID must be provided when the redirect flow is set up - // and again when it is completed. This allows integrators to ensure that the - // user who was originally sent to the GoCardless payment pages is the one who - // has completed them. + // The customer's session ID must be provided when the redirect flow is set + // up and again when it is completed. This allows integrators to ensure that + // the user who was originally sent to the GoCardless payment pages is the + // one who has completed them. session_token?: string; - // The URL to redirect to upon successful mandate setup. You must use a URL - // beginning `https` in the live environment. + // The URL to redirect to upon successful mandate setup. You must use a URL + // beginning `https` in the live environment. success_redirect_url?: string; }; /** Type for a redirectflowcreaterequestlinks resource. */ export type RedirectFlowCreateRequestLinks = { - // The [creditor](#core-endpoints-creditors) for whom the mandate will be - // created. The `name` of the creditor will be displayed on the payment page. - // Required if your account manages multiple creditors. + // The [creditor](#core-endpoints-creditors) for whom the mandate will be + // created. The `name` of the creditor will be displayed on the payment page. + // Required if your account manages multiple creditors. creditor?: string; }; /** Type for a redirectflowprefilledbankaccount resource. */ export type RedirectFlowPrefilledBankAccount = { - // Bank account type for USD-denominated bank accounts. Must not be provided - // for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type for USD-denominated bank accounts. Must not be provided + // for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: RedirectFlowPrefilledBankAccountAccountType; }; @@ -6242,53 +6482,53 @@ export enum RedirectFlowPrefilledBankAccountAccountType { /** Type for a redirectflowprefilledcustomer resource. */ export type RedirectFlowPrefilledCustomer = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // Customer's company name. Company name should only be provided if - // `given_name` and `family_name` are null. + // Customer's company name. Company name should only be provided if + // `given_name` and `family_name` are null. company_name?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. danish_identity_number?: string | null; - // Customer's email address. + // Customer's email address. email?: string | null; - // Customer's surname. + // Customer's surname. family_name?: string | null; - // Customer's first name. + // Customer's first name. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. language?: string | null; - // For New Zealand customers only. + // For New Zealand customers only. phone_number?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. + // The customer's address region, county or department. region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. swedish_identity_number?: string | null; }; @@ -6305,104 +6545,105 @@ export enum RedirectFlowScheme { /** Type for a redirectflowlinks resource. */ export type RedirectFlowLinks = { - // ID of [billing request](#billing-requests-billing-requests) that a redirect - // flow can create.
**Note**: The redirect flow will only create a - // billing request in the event the redirect flow is eligible to send the - // payer down this new and improved flow + // ID of [billing request](#billing-requests-billing-requests) that a + // redirect flow can create.
**Note**: The redirect flow will only + // create a billing request in the event the redirect flow is eligible to + // send the payer down this new and improved flow billing_request?: string; - // The [creditor](#core-endpoints-creditors) for whom the mandate will be - // created. The `name` of the creditor will be displayed on the payment page. + // The [creditor](#core-endpoints-creditors) for whom the mandate will be + // created. The `name` of the creditor will be displayed on the payment page. creditor?: string; - // ID of [customer](#core-endpoints-customers) created by this redirect - // flow.
**Note**: this property will not be present until the redirect - // flow has been successfully completed. + // ID of [customer](#core-endpoints-customers) created by this redirect + // flow.
**Note**: this property will not be present until the redirect + // flow has been successfully completed. customer?: string; - // ID of [customer bank account](#core-endpoints-customer-bank-accounts) - // created by this redirect flow.
**Note**: this property will not be - // present until the redirect flow has been successfully completed. + // ID of [customer bank account](#core-endpoints-customer-bank-accounts) + // created by this redirect flow.
**Note**: this property will not be + // present until the redirect flow has been successfully completed. customer_bank_account?: string; - // ID of [mandate](#core-endpoints-mandates) created by this redirect - // flow.
**Note**: this property will not be present until the redirect - // flow has been successfully completed. + // ID of [mandate](#core-endpoints-mandates) created by this redirect + // flow.
**Note**: this property will not be present until the redirect + // flow has been successfully completed. mandate?: string; }; /** Type for a refund resource. */ export type Refund = { - // Amount in minor unit (e.g. pence in GBP, cents in EUR). + // Amount in minor unit (e.g. pence in GBP, cents in EUR). amount?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. This is set to the currency of the refund's - // [payment](#core-endpoints-payments). + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. This is set to the currency of the refund's + // [payment](#core-endpoints-payments). currency?: string; // fx?: RefundFx; - // Unique identifier, beginning with "RF". + // Unique identifier, beginning with "RF". id?: string; // Resources linked to this Refund. links?: RefundLinks; - // 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. + // 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. metadata?: JsonMap; - // 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.

+ // 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.

reference?: string | null; - // One of: - //
    - //
  • `created`: the refund has been created
  • - //
  • `pending_submission`: the refund has been created, but not yet - // submitted to the banks
  • - //
  • `submitted`: the refund has been submitted to the banks
  • - //
  • `paid`: the refund has been included in a - // [payout](#core-endpoints-payouts)
  • - //
  • `cancelled`: the refund has been cancelled
  • - //
  • `bounced`: the refund has failed to be paid
  • - //
  • `funds_returned`: the refund has had its funds returned
  • - //
+ // One of: + //
    + //
  • `created`: the refund has been created
  • + //
  • `pending_submission`: the refund has been created, but not yet + // submitted to the banks
  • + //
  • `submitted`: the refund has been submitted to the banks
  • + //
  • `paid`: the refund has been included in a + // [payout](#core-endpoints-payouts)
  • + //
  • `cancelled`: the refund has been cancelled
  • + //
  • `bounced`: the refund has failed to be paid
  • + //
  • `funds_returned`: the refund has had its funds returned
  • + //
status?: RefundStatus; }; /** Type for a refundcreaterequestlinks resource. */ export type RefundCreateRequestLinks = { - // ID of the [mandate](#core-endpoints-mandates) against which the refund is - // being made.

Restricted: You must request - // access to Mandate Refunds by contacting our support team.

+ // ID of the [mandate](#core-endpoints-mandates) against which the refund is + // being made.

Restricted: You must request + // access to Mandate Refunds by contacting our support team.

mandate?: string; - // ID of the [payment](#core-endpoints-payments) against which the refund is - // being made. + // ID of the [payment](#core-endpoints-payments) against which the refund is + // being made. payment?: string; }; @@ -6413,26 +6654,26 @@ export enum RefundRefundType { /** Type for a refundfx resource. */ export type RefundFx = { - // Estimated rate that will be used in the foreign exchange of the `amount` - // into the `fx_currency`. - // This will vary based on the prevailing market rate until the moment that it - // is paid out. - // Present only before a resource is paid out. Has up to 10 decimal places. + // Estimated rate that will be used in the foreign exchange of the `amount` + // into the `fx_currency`. + // This will vary based on the prevailing market rate until the moment that + // it is paid out. + // Present only before a resource is paid out. Has up to 10 decimal places. estimated_exchange_rate?: string | null; - // Rate used in the foreign exchange of the `amount` into the `fx_currency`. - // Present only after a resource is paid out. Has up to 10 decimal places. + // Rate used in the foreign exchange of the `amount` into the `fx_currency`. + // Present only after a resource is paid out. Has up to 10 decimal places. exchange_rate?: string | null; - // Amount that was paid out in the `fx_currency` after foreign exchange. - // Present only after the resource has been paid out. + // Amount that was paid out in the `fx_currency` after foreign exchange. + // Present only after the resource has been paid out. fx_amount?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which amounts will be paid out (after foreign exchange). - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. Present only if payouts will be (or were) made via foreign - // exchange. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which amounts will be paid out (after foreign exchange). + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. Present only if payouts will be (or were) made via foreign + // exchange. fx_currency?: RefundFxFxCurrency; }; @@ -6449,12 +6690,12 @@ export enum RefundFxFxCurrency { /** Type for a refundlinks resource. */ export type RefundLinks = { - // ID of the [mandate](#core-endpoints-mandates) against which the refund is - // being made. + // ID of the [mandate](#core-endpoints-mandates) against which the refund is + // being made. mandate?: string; - // ID of the [payment](#core-endpoints-payments) against which the refund is - // being made. + // ID of the [payment](#core-endpoints-payments) against which the refund is + // being made. payment?: string; }; @@ -6470,218 +6711,218 @@ export enum RefundStatus { /** Type for a scenariosimulator resource. */ export type ScenarioSimulator = { - // The unique identifier of the simulator, used to initiate simulations. One - // of: - //
    - //
  • `creditor_verification_status_action_required`: Sets a creditor's - // `verification status` to `action required`, meaning that the creditor must - // provide further information to GoCardless in order to verify their account - // to receive payouts.
  • - //
  • `creditor_verification_status_in_review`: Sets a creditor's - // `verification status` to `in review`, meaning that the creditor has - // provided all of the information requested by GoCardless to verify their - // account, and is now awaiting review.
  • - //
  • `creditor_verification_status_successful`: Sets a creditor's - // `verification status` to `successful`, meaning that the creditor is fully - // verified and can receive payouts.
  • - //
  • `payment_confirmed`: Transitions a payment through to `confirmed`. It - // must start in the `pending_submission` state, and its mandate must be in - // the `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or - // SEPA, in which cases the mandate may be `pending_submission`, since their - // mandates are submitted with their first payment).
  • - //
  • `payment_paid_out`: Transitions a payment through to `paid_out`, having - // been collected successfully and paid out to you. It must start in the - // `pending_submission` state, and its mandate must be in the `activated` - // state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which - // cases the mandate may be `pending_submission`, since their mandates are - // submitted with their first payment).
  • - //
  • `payment_failed`: Transitions a payment through to `failed`. It must - // start in the `pending_submission` state, and its mandate must be in the - // `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, - // in which cases the mandate may be `pending_submission`, since their - // mandates are submitted with their first payment).
  • - //
  • `payment_charged_back`: Behaves the same as the `payout_paid_out` - // simulator, except that the payment is transitioned to `charged_back` after - // it is paid out, having been charged back by the customer.
  • - //
  • `payment_chargeback_settled`: Behaves the same as the - // `payment_charged_back` simulator, except that the charged back payment is - // additionally included as a debit item in a payout, thereby settling the - // charged back payment.
  • - //
  • `payment_late_failure`: Transitions a payment through to - // `late_failure`, having been apparently collected successfully beforehand. - // It must start in either the `pending_submission` or `paid_out` state, and - // its mandate must be in the `activated` state (unless it is a payment for - // ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be - // `pending_submission`, since their mandates are submitted with their first - // payment). Not compatible with Autogiro mandates.
  • - //
  • `payment_late_failure_settled`: Behaves the same as the - // `payment_late_failure` simulator, except that the late failure is - // additionally included as a debit item in a payout, thereby settling the - // late failure.
  • - //
  • `payment_submitted`: Transitions a payment to `submitted`, without - // proceeding any further. It must start in the `pending_submission` - // state.
  • - //
  • `mandate_activated`: Transitions a mandate through to `activated`, - // having been submitted to the banks and set up successfully. It must start - // in the `pending_submission` state. Not compatible with ACH, BECS, BECS_NZ - // and SEPA mandates, which are submitted and activated with their first - // payment.
  • - //
  • `mandate_customer_approval_granted`: Transitions a mandate through to - // `pending_submission`, as if the customer approved the mandate creation. It - // must start in the `pending_customer_approval` state. Compatible only with - // Bacs and SEPA mandates, which support customer signatures on the mandate. - // All payments associated with the mandate will be transitioned to - // `pending_submission`. All subscriptions associated with the mandate will - // become `active`.
  • - //
  • `mandate_customer_approval_skipped`: Transitions a mandate through to - // `pending_submission`, as if the customer skipped the mandate approval - // during the mandate creation process. It must start in the - // `pending_customer_approval` state. Compatible only with Bacs and SEPA - // mandates, which support customer signatures on the mandate. All payments - // associated with the mandate will be transitioned to `pending_submission`. - // All subscriptions associated with the mandate will become `active`.
  • - //
  • `mandate_failed`: Transitions a mandate through to `failed`, having - // been submitted to the banks but found to be invalid (for example due to - // invalid bank details). It must start in the `pending_submission` or - // `submitted` states. Not compatible with SEPA mandates, which are submitted - // with their first payment.
  • - //
  • `mandate_expired`: Transitions a mandate through to `expired`, having - // been submitted to the banks, set up successfully and then expired because - // no collection attempts were made against it for longer than the scheme's - // dormancy period (13 months for Bacs, 3 years for SEPA, 15 months for ACH, - // Betalingsservice, and BECS). It must start in the `pending_submission` - // state. Not compatible with Autogiro, BECS NZ, and PAD mandates, which do - // not expire.
  • - //
  • `mandate_transferred`: Transitions a mandate through to `transferred`, - // having been submitted to the banks, set up successfully and then moved to a - // new bank account due to the customer using the UK's Current Account - // Switching Service (CASS). It must start in the `pending_submission` state. - // Only compatible with Bacs mandates.
  • - //
  • `mandate_transferred_with_resubmission`: Transitions a mandate through - // `transferred` and resubmits it to the banks, can be caused be the UK's - // Current Account Switching Service (CASS) or when a customer contacts - // GoCardless to change their bank details. It must start in the - // `pending_submission` state. Only compatible with Bacs mandates.
  • - //
  • `mandate_suspended_by_payer`: Transitions a mandate to - // `suspended_by_payer`, as if payer has suspended the mandate after it has - // been setup successfully. It must start in the `activated` state. Only - // compatible with PAY_TO mandates.
  • - //
  • `refund_paid`: Transitions a refund to `paid`. It must start in either - // the `pending_submission` or `submitted` state.
  • - //
  • `refund_settled`: Transitions a refund to `paid`, if it's not already, - // then generates a payout that includes the refund, thereby settling the - // funds. It must start in one of `pending_submission`, `submitted` or `paid` - // states.
  • - //
  • `refund_bounced`: Transitions a refund to `bounced`. It must start in - // either the `pending_submission`, `submitted`, or `paid` state.
  • - //
  • `refund_returned`: Transitions a refund to `refund_returned`. The - // refund must start in `pending_submission`.
  • - //
  • `payout_bounced`: Transitions a payout to `bounced`. It must start in - // the `paid` state.
  • - //
  • `billing_request_fulfilled`: Authorises the billing request, and then - // fulfils it. The billing request must be in the `pending` state, with all - // actions completed except for `bank_authorisation`. Only billing requests - // with a `payment_request` are supported.
  • - //
  • `billing_request_fulfilled_and_payment_failed`: Authorises the billing - // request, fulfils it, and moves the associated payment to `failed`. The - // billing request must be in the `pending` state, with all actions completed - // except for `bank_authorisation`. Only billing requests with a - // `payment_request` are supported.
  • - //
  • `billing_request_fulfilled_and_payment_confirmed_to_failed`: Authorises - // the billing request, fulfils it, moves the associated payment to - // `confirmed` and then moves it to `failed`. The billing request must be in - // the `pending` state, with all actions completed except for - // `bank_authorisation`. Only billing requests with a `payment_request` are - // supported.
  • - //
  • `billing_request_fulfilled_and_payment_paid_out`: Authorises the - // billing request, fulfils it, and moves the associated payment to - // `paid_out`. The billing request must be in the `pending` state, with all - // actions completed except for `bank_authorisation`. Only billing requests - // with a `payment_request` are supported.
  • - //
+ // The unique identifier of the simulator, used to initiate simulations. One + // of: + //
    + //
  • `creditor_verification_status_action_required`: Sets a creditor's + // `verification status` to `action required`, meaning that the creditor must + // provide further information to GoCardless in order to verify their account + // to receive payouts.
  • + //
  • `creditor_verification_status_in_review`: Sets a creditor's + // `verification status` to `in review`, meaning that the creditor has + // provided all of the information requested by GoCardless to verify their + // account, and is now awaiting review.
  • + //
  • `creditor_verification_status_successful`: Sets a creditor's + // `verification status` to `successful`, meaning that the creditor is fully + // verified and can receive payouts.
  • + //
  • `payment_confirmed`: Transitions a payment through to `confirmed`. It + // must start in the `pending_submission` state, and its mandate must be in + // the `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or + // SEPA, in which cases the mandate may be `pending_submission`, since their + // mandates are submitted with their first payment).
  • + //
  • `payment_paid_out`: Transitions a payment through to `paid_out`, + // having been collected successfully and paid out to you. It must start in + // the `pending_submission` state, and its mandate must be in the `activated` + // state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which + // cases the mandate may be `pending_submission`, since their mandates are + // submitted with their first payment).
  • + //
  • `payment_failed`: Transitions a payment through to `failed`. It must + // start in the `pending_submission` state, and its mandate must be in the + // `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, + // in which cases the mandate may be `pending_submission`, since their + // mandates are submitted with their first payment).
  • + //
  • `payment_charged_back`: Behaves the same as the `payout_paid_out` + // simulator, except that the payment is transitioned to `charged_back` after + // it is paid out, having been charged back by the customer.
  • + //
  • `payment_chargeback_settled`: Behaves the same as the + // `payment_charged_back` simulator, except that the charged back payment is + // additionally included as a debit item in a payout, thereby settling the + // charged back payment.
  • + //
  • `payment_late_failure`: Transitions a payment through to + // `late_failure`, having been apparently collected successfully beforehand. + // It must start in either the `pending_submission` or `paid_out` state, and + // its mandate must be in the `activated` state (unless it is a payment for + // ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be + // `pending_submission`, since their mandates are submitted with their first + // payment). Not compatible with Autogiro mandates.
  • + //
  • `payment_late_failure_settled`: Behaves the same as the + // `payment_late_failure` simulator, except that the late failure is + // additionally included as a debit item in a payout, thereby settling the + // late failure.
  • + //
  • `payment_submitted`: Transitions a payment to `submitted`, without + // proceeding any further. It must start in the `pending_submission` + // state.
  • + //
  • `mandate_activated`: Transitions a mandate through to `activated`, + // having been submitted to the banks and set up successfully. It must start + // in the `pending_submission` state. Not compatible with ACH, BECS, BECS_NZ + // and SEPA mandates, which are submitted and activated with their first + // payment.
  • + //
  • `mandate_customer_approval_granted`: Transitions a mandate through to + // `pending_submission`, as if the customer approved the mandate creation. It + // must start in the `pending_customer_approval` state. Compatible only with + // Bacs and SEPA mandates, which support customer signatures on the mandate. + // All payments associated with the mandate will be transitioned to + // `pending_submission`. All subscriptions associated with the mandate will + // become `active`.
  • + //
  • `mandate_customer_approval_skipped`: Transitions a mandate through to + // `pending_submission`, as if the customer skipped the mandate approval + // during the mandate creation process. It must start in the + // `pending_customer_approval` state. Compatible only with Bacs and SEPA + // mandates, which support customer signatures on the mandate. All payments + // associated with the mandate will be transitioned to `pending_submission`. + // All subscriptions associated with the mandate will become `active`.
  • + //
  • `mandate_failed`: Transitions a mandate through to `failed`, having + // been submitted to the banks but found to be invalid (for example due to + // invalid bank details). It must start in the `pending_submission` or + // `submitted` states. Not compatible with SEPA mandates, which are submitted + // with their first payment.
  • + //
  • `mandate_expired`: Transitions a mandate through to `expired`, having + // been submitted to the banks, set up successfully and then expired because + // no collection attempts were made against it for longer than the scheme's + // dormancy period (13 months for Bacs, 3 years for SEPA, 15 months for ACH, + // Betalingsservice, and BECS). It must start in the `pending_submission` + // state. Not compatible with Autogiro, BECS NZ, and PAD mandates, which do + // not expire.
  • + //
  • `mandate_transferred`: Transitions a mandate through to `transferred`, + // having been submitted to the banks, set up successfully and then moved to + // a new bank account due. It must start in the `pending_submission` state. + // Only compatible with Bacs and SEPA mandates.
  • + //
  • `mandate_transferred_with_resubmission`: Transitions a mandate through + // `transferred` and resubmits it to the banks, can be caused be the UK's + // Current Account Switching Service (CASS) or when a customer contacts + // GoCardless to change their bank details. It must start in the + // `pending_submission` state. Only compatible with Bacs mandates.
  • + //
  • `mandate_suspended_by_payer`: Transitions a mandate to + // `suspended_by_payer`, as if payer has suspended the mandate after it has + // been setup successfully. It must start in the `activated` state. Only + // compatible with PAY_TO mandates.
  • + //
  • `refund_paid`: Transitions a refund to `paid`. It must start in either + // the `pending_submission` or `submitted` state.
  • + //
  • `refund_settled`: Transitions a refund to `paid`, if it's not already, + // then generates a payout that includes the refund, thereby settling the + // funds. It must start in one of `pending_submission`, `submitted` or `paid` + // states.
  • + //
  • `refund_bounced`: Transitions a refund to `bounced`. It must start in + // either the `pending_submission`, `submitted`, or `paid` state.
  • + //
  • `refund_returned`: Transitions a refund to `refund_returned`. The + // refund must start in `pending_submission`.
  • + //
  • `payout_bounced`: Transitions a payout to `bounced`. It must start in + // the `paid` state.
  • + //
  • `billing_request_fulfilled`: Authorises the billing request, and then + // fulfils it. The billing request must be in the `pending` state, with all + // actions completed except for `bank_authorisation`. Only billing requests + // with a `payment_request` are supported.
  • + //
  • `billing_request_fulfilled_and_payment_failed`: Authorises the billing + // request, fulfils it, and moves the associated payment to `failed`. The + // billing request must be in the `pending` state, with all actions completed + // except for `bank_authorisation`. Only billing requests with a + // `payment_request` are supported.
  • + //
  • `billing_request_fulfilled_and_payment_confirmed_to_failed`: + // Authorises the billing request, fulfils it, moves the associated payment + // to `confirmed` and then moves it to `failed`. The billing request must be + // in the `pending` state, with all actions completed except for + // `bank_authorisation`. Only billing requests with a `payment_request` are + // supported.
  • + //
  • `billing_request_fulfilled_and_payment_paid_out`: Authorises the + // billing request, fulfils it, and moves the associated payment to + // `paid_out`. The billing request must be in the `pending` state, with all + // actions completed except for `bank_authorisation`. Only billing requests + // with a `payment_request` are supported.
  • + //
id?: string; }; /** Type for a scenariosimulatorrunrequestlinks resource. */ export type ScenarioSimulatorRunRequestLinks = { - // ID of the resource to run the simulation against. - // Must be same type of resource as the simulator that is being run. - // eg. Payment ID for `payment_failed`, Mandate ID for `mandate_activated` etc + // ID of the resource to run the simulation against. + // Must be same type of resource as the simulator that is being run. + // eg. Payment ID for `payment_failed`, Mandate ID for `mandate_activated` + // etc resource: string; }; /** Type for a schemeidentifier resource. */ export type SchemeIdentifier = { - // The first line of the scheme identifier's support address. + // The first line of the scheme identifier's support address. address_line1?: string; - // The second line of the scheme identifier's support address. + // The second line of the scheme identifier's support address. address_line2?: string | null; - // The third line of the scheme identifier's support address. + // The third line of the scheme identifier's support address. address_line3?: string | null; - // Whether a custom reference can be submitted for mandates using this scheme - // identifier. + // Whether a custom reference can be submitted for mandates using this scheme + // identifier. can_specify_mandate_reference?: boolean; - // The city of the scheme identifier's support address. + // The city of the scheme identifier's support address. city?: string; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // The currency of the scheme identifier. + // The currency of the scheme identifier. currency?: SchemeIdentifierCurrency; - // Scheme identifier's support email address. + // Scheme identifier's support email address. email?: string; - // Unique identifier, usually beginning with "SU". + // Unique identifier, usually beginning with "SU". id?: string; - // The minimum interval, in working days, between the sending of a - // pre-notification to the customer, and the charge date of a payment using - // this scheme identifier. + // The minimum interval, in working days, between the sending of a + // pre-notification to the customer, and the charge date of a payment using + // this scheme identifier. // - // By default, GoCardless sends these notifications automatically. Please see - // our [compliance requirements](#appendix-compliance-requirements) for more - // details. + // By default, GoCardless sends these notifications automatically. Please see + // our [compliance requirements](#appendix-compliance-requirements) for more + // details. minimum_advance_notice?: number; - // The name which appears on customers' bank statements. This should usually - // be the merchant's trading name. + // The name which appears on customers' bank statements. This should usually + // be the merchant's trading name. name?: string; - // Scheme identifier's support phone number. + // Scheme identifier's support phone number. phone_number?: string; - // The scheme identifier's support postal code. + // The scheme identifier's support postal code. postal_code?: string; - // The scheme-unique identifier against which payments are submitted. + // The scheme-unique identifier against which payments are submitted. reference?: string; - // The scheme identifier's support address region, county or department. + // The scheme identifier's support address region, county or department. region?: string | null; - // The scheme which this scheme identifier applies to. + // The scheme which this scheme identifier applies to. scheme?: SchemeIdentifierScheme; - // The status of the scheme identifier. Only `active` scheme identifiers will - // be applied to a creditor and used against payments. + // The status of the scheme identifier. Only `active` scheme identifiers will + // be applied to a creditor and used against payments. status?: SchemeIdentifierStatus; }; /** Type for a schemeidentifiercreaterequestlinks resource. */ export type SchemeIdentifierCreateRequestLinks = { - // required ID of the associated - // [creditor](#core-endpoints-creditors). + // required ID of the associated + // [creditor](#core-endpoints-creditors). // creditor?: string; }; @@ -6784,121 +7025,124 @@ export interface ListMetaCursor { /** Type for a subscription resource. */ export type Subscription = { - // Amount in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount?: string; - // 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). + // 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). app_fee?: string | null; - // The total number of payments that should be taken by this subscription. + // The total number of payments that should be taken by this subscription. count?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string; - // 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. + // 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. day_of_month?: string | null; - // 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. + // 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. earliest_charge_date_after_resume?: string | null; - // 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.

+ // 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.

end_date?: string | null; - // Unique identifier, beginning with "SB". + // Unique identifier, beginning with "SB". id?: string; - // 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`. + // 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?: string; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit?: SubscriptionIntervalUnit; // Resources linked to this Subscription. links?: SubscriptionLinks; - // 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. + // 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. metadata?: JsonMap; - // Name of the month on which to charge a customer. Must be lowercase. Only - // applies - // when the interval_unit is `yearly`. + // Name of the month on which to charge a customer. Must be lowercase. Only + // applies + // when the interval_unit is `yearly`. // month?: SubscriptionMonth; - // Optional name for the subscription. This will be set as the description on - // each payment created. Must not exceed 255 characters. + // Optional name for the subscription. This will be set as the description on + // each payment created. Must not exceed 255 characters. name?: string | null; - // Whether the parent plan of this subscription is paused. + // Whether the parent plan of this subscription is paused. parent_plan_paused?: boolean; - // 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](#payments-create-a-payment) for more details. - //
- //

Restricted: You need your own - // Service User Number to specify a payment reference for Bacs payments.

+ // 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](#payments-create-a-payment) for more + // details. + //
+ //

Restricted: You need your + // own Service User Number to specify a payment reference for Bacs + // payments.

payment_reference?: string | null; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).

+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.

Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).

retry_if_possible?: boolean; - // The date on which the first payment should be charged. Must be on or after - // the [mandate](#core-endpoints-mandates)'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` + // The date on which the first payment should be charged. Must be on or after + // the [mandate](#core-endpoints-mandates)'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` start_date?: string | null; - // One of: - //
    - //
  • `pending_customer_approval`: the subscription is waiting for customer - // approval before becoming active
  • - //
  • `customer_approval_denied`: the customer did not approve the - // subscription
  • - //
  • `active`: the subscription is currently active and will continue to - // create payments
  • - //
  • `finished`: all of the payments scheduled for creation under this - // subscription have been created
  • - //
  • `cancelled`: the subscription has been cancelled and will no longer - // create payments
  • - //
  • `paused`: the subscription has been paused and will not create - // payments
  • - //
+ // One of: + //
    + //
  • `pending_customer_approval`: the subscription is waiting for customer + // approval before becoming active
  • + //
  • `customer_approval_denied`: the customer did not approve the + // subscription
  • + //
  • `active`: the subscription is currently active and will continue to + // create payments
  • + //
  • `finished`: all of the payments scheduled for creation under this + // subscription have been created
  • + //
  • `cancelled`: the subscription has been cancelled and will no longer + // create payments
  • + //
  • `paused`: the subscription has been paused and will not create + // payments
  • + //
status?: SubscriptionStatus; - // Up to 10 upcoming payments with their amounts and charge dates. + // Up to 10 upcoming payments with their amounts and charge dates. upcoming_payments?: SubscriptionUpcomingPayment[]; }; @@ -6910,8 +7154,8 @@ export enum SubscriptionIntervalUnit { /** Type for a subscriptioncreaterequestlinks resource. */ export type SubscriptionCreateRequestLinks = { - // ID of the associated [mandate](#core-endpoints-mandates) which the - // subscription will create payments against. + // ID of the associated [mandate](#core-endpoints-mandates) which the + // subscription will create payments against. mandate: string; }; @@ -6932,8 +7176,8 @@ export enum SubscriptionMonth { /** Type for a subscriptionlinks resource. */ export type SubscriptionLinks = { - // ID of the associated [mandate](#core-endpoints-mandates) which the - // subscription will create payments against. + // ID of the associated [mandate](#core-endpoints-mandates) which the + // subscription will create payments against. mandate?: string; }; @@ -6948,174 +7192,175 @@ export enum SubscriptionStatus { /** Type for a subscriptionupcomingpayment resource. */ export type SubscriptionUpcomingPayment = { - // The amount of this payment, in minor unit (e.g. pence in GBP, cents in - // EUR). + // The amount of this payment, in minor unit (e.g. pence in GBP, cents in + // EUR). amount?: string; - // The date on which this payment will be charged. + // The date on which this payment will be charged. charge_date?: string; }; /** Type for a taxrate resource. */ export type TaxRate = { - // Date at which GoCardless stopped applying the tax rate for the - // jurisdiction. + // Date at which GoCardless stopped applying the tax rate for the + // jurisdiction. end_date?: string | null; - // The unique identifier created by the jurisdiction, tax type and version + // The unique identifier created by the jurisdiction, tax type and version id?: string; - // The jurisdiction this tax rate applies to + // The jurisdiction this tax rate applies to jurisdiction?: string; - // The percentage of tax that is applied onto of GoCardless fees + // The percentage of tax that is applied onto of GoCardless fees percentage?: string; - // Date at which GoCardless started applying the tax rate in the jurisdiction. + // Date at which GoCardless started applying the tax rate in the + // jurisdiction. start_date?: string; - // The type of tax applied by this rate + // The type of tax applied by this rate type?: string; }; /** Type for a transferredmandate resource. */ export type TransferredMandate = { - // Encrypted customer bank account details, containing: - // `iban`, `account_holder_name`, `swift_bank_code`, `swift_branch_code`, - // `swift_account_number` + // Encrypted customer bank account details, containing: + // `iban`, `account_holder_name`, `swift_bank_code`, `swift_branch_code`, + // `swift_account_number` encrypted_customer_bank_details?: string; - // Random AES-256 key used to encrypt bank account details, itself encrypted - // with your public key. + // Random AES-256 key used to encrypt bank account details, itself encrypted + // with your public key. encrypted_decryption_key?: string; // Resources linked to this TransferredMandate. links?: TransferredMandateLinks; - // The ID of an RSA-2048 public key, from your JWKS, used to encrypt the AES - // key. + // The ID of an RSA-2048 public key, from your JWKS, used to encrypt the AES + // key. public_key_id?: string; }; /** Type for a transferredmandatelinks resource. */ export type TransferredMandateLinks = { - // The ID of the updated - // [customer_bank_account](#core-endpoints-customer-bank-accounts) + // The ID of the updated + // [customer_bank_account](#core-endpoints-customer-bank-accounts) customer_bank_account?: string; - // The ID of the transferred mandate + // The ID of the transferred mandate mandate?: string; }; /** Type for a verificationdetail resource. */ export type VerificationDetail = { - // The first line of the company's address. + // The first line of the company's address. address_line1?: string; - // The second line of the company's address. + // The second line of the company's address. address_line2?: string | null; - // The third line of the company's address. + // The third line of the company's address. address_line3?: string | null; - // The city of the company's address. + // The city of the company's address. city?: string; - // The company's registration number. + // The company's registration number. company_number?: string; - // A summary describing what the company does. + // A summary describing what the company does. description?: string; - // The company's directors. + // The company's directors. directors?: VerificationDetailDirector[]; // Resources linked to this VerificationDetail. links?: VerificationDetailLinks; - // The company's legal name. + // The company's legal name. name?: string; - // The company's postal code. + // The company's postal code. postal_code?: string; }; /** Type for a verificationdetailcreaterequestlinks resource. */ export type VerificationDetailCreateRequestLinks = { - // ID of the associated [creditor](#core-endpoints-creditors). + // ID of the associated [creditor](#core-endpoints-creditors). creditor: string; }; /** Type for a verificationdetaildirector resource. */ export type VerificationDetailDirector = { - // The city of the person's address. + // The city of the person's address. city: string; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code: string; - // The person's date of birth. + // The person's date of birth. date_of_birth: string; - // The person's family name. + // The person's family name. family_name: string; - // The person's given name. + // The person's given name. given_name: string; - // The person's postal code. + // The person's postal code. postal_code: string; - // The street of the person's address. + // The street of the person's address. street: string; }; /** Type for a verificationdetaillinks resource. */ export type VerificationDetailLinks = { - // ID of the [creditor](#core-endpoints-creditors) + // ID of the [creditor](#core-endpoints-creditors) creditor?: string; }; /** Type for a webhook resource. */ export type Webhook = { - // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource - // was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // Unique identifier, beginning with "WB". + // Unique identifier, beginning with "WB". id?: string; - // Boolean value showing whether this was a demo webhook for testing + // Boolean value showing whether this was a demo webhook for testing is_test?: boolean; - // The body of the request sent to the webhook URL + // The body of the request sent to the webhook URL request_body?: string; - // The request headers sent with the webhook + // The request headers sent with the webhook request_headers?: JsonMap; - // The body of the response from the webhook URL + // The body of the response from the webhook URL response_body?: string; - // Boolean value indicating the webhook response body was truncated + // Boolean value indicating the webhook response body was truncated response_body_truncated?: boolean; - // The response code from the webhook request + // The response code from the webhook request response_code?: number; - // The headers sent with the response from the webhook URL + // The headers sent with the response from the webhook URL response_headers?: JsonMap; - // Boolean indicating the content of response headers was truncated + // Boolean indicating the content of response headers was truncated response_headers_content_truncated?: boolean; - // Boolean indicating the number of response headers was truncated + // Boolean indicating the number of response headers was truncated response_headers_count_truncated?: boolean; - // Boolean indicating whether the request was successful or failed + // Boolean indicating whether the request was successful or failed successful?: boolean; - // URL the webhook was POST-ed to + // URL the webhook was POST-ed to url?: string; };