diff --git a/README.md b/README.md index fe91ce6..b06e054 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ A Node.js client for the GoCardless API. For full details of the GoCardless API, see the [API docs](https://developer.gocardless.com/). +PLEASE NOTE that this is intended only to be used in server-side code. Using it in client side code would expose your API key to your users. + +If you are using React, we offer bindings in our [react-dropin](https://github.com/gocardless/react-dropin) library. + ## Installation ```bash diff --git a/package-lock.json b/package-lock.json index 5bf1663..01badbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -718,13 +718,13 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" @@ -3783,37 +3783,24 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, "node_modules/glob/node_modules/brace-expansion": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.3.tgz", - "integrity": "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" + "balanced-match": "^1.0.0" } }, "node_modules/glob/node_modules/minimatch": { - "version": "9.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.8.tgz", - "integrity": "sha512-reYkDYtj/b19TeqbNZCV4q9t+Yxylf/rYBsLb42SXJatTv4/ylq5lEiAmhA/IToxO7NI2UzNMghHoHuaqDkAjw==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^5.0.2" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -6681,13 +6668,13 @@ } }, "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" @@ -7307,13 +7294,13 @@ } }, "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" diff --git a/src/services/balanceService.ts b/src/services/balanceService.ts index aa3a822..9b39548 100644 --- a/src/services/balanceService.ts +++ b/src/services/balanceService.ts @@ -9,19 +9,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 0233bbf..7b0287d 100644 --- a/src/services/bankAccountHolderVerificationService.ts +++ b/src/services/bankAccountHolderVerificationService.ts @@ -12,9 +12,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 78040b4..14c4455 100644 --- a/src/services/bankAuthorisationService.ts +++ b/src/services/bankAuthorisationService.ts @@ -12,28 +12,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 74ad8f1..737f986 100644 --- a/src/services/bankDetailsLookupService.ts +++ b/src/services/bankDetailsLookupService.ts @@ -9,35 +9,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 87fdf83..0e6c451 100644 --- a/src/services/billingRequestFlowService.ts +++ b/src/services/billingRequestFlowService.ts @@ -9,92 +9,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, for example if the customer searches for a bank that doesn't exist or - // isn't supported on the scheme. + // 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 6aaefc3..f2b0d57 100644 --- a/src/services/billingRequestService.ts +++ b/src/services/billingRequestService.ts @@ -9,13 +9,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; @@ -28,37 +28,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. + // 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. + // 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/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. + // 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; @@ -75,169 +75,168 @@ 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 881baef..f08ff76 100644 --- a/src/services/billingRequestTemplateService.ts +++ b/src/services/billingRequestTemplateService.ts @@ -9,24 +9,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; } @@ -35,209 +35,207 @@ 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 0a7e84a..2aaf2b1 100644 --- a/src/services/billingRequestWithActionService.ts +++ b/src/services/billingRequestWithActionService.ts @@ -9,16 +9,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; @@ -28,37 +28,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. + // 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. + // 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/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. + // 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 5ea752e..85d4499 100644 --- a/src/services/blockService.ts +++ b/src/services/blockService.ts @@ -9,129 +9,124 @@ 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 cc4c2e3..5256b20 100644 --- a/src/services/creditorBankAccountService.ts +++ b/src/services/creditorBankAccountService.ts @@ -9,89 +9,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 ea7d8d2..7ced3b1 100644 --- a/src/services/creditorService.ts +++ b/src/services/creditorService.ts @@ -9,94 +9,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 059b371..7c7939d 100644 --- a/src/services/currencyExchangeRateService.ts +++ b/src/services/currencyExchangeRateService.ts @@ -9,23 +9,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 fd4349b..48d1d05 100644 --- a/src/services/customerBankAccountService.ts +++ b/src/services/customerBankAccountService.ts @@ -9,92 +9,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 3434173..dfd6289 100644 --- a/src/services/customerService.ts +++ b/src/services/customerService.ts @@ -9,221 +9,221 @@ 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 { - // Boolean indicating whether the customer has any actions required. + // Boolean indicating whether the customer has any actions required. action_required?: Types.CustomerActionRequired; - // 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 8bd2e54..3968a00 100644 --- a/src/services/eventService.ts +++ b/src/services/eventService.ts @@ -9,129 +9,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](#core-endpoints-outbound-payments). 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 55c9536..2ca50df 100644 --- a/src/services/exportService.ts +++ b/src/services/exportService.ts @@ -9,15 +9,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 index 2a58c0b..2357596 100644 --- a/src/services/fundsAvailabilityService.ts +++ b/src/services/fundsAvailabilityService.ts @@ -9,7 +9,7 @@ interface FundsAvailabilityListResponse extends Types.APIResponse { } interface FundsAvailabilityCheckRequest { - // The amount of the payment + // The amount of the payment amount?: string; } diff --git a/src/services/instalmentScheduleService.ts b/src/services/instalmentScheduleService.ts index 6103bc8..0d70633 100644 --- a/src/services/instalmentScheduleService.ts +++ b/src/services/instalmentScheduleService.ts @@ -9,183 +9,181 @@ 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.test.ts b/src/services/institutionService.test.ts new file mode 100644 index 0000000..82ac871 --- /dev/null +++ b/src/services/institutionService.test.ts @@ -0,0 +1,118 @@ +/** + * Tests for InstitutionService + * + * These tests verify that the generated institution service has the correct + * method signatures, particularly for list methods with URI parameters. + */ + +import * as nock from 'nock'; +import gocardless from '../index'; +import { Environments } from '../constants'; + +describe('InstitutionService', () => { + const token = ''; + let client: ReturnType; + + beforeAll(() => { + nock.disableNetConnect(); + }); + + beforeEach(() => { + client = gocardless(token, Environments.Sandbox); + }); + + afterEach(() => { + nock.cleanAll(); + }); + + describe('list_for_billing_request', () => { + test('method signature includes identity parameter', () => { + // Verify the method exists on the service + expect(client.institutions.list_for_billing_request).toBeDefined(); + expect(typeof client.institutions.list_for_billing_request).toBe('function'); + + // Check that the method has the correct number of parameters + // Expected: (identity: string, requestParameters: {...}, customHeaders?: {...}) + expect(client.institutions.list_for_billing_request.length).toBeGreaterThanOrEqual(2); + }); + + test('correctly makes API request with identity in URL', async () => { + const billingRequestId = 'BRQ123'; + const countryCode = 'GB'; + + // Mock the API response + const apiMock = nock('https://api-sandbox.gocardless.com') + .get(`/billing_requests/${billingRequestId}/institutions`) + .query({ country_code: countryCode }) + .reply(200, { + institutions: [ + { + id: 'monzo', + name: 'Monzo', + country_code: 'GB', + }, + ], + }); + + // Call the method with identity parameter + const result = await client.institutions.list_for_billing_request(billingRequestId, { + country_code: countryCode, + }); + + // Verify the request was made correctly + expect(apiMock.isDone()).toBe(true); + expect(result.institutions).toHaveLength(1); + expect(result.institutions[0].id).toBe('monzo'); + }); + + test('throws error when identity is missing', async () => { + // This test ensures TypeScript compilation catches the error + // We can't actually test runtime behavior without TypeScript compilation + // but the type system should prevent this at compile time + + // @ts-expect-error - Testing that missing identity parameter causes type error + const callWithoutIdentity = () => client.institutions.list_for_billing_request({ country_code: 'GB' }); + + // If somehow this gets past TypeScript, it should fail at runtime + expect(() => callWithoutIdentity()).toBeDefined(); + }); + }); + + describe('list', () => { + test('method signature does not include identity parameter', () => { + // The regular list method should NOT have an identity parameter + expect(client.institutions.list).toBeDefined(); + expect(typeof client.institutions.list).toBe('function'); + + // Expected: (requestParameters?: {...}, customHeaders?: {...}) + // Length should be less than list_for_billing_request + expect(client.institutions.list.length).toBeLessThan(client.institutions.list_for_billing_request.length); + }); + + test('correctly makes API request without identity in URL', async () => { + const countryCode = 'GB'; + + // Mock the API response + const apiMock = nock('https://api-sandbox.gocardless.com') + .get('/institutions') + .query({ country_code: countryCode }) + .reply(200, { + institutions: [ + { + id: 'barclays', + name: 'Barclays', + country_code: 'GB', + }, + ], + }); + + // Call the method without identity parameter + const result = await client.institutions.list({ country_code: countryCode }); + + // Verify the request was made correctly + expect(apiMock.isDone()).toBe(true); + expect(result.institutions).toHaveLength(1); + expect(result.institutions[0].id).toBe('barclays'); + }); + }); +}); diff --git a/src/services/institutionService.ts b/src/services/institutionService.ts index b8b90df..2738458 100644 --- a/src/services/institutionService.ts +++ b/src/services/institutionService.ts @@ -9,55 +9,54 @@ 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; } @@ -94,10 +93,11 @@ export class InstitutionService { } public async list_for_billing_request( + identity: string, requestParameters: InstitutionListForBillingRequestRequest, customHeaders: Types.JsonMap = {}, ): Promise { - const urlParameters = []; + const urlParameters = [{ key: 'identity', value: identity }]; const requestParams = { path: '/billing_requests/:identity/institutions', method: 'get', diff --git a/src/services/logoService.ts b/src/services/logoService.ts index 810cced..cbc8e8c 100644 --- a/src/services/logoService.ts +++ b/src/services/logoService.ts @@ -9,7 +9,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 3a1fe19..3d0f8c6 100644 --- a/src/services/mandateImportEntryService.ts +++ b/src/services/mandateImportEntryService.ts @@ -24,40 +24,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 3c738df..92c50a3 100644 --- a/src/services/mandateImportService.ts +++ b/src/services/mandateImportService.ts @@ -12,9 +12,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 076295f..297262e 100644 --- a/src/services/mandatePdfService.ts +++ b/src/services/mandatePdfService.ts @@ -9,142 +9,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 6b93e85..eb152cd 100644 --- a/src/services/mandateService.ts +++ b/src/services/mandateService.ts @@ -9,16 +9,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; @@ -26,106 +26,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 644bcc7..293944e 100644 --- a/src/services/negativeBalanceLimitService.ts +++ b/src/services/negativeBalanceLimitService.ts @@ -9,25 +9,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 a623d9b..6242ed3 100644 --- a/src/services/outboundPaymentService.ts +++ b/src/services/outboundPaymentService.ts @@ -9,132 +9,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 bd8a3a0..7e2fa93 100644 --- a/src/services/payerAuthorisationService.ts +++ b/src/services/payerAuthorisationService.ts @@ -9,30 +9,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 61bd868..faa45a3 100644 --- a/src/services/payerThemeService.ts +++ b/src/services/payerThemeService.ts @@ -9,19 +9,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 bb1733c..f5237b9 100644 --- a/src/services/paymentAccountService.ts +++ b/src/services/paymentAccountService.ts @@ -9,15 +9,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 5eb27ba..03dc575 100644 --- a/src/services/paymentAccountTransactionService.ts +++ b/src/services/paymentAccountTransactionService.ts @@ -9,29 +9,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; } @@ -44,10 +44,11 @@ export class PaymentAccountTransactionService { } public async list( + identity: string, requestParameters: PaymentAccountTransactionListRequest, customHeaders: Types.JsonMap = {}, ): Promise { - const urlParameters = []; + const urlParameters = [{ key: 'identity', value: identity }]; const requestParams = { path: '/payment_accounts/:identity/transactions', method: 'get', @@ -68,12 +69,13 @@ export class PaymentAccountTransactionService { } public async *all( + identity: string, requestParameters: PaymentAccountTransactionListRequest, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; do { - const list = await this.list({ ...requestParameters, after: cursor }, customHeaders); + const list = await this.list(identity, { ...requestParameters, after: cursor }, customHeaders); for (const paymentaccounttransaction of list.payment_account_transactions) { yield paymentaccounttransaction; diff --git a/src/services/paymentService.ts b/src/services/paymentService.ts index 88625a6..6ff882e 100644 --- a/src/services/paymentService.ts +++ b/src/services/paymentService.ts @@ -9,99 +9,98 @@ 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; - // 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).
  • - //
+ // 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.

+ // 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; @@ -111,114 +110,113 @@ 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 3576801..2fd1cf0 100644 --- a/src/services/payoutItemService.ts +++ b/src/services/payoutItemService.ts @@ -9,24 +9,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 c5dc2dc..b2a99a4 100644 --- a/src/services/payoutService.ts +++ b/src/services/payoutService.ts @@ -9,64 +9,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 c916f4e..5907ee8 100644 --- a/src/services/redirectFlowService.ts +++ b/src/services/redirectFlowService.ts @@ -9,57 +9,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 6eb03f3..dc0075b 100644 --- a/src/services/refundService.ts +++ b/src/services/refundService.ts @@ -9,91 +9,90 @@ 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 2fa8d40..4a76bad 100644 --- a/src/services/schemeIdentifierService.ts +++ b/src/services/schemeIdentifierService.ts @@ -12,30 +12,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 ee12ed5..914e93f 100644 --- a/src/services/subscriptionService.ts +++ b/src/services/subscriptionService.ts @@ -9,211 +9,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 2e49670..ec40327 100644 --- a/src/services/taxRateService.ts +++ b/src/services/taxRateService.ts @@ -9,19 +9,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 74cfd9d..11d0a61 100644 --- a/src/services/verificationDetailService.ts +++ b/src/services/verificationDetailService.ts @@ -9,60 +9,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 e7d4d7b..aa17118 100644 --- a/src/services/webhookService.ts +++ b/src/services/webhookService.ts @@ -9,26 +9,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 23b0557..2b83e13 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,30 +219,29 @@ 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; }; @@ -261,103 +260,103 @@ 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; - // 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. + // 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. + // 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 + // Request for a one-off strongly authorised payment payment_request?: BillingRequestPaymentRequest; - // 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. + // 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; }; @@ -431,86 +430,86 @@ export enum BillingRequestPurposeCode { /** 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; }; @@ -533,53 +532,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; }; @@ -598,7 +597,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; // @@ -638,107 +637,104 @@ 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; }; @@ -750,170 +746,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; }; @@ -925,65 +921,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; }; @@ -1007,8 +1003,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; }; @@ -1022,54 +1018,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; }; @@ -1080,119 +1076,118 @@ 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; }; @@ -1203,138 +1198,137 @@ 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; }; @@ -1347,8 +1341,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; }; @@ -1370,121 +1364,120 @@ 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, for example if the customer searches for a bank that doesn't - // exist or isn't supported on the scheme. + // 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; }; @@ -1495,161 +1488,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; }; @@ -1662,65 +1655,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; }; @@ -1739,35 +1732,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; // @@ -1779,7 +1772,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; // @@ -1788,58 +1781,57 @@ 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; }; @@ -1859,219 +1851,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; }; @@ -2083,65 +2075,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; }; @@ -2181,60 +2173,60 @@ export enum BillingRequestWithActionPaymentContextCode { /** 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; }; @@ -2303,67 +2295,67 @@ export enum BillingRequestWithActionPurposeCode { /** 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; }; @@ -2374,114 +2366,114 @@ 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; - // 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. + // 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. + // 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 + // Request for a one-off strongly authorised payment payment_request?: BillingRequestWithActionBillingRequestsPaymentRequest; - // 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. + // 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; }; @@ -2555,86 +2547,86 @@ export enum BillingRequestWithActionBillingRequestsPurposeCode { /** 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; }; @@ -2657,53 +2649,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; }; @@ -2722,7 +2714,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; // @@ -2762,107 +2754,104 @@ 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; }; @@ -2874,170 +2863,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; }; @@ -3049,65 +3038,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; }; @@ -3131,8 +3120,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; }; @@ -3146,54 +3135,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; }; @@ -3204,119 +3193,118 @@ 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; }; @@ -3327,138 +3315,137 @@ 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; }; @@ -3471,8 +3458,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; }; @@ -3494,54 +3481,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; }; @@ -3566,112 +3553,111 @@ 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; }; @@ -3685,36 +3671,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; }; @@ -3731,104 +3717,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; }; @@ -3871,53 +3857,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; }; @@ -3928,15 +3914,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; }; @@ -3949,96 +3935,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; }; @@ -4071,56 +4057,55 @@ 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; }; @@ -4131,57 +4116,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; }; @@ -4191,22 +4176,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; }; @@ -4223,65 +4208,64 @@ 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; }; @@ -4302,81 +4286,78 @@ 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; }; @@ -4404,97 +4385,96 @@ 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 `resource_type` is `outbound_payments`, this is the ID of the - // outbound_payment which has been updated. + // 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. + // 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; }; @@ -4517,10 +4497,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; }; @@ -4533,20 +4513,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; }; @@ -4578,64 +4558,64 @@ export enum ExportExportType { /** Type for a fundsavailability resource. */ export type FundsAvailability = { - // Indicates if the amount is available + // 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; }; @@ -4652,52 +4632,51 @@ 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; }; @@ -4709,21 +4688,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[]; }; @@ -4738,33 +4717,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; }; @@ -4782,15 +4761,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; }; @@ -4802,114 +4781,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; }; @@ -4921,36 +4900,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; }; @@ -4977,18 +4956,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; }; @@ -5007,41 +4986,41 @@ 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; }; @@ -5060,7 +5039,7 @@ export enum MandateImportScheme { /** Type for a mandateimportlinks resource. */ export type MandateImportLinks = { - // ID of the associated creditor. + // ID of the associated creditor. creditor?: string; }; @@ -5074,85 +5053,83 @@ 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; }; @@ -5163,109 +5140,109 @@ 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 = { - // 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?: 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. + // 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; }; @@ -5282,34 +5259,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; }; @@ -5320,13 +5297,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; }; @@ -5338,19 +5315,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. @@ -5370,91 +5347,90 @@ 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; }; @@ -5464,7 +5440,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; }; @@ -5484,45 +5460,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; }; @@ -5539,101 +5515,99 @@ 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; }; @@ -5644,118 +5618,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; }; @@ -5782,117 +5756,116 @@ 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; }; @@ -5909,8 +5882,8 @@ 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; }; @@ -5921,20 +5894,20 @@ export enum PaymentPsuInteractionType { /** 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; }; @@ -5962,26 +5935,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; }; @@ -5998,55 +5971,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. @@ -6055,47 +6028,46 @@ 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; }; @@ -6110,91 +6082,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; }; @@ -6222,26 +6194,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; }; @@ -6258,66 +6230,65 @@ 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; }; @@ -6329,58 +6300,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; }; @@ -6410,73 +6381,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; }; @@ -6487,53 +6458,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; }; @@ -6550,105 +6521,104 @@ 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; }; @@ -6659,26 +6629,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; }; @@ -6695,12 +6665,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; }; @@ -6716,218 +6686,217 @@ 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. 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.
  • - //
+ // 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; }; @@ -7030,124 +6999,121 @@ 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[]; }; @@ -7159,8 +7125,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; }; @@ -7181,8 +7147,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; }; @@ -7197,175 +7163,174 @@ 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; };