diff --git a/Makefile b/Makefile deleted file mode 100644 index 69635bb1..00000000 --- a/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -docker-test: - docker run --rm -ti -v `pwd`:/opt/pypkg hmarr/python-test-tox diff --git a/gocardless_pro/resources/customer_bank_account.py b/gocardless_pro/resources/customer_bank_account.py index 6e7c400b..a3c0a4e0 100644 --- a/gocardless_pro/resources/customer_bank_account.py +++ b/gocardless_pro/resources/customer_bank_account.py @@ -76,6 +76,11 @@ def metadata(self): return self.attributes.get('metadata') + @property + def payer_name_verification_result(self): + return self.attributes.get('payer_name_verification_result') + + @property def trusted_recipient(self): return self.attributes.get('trusted_recipient') @@ -119,3 +124,5 @@ def customer(self): + + diff --git a/gocardless_pro/resources/verification_detail.py b/gocardless_pro/resources/verification_detail.py index 2e73a9ae..fc997364 100644 --- a/gocardless_pro/resources/verification_detail.py +++ b/gocardless_pro/resources/verification_detail.py @@ -41,6 +41,11 @@ def company_number(self): return self.attributes.get('company_number') + @property + def country_code(self): + return self.attributes.get('country_code') + + @property def description(self): return self.attributes.get('description') @@ -66,6 +71,13 @@ def postal_code(self): return self.attributes.get('postal_code') + @property + def region(self): + return self.attributes.get('region') + + + + @@ -98,3 +110,5 @@ def creditor(self): + + diff --git a/gocardless_pro/services/balances_service.py b/gocardless_pro/services/balances_service.py index 27805ccf..4583adcd 100644 --- a/gocardless_pro/services/balances_service.py +++ b/gocardless_pro/services/balances_service.py @@ -20,9 +20,10 @@ class BalancesService(base_service.BaseService): def list(self,params=None, headers=None): """List balances. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of - balances for a given creditor. This endpoint is rate limited to 60 - requests per minute. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of balances for a given creditor. This endpoint is rate limited to + 60 requests per minute. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/bank_account_details_service.py b/gocardless_pro/services/bank_account_details_service.py index 41bfcc95..f2f8c9a7 100644 --- a/gocardless_pro/services/bank_account_details_service.py +++ b/gocardless_pro/services/bank_account_details_service.py @@ -24,8 +24,8 @@ def get(self,identity,params=None, headers=None): format described in RFC 7516. You must specify a `Gc-Key-Id` header when using this endpoint. See - [Public Key - Setup](https://developer.gocardless.com/gc-embed/bank-details-access#public_key_setup) + Public Key Setup + (https://developer.gocardless.com/gc-embed/bank-details-access#public_key_setup) for more details. Args: diff --git a/gocardless_pro/services/bank_details_lookups_service.py b/gocardless_pro/services/bank_details_lookups_service.py index 59feb1e1..6e759bf5 100644 --- a/gocardless_pro/services/bank_details_lookups_service.py +++ b/gocardless_pro/services/bank_details_lookups_service.py @@ -30,18 +30,20 @@ def create(self,params=None, headers=None): account number match the details held by the relevant bank. - If your request returns an [error](#api-usage-errors) or the - `available_debit_schemes` + If your request returns an error + (https://developer.gocardless.com/api-reference/#api-usage-errors) or + the `available_debit_schemes` attribute is an empty array, you will not be able to collect payments from the specified bank account. GoCardless may be able to collect payments from an account even if no `bic` is returned. - Bank account details may be supplied using [local - details](#appendix-local-bank-details) or an IBAN. + Bank account details may be supplied using local details + (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) + or an IBAN. - _ACH scheme_ For compliance reasons, an extra validation step is done + ACH scheme For compliance reasons, an extra validation step is done using a third-party provider to make sure the customer's bank account can accept @@ -50,8 +52,8 @@ def create(self,params=None, headers=None): customer is requested to adjust the account number/routing number and succeed in this check to continue with the flow. - _Note:_ Usage of this endpoint is monitored. If your organisation - relies on GoCardless for + Note: Usage of this endpoint is monitored. If your organisation relies + on GoCardless for modulus or reachability checking but not for payment collection, please get in touch. diff --git a/gocardless_pro/services/billing_request_templates_service.py b/gocardless_pro/services/billing_request_templates_service.py index 31aa8272..56ff3f8b 100644 --- a/gocardless_pro/services/billing_request_templates_service.py +++ b/gocardless_pro/services/billing_request_templates_service.py @@ -20,8 +20,9 @@ class BillingRequestTemplatesService(base_service.BaseService): def list(self,params=None, headers=None): """List Billing Request Templates. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your - Billing Request Templates. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of your Billing Request Templates. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/billing_requests_service.py b/gocardless_pro/services/billing_requests_service.py index b9894223..a0a308d3 100644 --- a/gocardless_pro/services/billing_requests_service.py +++ b/gocardless_pro/services/billing_requests_service.py @@ -20,9 +20,9 @@ class BillingRequestsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a Billing Request. -
Important: All properties associated - with `subscription_request` and `instalment_schedule_request` are only - supported for ACH and PAD schemes.
+ Important: All properties associated with `subscription_request` and + `instalment_schedule_request` are only supported for ACH and PAD + schemes. Args: params (dict, optional): Request body. @@ -50,8 +50,7 @@ def create(self,params=None, headers=None): def collect_customer_details(self,identity,params=None, headers=None): """Collect customer details. - If the billing request has a pending -collect_customer_details
+ If the billing request has a pending collect_customer_details
action, this endpoint can be used to collect the details in order to
complete it.
@@ -85,7 +84,7 @@ def collect_bank_account(self,identity,params=None, headers=None):
"""Collect bank account details.
If the billing request has a pending
- collect_bank_account action, this endpoint can be
+ collect_bank_account action, this endpoint can be
used to collect the details in order to complete it.
The endpoint takes the same payload as Customer Bank Accounts, but
@@ -98,7 +97,7 @@ def collect_bank_account(self,identity,params=None, headers=None):
included in the payload along with the
country_code.
- _ACH scheme_ For compliance reasons, an extra validation step is done
+ ACH scheme For compliance reasons, an extra validation step is done
using
a third-party provider to make sure the customer's bank account can
accept
@@ -107,8 +106,8 @@ def collect_bank_account(self,identity,params=None, headers=None):
customer is requested to adjust the account number/routing number and
succeed in this check to continue with the flow.
- _BACS scheme_ [Payer Name
- Verification](https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB)
+ BACS scheme Payer Name Verification
+ (https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB)
is enabled by default for UK based bank accounts, meaning we verify the
account holder name and bank account
number match the details held by the relevant bank.
@@ -214,8 +213,9 @@ def cancel(self,identity,params=None, headers=None):
def list(self,params=None, headers=None):
"""List Billing Requests.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- billing requests.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your billing requests.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/blocks_service.py b/gocardless_pro/services/blocks_service.py
index a11d38b5..d25fd918 100644
--- a/gocardless_pro/services/blocks_service.py
+++ b/gocardless_pro/services/blocks_service.py
@@ -71,8 +71,9 @@ def get(self,identity,params=None, headers=None):
def list(self,params=None, headers=None):
"""List multiple blocks.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- blocks.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your blocks.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/creditor_bank_accounts_service.py b/gocardless_pro/services/creditor_bank_accounts_service.py
index f66582af..6aad781f 100644
--- a/gocardless_pro/services/creditor_bank_accounts_service.py
+++ b/gocardless_pro/services/creditor_bank_accounts_service.py
@@ -48,8 +48,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List creditor bank accounts.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- creditor bank accounts.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your creditor bank accounts.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/creditors_service.py b/gocardless_pro/services/creditors_service.py
index 68d3896b..467dde6a 100644
--- a/gocardless_pro/services/creditors_service.py
+++ b/gocardless_pro/services/creditors_service.py
@@ -48,8 +48,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List creditors.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- creditors.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your creditors.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/currency_exchange_rates_service.py b/gocardless_pro/services/currency_exchange_rates_service.py
index 36d0d7b0..75899546 100644
--- a/gocardless_pro/services/currency_exchange_rates_service.py
+++ b/gocardless_pro/services/currency_exchange_rates_service.py
@@ -20,8 +20,9 @@ class CurrencyExchangeRatesService(base_service.BaseService):
def list(self,params=None, headers=None):
"""List exchange rates.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all
- exchange rates.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of all exchange rates.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/customer_bank_accounts_service.py b/gocardless_pro/services/customer_bank_accounts_service.py
index f2d1e7ba..f3872c08 100644
--- a/gocardless_pro/services/customer_bank_accounts_service.py
+++ b/gocardless_pro/services/customer_bank_accounts_service.py
@@ -24,15 +24,18 @@ def create(self,params=None, headers=None):
There are three different ways to supply bank account details:
- - [Local details](#appendix-local-bank-details)
-
- - IBAN
-
- - [Customer Bank Account
- Tokens](#javascript-flow-create-a-customer-bank-account-token)
+ -
+ Local details
+ (https://developer.gocardless.com/api-reference/#appendix-local-bank-details)
+ -
+ IBAN
+ -
+ Customer Bank Account Tokens
+ (https://developer.gocardless.com/api-reference/#javascript-flow-create-a-customer-bank-account-token)
For more information on the different fields required in each country,
- see [local bank details](#appendix-local-bank-details).
+ see local bank details
+ (https://developer.gocardless.com/api-reference/#appendix-local-bank-details).
Args:
params (dict, optional): Request body.
@@ -60,8 +63,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List customer bank accounts.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- bank accounts.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your bank accounts.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/customer_notifications_service.py b/gocardless_pro/services/customer_notifications_service.py
index fe0213ae..7144db1f 100644
--- a/gocardless_pro/services/customer_notifications_service.py
+++ b/gocardless_pro/services/customer_notifications_service.py
@@ -28,7 +28,6 @@ def handle(self,identity,params=None, headers=None):
this endpoint will return an `already_actioned` error and you should
not take
further action. This endpoint takes no additional parameters.
-
Args:
identity (string): The id of the notification.
diff --git a/gocardless_pro/services/customers_service.py b/gocardless_pro/services/customers_service.py
index 50c7f7bc..a6f883ec 100644
--- a/gocardless_pro/services/customers_service.py
+++ b/gocardless_pro/services/customers_service.py
@@ -48,8 +48,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List customers.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- customers.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your customers.
Args:
params (dict, optional): Query string parameters.
@@ -130,8 +131,8 @@ def remove(self,identity,params=None, headers=None):
removed customer by
ID.
- The action of removing a customer - cannot be reversed, so please use with care.
+ The action of removing a customer cannot be reversed, so please use + with care. Args: identity (string): Unique identifier, beginning with "CU". diff --git a/gocardless_pro/services/events_service.py b/gocardless_pro/services/events_service.py index a136a990..f8068f46 100644 --- a/gocardless_pro/services/events_service.py +++ b/gocardless_pro/services/events_service.py @@ -20,8 +20,14 @@ class EventsService(base_service.BaseService): def list(self,params=None, headers=None): """List events. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your - events. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of your events. + + Important: This endpoint will no longer return events older than 18 + months, including when filtering by resource. This takes effect no + sooner than 1 August 2026 in sandbox environments, and no sooner than 1 + October 2026 in live environments. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/instalment_schedules_service.py b/gocardless_pro/services/instalment_schedules_service.py index d2025c9f..92924d34 100644 --- a/gocardless_pro/services/instalment_schedules_service.py +++ b/gocardless_pro/services/instalment_schedules_service.py @@ -24,8 +24,8 @@ def create_with_dates(self,params=None, headers=None): payments. This API is recommended if you know the specific dates you wish to charge. Otherwise, - please check out the [scheduling - version](#instalment-schedules-create-with-schedule). + please check out the scheduling version + (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule). The `instalments` property is an array of payment properties (`amount` and @@ -71,8 +71,9 @@ def create_with_schedule(self,params=None, headers=None): payments. This API is recommended if you wish to use the GoCardless scheduling logic. For finer - control over the individual dates, please check out the [alternative - version](#instalment-schedules-create-with-dates). + control over the individual dates, please check out the alternative + version + (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates). It can take quite a while to create the associated payments, so the API will return @@ -110,8 +111,9 @@ def create_with_schedule(self,params=None, headers=None): def list(self,params=None, headers=None): """List instalment schedules. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your - instalment schedules. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of your instalment schedules. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/logos_service.py b/gocardless_pro/services/logos_service.py index b8de6331..125d296a 100644 --- a/gocardless_pro/services/logos_service.py +++ b/gocardless_pro/services/logos_service.py @@ -27,7 +27,8 @@ def create_for_creditor(self,params=None, headers=None): of 300px by 40px. For more guidance on how to upload logos that will look great across your customer payment page and notification emails see - [here](https://developer.gocardless.com/gc-embed/setting-up-branding#tips_for_uploading_your_logo). + here + (https://developer.gocardless.com/gc-embed/setting-up-branding#tips_for_uploading_your_logo). Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/mandate_import_entries_service.py b/gocardless_pro/services/mandate_import_entries_service.py index f4aa8abb..db74ed3f 100644 --- a/gocardless_pro/services/mandate_import_entries_service.py +++ b/gocardless_pro/services/mandate_import_entries_service.py @@ -20,8 +20,9 @@ class MandateImportEntriesService(base_service.BaseService): def create(self,params=None, headers=None): """Add a mandate import entry. - For an existing [mandate import](#core-endpoints-mandate-imports), this - endpoint can + For an existing mandate import + (https://developer.gocardless.com/api-reference/#core-endpoints-mandate-imports), + this endpoint can be used to add individual mandates to be imported into GoCardless. You can add no more than 30,000 rows to a single mandate import. @@ -55,7 +56,6 @@ def list(self,params=None, headers=None): in your system (using the `record_identifier` that you provided when creating the mandate import). - Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/mandate_imports_service.py b/gocardless_pro/services/mandate_imports_service.py index c10a50b6..53cb0cb5 100644 --- a/gocardless_pro/services/mandate_imports_service.py +++ b/gocardless_pro/services/mandate_imports_service.py @@ -25,7 +25,9 @@ def create(self,params=None, headers=None): this endpoint merely signals the start of the import process. Once you've finished adding entries to an import, you should - [submit](#mandate-imports-submit-a-mandate-import) it. + submit + (https://developer.gocardless.com/api-reference/#mandate-imports-submit-a-mandate-import) + it. Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/mandate_pdfs_service.py b/gocardless_pro/services/mandate_pdfs_service.py index 07a9e0e4..75aace89 100644 --- a/gocardless_pro/services/mandate_pdfs_service.py +++ b/gocardless_pro/services/mandate_pdfs_service.py @@ -24,13 +24,14 @@ def create(self,params=None, headers=None): Customer and bank account details can be left blank (for a blank mandate), provided manually, or inferred from the ID of an existing - [mandate](#core-endpoints-mandates). + mandate + (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). By default, we'll generate PDF mandates in English. To generate a PDF mandate in another language, set the `Accept-Language` header when creating the PDF mandate to the relevant - [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) + ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code supported for the scheme. | Scheme | Supported languages diff --git a/gocardless_pro/services/mandates_service.py b/gocardless_pro/services/mandates_service.py index b2cf35c1..ac786f25 100644 --- a/gocardless_pro/services/mandates_service.py +++ b/gocardless_pro/services/mandates_service.py @@ -48,8 +48,9 @@ def create(self,params=None, headers=None): def list(self,params=None, headers=None): """List mandates. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your - mandates. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of your mandates. Args: params (dict, optional): Query string parameters. @@ -152,13 +153,13 @@ def cancel(self,identity,params=None, headers=None): def reinstate(self,identity,params=None, headers=None): """Reinstate a mandate. - Reinstates a cancelled or expired - mandate to the banks. You will receive a `resubmission_requested` - webhook, but after that reinstating the mandate follows the same - process as its initial creation, so you will receive a `submitted` - webhook, followed by a `reinstated` or `failed` webhook up to two - working days later. Any metadata supplied to this endpoint will be - stored on the `resubmission_requested` event it causes. + Reinstates a cancelled or expired mandate to the banks. You will + receive a `resubmission_requested` webhook, but after that reinstating + the mandate follows the same process as its initial creation, so you + will receive a `submitted` webhook, followed by a `reinstated` or + `failed` webhook up to two working days later. Any metadata supplied to + this endpoint will be stored on the `resubmission_requested` event it + causes. This will fail with a `mandate_not_inactive` error if the mandate is already being submitted, or is active. diff --git a/gocardless_pro/services/negative_balance_limits_service.py b/gocardless_pro/services/negative_balance_limits_service.py index c81fda81..0c925e3a 100644 --- a/gocardless_pro/services/negative_balance_limits_service.py +++ b/gocardless_pro/services/negative_balance_limits_service.py @@ -20,8 +20,9 @@ class NegativeBalanceLimitsService(base_service.BaseService): def list(self,params=None, headers=None): """List negative balance limits. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of - negative balance limits. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of negative balance limits. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/outbound_payment_import_entries_service.py b/gocardless_pro/services/outbound_payment_import_entries_service.py index c14fa3f8..4060f90c 100644 --- a/gocardless_pro/services/outbound_payment_import_entries_service.py +++ b/gocardless_pro/services/outbound_payment_import_entries_service.py @@ -20,8 +20,9 @@ class OutboundPaymentImportEntriesService(base_service.BaseService): def list(self,params=None, headers=None): """List outbound payment import entries. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of the - entries for a given outbound payment import. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of the entries for a given outbound payment import. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/outbound_payment_imports_service.py b/gocardless_pro/services/outbound_payment_imports_service.py index 377df1c7..15e2e056 100644 --- a/gocardless_pro/services/outbound_payment_imports_service.py +++ b/gocardless_pro/services/outbound_payment_imports_service.py @@ -71,8 +71,9 @@ def get(self,identity,params=None, headers=None): def list(self,params=None, headers=None): """List outbound payment imports. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your - outbound payment imports. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of your outbound payment imports. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/outbound_payments_service.py b/gocardless_pro/services/outbound_payments_service.py index f3d07a9d..5b13179d 100644 --- a/gocardless_pro/services/outbound_payments_service.py +++ b/gocardless_pro/services/outbound_payments_service.py @@ -145,8 +145,9 @@ def get(self,identity,params=None, headers=None): def list(self,params=None, headers=None): """List outbound payments. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of - outbound payments. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of outbound payments. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/payer_authorisations_service.py b/gocardless_pro/services/payer_authorisations_service.py index 4369f064..226f520d 100644 --- a/gocardless_pro/services/payer_authorisations_service.py +++ b/gocardless_pro/services/payer_authorisations_service.py @@ -83,9 +83,9 @@ def update(self,identity,params=None, headers=None): incomplete_fields means that the resource is valid. This endpoint has been designed this way so you do not need to save any payer data on your servers or the browser while still being able to implement a - progressive solution, such a multi-step form.Note - that in order to update the `metadata` attribute values it must be sent - completely as it overrides the previously existing values.
+ progressive solution, such a multi-step form. Note that in order to + update the `metadata` attribute values it must be sent completely as it + overrides the previously existing values. Args: identity (string): Unique identifier, beginning with "PA". @@ -143,13 +143,11 @@ def confirm(self,identity,params=None, headers=None): A Payer Authorisation cannot be confirmed if it hasn't been submitted yet. -The main use of the confirm endpoint is to enable integrators to acknowledge the end of the setup process. - They might want to make the payers go through some other steps after + They might want to make the payers go through some other steps after they go through our flow or make them go through the necessary verification mechanism (upcoming feature). -
Args: identity (string): Unique identifier, beginning with "PA". diff --git a/gocardless_pro/services/payment_accounts_service.py b/gocardless_pro/services/payment_accounts_service.py index ecf7c4c7..a2d6924e 100644 --- a/gocardless_pro/services/payment_accounts_service.py +++ b/gocardless_pro/services/payment_accounts_service.py @@ -43,8 +43,9 @@ def get(self,identity,params=None, headers=None): def list(self,params=None, headers=None): """List payment accounts. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your - payment accounts. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of your payment accounts. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/payments_service.py b/gocardless_pro/services/payments_service.py index db581d1c..3553c465 100644 --- a/gocardless_pro/services/payments_service.py +++ b/gocardless_pro/services/payments_service.py @@ -20,13 +20,13 @@ class PaymentsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a payment. - Creates a new payment object. + Creates a new payment object. - This fails with a `mandate_is_inactive` error if the linked - [mandate](#core-endpoints-mandates) is cancelled or has failed. - Payments can be created against mandates with status of: - `pending_customer_approval`, `pending_submission`, `submitted`, and - `active`. + This fails with a `mandate_is_inactive` error if the linked mandate + (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) + is cancelled or has failed. Payments can be created against mandates + with status of: `pending_customer_approval`, `pending_submission`, + `submitted`, and `active`. Args: params (dict, optional): Request body. @@ -54,8 +54,9 @@ def create(self,params=None, headers=None): def list(self,params=None, headers=None): """List payments. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your - payments. + Returns a cursor-paginated + (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) + list of your payments. Args: params (dict, optional): Query string parameters. @@ -158,12 +159,12 @@ def cancel(self,identity,params=None, headers=None): def retry(self,identity,params=None, headers=None): """Retry a payment. - Retries a failed payment if the underlying - mandate is active. You will receive a `resubmission_requested` webhook, - but after that retrying the payment follows the same process as its - initial creation, so you will receive a `submitted` webhook, followed - by a `confirmed` or `failed` event. Any metadata supplied to this - endpoint will be stored against the payment submission event it causes. + Retries a failed payment if the underlying mandate is active. You will + receive a `resubmission_requested` webhook, but after that retrying the + payment follows the same process as its initial creation, so you will + receive a `submitted` webhook, followed by a `confirmed` or `failed` + event. Any metadata supplied to this endpoint will be stored against + the payment submission event it causes. This will return a `retry_failed` error if the payment has not failed. diff --git a/gocardless_pro/services/payout_items_service.py b/gocardless_pro/services/payout_items_service.py index a7b714fa..121d7bf2 100644 --- a/gocardless_pro/services/payout_items_service.py +++ b/gocardless_pro/services/payout_items_service.py @@ -20,13 +20,12 @@ class PayoutItemsService(base_service.BaseService): def list(self,params=None, headers=None): """Get all payout items in a single payout. - Returns a [cursor-paginated](#api-usage-cursor-pagination) list of - items in the payout. - - This endpoint only serves requests for payouts created in the - last 6 months. Requests for older payouts will return an HTTP status -410 Gone.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of items in the payout.
+ This endpoint only serves requests for payouts created in the last 6
+ months. Requests for older payouts will return an HTTP status 410 Gone.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/payouts_service.py b/gocardless_pro/services/payouts_service.py
index 443d0758..e9e00be0 100644
--- a/gocardless_pro/services/payouts_service.py
+++ b/gocardless_pro/services/payouts_service.py
@@ -20,8 +20,9 @@ class PayoutsService(base_service.BaseService):
def list(self,params=None, headers=None):
"""List payouts.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- payouts.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your payouts.
Args:
params (dict, optional): Query string parameters.
@@ -48,8 +49,8 @@ def get(self,identity,params=None, headers=None):
"""Get a single payout.
Retrieves the details of a single payout. For an example of how to
- reconcile the transactions in a payout, see [this
- guide](#events-reconciling-payouts-with-events).
+ reconcile the transactions in a payout, see this guide
+ (https://developer.gocardless.com/api-reference/#events-reconciling-payouts-with-events).
Args:
identity (string): Unique identifier, beginning with "PO".
diff --git a/gocardless_pro/services/redirect_flows_service.py b/gocardless_pro/services/redirect_flows_service.py
index 75dfcc9a..992e3d5f 100644
--- a/gocardless_pro/services/redirect_flows_service.py
+++ b/gocardless_pro/services/redirect_flows_service.py
@@ -72,10 +72,14 @@ def get(self,identity,params=None, headers=None):
def complete(self,identity,params=None, headers=None):
"""Complete a redirect flow.
- This creates a [customer](#core-endpoints-customers), [customer bank
- account](#core-endpoints-customer-bank-accounts), and
- [mandate](#core-endpoints-mandates) using the details supplied by your
- customer and returns the ID of the created mandate.
+ This creates a customer
+ (https://developer.gocardless.com/api-reference/#core-endpoints-customers),
+ customer bank account
+ (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts),
+ and mandate
+ (https://developer.gocardless.com/api-reference/#core-endpoints-mandates)
+ using the details supplied by your customer and returns the ID of the
+ created mandate.
This will return a `redirect_flow_incomplete` error if your customer
has not yet been redirected back to your site, and a
diff --git a/gocardless_pro/services/refunds_service.py b/gocardless_pro/services/refunds_service.py
index 852ef4e5..e280811f 100644
--- a/gocardless_pro/services/refunds_service.py
+++ b/gocardless_pro/services/refunds_service.py
@@ -22,19 +22,17 @@ def create(self,params=None, headers=None):
Creates a new refund object.
- This fails with:
+ This fails with:
- - `total_amount_confirmation_invalid` if the confirmation amount
- doesn't match the total amount refunded for the payment. This safeguard
- is there to prevent two processes from creating refunds without
- awareness of each other.
-
- - `available_refund_amount_insufficient` if the creditor does not have
+ -
+ `total_amount_confirmation_invalid` if the confirmation amount doesn't
+ match the total amount refunded for the payment. This safeguard is
+ there to prevent two processes from creating refunds without awareness
+ of each other.
+ -
+ `available_refund_amount_insufficient` if the creditor does not have
sufficient balance for refunds available to cover the cost of the
requested refund.
-
Args:
params (dict, optional): Request body.
@@ -62,8 +60,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List refunds.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- refunds.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your refunds.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/scheme_identifiers_service.py b/gocardless_pro/services/scheme_identifiers_service.py
index 7b555554..67425d3d 100644
--- a/gocardless_pro/services/scheme_identifiers_service.py
+++ b/gocardless_pro/services/scheme_identifiers_service.py
@@ -30,7 +30,7 @@ def create(self,params=None, headers=None):
to become active. On other schemes, including SEPA,
this happens instantly.
- #### Scheme identifier name validations
+ Scheme identifier name validations
The `name` field of a scheme identifier can contain alphanumeric
characters, spaces and
@@ -39,8 +39,8 @@ def create(self,params=None, headers=None):
Its maximum length and the special characters it supports depend on the
scheme:
- | __scheme__ | __maximum length__ | __special characters
- allowed__ |
+ | scheme | maximum length | special characters allowed
+ |
| :---------------- | :----------------- |
:-------------------------------------------------- |
| `bacs` | 18 characters | `/` `.` `&` `-`
@@ -59,7 +59,6 @@ def create(self,params=None, headers=None):
You should ensure that the name you set matches the legal name or the
trading name of
the creditor, otherwise, there is an increased risk of chargeback.
-
Args:
params (dict, optional): Request body.
@@ -87,8 +86,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List scheme identifiers.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- scheme identifiers.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your scheme identifiers.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/subscriptions_service.py b/gocardless_pro/services/subscriptions_service.py
index ba5774e9..c66b1cd0 100644
--- a/gocardless_pro/services/subscriptions_service.py
+++ b/gocardless_pro/services/subscriptions_service.py
@@ -48,10 +48,11 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List subscriptions.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- subscriptions. Please note if the subscriptions are related to
- customers who have been removed, they will not be shown in the
- response.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your subscriptions. Please note if the subscriptions are
+ related to customers who have been removed, they will not be shown in
+ the response.
Args:
params (dict, optional): Query string parameters.
@@ -104,29 +105,29 @@ def update(self,identity,params=None, headers=None):
This fails with:
- - `validation_failed` if invalid data is provided when attempting to
+ -
+ `validation_failed` if invalid data is provided when attempting to
update a subscription.
-
- - `subscription_not_active` if the subscription is no longer active.
-
- - `subscription_already_ended` if the subscription has taken all
+ -
+ `subscription_not_active` if the subscription is no longer active.
+ -
+ `subscription_already_ended` if the subscription has taken all
payments.
-
- - `mandate_payments_require_approval` if the amount is being changed
- and the mandate requires approval.
-
- - `number_of_subscription_amendments_exceeded` error if the
- subscription amount has already been changed 10 times.
-
- - `forbidden` if the amount is being changed, and the subscription was
+ -
+ `mandate_payments_require_approval` if the amount is being changed and
+ the mandate requires approval.
+ -
+ `number_of_subscription_amendments_exceeded` error if the subscription
+ amount has already been changed 10 times.
+ -
+ `forbidden` if the amount is being changed, and the subscription was
created by an app and you are not authenticated as that app, or if the
subscription was not created by an app and you are authenticated as an
app
-
- - `resource_created_by_another_app` if the app fee is being changed,
- and the subscription was created by an app other than the app you are
+ -
+ `resource_created_by_another_app` if the app fee is being changed, and
+ the subscription was created by an app other than the app you are
authenticated as
-
Args:
identity (string): Unique identifier, beginning with "SB".
@@ -160,7 +161,9 @@ def pause(self,identity,params=None, headers=None):
the subscription is already paused for a number of cycles.
When `pause_cycles` is omitted the subscription is paused until the
- [resume endpoint](#subscriptions-resume-a-subscription) is called.
+ resume endpoint
+ (https://developer.gocardless.com/api-reference/#subscriptions-resume-a-subscription)
+ is called.
If the subscription is collecting a fixed number of payments,
`end_date` will be set to `null`.
When paused indefinitely, `upcoming_payments` will be empty.
@@ -174,23 +177,24 @@ def pause(self,identity,params=None, headers=None):
This fails with:
- - `forbidden` if the subscription was created by an app and you are not
+ -
+ `forbidden` if the subscription was created by an app and you are not
authenticated as that app, or if the subscription was not created by an
app and you are authenticated as an app
-
- - `validation_failed` if invalid data is provided when attempting to
+ -
+ `validation_failed` if invalid data is provided when attempting to
pause a subscription.
-
- - `subscription_paused_cannot_update_cycles` if the subscription is
+ -
+ `subscription_paused_cannot_update_cycles` if the subscription is
already paused for a number of cycles and the request provides a value
for `pause_cycle`.
-
- - `subscription_cannot_be_paused` if the subscription cannot be paused.
-
- - `subscription_already_ended` if the subscription has taken all
+ -
+ `subscription_cannot_be_paused` if the subscription cannot be paused.
+ -
+ `subscription_already_ended` if the subscription has taken all
payments.
-
- - `pause_cycles_must_be_greater_than_or_equal_to` if the provided value
+ -
+ `pause_cycles_must_be_greater_than_or_equal_to` if the provided value
for `pause_cycles` cannot be satisfied.
Args:
@@ -223,15 +227,15 @@ def resume(self,identity,params=None, headers=None):
This fails with:
- - `forbidden` if the subscription was created by an app and you are not
+ -
+ `forbidden` if the subscription was created by an app and you are not
authenticated as that app, or if the subscription was not created by an
app and you are authenticated as an app
-
- - `validation_failed` if invalid data is provided when attempting to
+ -
+ `validation_failed` if invalid data is provided when attempting to
resume a subscription.
-
- - `subscription_not_paused` if the subscription is not paused.
-
+ -
+ `subscription_not_paused` if the subscription is not paused.
Args:
identity (string): Unique identifier, beginning with "SB".
diff --git a/gocardless_pro/services/tax_rates_service.py b/gocardless_pro/services/tax_rates_service.py
index 877ea07a..a014b143 100644
--- a/gocardless_pro/services/tax_rates_service.py
+++ b/gocardless_pro/services/tax_rates_service.py
@@ -20,8 +20,9 @@ class TaxRatesService(base_service.BaseService):
def list(self,params=None, headers=None):
"""List tax rates.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all
- tax rates.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of all tax rates.
Args:
params (dict, optional): Query string parameters.
diff --git a/gocardless_pro/services/webhooks_service.py b/gocardless_pro/services/webhooks_service.py
index a5e0a4e9..30f9841d 100644
--- a/gocardless_pro/services/webhooks_service.py
+++ b/gocardless_pro/services/webhooks_service.py
@@ -20,8 +20,9 @@ class WebhooksService(base_service.BaseService):
def list(self,params=None, headers=None):
"""List webhooks.
- Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
- webhooks.
+ Returns a cursor-paginated
+ (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
+ list of your webhooks.
Args:
params (dict, optional): Query string parameters.
diff --git a/tests/fixtures/billing_request_templates.json b/tests/fixtures/billing_request_templates.json
index acc182eb..3b804705 100644
--- a/tests/fixtures/billing_request_templates.json
+++ b/tests/fixtures/billing_request_templates.json
@@ -5,24 +5,24 @@
"method": "GET",
"path_template": "/billing_request_templates",
"url_params": [],
- "body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 101","max_amount_per_payment":101,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"week"}],"start_date":"example start_date 101"},"mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 102","max_amount_per_payment":102,"payment_method":"example payment_method 102","periodic_limits":[{"alignment":"calendar","max_payments":102,"max_total_amount":102,"period":"month"}],"start_date":"example start_date 102"},"mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}}
+ "body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 101","max_amount_per_payment":101,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"week"}],"start_date":"example start_date 101"},"mandate_request_currency":"example mandate_request_currency 101","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":"example mandate_request_verify 101","metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"example payment_request_currency 101","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 102","max_amount_per_payment":102,"payment_method":"example payment_method 102","periodic_limits":[{"alignment":"calendar","max_payments":102,"max_total_amount":102,"period":"month"}],"start_date":"example start_date 102"},"mandate_request_currency":"example mandate_request_currency 102","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":"example mandate_request_verify 102","metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"example payment_request_currency 102","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/billing_request_templates/:identity",
"url_params": ["BRT123"],
- "body": {"billing_request_templates":{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 103","max_amount_per_payment":103,"payment_method":"example payment_method 103","periodic_limits":[{"alignment":"creation_date","max_payments":103,"max_total_amount":103,"period":"year"}],"start_date":"example start_date 103"},"mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}}
+ "body": {"billing_request_templates":{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 103","max_amount_per_payment":103,"payment_method":"example payment_method 103","periodic_limits":[{"alignment":"creation_date","max_payments":103,"max_total_amount":103,"period":"year"}],"start_date":"example start_date 103"},"mandate_request_currency":"example mandate_request_currency 103","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":"example mandate_request_verify 103","metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"example payment_request_currency 103","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}}
},
"create": {
"method": "POST",
"path_template": "/billing_request_templates",
"url_params": [],
- "body": {"billing_request_templates":{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 104","max_amount_per_payment":104,"payment_method":"example payment_method 104","periodic_limits":[{"alignment":"calendar","max_payments":104,"max_total_amount":104,"period":"flexible"}],"start_date":"example start_date 104"},"mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}}
+ "body": {"billing_request_templates":{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 104","max_amount_per_payment":104,"payment_method":"example payment_method 104","periodic_limits":[{"alignment":"calendar","max_payments":104,"max_total_amount":104,"period":"flexible"}],"start_date":"example start_date 104"},"mandate_request_currency":"example mandate_request_currency 104","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":"example mandate_request_verify 104","metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"example payment_request_currency 104","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}}
},
"update": {
"method": "PUT",
"path_template": "/billing_request_templates/:identity",
"url_params": ["BRT123"],
- "body": {"billing_request_templates":{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 105","max_amount_per_payment":105,"payment_method":"example payment_method 105","periodic_limits":[{"alignment":"creation_date","max_payments":105,"max_total_amount":105,"period":"day"}],"start_date":"example start_date 105"},"mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}}
+ "body": {"billing_request_templates":{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_constraints":{"end_date":"example end_date 105","max_amount_per_payment":105,"payment_method":"example payment_method 105","periodic_limits":[{"alignment":"creation_date","max_payments":105,"max_total_amount":105,"period":"day"}],"start_date":"example start_date 105"},"mandate_request_currency":"example mandate_request_currency 105","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":"example mandate_request_verify 105","metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"example payment_request_currency 105","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}}
}
}
diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json
index 7bd3b551..7127da71 100644
--- a/tests/fixtures/billing_request_with_actions.json
+++ b/tests/fixtures/billing_request_with_actions.json
@@ -5,6 +5,6 @@
"method": "POST",
"path_template": "/billing_requests/create_with_actions",
"url_params": [],
- "body": {"billing_request_with_actions":{"bank_authorisations":{"authorisation_type":"example authorisation_type 101","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-01-15T10:00:00.000Z","expires_at":"2024-01-15T10:00:00.000Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"},"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 101","authorisation_type":"example authorisation_type 102"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 101"],"customer_billing_detail":["example customer_billing_detail 101"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 101"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 101","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 102","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 101","constraints":{"end_date":"example end_date 101","max_amount_per_payment":101,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"week"}],"start_date":"example start_date 101"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_arrears","payment_purpose_code":"example payment_purpose_code 101","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 101"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 102"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 101"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 101"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}}
+ "body": {"billing_request_with_actions":{"bank_authorisations":{"authorisation_type":"example authorisation_type 101","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-01-15T10:00:00.000Z","expires_at":"2024-01-15T10:00:00.000Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"},"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 101","authorisation_type":"example authorisation_type 102"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 101"],"customer_billing_detail":["example customer_billing_detail 101"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 101"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 101","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 102","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 101","constraints":{"end_date":"example end_date 101","max_amount_per_payment":101,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"week"}],"start_date":"example start_date 101"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_arrears","payment_purpose_code":"example payment_purpose_code 101","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 101"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 102"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 101"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 101"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}}
}
}
diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json
index 2b589b0a..f21b3d05 100644
--- a/tests/fixtures/billing_requests.json
+++ b/tests/fixtures/billing_requests.json
@@ -5,37 +5,37 @@
"method": "POST",
"path_template": "/billing_requests",
"url_params": [],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 101","authorisation_type":"example authorisation_type 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 101"],"customer_billing_detail":["example customer_billing_detail 101"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 101"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 101","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 102","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 101","constraints":{"end_date":"example end_date 101","max_amount_per_payment":101,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"week"}],"start_date":"example start_date 101"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_arrears","payment_purpose_code":"example payment_purpose_code 101","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 101"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 102"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 101"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 101"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 101","authorisation_type":"example authorisation_type 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 101"],"customer_billing_detail":["example customer_billing_detail 101"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 101"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 101","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 102","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 101","constraints":{"end_date":"example end_date 101","max_amount_per_payment":101,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"week"}],"start_date":"example start_date 101"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_arrears","payment_purpose_code":"example payment_purpose_code 101","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 101"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 102"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 101"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 101"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"collect_customer_details": {
"method": "POST",
"path_template": "/billing_requests/:identity/actions/collect_customer_details",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 102","authorisation_type":"example authorisation_type 102"},"collect_customer_details":{"default_country_code":"example default_country_code 102","incomplete_fields":{"customer":["example customer 103"],"customer_billing_detail":["example customer_billing_detail 103"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 102"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 102","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 104","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 102","constraints":{"end_date":"example end_date 102","max_amount_per_payment":102,"payment_method":"example payment_method 102","periodic_limits":[{"alignment":"calendar","max_payments":102,"max_total_amount":102,"period":"month"}],"start_date":"example start_date 102"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 102"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_context_code":"face_to_face_point_of_sale","payment_purpose_code":"example payment_purpose_code 102","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 102"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"loan","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 104"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 102"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 102"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 102","authorisation_type":"example authorisation_type 102"},"collect_customer_details":{"default_country_code":"example default_country_code 102","incomplete_fields":{"customer":["example customer 103"],"customer_billing_detail":["example customer_billing_detail 103"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 102"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 102","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 104","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 102","constraints":{"end_date":"example end_date 102","max_amount_per_payment":102,"payment_method":"example payment_method 102","periodic_limits":[{"alignment":"calendar","max_payments":102,"max_total_amount":102,"period":"month"}],"start_date":"example start_date 102"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 102"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_context_code":"face_to_face_point_of_sale","payment_purpose_code":"example payment_purpose_code 102","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 102"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"loan","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 104"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 102"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 102"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"collect_bank_account": {
"method": "POST",
"path_template": "/billing_requests/:identity/actions/collect_bank_account",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 103","authorisation_type":"example authorisation_type 103"},"collect_customer_details":{"default_country_code":"example default_country_code 103","incomplete_fields":{"customer":["example customer 105"],"customer_billing_detail":["example customer_billing_detail 105"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 103"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 103","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 106","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 103","constraints":{"end_date":"example end_date 103","max_amount_per_payment":103,"payment_method":"example payment_method 103","periodic_limits":[{"alignment":"creation_date","max_payments":103,"max_total_amount":103,"period":"year"}],"start_date":"example start_date 103"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_context_code":"ecommerce_merchant_initiated_payment","payment_purpose_code":"example payment_purpose_code 103","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 103"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"dependant_support","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 106"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 103"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 103"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 103","authorisation_type":"example authorisation_type 103"},"collect_customer_details":{"default_country_code":"example default_country_code 103","incomplete_fields":{"customer":["example customer 105"],"customer_billing_detail":["example customer_billing_detail 105"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 103"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 103","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 106","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 103","constraints":{"end_date":"example end_date 103","max_amount_per_payment":103,"payment_method":"example payment_method 103","periodic_limits":[{"alignment":"creation_date","max_payments":103,"max_total_amount":103,"period":"year"}],"start_date":"example start_date 103"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_context_code":"ecommerce_merchant_initiated_payment","payment_purpose_code":"example payment_purpose_code 103","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 103"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"dependant_support","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 106"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 103"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 103"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"confirm_payer_details": {
"method": "POST",
"path_template": "/billing_requests/:identity/actions/confirm_payer_details",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 104","authorisation_type":"example authorisation_type 104"},"collect_customer_details":{"default_country_code":"example default_country_code 104","incomplete_fields":{"customer":["example customer 107"],"customer_billing_detail":["example customer_billing_detail 107"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 104"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 104","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 108","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 104","constraints":{"end_date":"example end_date 104","max_amount_per_payment":104,"payment_method":"example payment_method 104","periodic_limits":[{"alignment":"calendar","max_payments":104,"max_total_amount":104,"period":"flexible"}],"start_date":"example start_date 104"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 104"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_context_code":"transfer_to_self","payment_purpose_code":"example payment_purpose_code 104","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 104"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"gambling","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 108"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 104"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 104"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 104","authorisation_type":"example authorisation_type 104"},"collect_customer_details":{"default_country_code":"example default_country_code 104","incomplete_fields":{"customer":["example customer 107"],"customer_billing_detail":["example customer_billing_detail 107"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 104"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 104","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 108","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 104","constraints":{"end_date":"example end_date 104","max_amount_per_payment":104,"payment_method":"example payment_method 104","periodic_limits":[{"alignment":"calendar","max_payments":104,"max_total_amount":104,"period":"flexible"}],"start_date":"example start_date 104"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 104"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_context_code":"transfer_to_self","payment_purpose_code":"example payment_purpose_code 104","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 104"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"gambling","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 108"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 104"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 104"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"fulfil": {
"method": "POST",
"path_template": "/billing_requests/:identity/actions/fulfil",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 105","authorisation_type":"example authorisation_type 105"},"collect_customer_details":{"default_country_code":"example default_country_code 105","incomplete_fields":{"customer":["example customer 109"],"customer_billing_detail":["example customer_billing_detail 109"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 105"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 105","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 110","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 105","constraints":{"end_date":"example end_date 105","max_amount_per_payment":105,"payment_method":"example payment_method 105","periodic_limits":[{"alignment":"creation_date","max_payments":105,"max_total_amount":105,"period":"day"}],"start_date":"example start_date 105"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 105"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"transfer_to_third_party","payment_purpose_code":"example payment_purpose_code 105","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 105"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"retail","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 110"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 105"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 105"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 105","authorisation_type":"example authorisation_type 105"},"collect_customer_details":{"default_country_code":"example default_country_code 105","incomplete_fields":{"customer":["example customer 109"],"customer_billing_detail":["example customer_billing_detail 109"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 105"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 105","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 110","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 105","constraints":{"end_date":"example end_date 105","max_amount_per_payment":105,"payment_method":"example payment_method 105","periodic_limits":[{"alignment":"creation_date","max_payments":105,"max_total_amount":105,"period":"day"}],"start_date":"example start_date 105"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 105"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"transfer_to_third_party","payment_purpose_code":"example payment_purpose_code 105","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 105"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"retail","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 110"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 105"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 105"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"cancel": {
"method": "POST",
"path_template": "/billing_requests/:identity/actions/cancel",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 106","authorisation_type":"example authorisation_type 106"},"collect_customer_details":{"default_country_code":"example default_country_code 106","incomplete_fields":{"customer":["example customer 111"],"customer_billing_detail":["example customer_billing_detail 111"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 106"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 106","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 112","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 106","constraints":{"end_date":"example end_date 106","max_amount_per_payment":106,"payment_method":"example payment_method 106","periodic_limits":[{"alignment":"calendar","max_payments":106,"max_total_amount":106,"period":"week"}],"start_date":"example start_date 106"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 106"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_advance","payment_purpose_code":"example payment_purpose_code 106","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 106"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"salary","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 112"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 106"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 106"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 106","authorisation_type":"example authorisation_type 106"},"collect_customer_details":{"default_country_code":"example default_country_code 106","incomplete_fields":{"customer":["example customer 111"],"customer_billing_detail":["example customer_billing_detail 111"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 106"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 106","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 112","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 106","constraints":{"end_date":"example end_date 106","max_amount_per_payment":106,"payment_method":"example payment_method 106","periodic_limits":[{"alignment":"calendar","max_payments":106,"max_total_amount":106,"period":"week"}],"start_date":"example start_date 106"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 106"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_advance","payment_purpose_code":"example payment_purpose_code 106","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 106"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"salary","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 112"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 106"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 106"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"list": {
"method": "GET",
@@ -47,30 +47,30 @@
"method": "GET",
"path_template": "/billing_requests/:identity",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 107","authorisation_type":"example authorisation_type 107"},"collect_customer_details":{"default_country_code":"example default_country_code 107","incomplete_fields":{"customer":["example customer 113"],"customer_billing_detail":["example customer_billing_detail 115"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 109"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 109","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 116","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 109","constraints":{"end_date":"example end_date 109","max_amount_per_payment":109,"payment_method":"example payment_method 109","periodic_limits":[{"alignment":"creation_date","max_payments":109,"max_total_amount":109,"period":"flexible"}],"start_date":"example start_date 109"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 109"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_arrears","payment_purpose_code":"example payment_purpose_code 107","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 109"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"personal","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 114"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 107"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 109"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 107","authorisation_type":"example authorisation_type 107"},"collect_customer_details":{"default_country_code":"example default_country_code 107","incomplete_fields":{"customer":["example customer 113"],"customer_billing_detail":["example customer_billing_detail 115"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 109"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 109","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 116","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 109","constraints":{"end_date":"example end_date 109","max_amount_per_payment":109,"payment_method":"example payment_method 109","periodic_limits":[{"alignment":"creation_date","max_payments":109,"max_total_amount":109,"period":"flexible"}],"start_date":"example start_date 109"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 109"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_arrears","payment_purpose_code":"example payment_purpose_code 107","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 109"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"personal","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 114"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 107"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 109"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"notify": {
"method": "POST",
"path_template": "/billing_requests/:identity/actions/notify",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 108","authorisation_type":"example authorisation_type 108"},"collect_customer_details":{"default_country_code":"example default_country_code 108","incomplete_fields":{"customer":["example customer 115"],"customer_billing_detail":["example customer_billing_detail 117"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 110"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 110","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 118","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 110","constraints":{"end_date":"example end_date 110","max_amount_per_payment":110,"payment_method":"example payment_method 110","periodic_limits":[{"alignment":"calendar","max_payments":110,"max_total_amount":110,"period":"day"}],"start_date":"example start_date 110"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_context_code":"face_to_face_point_of_sale","payment_purpose_code":"example payment_purpose_code 108","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 110"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"government","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 116"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 108"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 110"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 108","authorisation_type":"example authorisation_type 108"},"collect_customer_details":{"default_country_code":"example default_country_code 108","incomplete_fields":{"customer":["example customer 115"],"customer_billing_detail":["example customer_billing_detail 117"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 110"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 110","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 118","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 110","constraints":{"end_date":"example end_date 110","max_amount_per_payment":110,"payment_method":"example payment_method 110","periodic_limits":[{"alignment":"calendar","max_payments":110,"max_total_amount":110,"period":"day"}],"start_date":"example start_date 110"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_context_code":"face_to_face_point_of_sale","payment_purpose_code":"example payment_purpose_code 108","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 110"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"government","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 116"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 108"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 110"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"fallback": {
"method": "POST",
"path_template": "/billing_requests/:identity/actions/fallback",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 109","authorisation_type":"example authorisation_type 109"},"collect_customer_details":{"default_country_code":"example default_country_code 109","incomplete_fields":{"customer":["example customer 117"],"customer_billing_detail":["example customer_billing_detail 119"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 111"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 111","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 120","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 111","constraints":{"end_date":"example end_date 111","max_amount_per_payment":111,"payment_method":"example payment_method 111","periodic_limits":[{"alignment":"creation_date","max_payments":111,"max_total_amount":111,"period":"week"}],"start_date":"example start_date 111"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 111"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_context_code":"ecommerce_merchant_initiated_payment","payment_purpose_code":"example payment_purpose_code 109","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 111"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"pension","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 118"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 109"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 111"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 109","authorisation_type":"example authorisation_type 109"},"collect_customer_details":{"default_country_code":"example default_country_code 109","incomplete_fields":{"customer":["example customer 117"],"customer_billing_detail":["example customer_billing_detail 119"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 111"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 111","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 120","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 111","constraints":{"end_date":"example end_date 111","max_amount_per_payment":111,"payment_method":"example payment_method 111","periodic_limits":[{"alignment":"creation_date","max_payments":111,"max_total_amount":111,"period":"week"}],"start_date":"example start_date 111"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 111"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_context_code":"ecommerce_merchant_initiated_payment","payment_purpose_code":"example payment_purpose_code 109","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 111"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"pension","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 118"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 109"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 111"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"choose_currency": {
"method": "POST",
"path_template": "/billing_requests/:identity/actions/choose_currency",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 110","authorisation_type":"example authorisation_type 110"},"collect_customer_details":{"default_country_code":"example default_country_code 110","incomplete_fields":{"customer":["example customer 119"],"customer_billing_detail":["example customer_billing_detail 121"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 112"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 112","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 122","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 112","constraints":{"end_date":"example end_date 112","max_amount_per_payment":112,"payment_method":"example payment_method 112","periodic_limits":[{"alignment":"calendar","max_payments":112,"max_total_amount":112,"period":"month"}],"start_date":"example start_date 112"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 112"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_context_code":"transfer_to_self","payment_purpose_code":"example payment_purpose_code 110","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 112"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"tax","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 120"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 110"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 112"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 110","authorisation_type":"example authorisation_type 110"},"collect_customer_details":{"default_country_code":"example default_country_code 110","incomplete_fields":{"customer":["example customer 119"],"customer_billing_detail":["example customer_billing_detail 121"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 112"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 112","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 122","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 112","constraints":{"end_date":"example end_date 112","max_amount_per_payment":112,"payment_method":"example payment_method 112","periodic_limits":[{"alignment":"calendar","max_payments":112,"max_total_amount":112,"period":"month"}],"start_date":"example start_date 112"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 112"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_context_code":"transfer_to_self","payment_purpose_code":"example payment_purpose_code 110","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 112"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"tax","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 120"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 110"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 112"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
},
"select_institution": {
"method": "POST",
"path_template": "/billing_requests/:identity/actions/select_institution",
"url_params": ["BRQ123"],
- "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 111","authorisation_type":"example authorisation_type 111"},"collect_customer_details":{"default_country_code":"example default_country_code 111","incomplete_fields":{"customer":["example customer 121"],"customer_billing_detail":["example customer_billing_detail 123"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 113"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 113","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 124","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 113","constraints":{"end_date":"example end_date 113","max_amount_per_payment":113,"payment_method":"example payment_method 113","periodic_limits":[{"alignment":"creation_date","max_payments":113,"max_total_amount":113,"period":"year"}],"start_date":"example start_date 113"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 113"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"transfer_to_third_party","payment_purpose_code":"example payment_purpose_code 111","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 113"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"other","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 122"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 111"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 113"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
+ "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 111","authorisation_type":"example authorisation_type 111"},"collect_customer_details":{"default_country_code":"example default_country_code 111","incomplete_fields":{"customer":["example customer 121"],"customer_billing_detail":["example customer_billing_detail 123"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 113"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 113","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 124","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 113","constraints":{"end_date":"example end_date 113","max_amount_per_payment":113,"payment_method":"example payment_method 113","periodic_limits":[{"alignment":"creation_date","max_payments":113,"max_total_amount":113,"period":"year"}],"start_date":"example start_date 113"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 113"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"transfer_to_third_party","payment_purpose_code":"example payment_purpose_code 111","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 113"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"other","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 122"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 111"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 113"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}}
}
}
diff --git a/tests/fixtures/customer_bank_accounts.json b/tests/fixtures/customer_bank_accounts.json
index 1c0beef5..3edd2040 100644
--- a/tests/fixtures/customer_bank_accounts.json
+++ b/tests/fixtures/customer_bank_accounts.json
@@ -5,30 +5,30 @@
"method": "POST",
"path_template": "/customer_bank_accounts",
"url_params": [],
- "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 101"},"metadata":{},"trusted_recipient":true}}
+ "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 101"},"metadata":{},"payer_name_verification_result":"full","trusted_recipient":true}}
},
"list": {
"method": "GET",
"path_template": "/customer_bank_accounts",
"url_params": [],
- "body": {"customer_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 102"},"metadata":{},"trusted_recipient":true},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 103"},"metadata":{},"trusted_recipient":true}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}}
+ "body": {"customer_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 102"},"metadata":{},"payer_name_verification_result":"full","trusted_recipient":true},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 103"},"metadata":{},"payer_name_verification_result":"full","trusted_recipient":true}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/customer_bank_accounts/:identity",
"url_params": ["BA123"],
- "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 104"},"metadata":{},"trusted_recipient":true}}
+ "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 104"},"metadata":{},"payer_name_verification_result":"full","trusted_recipient":true}}
},
"update": {
"method": "PUT",
"path_template": "/customer_bank_accounts/:identity",
"url_params": ["BA123"],
- "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 105"},"metadata":{},"trusted_recipient":true}}
+ "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 105"},"metadata":{},"payer_name_verification_result":"full","trusted_recipient":true}}
},
"disable": {
"method": "POST",
"path_template": "/customer_bank_accounts/:identity/actions/disable",
"url_params": ["BA123"],
- "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 106"},"metadata":{},"trusted_recipient":true}}
+ "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 106"},"metadata":{},"payer_name_verification_result":"full","trusted_recipient":true}}
}
}
diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json
index 5cbf1504..e4b21dda 100644
--- a/tests/fixtures/events.json
+++ b/tests/fixtures/events.json
@@ -5,7 +5,7 @@
"method": "GET",
"path_template": "/events",
"url_params": [],
- "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2024-01-15T10:00:00.000Z","id":"PCN123","mandatory":false,"type":"example type 101"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","outbound_payment":"OUT123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_account_transaction":"PATR123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates","source":{"name":"Joe Bloggs","type":"gc_team"}},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2024-01-15T10:00:00.000Z","id":"PCN123","mandatory":true,"type":"example type 103"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","outbound_payment":"OUT123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_account_transaction":"PATR123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates","source":{"name":"Joe Bloggs","type":"app"}}],"linked":{"billing_requests":[{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 101","authorisation_type":"example authorisation_type 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 101"],"customer_billing_detail":["example customer_billing_detail 101"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 101"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 101","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 102","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 101","constraints":{"end_date":"example end_date 101","max_amount_per_payment":101,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"week"}],"start_date":"example start_date 101"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_arrears","payment_purpose_code":"example payment_purpose_code 101","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 101"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 102"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 101"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 101"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 101","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Acme","postal_code":"EC1V 7LQ","region":"example region 101","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}],"customers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"}],"instalment_schedules":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"IS123","links":{"customer":"CU123","mandate":"MD123","payments":["PM123","PM456"]},"metadata":{},"name":"Invoice 4404","payment_errors":{"0":[{"field":"charge_date","message":"must be on or after mandate's next_possible_customer_charge_date"}]},"status":"active","total_amount":1000}],"mandates":[{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 102","max_amount_per_payment":102,"max_amount_per_period":101,"max_payments_per_period":101,"period":"month","start_date":"example start_date 102"},"consent_type":"example consent_type 102","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"direct","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"mandate_type":"bank_debit","metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}],"outbound_payments":[{"amount":1000,"created_at":"2024-01-01T12:00:00.001Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","outbound_payment_import":"IM123","recipient_bank_account":"BA123"},"metadata":{},"reference":"GC-QC2FI7GBEW7VCXL","scheme":"faster_payments","status":"cancelled","verifications":{"recipient_bank_account_holder_verification":{"actual_account_name":"Jo Doe","result":"partial_match","type":"confirmation_of_payee"}}}],"payer_authorisations":[{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 101","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 101","message":"example message 101","request_pointer":"example request_pointer 101"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}],"payment_account_transactions":[{"amount":1000,"balance_after_transaction":1000,"counterparty_name":"Acme Ltd","currency":"example currency 101","description":"Reward Payment (August 2024)","direction":"credit","id":"PATR1234","links":{"outbound_payment":"OUT123","payment_bank_account":"BA123","payout":"PO123"},"reference":"GC-058408d9","value_date":"2014-01-01"}],"payments":[{"amount":1000,"amount_refunded":150,"charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","faster_ach":false,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","instalment_schedule":"IS123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","retry_if_possible":false,"scheme":"bacs","status":"submitted"}],"payouts":[{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"}],"refunds":[{"amount":150,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"}],"scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","region":"Greater London","scheme":"bacs","status":"pending"}],"subscriptions":[{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","parent_plan_paused":false,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]},"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}}
+ "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2024-01-15T10:00:00.000Z","id":"PCN123","mandatory":false,"type":"example type 101"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","outbound_payment":"OUT123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_account_transaction":"PATR123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates","source":{"name":"Joe Bloggs","type":"gc_team"}},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2024-01-15T10:00:00.000Z","id":"PCN123","mandatory":true,"type":"example type 103"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","outbound_payment":"OUT123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_account_transaction":"PATR123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates","source":{"name":"Joe Bloggs","type":"app"}}],"linked":{"billing_requests":[{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 101","authorisation_type":"example authorisation_type 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 101"],"customer_billing_detail":["example customer_billing_detail 101"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_account"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"USD","instalments_with_dates":[{"amount":250,"charge_date":"2020-11-03"}],"instalments_with_schedule":{"amounts":[1000],"interval":1,"interval_unit":"monthly","start_date":"2014-10-21"},"links":{"instalment_schedule":"example instalment_schedule 101"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 101","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 102","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 101","constraints":{"end_date":"example end_date 101","max_amount_per_payment":101,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"week"}],"start_date":"example start_date 101"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_context_code":"billing_goods_and_services_in_arrears","payment_purpose_code":"example payment_purpose_code 101","payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 101"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 102"},"metadata":{},"payer_name_verification_result":"full"},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 101"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"USD","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 101"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 101","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Acme","postal_code":"EC1V 7LQ","region":"example region 101","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}],"customers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"}],"instalment_schedules":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"IS123","links":{"customer":"CU123","mandate":"MD123","payments":["PM123","PM456"]},"metadata":{},"name":"Invoice 4404","payment_errors":{"0":[{"field":"charge_date","message":"must be on or after mandate's next_possible_customer_charge_date"}]},"status":"active","total_amount":1000}],"mandates":[{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 102","max_amount_per_payment":102,"max_amount_per_period":101,"max_payments_per_period":101,"period":"month","start_date":"example start_date 102"},"consent_type":"example consent_type 102","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"direct","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"mandate_type":"bank_debit","metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}],"outbound_payments":[{"amount":1000,"created_at":"2024-01-01T12:00:00.001Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","outbound_payment_import":"IM123","recipient_bank_account":"BA123"},"metadata":{},"reference":"GC-QC2FI7GBEW7VCXL","scheme":"faster_payments","status":"cancelled","verifications":{"recipient_bank_account_holder_verification":{"actual_account_name":"Jo Doe","result":"partial_match","type":"confirmation_of_payee"}}}],"payer_authorisations":[{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 101","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 101","message":"example message 101","request_pointer":"example request_pointer 101"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}],"payment_account_transactions":[{"amount":1000,"balance_after_transaction":1000,"counterparty_name":"Acme Ltd","currency":"example currency 101","description":"Reward Payment (August 2024)","direction":"credit","id":"PATR1234","links":{"outbound_payment":"OUT123","payment_bank_account":"BA123","payout":"PO123"},"reference":"GC-058408d9","value_date":"2014-01-01"}],"payments":[{"amount":1000,"amount_refunded":150,"charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","faster_ach":false,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","instalment_schedule":"IS123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","retry_if_possible":false,"scheme":"bacs","status":"submitted"}],"payouts":[{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"}],"refunds":[{"amount":150,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"}],"scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","region":"Greater London","scheme":"bacs","status":"pending"}],"subscriptions":[{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","parent_plan_paused":false,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]},"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}}
},
"get": {
"method": "GET",
diff --git a/tests/fixtures/verification_details.json b/tests/fixtures/verification_details.json
index a0cea249..2990eec3 100644
--- a/tests/fixtures/verification_details.json
+++ b/tests/fixtures/verification_details.json
@@ -5,12 +5,12 @@
"method": "POST",
"path_template": "/verification_details",
"url_params": [],
- "body": {"verification_details":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 101","city":"London","company_number":"07495895","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 101"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"}}
+ "body": {"verification_details":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 101","city":"London","company_number":"07495895","country_code":"GB","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 101"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ","region":"Essex"}}
},
"list": {
"method": "GET",
"path_template": "/verification_details",
"url_params": [],
- "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"verification_details":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 102","city":"London","company_number":"07495895","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 102"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 103","city":"London","company_number":"07495895","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 103"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"}]}
+ "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"verification_details":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 102","city":"London","company_number":"07495895","country_code":"GB","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 102"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ","region":"Essex"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 103","city":"London","company_number":"07495895","country_code":"GB","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 103"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ","region":"Essex"}]}
}
}
diff --git a/tests/integration/customer_bank_accounts_integration_test.py b/tests/integration/customer_bank_accounts_integration_test.py
index 0a2de313..6de14671 100644
--- a/tests/integration/customer_bank_accounts_integration_test.py
+++ b/tests/integration/customer_bank_accounts_integration_test.py
@@ -38,6 +38,7 @@ def test_customer_bank_accounts_create():
assert response.enabled == body.get('enabled')
assert response.id == body.get('id')
assert response.metadata == body.get('metadata')
+ assert response.payer_name_verification_result == body.get('payer_name_verification_result')
assert response.trusted_recipient == body.get('trusted_recipient')
assert response.links.customer == body.get('links')['customer']
@@ -104,6 +105,7 @@ def test_customer_bank_accounts_list():
assert [r.enabled for r in response.records] == [b.get('enabled') for b in body]
assert [r.id for r in response.records] == [b.get('id') for b in body]
assert [r.metadata for r in response.records] == [b.get('metadata') for b in body]
+ assert [r.payer_name_verification_result for r in response.records] == [b.get('payer_name_verification_result') for b in body]
assert [r.trusted_recipient for r in response.records] == [b.get('trusted_recipient') for b in body]
@responses.activate
@@ -175,6 +177,7 @@ def test_customer_bank_accounts_get():
assert response.enabled == body.get('enabled')
assert response.id == body.get('id')
assert response.metadata == body.get('metadata')
+ assert response.payer_name_verification_result == body.get('payer_name_verification_result')
assert response.trusted_recipient == body.get('trusted_recipient')
assert response.links.customer == body.get('links')['customer']
@@ -220,6 +223,7 @@ def test_customer_bank_accounts_update():
assert response.enabled == body.get('enabled')
assert response.id == body.get('id')
assert response.metadata == body.get('metadata')
+ assert response.payer_name_verification_result == body.get('payer_name_verification_result')
assert response.trusted_recipient == body.get('trusted_recipient')
assert response.links.customer == body.get('links')['customer']
@@ -265,6 +269,7 @@ def test_customer_bank_accounts_disable():
assert response.enabled == body.get('enabled')
assert response.id == body.get('id')
assert response.metadata == body.get('metadata')
+ assert response.payer_name_verification_result == body.get('payer_name_verification_result')
assert response.trusted_recipient == body.get('trusted_recipient')
assert response.links.customer == body.get('links')['customer']
diff --git a/tests/integration/verification_details_integration_test.py b/tests/integration/verification_details_integration_test.py
index 86c8a084..e4396862 100644
--- a/tests/integration/verification_details_integration_test.py
+++ b/tests/integration/verification_details_integration_test.py
@@ -32,10 +32,12 @@ def test_verification_details_create():
assert response.address_line3 == body.get('address_line3')
assert response.city == body.get('city')
assert response.company_number == body.get('company_number')
+ assert response.country_code == body.get('country_code')
assert response.description == body.get('description')
assert response.directors == body.get('directors')
assert response.name == body.get('name')
assert response.postal_code == body.get('postal_code')
+ assert response.region == body.get('region')
assert response.links.creditor == body.get('links')['creditor']
@responses.activate
@@ -78,10 +80,12 @@ def test_verification_details_list():
assert [r.address_line3 for r in response.records] == [b.get('address_line3') for b in body]
assert [r.city for r in response.records] == [b.get('city') for b in body]
assert [r.company_number for r in response.records] == [b.get('company_number') for b in body]
+ assert [r.country_code for r in response.records] == [b.get('country_code') for b in body]
assert [r.description for r in response.records] == [b.get('description') for b in body]
assert [r.directors for r in response.records] == [b.get('directors') for b in body]
assert [r.name for r in response.records] == [b.get('name') for b in body]
assert [r.postal_code for r in response.records] == [b.get('postal_code') for b in body]
+ assert [r.region for r in response.records] == [b.get('region') for b in body]
@responses.activate
def test_timeout_verification_details_list_retries():