From 2c3e4820b28be0e9d63f0ea3ae9bce0717cec541 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 10:37:56 +0000 Subject: [PATCH 01/12] Changes generated by 3fad33f890159624850e31c56550ef465305ea3f This commit was automatically created from gocardless/gocardless-pro-python-template@3fad33f890159624850e31c56550ef465305ea3f by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-python-template/actions/runs/19533895221 --- tests/fixtures/bank_account_details.json | 2 +- tests/fixtures/bank_authorisations.json | 4 ++-- tests/fixtures/billing_request_flows.json | 4 ++-- tests/fixtures/billing_request_templates.json | 8 +++---- .../billing_request_with_actions.json | 2 +- tests/fixtures/billing_requests.json | 24 +++++++++---------- tests/fixtures/blocks.json | 8 +++---- tests/fixtures/creditors.json | 8 +++---- tests/fixtures/customer_notifications.json | 2 +- tests/fixtures/events.json | 4 ++-- tests/fixtures/exports.json | 2 +- tests/fixtures/instalment_schedules.json | 2 +- tests/fixtures/mandates.json | 12 +++++----- tests/fixtures/negative_balance_limits.json | 2 +- tests/fixtures/outbound_payments.json | 2 +- tests/fixtures/payer_authorisations.json | 8 +++---- .../payment_account_transactions.json | 2 +- tests/fixtures/payments.json | 6 ++--- tests/fixtures/scheme_identifiers.json | 2 +- tests/fixtures/subscriptions.json | 4 ++-- tests/fixtures/transferred_mandates.json | 2 +- tests/fixtures/verification_details.json | 2 +- tests/fixtures/webhooks.json | 6 ++--- 23 files changed, 59 insertions(+), 59 deletions(-) diff --git a/tests/fixtures/bank_account_details.json b/tests/fixtures/bank_account_details.json index 266315f2..0cd0a617 100644 --- a/tests/fixtures/bank_account_details.json +++ b/tests/fixtures/bank_account_details.json @@ -3,6 +3,6 @@ "method": "GET", "path_template": "/bank_account_details/:identity", "url_params": ["BA123"], - "body": {"bank_account_details":{"ciphertext":"example ciphertext 4425","encrypted_key":"example encrypted_key 2081","iv":"example iv 1318","protected":"example protected 456","tag":"example tag 2540"}} + "body": {"bank_account_details":{"ciphertext":"example ciphertext 1318","encrypted_key":"example encrypted_key 456","iv":"example iv 2081","protected":"example protected 2540","tag":"example tag 4425"}} } } diff --git a/tests/fixtures/bank_authorisations.json b/tests/fixtures/bank_authorisations.json index 26bec99f..760a0ba1 100644 --- a/tests/fixtures/bank_authorisations.json +++ b/tests/fixtures/bank_authorisations.json @@ -3,12 +3,12 @@ "method": "POST", "path_template": "/bank_authorisations", "url_params": [], - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 3300","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2025-11-20T08:25:53.465Z","expires_at":"2025-11-20T08:25:53.465Z","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"}} + "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 3300","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2025-11-20T10:35:29.102Z","expires_at":"2025-11-20T10:35:29.102Z","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"}} }, "get": { "method": "GET", "path_template": "/bank_authorisations/:identity", "url_params": ["BAU123"], - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 694","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2025-11-20T08:25:53.465Z","expires_at":"2025-11-20T08:25:53.465Z","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"}} + "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 694","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2025-11-20T10:35:29.102Z","expires_at":"2025-11-20T10:35:29.102Z","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"}} } } diff --git a/tests/fixtures/billing_request_flows.json b/tests/fixtures/billing_request_flows.json index 3e7579d2..0f7007dc 100644 --- a/tests/fixtures/billing_request_flows.json +++ b/tests/fixtures/billing_request_flows.json @@ -3,12 +3,12 @@ "method": "POST", "path_template": "/billing_request_flows", "url_params": [], - "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2025-11-20T08:25:53.469Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2025-11-20T08:25:53.469Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":true,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":true,"show_success_redirect_button":false,"skip_success_screen":true}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2025-11-20T10:35:29.108Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2025-11-20T10:35:29.108Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":true,"lock_customer_details":false,"prefilled_bank_account":{"account_type":"savings"},"prefilled_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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true,"skip_success_screen":true}} }, "initialise": { "method": "POST", "path_template": "/billing_request_flows/:identity/actions/initialise", "url_params": ["BRF123"], - "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2025-11-20T08:25:53.469Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2025-11-20T08:25:53.469Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":true,"lock_customer_details":false,"prefilled_bank_account":{"account_type":"savings"},"prefilled_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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":false,"skip_success_screen":true}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2025-11-20T10:35:29.109Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2025-11-20T10:35:29.109Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":false,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true,"skip_success_screen":false}} } } diff --git a/tests/fixtures/billing_request_templates.json b/tests/fixtures/billing_request_templates.json index 89d42cd3..2e02566d 100644 --- a/tests/fixtures/billing_request_templates.json +++ b/tests/fixtures/billing_request_templates.json @@ -3,24 +3,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 2474","max_amount_per_payment":3544,"payment_method":"example payment_method 1723","periodic_limits":[{"alignment":"creation_date","max_payments":3922,"max_total_amount":894,"period":"flexible"}],"start_date":"example start_date 1406"},"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 7650","max_amount_per_payment":909,"payment_method":"example payment_method 9277","periodic_limits":[{"alignment":"calendar","max_payments":5395,"max_total_amount":30,"period":"day"}],"start_date":"example start_date 2523"},"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 671","before":"example before 5645"},"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 8033","max_amount_per_payment":7574,"payment_method":"example payment_method 1406","periodic_limits":[{"alignment":"calendar","max_payments":2474,"max_total_amount":894,"period":"year"}],"start_date":"example start_date 3922"},"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 909","max_amount_per_payment":9277,"payment_method":"example payment_method 8610","periodic_limits":[{"alignment":"creation_date","max_payments":9914,"max_total_amount":5395,"period":"day"}],"start_date":"example start_date 7650"},"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 671","before":"example before 5645"},"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 8198","max_amount_per_payment":2734,"payment_method":"example payment_method 8879","periodic_limits":[{"alignment":"calendar","max_payments":7587,"max_total_amount":4721,"period":"flexible"}],"start_date":"example start_date 7208"},"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 8198","max_amount_per_payment":2734,"payment_method":"example payment_method 8879","periodic_limits":[{"alignment":"creation_date","max_payments":4721,"max_total_amount":3354,"period":"week"}],"start_date":"example start_date 7208"},"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"}} }, "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 3920","max_amount_per_payment":8374,"payment_method":"example payment_method 10","periodic_limits":[{"alignment":"creation_date","max_payments":9301,"max_total_amount":1267,"period":"week"}],"start_date":"example start_date 9488"},"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 10","max_amount_per_payment":3921,"payment_method":"example payment_method 1267","periodic_limits":[{"alignment":"calendar","max_payments":8849,"max_total_amount":9301,"period":"day"}],"start_date":"example start_date 8374"},"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"}} }, "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 4401","max_amount_per_payment":8140,"payment_method":"example payment_method 3973","periodic_limits":[{"alignment":"calendar","max_payments":5596,"max_total_amount":6110,"period":"day"}],"start_date":"example start_date 6872"},"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 6110","max_amount_per_payment":6872,"payment_method":"example payment_method 4401","periodic_limits":[{"alignment":"calendar","max_payments":9466,"max_total_amount":5596,"period":"year"}],"start_date":"example start_date 75"},"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"}} } } diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index aca9beac..0eae83c4 100644 --- a/tests/fixtures/billing_request_with_actions.json +++ b/tests/fixtures/billing_request_with_actions.json @@ -3,6 +3,6 @@ "method": "POST", "path_template": "/billing_requests/create_with_actions", "url_params": [], - "body": {"billing_request_with_actions":{"bank_authorisations":{"authorisation_type":"example authorisation_type 9750","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2025-11-20T08:25:53.471Z","expires_at":"2025-11-20T08:25:53.471Z","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 1446","authorisation_type":"example authorisation_type 9921"},"collect_customer_details":{"default_country_code":"example default_country_code 6244","incomplete_fields":{"customer":["example customer 7063"],"customer_billing_detail":["example customer_billing_detail 1436"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 325"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 8223","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1925","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 9434","constraints":{"end_date":"example end_date 8051","max_amount_per_payment":9026,"payment_method":"example payment_method 9219","periodic_limits":[{"alignment":"calendar","max_payments":8730,"max_total_amount":3114,"period":"day"}],"start_date":"example start_date 1300"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 7045"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 7694"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"Trade","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 6487"},"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 1488"],"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 7913"},"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 9750","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2025-11-20T10:35:29.114Z","expires_at":"2025-11-20T10:35:29.114Z","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 1446","authorisation_type":"example authorisation_type 9921"},"collect_customer_details":{"default_country_code":"example default_country_code 5214","incomplete_fields":{"customer":["example customer 9959"],"customer_billing_detail":["example customer_billing_detail 325"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 5666"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 5642","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 541","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 6244","constraints":{"end_date":"example end_date 8730","max_amount_per_payment":3176,"payment_method":"example payment_method 8223","periodic_limits":[{"alignment":"calendar","max_payments":9219,"max_total_amount":9026,"period":"day"}],"start_date":"example start_date 3114"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 1436"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 701"},"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 7221"},"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 7694"],"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 8619"},"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 c76d31ff..e16d7ad3 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -3,72 +3,72 @@ "method": "POST", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 1737","authorisation_type":"example authorisation_type 631"},"collect_customer_details":{"default_country_code":"example default_country_code 6831","incomplete_fields":{"customer":["example customer 5429"],"customer_billing_detail":["example customer_billing_detail 5356"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 1211"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 8162","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8511","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 3015","constraints":{"end_date":"example end_date 2888","max_amount_per_payment":495,"payment_method":"example payment_method 5466","periodic_limits":[{"alignment":"creation_date","max_payments":6258,"max_total_amount":1528,"period":"month"}],"start_date":"example start_date 8287"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 5541"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 563"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"Commercial","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 3090"},"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 6413"],"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 4728"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} + "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 3237","authorisation_type":"example authorisation_type 9106"},"collect_customer_details":{"default_country_code":"example default_country_code 495","incomplete_fields":{"customer":["example customer 1528"],"customer_billing_detail":["example customer_billing_detail 5466"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 3274"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 8162","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8511","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 1737","constraints":{"end_date":"example end_date 2790","max_amount_per_payment":3015,"payment_method":"example payment_method 5541","periodic_limits":[{"alignment":"creation_date","max_payments":6831,"max_total_amount":7387,"period":"year"}],"start_date":"example start_date 2888"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 5356"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":true,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 6413"},"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 5194"},"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 563"],"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 5089"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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 5746","authorisation_type":"example authorisation_type 1563"},"collect_customer_details":{"default_country_code":"example default_country_code 4376","incomplete_fields":{"customer":["example customer 9002"],"customer_billing_detail":["example customer_billing_detail 9718"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 7202"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 8266","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9828","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 2888","constraints":{"end_date":"example end_date 2433","max_amount_per_payment":4147,"payment_method":"example payment_method 4078","periodic_limits":[{"alignment":"creation_date","max_payments":1353,"max_total_amount":6159,"period":"flexible"}],"start_date":"example start_date 3721"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 8705"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 156"},"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 1577"},"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 5094"],"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 9355"},"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 3721","authorisation_type":"example authorisation_type 7189"},"collect_customer_details":{"default_country_code":"example default_country_code 2199","incomplete_fields":{"customer":["example customer 3000"],"customer_billing_detail":["example customer_billing_detail 8705"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 1957"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 4324","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 4078","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 9703","constraints":{"end_date":"example end_date 1563","max_amount_per_payment":156,"payment_method":"example payment_method 8266","periodic_limits":[{"alignment":"calendar","max_payments":4783,"max_total_amount":7202,"period":"week"}],"start_date":"example start_date 5746"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 2605"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 9002"},"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 2433"},"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 4147"],"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 9718"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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 7463","authorisation_type":"example authorisation_type 7996"},"collect_customer_details":{"default_country_code":"example default_country_code 6420","incomplete_fields":{"customer":["example customer 8623"],"customer_billing_detail":["example customer_billing_detail 953"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 8878"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 9241","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3133","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 8590","constraints":{"end_date":"example end_date 9757","max_amount_per_payment":552,"payment_method":"example payment_method 9843","periodic_limits":[{"alignment":"creation_date","max_payments":7425,"max_total_amount":1598,"period":"day"}],"start_date":"example start_date 1515"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 3632"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 9107"},"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 2546"},"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 9336"],"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 8643"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} + "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 9757","authorisation_type":"example authorisation_type 3687"},"collect_customer_details":{"default_country_code":"example default_country_code 8010","incomplete_fields":{"customer":["example customer 3410"],"customer_billing_detail":["example customer_billing_detail 5285"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 1598"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 1137","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3133","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 59","constraints":{"end_date":"example end_date 9336","max_amount_per_payment":2546,"payment_method":"example payment_method 9107","periodic_limits":[{"alignment":"creation_date","max_payments":3033,"max_total_amount":2002,"period":"week"}],"start_date":"example start_date 8878"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 9843"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 7996"},"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 1515"},"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 1351"],"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 8590"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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 3749","authorisation_type":"example authorisation_type 1528"},"collect_customer_details":{"default_country_code":"example default_country_code 2818","incomplete_fields":{"customer":["example customer 7903"],"customer_billing_detail":["example customer_billing_detail 4384"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 8582"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6052","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 7175","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 1297","constraints":{"end_date":"example end_date 7726","max_amount_per_payment":5802,"payment_method":"example payment_method 3981","periodic_limits":[{"alignment":"calendar","max_payments":2066,"max_total_amount":2079,"period":"year"}],"start_date":"example start_date 5894"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 9271"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 4885"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"Epayment","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 4547"},"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 1224"],"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 8553"},"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 8582","authorisation_type":"example authorisation_type 5384"},"collect_customer_details":{"default_country_code":"example default_country_code 3098","incomplete_fields":{"customer":["example customer 8553"],"customer_billing_detail":["example customer_billing_detail 8591"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 7175"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 7903","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1224","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 6137","constraints":{"end_date":"example end_date 2079","max_amount_per_payment":2066,"payment_method":"example payment_method 1270","periodic_limits":[{"alignment":"creation_date","max_payments":9819,"max_total_amount":3086,"period":"year"}],"start_date":"example start_date 3981"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 7726"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 3612"},"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 4384"},"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 2818"],"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 1528"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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 1532","authorisation_type":"example authorisation_type 3616"},"collect_customer_details":{"default_country_code":"example default_country_code 5786","incomplete_fields":{"customer":["example customer 540"],"customer_billing_detail":["example customer_billing_detail 7839"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 7822"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 7743","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1968","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 3231","constraints":{"end_date":"example end_date 7351","max_amount_per_payment":8844,"payment_method":"example payment_method 364","periodic_limits":[{"alignment":"creation_date","max_payments":90,"max_total_amount":4801,"period":"year"}],"start_date":"example start_date 3640"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 7578"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 3162"},"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 7342"},"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 1223"],"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 3710"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} + "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 4208","authorisation_type":"example authorisation_type 7743"},"collect_customer_details":{"default_country_code":"example default_country_code 7822","incomplete_fields":{"customer":["example customer 1223"],"customer_billing_detail":["example customer_billing_detail 7342"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 440"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 1968","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1166","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 5786","constraints":{"end_date":"example end_date 1602","max_amount_per_payment":7351,"payment_method":"example payment_method 8844","periodic_limits":[{"alignment":"calendar","max_payments":4801,"max_total_amount":9183,"period":"day"}],"start_date":"example start_date 90"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 3640"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":true,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 3710"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"Epayment","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 7839"},"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 3616"],"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 8154"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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 783","authorisation_type":"example authorisation_type 6720"},"collect_customer_details":{"default_country_code":"example default_country_code 870","incomplete_fields":{"customer":["example customer 8247"],"customer_billing_detail":["example customer_billing_detail 2984"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"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 3430"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 8010","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 565","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 6629","constraints":{"end_date":"example end_date 8666","max_amount_per_payment":6200,"payment_method":"example payment_method 4162","periodic_limits":[{"alignment":"calendar","max_payments":6829,"max_total_amount":6756,"period":"year"}],"start_date":"example start_date 5695"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 8831"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 5399"},"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 4415"},"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 9371"],"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 9700"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} + "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 7920","authorisation_type":"example authorisation_type 2048"},"collect_customer_details":{"default_country_code":"example default_country_code 8666","incomplete_fields":{"customer":["example customer 6756"],"customer_billing_detail":["example customer_billing_detail 5695"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 1162"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6629","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1092","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 3039","constraints":{"end_date":"example end_date 9513","max_amount_per_payment":9700,"payment_method":"example payment_method 1359","periodic_limits":[{"alignment":"calendar","max_payments":783,"max_total_amount":6720,"period":"flexible"}],"start_date":"example start_date 8247"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 3430"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 7577"},"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 9456"},"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 6200"],"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 5320"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} }, "list": { "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 9386"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 1888","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 292","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 1853","constraints":{"end_date":"example end_date 8652","max_amount_per_payment":8675,"payment_method":"example payment_method 9888","periodic_limits":[{"alignment":"creation_date","max_payments":2019,"max_total_amount":3756,"period":"year"}],"start_date":"example start_date 6157"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 9103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 2520"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 8470"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 60"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 2954","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1464","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 1509","constraints":{"end_date":"example end_date 600","max_amount_per_payment":7039,"payment_method":"example payment_method 4637","periodic_limits":[{"alignment":"creation_date","max_payments":1181,"max_total_amount":9551,"period":"day"}],"start_date":"example start_date 9516"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 2804"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 2420"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 3922"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 1040","before":"example before 5014"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 9103"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 260","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2520","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 6157","constraints":{"end_date":"example end_date 8675","max_amount_per_payment":2181,"payment_method":"example payment_method 1853","periodic_limits":[{"alignment":"creation_date","max_payments":8470,"max_total_amount":1393,"period":"month"}],"start_date":"example start_date 8652"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 8318"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 9386"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 292"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 7029"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 1719","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1215","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 2420","constraints":{"end_date":"example end_date 2954","max_amount_per_payment":1464,"payment_method":"example payment_method 2060","periodic_limits":[{"alignment":"creation_date","max_payments":9516,"max_total_amount":1757,"period":"week"}],"start_date":"example start_date 1079"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 60"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 2804"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 1509"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 1040","before":"example before 5014"},"limit":50}} }, "get": { "method": "GET", "path_template": "/billing_requests/:identity", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 3479","authorisation_type":"example authorisation_type 6592"},"collect_customer_details":{"default_country_code":"example default_country_code 8151","incomplete_fields":{"customer":["example customer 8682"],"customer_billing_detail":["example customer_billing_detail 5265"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 8662"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 9284","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6000","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 6336","constraints":{"end_date":"example end_date 3472","max_amount_per_payment":1544,"payment_method":"example payment_method 2395","periodic_limits":[{"alignment":"calendar","max_payments":1237,"max_total_amount":2174,"period":"year"}],"start_date":"example start_date 3338"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 2869"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 8622"},"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 574"},"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 2390"],"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 235"},"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 8070","authorisation_type":"example authorisation_type 2869"},"collect_customer_details":{"default_country_code":"example default_country_code 421","incomplete_fields":{"customer":["example customer 2390"],"customer_billing_detail":["example customer_billing_detail 574"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 235"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6336","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3338","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 7420","constraints":{"end_date":"example end_date 2174","max_amount_per_payment":1237,"payment_method":"example payment_method 3524","periodic_limits":[{"alignment":"creation_date","max_payments":3352,"max_total_amount":9648,"period":"week"}],"start_date":"example start_date 2395"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 8622"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 5740"},"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 6592"},"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 3479"],"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 6000"},"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 4511","authorisation_type":"example authorisation_type 5343"},"collect_customer_details":{"default_country_code":"example default_country_code 1053","incomplete_fields":{"customer":["example customer 5166"],"customer_billing_detail":["example customer_billing_detail 9859"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 8721"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6039","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6531","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 4658","constraints":{"end_date":"example end_date 8284","max_amount_per_payment":2375,"payment_method":"example payment_method 1874","periodic_limits":[{"alignment":"calendar","max_payments":6537,"max_total_amount":106,"period":"month"}],"start_date":"example start_date 6114"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 9723"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 7587"},"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 8408"},"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 9867"],"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 4231"},"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 4511","authorisation_type":"example authorisation_type 5343"},"collect_customer_details":{"default_country_code":"example default_country_code 4231","incomplete_fields":{"customer":["example customer 8721"],"customer_billing_detail":["example customer_billing_detail 855"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 1657"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6039","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6531","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 7008","constraints":{"end_date":"example end_date 6537","max_amount_per_payment":5528,"payment_method":"example payment_method 3653","periodic_limits":[{"alignment":"calendar","max_payments":2375,"max_total_amount":8284,"period":"flexible"}],"start_date":"example start_date 106"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 9867"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 259"},"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 4658"},"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 6114"],"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 9723"},"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 4405","authorisation_type":"example authorisation_type 9081"},"collect_customer_details":{"default_country_code":"example default_country_code 7276","incomplete_fields":{"customer":["example customer 1466"],"customer_billing_detail":["example customer_billing_detail 1509"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"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 4983"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 5036","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 7412","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 2120","constraints":{"end_date":"example end_date 7871","max_amount_per_payment":7653,"payment_method":"example payment_method 1128","periodic_limits":[{"alignment":"calendar","max_payments":8602,"max_total_amount":6861,"period":"flexible"}],"start_date":"example start_date 8345"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 4698"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 7762"},"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 7477"},"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 4926"],"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 556"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} + "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 4405","authorisation_type":"example authorisation_type 7276"},"collect_customer_details":{"default_country_code":"example default_country_code 8240","incomplete_fields":{"customer":["example customer 2120"],"customer_billing_detail":["example customer_billing_detail 9081"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"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 7695"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6861","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9159","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 7477","constraints":{"end_date":"example end_date 2887","max_amount_per_payment":9430,"payment_method":"example payment_method 2409","periodic_limits":[{"alignment":"creation_date","max_payments":6051,"max_total_amount":6789,"period":"month"}],"start_date":"example start_date 4698"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 5036"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 8146"},"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 8345"},"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 7418"],"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 7653"},"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 3808","authorisation_type":"example authorisation_type 2631"},"collect_customer_details":{"default_country_code":"example default_country_code 2884","incomplete_fields":{"customer":["example customer 8265"],"customer_billing_detail":["example customer_billing_detail 8558"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"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 2677"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 4834","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 580","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 3740","constraints":{"end_date":"example end_date 5048","max_amount_per_payment":3162,"payment_method":"example payment_method 9673","periodic_limits":[{"alignment":"calendar","max_payments":5527,"max_total_amount":9158,"period":"year"}],"start_date":"example start_date 496"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 9023"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 3654"},"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 4993"},"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 3380"],"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 8477"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} + "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 2332","authorisation_type":"example authorisation_type 2677"},"collect_customer_details":{"default_country_code":"example default_country_code 1306","incomplete_fields":{"customer":["example customer 3740"],"customer_billing_detail":["example customer_billing_detail 8531"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 9731"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 9253","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6972","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 8558","constraints":{"end_date":"example end_date 2631","max_amount_per_payment":8265,"payment_method":"example payment_method 4267","periodic_limits":[{"alignment":"creation_date","max_payments":2175,"max_total_amount":1478,"period":"day"}],"start_date":"example start_date 3808"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 9023"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 3654"},"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 496"},"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 5527"],"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 5048"},"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 4024","authorisation_type":"example authorisation_type 1420"},"collect_customer_details":{"default_country_code":"example default_country_code 6494","incomplete_fields":{"customer":["example customer 4806"],"customer_billing_detail":["example customer_billing_detail 8999"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 4187"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 604","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3421","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 7759","constraints":{"end_date":"example end_date 5740","max_amount_per_payment":8089,"payment_method":"example payment_method 5814","periodic_limits":[{"alignment":"calendar","max_payments":8853,"max_total_amount":3357,"period":"flexible"}],"start_date":"example start_date 8475"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 545"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 8193"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"Commercial","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 922"},"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 6765"],"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 3483"},"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 1462","authorisation_type":"example authorisation_type 604"},"collect_customer_details":{"default_country_code":"example default_country_code 8398","incomplete_fields":{"customer":["example customer 3421"],"customer_billing_detail":["example customer_billing_detail 8193"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 2686"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 4806","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6494","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 4007","constraints":{"end_date":"example end_date 7774","max_amount_per_payment":8475,"payment_method":"example payment_method 5740","periodic_limits":[{"alignment":"creation_date","max_payments":5814,"max_total_amount":8089,"period":"flexible"}],"start_date":"example start_date 1581"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 3131"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 8956"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"Epayment","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 45"},"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 922"],"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 4330"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} } } diff --git a/tests/fixtures/blocks.json b/tests/fixtures/blocks.json index 6ef7ca3d..9d9db434 100644 --- a/tests/fixtures/blocks.json +++ b/tests/fixtures/blocks.json @@ -15,24 +15,24 @@ "method": "GET", "path_template": "/blocks", "url_params": [], - "body": {"blocks":[{"active":true,"block_type":"example block_type 6813","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 6316","reason_type":"example reason_type 1582","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 3322","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 2516","reason_type":"example reason_type 6301","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 9277","before":"example before 9555"},"limit":50}} + "body": {"blocks":[{"active":true,"block_type":"example block_type 1582","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 6813","reason_type":"example reason_type 6316","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 2516","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 6301","reason_type":"example reason_type 3322","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 9277","before":"example before 9555"},"limit":50}} }, "disable": { "method": "POST", "path_template": "/blocks/:identity/actions/disable", "url_params": ["BLC123"], - "body": {"blocks":{"active":true,"block_type":"example block_type 3963","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 758","reason_type":"example reason_type 6217","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 758","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 6217","reason_type":"example reason_type 3963","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "enable": { "method": "POST", "path_template": "/blocks/:identity/actions/enable", "url_params": ["BLC123"], - "body": {"blocks":{"active":true,"block_type":"example block_type 2232","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3875","reason_type":"example reason_type 7179","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 3875","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7179","reason_type":"example reason_type 2232","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "block_by_ref": { "method": "POST", "path_template": "/blocks/block_by_ref", "url_params": [], - "body": {"blocks":[{"active":true,"block_type":"example block_type 3333","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7627","reason_type":"example reason_type 3740","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 1552","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 4534","reason_type":"example reason_type 3928","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 4647","before":"example before 7037"},"limit":50}} + "body": {"blocks":[{"active":true,"block_type":"example block_type 3333","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7627","reason_type":"example reason_type 3740","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 4534","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3928","reason_type":"example reason_type 1552","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 7037","before":"example before 4647"},"limit":50}} } } diff --git a/tests/fixtures/creditors.json b/tests/fixtures/creditors.json index b929ff0a..e0e82176 100644 --- a/tests/fixtures/creditors.json +++ b/tests/fixtures/creditors.json @@ -3,24 +3,24 @@ "method": "POST", "path_template": "/creditors", "url_params": [], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 9969","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 1009","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 6346","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 712","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 712","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 9969","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 6346","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1009","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} }, "list": { "method": "GET", "path_template": "/creditors", "url_params": [], - "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 3589","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 6314","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 9356","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 104","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 7223","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 2442","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 5339","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7764","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 5619","before":"example before 1730"},"limit":50}} + "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 3589","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 6314","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 104","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9356","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 7223","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 5339","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 2442","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7764","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 5619","before":"example before 1730"},"limit":50}} }, "get": { "method": "GET", "path_template": "/creditors/:identity", "url_params": ["CR123"], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 9953","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 3360","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 894","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 5985","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 5985","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 9953","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 3360","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 894","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} }, "update": { "method": "PUT", "path_template": "/creditors/:identity", "url_params": ["CR123"], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 7328","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 5721","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 9401","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6213","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 5721","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 6213","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 9401","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7328","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} } } diff --git a/tests/fixtures/customer_notifications.json b/tests/fixtures/customer_notifications.json index 3a3231d6..4f69d17a 100644 --- a/tests/fixtures/customer_notifications.json +++ b/tests/fixtures/customer_notifications.json @@ -3,6 +3,6 @@ "method": "POST", "path_template": "/customer_notifications/:identity/actions/handle", "url_params": ["PCN123"], - "body": {"customer_notifications":{"action_taken":"example action_taken 7912","action_taken_at":"2025-11-20T08:25:53.476Z","action_taken_by":"example action_taken_by 9695","id":"PCN123","links":{"customer":"CU123","event":"EV123","mandate":"MD123","payment":"PM123","refund":"RF123","subscription":"SB123"},"type":"payment_created"}} + "body": {"customer_notifications":{"action_taken":"example action_taken 7912","action_taken_at":"2025-11-20T10:35:29.126Z","action_taken_by":"example action_taken_by 9695","id":"PCN123","links":{"customer":"CU123","event":"EV123","mandate":"MD123","payment":"PM123","refund":"RF123","subscription":"SB123"},"type":"payment_created"}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index dc4ee6fb..49e3d38a 100644 --- a/tests/fixtures/events.json +++ b/tests/fixtures/events.json @@ -3,12 +3,12 @@ "method": "GET", "path_template": "/events", "url_params": [], - "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2025-11-20T08:25:53.477Z","id":"PCN123","mandatory":false,"type":"example type 6452"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2025-11-20T08:25:53.477Z","id":"PCN123","mandatory":false,"type":"example type 3755"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 4135","authorisation_type":"example authorisation_type 2748"},"collect_customer_details":{"default_country_code":"example default_country_code 9350","incomplete_fields":{"customer":["example customer 5652"],"customer_billing_detail":["example customer_billing_detail 3040"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"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 4666"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 4490","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8798","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 9401","constraints":{"end_date":"example end_date 9681","max_amount_per_payment":6848,"payment_method":"example payment_method 2356","periodic_limits":[{"alignment":"creation_date","max_payments":573,"max_total_amount":1099,"period":"flexible"}],"start_date":"example start_date 1051"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 3161"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 6118"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"Epayment","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 9841"},"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 1086"],"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 1092"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}],"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 5768","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 8825","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 4196","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1526","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 7093","max_amount_per_payment":2243,"max_amount_per_period":4121,"max_payments_per_period":2713,"period":"week","start_date":"example start_date 3709"},"consent_type":"example consent_type 4870","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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 3414","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 3882","message":"example message 1590","request_pointer":"example request_pointer 7417"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}],"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":true,"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":true,"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 8268","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 4476","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":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]},"meta":{"cursors":{"after":"example after 7694","before":"example before 8098"},"limit":50}} + "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2025-11-20T10:35:29.127Z","id":"PCN123","mandatory":false,"type":"example type 9350"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2025-11-20T10:35:29.127Z","id":"PCN123","mandatory":true,"type":"example type 5652"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}}],"linked":{"billing_requests":[{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 3161","authorisation_type":"example authorisation_type 8460"},"collect_customer_details":{"default_country_code":"example default_country_code 1099","incomplete_fields":{"customer":["example customer 1051"],"customer_billing_detail":["example customer_billing_detail 573"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 5063"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6524","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1092","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 4490","constraints":{"end_date":"example end_date 9401","max_amount_per_payment":9058,"payment_method":"example payment_method 718","periodic_limits":[{"alignment":"creation_date","max_payments":5392,"max_total_amount":9681,"period":"day"}],"start_date":"example start_date 3585"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 5074"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 4870"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"OtherPayment","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 2713"},"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 4121"],"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 6118"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}],"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 2762","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 4196","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 8825","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 5768","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":"telephone","consent_parameters":{"end_date":"example end_date 7694","max_amount_per_payment":8098,"max_amount_per_period":7417,"max_payments_per_period":3882,"period":"day","start_date":"example start_date 4740"},"consent_type":"example consent_type 4769","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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 6516","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 6452","message":"example message 2283","request_pointer":"example request_pointer 3755"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}],"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":true,"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 1526","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 4476","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":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]},"meta":{"cursors":{"after":"example after 760","before":"example before 5799"},"limit":50}} }, "get": { "method": "GET", "path_template": "/events/:identity", "url_params": ["EV123"], - "body": {"events":{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2025-11-20T08:25:53.477Z","id":"PCN123","mandatory":false,"type":"example type 3794"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"access_token"}}} + "body": {"events":{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2025-11-20T10:35:29.128Z","id":"PCN123","mandatory":false,"type":"example type 8351"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}}} } } diff --git a/tests/fixtures/exports.json b/tests/fixtures/exports.json index 6ab9d6a5..efbf0a2e 100644 --- a/tests/fixtures/exports.json +++ b/tests/fixtures/exports.json @@ -9,6 +9,6 @@ "method": "GET", "path_template": "/exports", "url_params": [], - "body": {"exports":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"},{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"}],"meta":{"cursors":{"after":"example after 722","before":"example before 8601"},"limit":50}} + "body": {"exports":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"},{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"}],"meta":{"cursors":{"after":"example after 8601","before":"example before 722"},"limit":50}} } } diff --git a/tests/fixtures/instalment_schedules.json b/tests/fixtures/instalment_schedules.json index 58ceca2c..4d712139 100644 --- a/tests/fixtures/instalment_schedules.json +++ b/tests/fixtures/instalment_schedules.json @@ -15,7 +15,7 @@ "method": "GET", "path_template": "/instalment_schedules", "url_params": [], - "body": {"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},{"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}],"meta":{"cursors":{"after":"example after 3834","before":"example before 1060"},"limit":50}} + "body": {"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},{"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}],"meta":{"cursors":{"after":"example after 1060","before":"example before 3834"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/mandates.json b/tests/fixtures/mandates.json index d39a6498..9ad69625 100644 --- a/tests/fixtures/mandates.json +++ b/tests/fixtures/mandates.json @@ -3,36 +3,36 @@ "method": "POST", "path_template": "/mandates", "url_params": [], - "body": {"mandates":{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 6053","max_amount_per_payment":6218,"max_amount_per_period":3006,"max_payments_per_period":2188,"period":"week","start_date":"example start_date 6840"},"consent_type":"example consent_type 3571","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"},"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"}} + "body": {"mandates":{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 6218","max_amount_per_payment":7601,"max_amount_per_period":2188,"max_payments_per_period":6840,"period":"week","start_date":"example start_date 6053"},"consent_type":"example consent_type 5093","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"},"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"}} }, "list": { "method": "GET", "path_template": "/mandates", "url_params": [], - "body": {"mandates":[{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 2945","max_amount_per_payment":9407,"max_amount_per_period":7150,"max_payments_per_period":4907,"period":"flexible","start_date":"example start_date 7222"},"consent_type":"example consent_type 7630","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"},"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"},{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 562","max_amount_per_payment":4752,"max_amount_per_period":8114,"max_payments_per_period":3207,"period":"day","start_date":"example start_date 6904"},"consent_type":"example consent_type 5453","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"},"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"}],"meta":{"cursors":{"after":"example after 242","before":"example before 817"},"limit":50}} + "body": {"mandates":[{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 8284","max_amount_per_payment":7150,"max_amount_per_period":7222,"max_payments_per_period":2945,"period":"month","start_date":"example start_date 9407"},"consent_type":"example consent_type 2835","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"},"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"},{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 6775","max_amount_per_payment":8114,"max_amount_per_period":6904,"max_payments_per_period":562,"period":"month","start_date":"example start_date 4752"},"consent_type":"example consent_type 5453","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}],"meta":{"cursors":{"after":"example after 7173","before":"example before 8701"},"limit":50}} }, "get": { "method": "GET", "path_template": "/mandates/:identity", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 6138","max_amount_per_payment":8399,"max_amount_per_period":3045,"max_payments_per_period":9227,"period":"day","start_date":"example start_date 5299"},"consent_type":"example consent_type 4195","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} + "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 6138","max_amount_per_payment":8399,"max_amount_per_period":3045,"max_payments_per_period":9227,"period":"day","start_date":"example start_date 5299"},"consent_type":"example consent_type 4195","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"},"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"}} }, "update": { "method": "PUT", "path_template": "/mandates/:identity", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 593","max_amount_per_payment":1775,"max_amount_per_period":5340,"max_payments_per_period":860,"period":"year","start_date":"example start_date 3539"},"consent_type":"example consent_type 2551","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} + "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 5340","max_amount_per_payment":860,"max_amount_per_period":593,"max_payments_per_period":2551,"period":"flexible","start_date":"example start_date 943"},"consent_type":"example consent_type 1778","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} }, "cancel": { "method": "POST", "path_template": "/mandates/:identity/actions/cancel", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 7185","max_amount_per_payment":5511,"max_amount_per_period":1106,"max_payments_per_period":3179,"period":"year","start_date":"example start_date 4615"},"consent_type":"example consent_type 1281","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} + "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 1106","max_amount_per_payment":3179,"max_amount_per_period":7185,"max_payments_per_period":5511,"period":"day","start_date":"example start_date 1281"},"consent_type":"example consent_type 8314","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} }, "reinstate": { "method": "POST", "path_template": "/mandates/:identity/actions/reinstate", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 7483","max_amount_per_payment":6128,"max_amount_per_period":3360,"max_payments_per_period":5836,"period":"week","start_date":"example start_date 3906"},"consent_type":"example consent_type 8612","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"},"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"}} + "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 5836","max_amount_per_payment":3906,"max_amount_per_period":6128,"max_payments_per_period":6955,"period":"year","start_date":"example start_date 3360"},"consent_type":"example consent_type 8612","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} } } diff --git a/tests/fixtures/negative_balance_limits.json b/tests/fixtures/negative_balance_limits.json index 4830fb6e..3420578d 100644 --- a/tests/fixtures/negative_balance_limits.json +++ b/tests/fixtures/negative_balance_limits.json @@ -3,6 +3,6 @@ "method": "GET", "path_template": "/negative_balance_limits", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 3787","before":"example before 8143"},"limit":50},"negative_balance_limits":[{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}},{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}}]} + "body": {"meta":{"cursors":{"after":"example after 8143","before":"example before 3787"},"limit":50},"negative_balance_limits":[{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}},{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}}]} } } diff --git a/tests/fixtures/outbound_payments.json b/tests/fixtures/outbound_payments.json index b6d133a2..c1a3e596 100644 --- a/tests/fixtures/outbound_payments.json +++ b/tests/fixtures/outbound_payments.json @@ -33,7 +33,7 @@ "method": "GET", "path_template": "/outbound_payments", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 6532","before":"example before 1523"},"limit":50},"outbound_payments":[{"amount":1000,"created_at":"2024-01-01T12:00:00.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}}},{"amount":1000,"created_at":"2024-01-01T12:00:00.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}}}]} + "body": {"meta":{"cursors":{"after":"example after 1523","before":"example before 6532"},"limit":50},"outbound_payments":[{"amount":1000,"created_at":"2024-01-01T12:00:00.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}}},{"amount":1000,"created_at":"2024-01-01T12:00:00.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}}}]} }, "update": { "method": "PUT", diff --git a/tests/fixtures/payer_authorisations.json b/tests/fixtures/payer_authorisations.json index 2591673d..95fdcf66 100644 --- a/tests/fixtures/payer_authorisations.json +++ b/tests/fixtures/payer_authorisations.json @@ -3,19 +3,19 @@ "method": "GET", "path_template": "/payer_authorisations/:identity", "url_params": ["PA123"], - "body": {"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 277","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 9723","message":"example message 2825","request_pointer":"example request_pointer 1190"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"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 9723","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 277","message":"example message 2825","request_pointer":"example request_pointer 1190"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "create": { "method": "POST", "path_template": "/payer_authorisations", "url_params": [], - "body": {"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 4801","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 6501","message":"example message 3847","request_pointer":"example request_pointer 7808"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"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 4801","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 3847","message":"example message 7808","request_pointer":"example request_pointer 6501"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "update": { "method": "PUT", "path_template": "/payer_authorisations/:identity", "url_params": ["PA123"], - "body": {"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 1096","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 7407","message":"example message 4659","request_pointer":"example request_pointer 2414"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"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 7407","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 4659","message":"example message 2414","request_pointer":"example request_pointer 1096"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "submit": { "method": "POST", @@ -27,6 +27,6 @@ "method": "POST", "path_template": "/payer_authorisations/:identity/actions/confirm", "url_params": ["PA123"], - "body": {"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 2395","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 1192","message":"example message 5138","request_pointer":"example request_pointer 1800"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"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 1800","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 1192","message":"example message 5138","request_pointer":"example request_pointer 2395"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} } } diff --git a/tests/fixtures/payment_account_transactions.json b/tests/fixtures/payment_account_transactions.json index b0f7a8ea..c410f25a 100644 --- a/tests/fixtures/payment_account_transactions.json +++ b/tests/fixtures/payment_account_transactions.json @@ -3,6 +3,6 @@ "method": "GET", "path_template": "/payment_accounts/:identity/transactions", "url_params": ["BA123"], - "body": {"meta":{"cursors":{"after":"example after 3527","before":"example before 7636"},"limit":50},"payment_account_transactions":[{"amount":1000,"balance_after_transaction":1000,"counterparty_name":"Acme Ltd","currency":"example currency 2641","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"},{"amount":1000,"balance_after_transaction":1000,"counterparty_name":"Acme Ltd","currency":"example currency 8314","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"}]} + "body": {"meta":{"cursors":{"after":"example after 7636","before":"example before 3527"},"limit":50},"payment_account_transactions":[{"amount":1000,"balance_after_transaction":1000,"counterparty_name":"Acme Ltd","currency":"example currency 2641","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"},{"amount":1000,"balance_after_transaction":1000,"counterparty_name":"Acme Ltd","currency":"example currency 8314","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"}]} } } diff --git a/tests/fixtures/payments.json b/tests/fixtures/payments.json index 3ebd1b38..56a8e49e 100644 --- a/tests/fixtures/payments.json +++ b/tests/fixtures/payments.json @@ -3,13 +3,13 @@ "method": "POST", "path_template": "/payments", "url_params": [], - "body": {"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":true,"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"}} + "body": {"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":true,"scheme":"bacs","status":"submitted"}} }, "list": { "method": "GET", "path_template": "/payments", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 7352","before":"example before 8454"},"limit":50},"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":true,"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":true,"scheme":"bacs","status":"submitted"},{"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":true,"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"}]} + "body": {"meta":{"cursors":{"after":"example after 7352","before":"example before 8454"},"limit":50},"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":true,"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":true,"scheme":"bacs","status":"submitted"},{"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":true,"scheme":"bacs","status":"submitted"}]} }, "get": { "method": "GET", @@ -27,7 +27,7 @@ "method": "POST", "path_template": "/payments/:identity/actions/cancel", "url_params": ["PM123"], - "body": {"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":true,"scheme":"bacs","status":"submitted"}} + "body": {"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":true,"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"}} }, "retry": { "method": "POST", diff --git a/tests/fixtures/scheme_identifiers.json b/tests/fixtures/scheme_identifiers.json index 7fd5b4b2..d4ce90ce 100644 --- a/tests/fixtures/scheme_identifiers.json +++ b/tests/fixtures/scheme_identifiers.json @@ -9,7 +9,7 @@ "method": "GET", "path_template": "/scheme_identifiers", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 1878","before":"example before 856"},"limit":50},"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 7107","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1428","region":"Greater London","scheme":"bacs","status":"pending"},{"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 3495","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6082","region":"Greater London","scheme":"bacs","status":"pending"}]} + "body": {"meta":{"cursors":{"after":"example after 856","before":"example before 1878"},"limit":50},"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 7107","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1428","region":"Greater London","scheme":"bacs","status":"pending"},{"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 3495","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6082","region":"Greater London","scheme":"bacs","status":"pending"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/subscriptions.json b/tests/fixtures/subscriptions.json index 3f70daaa..dcd98109 100644 --- a/tests/fixtures/subscriptions.json +++ b/tests/fixtures/subscriptions.json @@ -9,13 +9,13 @@ "method": "GET", "path_template": "/subscriptions", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 8804","before":"example before 503"},"limit":50},"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"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"}]}]} + "body": {"meta":{"cursors":{"after":"example after 564","before":"example before 1602"},"limit":50},"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"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":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]} }, "get": { "method": "GET", "path_template": "/subscriptions/:identity", "url_params": ["SB123"], - "body": {"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"}]}} + "body": {"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "update": { "method": "PUT", diff --git a/tests/fixtures/transferred_mandates.json b/tests/fixtures/transferred_mandates.json index 80b2a53b..7c47bc11 100644 --- a/tests/fixtures/transferred_mandates.json +++ b/tests/fixtures/transferred_mandates.json @@ -3,6 +3,6 @@ "method": "GET", "path_template": "/transferred_mandates/:identity", "url_params": ["MD123"], - "body": {"transferred_mandates":{"encrypted_customer_bank_details":"example encrypted_customer_bank_details 9962","encrypted_decryption_key":"example encrypted_decryption_key 4832","links":{"customer_bank_account":"BA123","mandate":"MD123"},"public_key_id":"example public_key_id 3332"}} + "body": {"transferred_mandates":{"encrypted_customer_bank_details":"example encrypted_customer_bank_details 3332","encrypted_decryption_key":"example encrypted_decryption_key 9962","links":{"customer_bank_account":"BA123","mandate":"MD123"},"public_key_id":"example public_key_id 4832"}} } } diff --git a/tests/fixtures/verification_details.json b/tests/fixtures/verification_details.json index f52aa2f6..3acd9f3f 100644 --- a/tests/fixtures/verification_details.json +++ b/tests/fixtures/verification_details.json @@ -9,6 +9,6 @@ "method": "GET", "path_template": "/verification_details", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 3416","before":"example before 7356"},"limit":50},"verification_details":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 9438","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 9249"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 8788","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 5809"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"}]} + "body": {"meta":{"cursors":{"after":"example after 7356","before":"example before 3416"},"limit":50},"verification_details":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 9438","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 9249"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 5809","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 8788"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"}]} } } diff --git a/tests/fixtures/webhooks.json b/tests/fixtures/webhooks.json index 316680a7..d9ec5c25 100644 --- a/tests/fixtures/webhooks.json +++ b/tests/fixtures/webhooks.json @@ -3,18 +3,18 @@ "method": "GET", "path_template": "/webhooks", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 4191","before":"example before 1561"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 9244","request_headers":{},"response_body":"example response_body 7346","response_body_truncated":false,"response_code":4633,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":false,"url":"https://example.com/webhooks"},{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 344","request_headers":{},"response_body":"example response_body 1806","response_body_truncated":true,"response_code":7800,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":true,"url":"https://example.com/webhooks"}]} + "body": {"meta":{"cursors":{"after":"example after 1561","before":"example before 4191"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 4633","request_headers":{},"response_body":"example response_body 7346","response_body_truncated":false,"response_code":9243,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":true,"url":"https://example.com/webhooks"},{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 7663","request_headers":{},"response_body":"example response_body 7378","response_body_truncated":true,"response_code":7800,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":true,"url":"https://example.com/webhooks"}]} }, "get": { "method": "GET", "path_template": "/webhooks/:identity", "url_params": ["WB123"], - "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 6312","request_headers":{},"response_body":"example response_body 6444","response_body_truncated":false,"response_code":4278,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":false,"url":"https://example.com/webhooks"}} + "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 1312","request_headers":{},"response_body":"example response_body 6383","response_body_truncated":true,"response_code":6312,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":false,"url":"https://example.com/webhooks"}} }, "retry": { "method": "POST", "path_template": "/webhooks/:identity/actions/retry", "url_params": ["WB123"], - "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 7801","request_headers":{},"response_body":"example response_body 2971","response_body_truncated":true,"response_code":8158,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":false,"successful":false,"url":"https://example.com/webhooks"}} + "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 3816","request_headers":{},"response_body":"example response_body 3799","response_body_truncated":true,"response_code":7801,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":false,"successful":true,"url":"https://example.com/webhooks"}} } } From 39808e86524bba3b2e68247c11fb744e5bad9e7a Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 10:41:53 +0000 Subject: [PATCH 02/12] Changes generated by 0227f812abc07c331324e28050b58bbbb10ecb07 This commit was automatically created from gocardless/gocardless-pro-python-template@0227f812abc07c331324e28050b58bbbb10ecb07 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-python-template/actions/runs/19534004178 --- tests/fixtures/balances.json | 4 ++- tests/fixtures/bank_account_details.json | 4 ++- tests/fixtures/bank_authorisations.json | 6 +++-- tests/fixtures/bank_details_lookups.json | 2 ++ tests/fixtures/billing_request_flows.json | 6 +++-- tests/fixtures/billing_request_templates.json | 10 ++++--- .../billing_request_with_actions.json | 4 ++- tests/fixtures/billing_requests.json | 26 ++++++++++--------- tests/fixtures/blocks.json | 14 +++++----- tests/fixtures/creditor_bank_accounts.json | 4 ++- tests/fixtures/creditors.json | 10 ++++--- tests/fixtures/currency_exchange_rates.json | 4 ++- tests/fixtures/customer_bank_accounts.json | 12 +++++---- tests/fixtures/customer_notifications.json | 4 ++- tests/fixtures/customers.json | 4 ++- tests/fixtures/events.json | 6 +++-- tests/fixtures/exports.json | 6 +++-- tests/fixtures/instalment_schedules.json | 4 ++- tests/fixtures/institutions.json | 6 +++-- tests/fixtures/logos.json | 2 ++ tests/fixtures/mandate_import_entries.json | 4 ++- tests/fixtures/mandate_imports.json | 2 ++ tests/fixtures/mandate_pdfs.json | 2 ++ tests/fixtures/mandates.json | 14 +++++----- tests/fixtures/negative_balance_limits.json | 4 ++- tests/fixtures/outbound_payments.json | 4 ++- tests/fixtures/payer_authorisations.json | 12 +++++---- tests/fixtures/payer_themes.json | 2 ++ .../payment_account_transactions.json | 4 ++- tests/fixtures/payments.json | 12 +++++---- tests/fixtures/payout_items.json | 4 ++- tests/fixtures/payouts.json | 4 ++- tests/fixtures/redirect_flows.json | 8 +++--- tests/fixtures/refunds.json | 4 ++- tests/fixtures/scenario_simulators.json | 2 ++ tests/fixtures/scheme_identifiers.json | 8 +++--- tests/fixtures/subscriptions.json | 16 +++++++----- tests/fixtures/tax_rates.json | 4 ++- tests/fixtures/transferred_mandates.json | 4 ++- tests/fixtures/verification_details.json | 6 +++-- tests/fixtures/webhooks.json | 8 +++--- 41 files changed, 174 insertions(+), 92 deletions(-) diff --git a/tests/fixtures/balances.json b/tests/fixtures/balances.json index f9958814..bb6a44e3 100644 --- a/tests/fixtures/balances.json +++ b/tests/fixtures/balances.json @@ -1,8 +1,10 @@ { + + "list": { "method": "GET", "path_template": "/balances", "url_params": [], - "body": {"balances":[{"amount":8081,"balance_type":"confirmed_funds","currency":"EUR","last_updated_at":"2014-01-01T12:00:00.000Z","links":{"creditor":"CR123"}},{"amount":7887,"balance_type":"confirmed_funds","currency":"EUR","last_updated_at":"2014-01-01T12:00:00.000Z","links":{"creditor":"CR123"}}],"meta":{"cursors":{"after":"example after 4059","before":"example before 1847"},"limit":50}} + "body": {"balances":[{"amount":101,"balance_type":"confirmed_funds","currency":"EUR","last_updated_at":"2014-01-01T12:00:00.000Z","links":{"creditor":"CR123"}},{"amount":102,"balance_type":"confirmed_funds","currency":"EUR","last_updated_at":"2014-01-01T12:00:00.000Z","links":{"creditor":"CR123"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} } } diff --git a/tests/fixtures/bank_account_details.json b/tests/fixtures/bank_account_details.json index 0cd0a617..ba8c7397 100644 --- a/tests/fixtures/bank_account_details.json +++ b/tests/fixtures/bank_account_details.json @@ -1,8 +1,10 @@ { + + "get": { "method": "GET", "path_template": "/bank_account_details/:identity", "url_params": ["BA123"], - "body": {"bank_account_details":{"ciphertext":"example ciphertext 1318","encrypted_key":"example encrypted_key 456","iv":"example iv 2081","protected":"example protected 2540","tag":"example tag 4425"}} + "body": {"bank_account_details":{"ciphertext":"example ciphertext 101","encrypted_key":"example encrypted_key 101","iv":"example iv 101","protected":"example protected 101","tag":"example tag 101"}} } } diff --git a/tests/fixtures/bank_authorisations.json b/tests/fixtures/bank_authorisations.json index 760a0ba1..eba58788 100644 --- a/tests/fixtures/bank_authorisations.json +++ b/tests/fixtures/bank_authorisations.json @@ -1,14 +1,16 @@ { + + "create": { "method": "POST", "path_template": "/bank_authorisations", "url_params": [], - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 3300","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2025-11-20T10:35:29.102Z","expires_at":"2025-11-20T10:35:29.102Z","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"}} + "body": {"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"}} }, "get": { "method": "GET", "path_template": "/bank_authorisations/:identity", "url_params": ["BAU123"], - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 694","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2025-11-20T10:35:29.102Z","expires_at":"2025-11-20T10:35:29.102Z","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"}} + "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 102","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"}} } } diff --git a/tests/fixtures/bank_details_lookups.json b/tests/fixtures/bank_details_lookups.json index 379613cf..f803811f 100644 --- a/tests/fixtures/bank_details_lookups.json +++ b/tests/fixtures/bank_details_lookups.json @@ -1,4 +1,6 @@ { + + "create": { "method": "POST", "path_template": "/bank_details_lookups", diff --git a/tests/fixtures/billing_request_flows.json b/tests/fixtures/billing_request_flows.json index 0f7007dc..5ecfd774 100644 --- a/tests/fixtures/billing_request_flows.json +++ b/tests/fixtures/billing_request_flows.json @@ -1,14 +1,16 @@ { + + "create": { "method": "POST", "path_template": "/billing_request_flows", "url_params": [], - "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2025-11-20T10:35:29.108Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2025-11-20T10:35:29.108Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":true,"lock_customer_details":false,"prefilled_bank_account":{"account_type":"savings"},"prefilled_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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true,"skip_success_screen":true}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2024-01-15T10:00:00.000Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-01-15T10:00:00.000Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":false,"lock_customer_details":false,"prefilled_bank_account":{"account_type":"savings"},"prefilled_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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":false,"skip_success_screen":false}} }, "initialise": { "method": "POST", "path_template": "/billing_request_flows/:identity/actions/initialise", "url_params": ["BRF123"], - "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2025-11-20T10:35:29.109Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2025-11-20T10:35:29.109Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":false,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true,"skip_success_screen":false}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2024-01-15T10:00:00.000Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-01-15T10:00:00.000Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":true,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":true,"show_success_redirect_button":true,"skip_success_screen":true}} } } diff --git a/tests/fixtures/billing_request_templates.json b/tests/fixtures/billing_request_templates.json index 2e02566d..acc182eb 100644 --- a/tests/fixtures/billing_request_templates.json +++ b/tests/fixtures/billing_request_templates.json @@ -1,26 +1,28 @@ { + + "list": { "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 8033","max_amount_per_payment":7574,"payment_method":"example payment_method 1406","periodic_limits":[{"alignment":"calendar","max_payments":2474,"max_total_amount":894,"period":"year"}],"start_date":"example start_date 3922"},"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 909","max_amount_per_payment":9277,"payment_method":"example payment_method 8610","periodic_limits":[{"alignment":"creation_date","max_payments":9914,"max_total_amount":5395,"period":"day"}],"start_date":"example start_date 7650"},"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 671","before":"example before 5645"},"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":"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}} }, "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 8198","max_amount_per_payment":2734,"payment_method":"example payment_method 8879","periodic_limits":[{"alignment":"creation_date","max_payments":4721,"max_total_amount":3354,"period":"week"}],"start_date":"example start_date 7208"},"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":"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"}} }, "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 10","max_amount_per_payment":3921,"payment_method":"example payment_method 1267","periodic_limits":[{"alignment":"calendar","max_payments":8849,"max_total_amount":9301,"period":"day"}],"start_date":"example start_date 8374"},"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":"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"}} }, "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 6110","max_amount_per_payment":6872,"payment_method":"example payment_method 4401","periodic_limits":[{"alignment":"calendar","max_payments":9466,"max_total_amount":5596,"period":"year"}],"start_date":"example start_date 75"},"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":"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"}} } } diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index 0eae83c4..9af83fcf 100644 --- a/tests/fixtures/billing_request_with_actions.json +++ b/tests/fixtures/billing_request_with_actions.json @@ -1,8 +1,10 @@ { + + "create_with_actions": { "method": "POST", "path_template": "/billing_requests/create_with_actions", "url_params": [], - "body": {"billing_request_with_actions":{"bank_authorisations":{"authorisation_type":"example authorisation_type 9750","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2025-11-20T10:35:29.114Z","expires_at":"2025-11-20T10:35:29.114Z","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 1446","authorisation_type":"example authorisation_type 9921"},"collect_customer_details":{"default_country_code":"example default_country_code 5214","incomplete_fields":{"customer":["example customer 9959"],"customer_billing_detail":["example customer_billing_detail 325"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 5666"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 5642","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 541","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 6244","constraints":{"end_date":"example end_date 8730","max_amount_per_payment":3176,"payment_method":"example payment_method 8223","periodic_limits":[{"alignment":"calendar","max_payments":9219,"max_total_amount":9026,"period":"day"}],"start_date":"example start_date 3114"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 1436"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 701"},"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 7221"},"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 7694"],"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 8619"},"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 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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"}}}} } } diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index e16d7ad3..7ddb421a 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -1,74 +1,76 @@ { + + "create": { "method": "POST", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 3237","authorisation_type":"example authorisation_type 9106"},"collect_customer_details":{"default_country_code":"example default_country_code 495","incomplete_fields":{"customer":["example customer 1528"],"customer_billing_detail":["example customer_billing_detail 5466"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 3274"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 8162","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8511","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 1737","constraints":{"end_date":"example end_date 2790","max_amount_per_payment":3015,"payment_method":"example payment_method 5541","periodic_limits":[{"alignment":"creation_date","max_payments":6831,"max_total_amount":7387,"period":"year"}],"start_date":"example start_date 2888"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 5356"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":true,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 6413"},"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 5194"},"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 563"],"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 5089"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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_details"}],"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":true,"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_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":false,"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 3721","authorisation_type":"example authorisation_type 7189"},"collect_customer_details":{"default_country_code":"example default_country_code 2199","incomplete_fields":{"customer":["example customer 3000"],"customer_billing_detail":["example customer_billing_detail 8705"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 1957"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 4324","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 4078","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 9703","constraints":{"end_date":"example end_date 1563","max_amount_per_payment":156,"payment_method":"example payment_method 8266","periodic_limits":[{"alignment":"calendar","max_payments":4783,"max_total_amount":7202,"period":"week"}],"start_date":"example start_date 5746"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 2605"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 9002"},"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 2433"},"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 4147"],"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 9718"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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 104"],"customer_billing_detail":["example customer_billing_detail 104"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 103","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":"managed","links":{"mandate":"example mandate 102"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 103"},"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":false,"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 9757","authorisation_type":"example authorisation_type 3687"},"collect_customer_details":{"default_country_code":"example default_country_code 8010","incomplete_fields":{"customer":["example customer 3410"],"customer_billing_detail":["example customer_billing_detail 5285"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 1598"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 1137","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3133","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 59","constraints":{"end_date":"example end_date 9336","max_amount_per_payment":2546,"payment_method":"example payment_method 9107","periodic_limits":[{"alignment":"creation_date","max_payments":3033,"max_total_amount":2002,"period":"week"}],"start_date":"example start_date 8878"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 9843"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 7996"},"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 1515"},"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 1351"],"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 8590"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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 106"],"customer_billing_detail":["example customer_billing_detail 106"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 105","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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 105"},"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"}}} }, "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 8582","authorisation_type":"example authorisation_type 5384"},"collect_customer_details":{"default_country_code":"example default_country_code 3098","incomplete_fields":{"customer":["example customer 8553"],"customer_billing_detail":["example customer_billing_detail 8591"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 7175"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 7903","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1224","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 6137","constraints":{"end_date":"example end_date 2079","max_amount_per_payment":2066,"payment_method":"example payment_method 1270","periodic_limits":[{"alignment":"creation_date","max_payments":9819,"max_total_amount":3086,"period":"year"}],"start_date":"example start_date 3981"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 7726"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 3612"},"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 4384"},"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 2818"],"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 1528"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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_details"}],"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":"managed","links":{"mandate":"example mandate 104"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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"}}} }, "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 4208","authorisation_type":"example authorisation_type 7743"},"collect_customer_details":{"default_country_code":"example default_country_code 7822","incomplete_fields":{"customer":["example customer 1223"],"customer_billing_detail":["example customer_billing_detail 7342"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 440"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 1968","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1166","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 5786","constraints":{"end_date":"example end_date 1602","max_amount_per_payment":7351,"payment_method":"example payment_method 8844","periodic_limits":[{"alignment":"calendar","max_payments":4801,"max_total_amount":9183,"period":"day"}],"start_date":"example start_date 90"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 3640"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":true,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 3710"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"Epayment","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 7839"},"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 3616"],"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 8154"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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_details"}],"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":"managed","links":{"mandate":"example mandate 105"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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"}}} }, "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 7920","authorisation_type":"example authorisation_type 2048"},"collect_customer_details":{"default_country_code":"example default_country_code 8666","incomplete_fields":{"customer":["example customer 6756"],"customer_billing_detail":["example customer_billing_detail 5695"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 1162"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6629","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1092","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 3039","constraints":{"end_date":"example end_date 9513","max_amount_per_payment":9700,"payment_method":"example payment_method 1359","periodic_limits":[{"alignment":"calendar","max_payments":783,"max_total_amount":6720,"period":"flexible"}],"start_date":"example start_date 8247"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 3430"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 7577"},"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 9456"},"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 6200"],"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 5320"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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 112"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 111","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_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"}}} }, "list": { "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 9103"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 260","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2520","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 6157","constraints":{"end_date":"example end_date 8675","max_amount_per_payment":2181,"payment_method":"example payment_method 1853","periodic_limits":[{"alignment":"creation_date","max_payments":8470,"max_total_amount":1393,"period":"month"}],"start_date":"example start_date 8652"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 8318"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 9386"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 292"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 7029"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 1719","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1215","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 2420","constraints":{"end_date":"example end_date 2954","max_amount_per_payment":1464,"payment_method":"example payment_method 2060","periodic_limits":[{"alignment":"creation_date","max_payments":9516,"max_total_amount":1757,"period":"week"}],"start_date":"example start_date 1079"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 60"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 2804"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 1509"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 1040","before":"example before 5014"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "method": "GET", "path_template": "/billing_requests/:identity", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 8070","authorisation_type":"example authorisation_type 2869"},"collect_customer_details":{"default_country_code":"example default_country_code 421","incomplete_fields":{"customer":["example customer 2390"],"customer_billing_detail":["example customer_billing_detail 574"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"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 235"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6336","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3338","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 7420","constraints":{"end_date":"example end_date 2174","max_amount_per_payment":1237,"payment_method":"example payment_method 3524","periodic_limits":[{"alignment":"creation_date","max_payments":3352,"max_total_amount":9648,"period":"week"}],"start_date":"example start_date 2395"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 8622"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 5740"},"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 6592"},"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 3479"],"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 6000"},"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 114"],"customer_billing_detail":["example customer_billing_detail 116"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 115","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":"managed","links":{"mandate":"example mandate 109"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 113"},"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"}}} }, "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 4511","authorisation_type":"example authorisation_type 5343"},"collect_customer_details":{"default_country_code":"example default_country_code 4231","incomplete_fields":{"customer":["example customer 8721"],"customer_billing_detail":["example customer_billing_detail 855"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 1657"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6039","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6531","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 7008","constraints":{"end_date":"example end_date 6537","max_amount_per_payment":5528,"payment_method":"example payment_method 3653","periodic_limits":[{"alignment":"calendar","max_payments":2375,"max_total_amount":8284,"period":"flexible"}],"start_date":"example start_date 106"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 9867"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 259"},"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 4658"},"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 6114"],"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 9723"},"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_details"}],"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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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"}}} }, "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 4405","authorisation_type":"example authorisation_type 7276"},"collect_customer_details":{"default_country_code":"example default_country_code 8240","incomplete_fields":{"customer":["example customer 2120"],"customer_billing_detail":["example customer_billing_detail 9081"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"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 7695"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6861","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9159","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 7477","constraints":{"end_date":"example end_date 2887","max_amount_per_payment":9430,"payment_method":"example payment_method 2409","periodic_limits":[{"alignment":"creation_date","max_payments":6051,"max_total_amount":6789,"period":"month"}],"start_date":"example start_date 4698"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 5036"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 8146"},"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 8345"},"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 7418"],"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 7653"},"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 118"],"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_details"}],"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_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 117"},"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"}}} }, "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 2332","authorisation_type":"example authorisation_type 2677"},"collect_customer_details":{"default_country_code":"example default_country_code 1306","incomplete_fields":{"customer":["example customer 3740"],"customer_billing_detail":["example customer_billing_detail 8531"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 9731"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 9253","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6972","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 8558","constraints":{"end_date":"example end_date 2631","max_amount_per_payment":8265,"payment_method":"example payment_method 4267","periodic_limits":[{"alignment":"creation_date","max_payments":2175,"max_total_amount":1478,"period":"day"}],"start_date":"example start_date 3808"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 9023"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 3654"},"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 496"},"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 5527"],"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 5048"},"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_details"}],"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":"managed","links":{"mandate":"example mandate 112"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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"}}} }, "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 1462","authorisation_type":"example authorisation_type 604"},"collect_customer_details":{"default_country_code":"example default_country_code 8398","incomplete_fields":{"customer":["example customer 3421"],"customer_billing_detail":["example customer_billing_detail 8193"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 2686"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 4806","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6494","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 4007","constraints":{"end_date":"example end_date 7774","max_amount_per_payment":8475,"payment_method":"example payment_method 5740","periodic_limits":[{"alignment":"creation_date","max_payments":5814,"max_total_amount":8089,"period":"flexible"}],"start_date":"example start_date 1581"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 3131"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 8956"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"Epayment","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 45"},"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 922"],"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 4330"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"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 122"],"customer_billing_detail":["example customer_billing_detail 124"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 123","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":"managed","links":{"mandate":"example mandate 113"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 121"},"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"}}} } } diff --git a/tests/fixtures/blocks.json b/tests/fixtures/blocks.json index 9d9db434..bca9bdec 100644 --- a/tests/fixtures/blocks.json +++ b/tests/fixtures/blocks.json @@ -1,38 +1,40 @@ { + + "create": { "method": "POST", "path_template": "/blocks", "url_params": [], - "body": {"blocks":{"active":true,"block_type":"example block_type 9485","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 864","reason_type":"example reason_type 2088","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 101","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 101","reason_type":"example reason_type 101","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "get": { "method": "GET", "path_template": "/blocks/:identity", "url_params": ["BLC123"], - "body": {"blocks":{"active":true,"block_type":"example block_type 4560","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 9719","reason_type":"example reason_type 6216","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 102","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 102","reason_type":"example reason_type 102","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "list": { "method": "GET", "path_template": "/blocks", "url_params": [], - "body": {"blocks":[{"active":true,"block_type":"example block_type 1582","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 6813","reason_type":"example reason_type 6316","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 2516","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 6301","reason_type":"example reason_type 3322","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 9277","before":"example before 9555"},"limit":50}} + "body": {"blocks":[{"active":true,"block_type":"example block_type 103","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 103","reason_type":"example reason_type 103","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 104","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 104","reason_type":"example reason_type 104","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "disable": { "method": "POST", "path_template": "/blocks/:identity/actions/disable", "url_params": ["BLC123"], - "body": {"blocks":{"active":true,"block_type":"example block_type 758","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 6217","reason_type":"example reason_type 3963","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 105","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 105","reason_type":"example reason_type 105","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "enable": { "method": "POST", "path_template": "/blocks/:identity/actions/enable", "url_params": ["BLC123"], - "body": {"blocks":{"active":true,"block_type":"example block_type 3875","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7179","reason_type":"example reason_type 2232","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 106","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 106","reason_type":"example reason_type 106","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "block_by_ref": { "method": "POST", "path_template": "/blocks/block_by_ref", "url_params": [], - "body": {"blocks":[{"active":true,"block_type":"example block_type 3333","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7627","reason_type":"example reason_type 3740","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 4534","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3928","reason_type":"example reason_type 1552","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 7037","before":"example before 4647"},"limit":50}} + "body": {"blocks":[{"active":true,"block_type":"example block_type 107","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 107","reason_type":"example reason_type 107","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 108","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 108","reason_type":"example reason_type 108","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 102","before":"example before 102"},"limit":50}} } } diff --git a/tests/fixtures/creditor_bank_accounts.json b/tests/fixtures/creditor_bank_accounts.json index fc5c5eae..56b8cc77 100644 --- a/tests/fixtures/creditor_bank_accounts.json +++ b/tests/fixtures/creditor_bank_accounts.json @@ -1,4 +1,6 @@ { + + "create": { "method": "POST", "path_template": "/creditor_bank_accounts", @@ -9,7 +11,7 @@ "method": "GET", "path_template": "/creditor_bank_accounts", "url_params": [], - "body": {"creditor_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{},"verification_status":"successful"},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{},"verification_status":"successful"}],"meta":{"cursors":{"after":"example after 6184","before":"example before 1757"},"limit":50}} + "body": {"creditor_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{},"verification_status":"successful"},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{},"verification_status":"successful"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/creditors.json b/tests/fixtures/creditors.json index e0e82176..bbd9b052 100644 --- a/tests/fixtures/creditors.json +++ b/tests/fixtures/creditors.json @@ -1,26 +1,28 @@ { + + "create": { "method": "POST", "path_template": "/creditors", "url_params": [], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 712","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 9969","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 6346","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1009","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} + "body": {"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"}} }, "list": { "method": "GET", "path_template": "/creditors", "url_params": [], - "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 3589","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 6314","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 104","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9356","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 7223","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 5339","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 2442","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7764","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 5619","before":"example before 1730"},"limit":50}} + "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 102","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 102","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"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 103","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 103","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 103","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 103","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "method": "GET", "path_template": "/creditors/:identity", "url_params": ["CR123"], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 5985","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 9953","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 3360","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 894","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 104","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 104","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 104","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 104","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} }, "update": { "method": "PUT", "path_template": "/creditors/:identity", "url_params": ["CR123"], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 5721","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 6213","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 9401","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7328","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 105","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 105","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 105","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 105","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} } } diff --git a/tests/fixtures/currency_exchange_rates.json b/tests/fixtures/currency_exchange_rates.json index 4e3008a8..e08c8e63 100644 --- a/tests/fixtures/currency_exchange_rates.json +++ b/tests/fixtures/currency_exchange_rates.json @@ -1,8 +1,10 @@ { + + "list": { "method": "GET", "path_template": "/currency_exchange_rates", "url_params": [], - "body": {"currency_exchange_rates":[{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"},{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"}],"meta":{"cursors":{"after":"example after 4283","before":"example before 6262"},"limit":50}} + "body": {"currency_exchange_rates":[{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"},{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} } } diff --git a/tests/fixtures/customer_bank_accounts.json b/tests/fixtures/customer_bank_accounts.json index 94e28ef0..4ea7e1e8 100644 --- a/tests/fixtures/customer_bank_accounts.json +++ b/tests/fixtures/customer_bank_accounts.json @@ -1,32 +1,34 @@ { + + "create": { "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 1315"},"metadata":{}}} + "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":{}}} }, "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 5540"},"metadata":{}},{"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 4492"},"metadata":{}}],"meta":{"cursors":{"after":"example after 6591","before":"example before 342"},"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":{}},{"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":{}}],"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 1898"},"metadata":{}}} + "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":{}}} }, "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 3401"},"metadata":{}}} + "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":{}}} }, "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 5707"},"metadata":{}}} + "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":{}}} } } diff --git a/tests/fixtures/customer_notifications.json b/tests/fixtures/customer_notifications.json index 4f69d17a..9ac0226a 100644 --- a/tests/fixtures/customer_notifications.json +++ b/tests/fixtures/customer_notifications.json @@ -1,8 +1,10 @@ { + + "handle": { "method": "POST", "path_template": "/customer_notifications/:identity/actions/handle", "url_params": ["PCN123"], - "body": {"customer_notifications":{"action_taken":"example action_taken 7912","action_taken_at":"2025-11-20T10:35:29.126Z","action_taken_by":"example action_taken_by 9695","id":"PCN123","links":{"customer":"CU123","event":"EV123","mandate":"MD123","payment":"PM123","refund":"RF123","subscription":"SB123"},"type":"payment_created"}} + "body": {"customer_notifications":{"action_taken":"example action_taken 101","action_taken_at":"2024-01-15T10:00:00.000Z","action_taken_by":"example action_taken_by 101","id":"PCN123","links":{"customer":"CU123","event":"EV123","mandate":"MD123","payment":"PM123","refund":"RF123","subscription":"SB123"},"type":"payment_created"}} } } diff --git a/tests/fixtures/customers.json b/tests/fixtures/customers.json index 91218144..5effb30b 100644 --- a/tests/fixtures/customers.json +++ b/tests/fixtures/customers.json @@ -1,4 +1,6 @@ { + + "create": { "method": "POST", "path_template": "/customers", @@ -9,7 +11,7 @@ "method": "GET", "path_template": "/customers", "url_params": [], - "body": {"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"},{"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"}],"meta":{"cursors":{"after":"example after 1350","before":"example before 4721"},"limit":50}} + "body": {"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"},{"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"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index 49e3d38a..1f06dd66 100644 --- a/tests/fixtures/events.json +++ b/tests/fixtures/events.json @@ -1,14 +1,16 @@ { + + "list": { "method": "GET", "path_template": "/events", "url_params": [], - "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2025-11-20T10:35:29.127Z","id":"PCN123","mandatory":false,"type":"example type 9350"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2025-11-20T10:35:29.127Z","id":"PCN123","mandatory":true,"type":"example type 5652"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}}],"linked":{"billing_requests":[{"actions":[{"available_currencies":["GBP"],"bank_authorisation":{"adapter":"example adapter 3161","authorisation_type":"example authorisation_type 8460"},"collect_customer_details":{"default_country_code":"example default_country_code 1099","incomplete_fields":{"customer":["example customer 1051"],"customer_billing_detail":["example customer_billing_detail 573"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 5063"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6524","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1092","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 4490","constraints":{"end_date":"example end_date 9401","max_amount_per_payment":9058,"payment_method":"example payment_method 718","periodic_limits":[{"alignment":"creation_date","max_payments":5392,"max_total_amount":9681,"period":"day"}],"start_date":"example start_date 3585"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 5074"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 4870"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"OtherPayment","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 2713"},"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 4121"],"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 6118"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}],"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 2762","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 4196","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 8825","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 5768","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":"telephone","consent_parameters":{"end_date":"example end_date 7694","max_amount_per_payment":8098,"max_amount_per_period":7417,"max_payments_per_period":3882,"period":"day","start_date":"example start_date 4740"},"consent_type":"example consent_type 4769","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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 6516","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 6452","message":"example message 2283","request_pointer":"example request_pointer 3755"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}],"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":true,"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 1526","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 4476","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":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]},"meta":{"cursors":{"after":"example after 760","before":"example before 5799"},"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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", "path_template": "/events/:identity", "url_params": ["EV123"], - "body": {"events":{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2025-11-20T10:35:29.128Z","id":"PCN123","mandatory":false,"type":"example type 8351"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}}} + "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 106"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}}} } } diff --git a/tests/fixtures/exports.json b/tests/fixtures/exports.json index efbf0a2e..b45737ca 100644 --- a/tests/fixtures/exports.json +++ b/tests/fixtures/exports.json @@ -1,14 +1,16 @@ { + + "get": { "method": "GET", "path_template": "/exports/:identity", "url_params": ["EX123"], - "body": {"exports":{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","download_url":"example download_url 5666","export_type":"payments_index","id":"EX123"}} + "body": {"exports":{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","download_url":"example download_url 101","export_type":"payments_index","id":"EX123"}} }, "list": { "method": "GET", "path_template": "/exports", "url_params": [], - "body": {"exports":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"},{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"}],"meta":{"cursors":{"after":"example after 8601","before":"example before 722"},"limit":50}} + "body": {"exports":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"},{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} } } diff --git a/tests/fixtures/instalment_schedules.json b/tests/fixtures/instalment_schedules.json index 4d712139..72159a5d 100644 --- a/tests/fixtures/instalment_schedules.json +++ b/tests/fixtures/instalment_schedules.json @@ -1,4 +1,6 @@ { + + "create_with_dates": { "method": "POST", "path_template": "/instalment_schedules", @@ -15,7 +17,7 @@ "method": "GET", "path_template": "/instalment_schedules", "url_params": [], - "body": {"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},{"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}],"meta":{"cursors":{"after":"example after 1060","before":"example before 3834"},"limit":50}} + "body": {"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},{"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}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/institutions.json b/tests/fixtures/institutions.json index 84bc41fe..1a46b30f 100644 --- a/tests/fixtures/institutions.json +++ b/tests/fixtures/institutions.json @@ -1,14 +1,16 @@ { + + "list": { "method": "GET", "path_template": "/institutions", "url_params": [], - "body": {"institutions":[{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","limits":{"daily":{},"single":{}},"logo_url":"https://gocardless/assets/logos/monzo","name":"VAT","status":"enabled"},{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","limits":{"daily":{},"single":{}},"logo_url":"https://gocardless/assets/logos/monzo","name":"VAT","status":"enabled"}],"meta":{"cursors":{"after":"example after 162","before":"example before 6013"},"limit":50}} + "body": {"institutions":[{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","limits":{"daily":{},"single":{}},"logo_url":"https://gocardless/assets/logos/monzo","name":"VAT","status":"enabled"},{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","limits":{"daily":{},"single":{}},"logo_url":"https://gocardless/assets/logos/monzo","name":"VAT","status":"enabled"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "list_for_billing_request": { "method": "GET", "path_template": "/billing_requests/:identity/institutions", "url_params": ["BRQ123"], - "body": {"institutions":[{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","limits":{"daily":{},"single":{}},"logo_url":"https://gocardless/assets/logos/monzo","name":"VAT","status":"enabled"},{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","limits":{"daily":{},"single":{}},"logo_url":"https://gocardless/assets/logos/monzo","name":"VAT","status":"enabled"}],"meta":{"cursors":{"after":"example after 3817","before":"example before 6898"},"limit":50}} + "body": {"institutions":[{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","limits":{"daily":{},"single":{}},"logo_url":"https://gocardless/assets/logos/monzo","name":"VAT","status":"enabled"},{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","limits":{"daily":{},"single":{}},"logo_url":"https://gocardless/assets/logos/monzo","name":"VAT","status":"enabled"}],"meta":{"cursors":{"after":"example after 102","before":"example before 102"},"limit":50}} } } diff --git a/tests/fixtures/logos.json b/tests/fixtures/logos.json index a1deeb16..61a06ec2 100644 --- a/tests/fixtures/logos.json +++ b/tests/fixtures/logos.json @@ -1,4 +1,6 @@ { + + "create_for_creditor": { "method": "POST", "path_template": "/branding/logos", diff --git a/tests/fixtures/mandate_import_entries.json b/tests/fixtures/mandate_import_entries.json index 8f59e0d1..79e09f60 100644 --- a/tests/fixtures/mandate_import_entries.json +++ b/tests/fixtures/mandate_import_entries.json @@ -1,4 +1,6 @@ { + + "create": { "method": "POST", "path_template": "/mandate_import_entries", @@ -9,6 +11,6 @@ "method": "GET", "path_template": "/mandate_import_entries", "url_params": [], - "body": {"mandate_import_entries":[{"created_at":"2014-01-01T12:00:00.000Z","links":{"customer":"CU123","customer_bank_account":"BA123","mandate":"MD123","mandate_import":"IM0000AAAAAAA"},"processing_errors":{},"record_identifier":"bank-file.xml/line-1"},{"created_at":"2014-01-01T12:00:00.000Z","links":{"customer":"CU123","customer_bank_account":"BA123","mandate":"MD123","mandate_import":"IM0000AAAAAAA"},"processing_errors":{},"record_identifier":"bank-file.xml/line-1"}],"meta":{"cursors":{"after":"example after 7563","before":"example before 779"},"limit":50}} + "body": {"mandate_import_entries":[{"created_at":"2014-01-01T12:00:00.000Z","links":{"customer":"CU123","customer_bank_account":"BA123","mandate":"MD123","mandate_import":"IM0000AAAAAAA"},"processing_errors":{},"record_identifier":"bank-file.xml/line-1"},{"created_at":"2014-01-01T12:00:00.000Z","links":{"customer":"CU123","customer_bank_account":"BA123","mandate":"MD123","mandate_import":"IM0000AAAAAAA"},"processing_errors":{},"record_identifier":"bank-file.xml/line-1"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} } } diff --git a/tests/fixtures/mandate_imports.json b/tests/fixtures/mandate_imports.json index 596840af..32a4cd05 100644 --- a/tests/fixtures/mandate_imports.json +++ b/tests/fixtures/mandate_imports.json @@ -1,4 +1,6 @@ { + + "create": { "method": "POST", "path_template": "/mandate_imports", diff --git a/tests/fixtures/mandate_pdfs.json b/tests/fixtures/mandate_pdfs.json index dadb3033..71203235 100644 --- a/tests/fixtures/mandate_pdfs.json +++ b/tests/fixtures/mandate_pdfs.json @@ -1,4 +1,6 @@ { + + "create": { "method": "POST", "path_template": "/mandate_pdfs", diff --git a/tests/fixtures/mandates.json b/tests/fixtures/mandates.json index 9ad69625..5518eb65 100644 --- a/tests/fixtures/mandates.json +++ b/tests/fixtures/mandates.json @@ -1,38 +1,40 @@ { + + "create": { "method": "POST", "path_template": "/mandates", "url_params": [], - "body": {"mandates":{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 6218","max_amount_per_payment":7601,"max_amount_per_period":2188,"max_payments_per_period":6840,"period":"week","start_date":"example start_date 6053"},"consent_type":"example consent_type 5093","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"},"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"}} + "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 101","max_amount_per_payment":101,"max_amount_per_period":101,"max_payments_per_period":101,"period":"week","start_date":"example start_date 101"},"consent_type":"example consent_type 101","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"},"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"}} }, "list": { "method": "GET", "path_template": "/mandates", "url_params": [], - "body": {"mandates":[{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 8284","max_amount_per_payment":7150,"max_amount_per_period":7222,"max_payments_per_period":2945,"period":"month","start_date":"example start_date 9407"},"consent_type":"example consent_type 2835","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"},"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"},{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 6775","max_amount_per_payment":8114,"max_amount_per_period":6904,"max_payments_per_period":562,"period":"month","start_date":"example start_date 4752"},"consent_type":"example consent_type 5453","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}],"meta":{"cursors":{"after":"example after 7173","before":"example before 8701"},"limit":50}} + "body": {"mandates":[{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 102","max_amount_per_payment":102,"max_amount_per_period":102,"max_payments_per_period":102,"period":"month","start_date":"example start_date 102"},"consent_type":"example consent_type 102","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"},{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 103","max_amount_per_payment":103,"max_amount_per_period":103,"max_payments_per_period":103,"period":"year","start_date":"example start_date 103"},"consent_type":"example consent_type 103","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"},"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"}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "method": "GET", "path_template": "/mandates/:identity", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 6138","max_amount_per_payment":8399,"max_amount_per_period":3045,"max_payments_per_period":9227,"period":"day","start_date":"example start_date 5299"},"consent_type":"example consent_type 4195","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"},"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"}} + "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 104","max_amount_per_payment":104,"max_amount_per_period":104,"max_payments_per_period":104,"period":"flexible","start_date":"example start_date 104"},"consent_type":"example consent_type 104","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} }, "update": { "method": "PUT", "path_template": "/mandates/:identity", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 5340","max_amount_per_payment":860,"max_amount_per_period":593,"max_payments_per_period":2551,"period":"flexible","start_date":"example start_date 943"},"consent_type":"example consent_type 1778","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} + "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 105","max_amount_per_payment":105,"max_amount_per_period":105,"max_payments_per_period":105,"period":"day","start_date":"example start_date 105"},"consent_type":"example consent_type 105","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"},"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"}} }, "cancel": { "method": "POST", "path_template": "/mandates/:identity/actions/cancel", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 1106","max_amount_per_payment":3179,"max_amount_per_period":7185,"max_payments_per_period":5511,"period":"day","start_date":"example start_date 1281"},"consent_type":"example consent_type 8314","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} + "body": {"mandates":{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 106","max_amount_per_payment":106,"max_amount_per_period":106,"max_payments_per_period":106,"period":"week","start_date":"example start_date 106"},"consent_type":"example consent_type 106","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} }, "reinstate": { "method": "POST", "path_template": "/mandates/:identity/actions/reinstate", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 5836","max_amount_per_payment":3906,"max_amount_per_period":6128,"max_payments_per_period":6955,"period":"year","start_date":"example start_date 3360"},"consent_type":"example consent_type 8612","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"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"}} + "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 107","max_amount_per_payment":107,"max_amount_per_period":107,"max_payments_per_period":107,"period":"month","start_date":"example start_date 107"},"consent_type":"example consent_type 107","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"},"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"}} } } diff --git a/tests/fixtures/negative_balance_limits.json b/tests/fixtures/negative_balance_limits.json index 3420578d..50d6e48d 100644 --- a/tests/fixtures/negative_balance_limits.json +++ b/tests/fixtures/negative_balance_limits.json @@ -1,8 +1,10 @@ { + + "list": { "method": "GET", "path_template": "/negative_balance_limits", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 8143","before":"example before 3787"},"limit":50},"negative_balance_limits":[{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}},{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"negative_balance_limits":[{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}},{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}}]} } } diff --git a/tests/fixtures/outbound_payments.json b/tests/fixtures/outbound_payments.json index c1a3e596..043fdd7d 100644 --- a/tests/fixtures/outbound_payments.json +++ b/tests/fixtures/outbound_payments.json @@ -1,4 +1,6 @@ { + + "create": { "method": "POST", "path_template": "/outbound_payments", @@ -33,7 +35,7 @@ "method": "GET", "path_template": "/outbound_payments", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 1523","before":"example before 6532"},"limit":50},"outbound_payments":[{"amount":1000,"created_at":"2024-01-01T12:00:00.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}}},{"amount":1000,"created_at":"2024-01-01T12:00:00.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}}}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"outbound_payments":[{"amount":1000,"created_at":"2024-01-01T12:00:00.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}}},{"amount":1000,"created_at":"2024-01-01T12:00:00.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}}}]} }, "update": { "method": "PUT", diff --git a/tests/fixtures/payer_authorisations.json b/tests/fixtures/payer_authorisations.json index 95fdcf66..43e4ac76 100644 --- a/tests/fixtures/payer_authorisations.json +++ b/tests/fixtures/payer_authorisations.json @@ -1,32 +1,34 @@ { + + "get": { "method": "GET", "path_template": "/payer_authorisations/:identity", "url_params": ["PA123"], - "body": {"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 9723","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 277","message":"example message 2825","request_pointer":"example request_pointer 1190"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"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"}} }, "create": { "method": "POST", "path_template": "/payer_authorisations", "url_params": [], - "body": {"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 4801","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 3847","message":"example message 7808","request_pointer":"example request_pointer 6501"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"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 102","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 102","message":"example message 102","request_pointer":"example request_pointer 102"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "update": { "method": "PUT", "path_template": "/payer_authorisations/:identity", "url_params": ["PA123"], - "body": {"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 7407","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 4659","message":"example message 2414","request_pointer":"example request_pointer 1096"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"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 103","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 103","message":"example message 103","request_pointer":"example request_pointer 103"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "submit": { "method": "POST", "path_template": "/payer_authorisations/:identity/actions/submit", "url_params": ["PA123"], - "body": {"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 6152","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 1364","message":"example message 6588","request_pointer":"example request_pointer 3237"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"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 104","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 104","message":"example message 104","request_pointer":"example request_pointer 104"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "confirm": { "method": "POST", "path_template": "/payer_authorisations/:identity/actions/confirm", "url_params": ["PA123"], - "body": {"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 1800","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 1192","message":"example message 5138","request_pointer":"example request_pointer 2395"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"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 105","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 105","message":"example message 105","request_pointer":"example request_pointer 105"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} } } diff --git a/tests/fixtures/payer_themes.json b/tests/fixtures/payer_themes.json index b7cbea34..9917cf44 100644 --- a/tests/fixtures/payer_themes.json +++ b/tests/fixtures/payer_themes.json @@ -1,4 +1,6 @@ { + + "create_for_creditor": { "method": "POST", "path_template": "/branding/payer_themes", diff --git a/tests/fixtures/payment_account_transactions.json b/tests/fixtures/payment_account_transactions.json index c410f25a..a6775f00 100644 --- a/tests/fixtures/payment_account_transactions.json +++ b/tests/fixtures/payment_account_transactions.json @@ -1,8 +1,10 @@ { + + "list": { "method": "GET", "path_template": "/payment_accounts/:identity/transactions", "url_params": ["BA123"], - "body": {"meta":{"cursors":{"after":"example after 7636","before":"example before 3527"},"limit":50},"payment_account_transactions":[{"amount":1000,"balance_after_transaction":1000,"counterparty_name":"Acme Ltd","currency":"example currency 2641","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"},{"amount":1000,"balance_after_transaction":1000,"counterparty_name":"Acme Ltd","currency":"example currency 8314","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"}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"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"},{"amount":1000,"balance_after_transaction":1000,"counterparty_name":"Acme Ltd","currency":"example currency 102","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"}]} } } diff --git a/tests/fixtures/payments.json b/tests/fixtures/payments.json index 56a8e49e..bf8c6bca 100644 --- a/tests/fixtures/payments.json +++ b/tests/fixtures/payments.json @@ -1,15 +1,17 @@ { + + "create": { "method": "POST", "path_template": "/payments", "url_params": [], - "body": {"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":true,"scheme":"bacs","status":"submitted"}} + "body": {"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"}} }, "list": { "method": "GET", "path_template": "/payments", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 7352","before":"example before 8454"},"limit":50},"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":true,"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":true,"scheme":"bacs","status":"submitted"},{"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":true,"scheme":"bacs","status":"submitted"}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"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":true,"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":true,"scheme":"bacs","status":"submitted"},{"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"}]} }, "get": { "method": "GET", @@ -21,18 +23,18 @@ "method": "PUT", "path_template": "/payments/:identity", "url_params": ["PM123"], - "body": {"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":true,"scheme":"bacs","status":"submitted"}} + "body": {"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"}} }, "cancel": { "method": "POST", "path_template": "/payments/:identity/actions/cancel", "url_params": ["PM123"], - "body": {"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":true,"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"}} + "body": {"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":true,"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":true,"scheme":"bacs","status":"submitted"}} }, "retry": { "method": "POST", "path_template": "/payments/:identity/actions/retry", "url_params": ["PM123"], - "body": {"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":true,"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":true,"scheme":"bacs","status":"submitted"}} + "body": {"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"}} } } diff --git a/tests/fixtures/payout_items.json b/tests/fixtures/payout_items.json index d698dd3d..1f462dc1 100644 --- a/tests/fixtures/payout_items.json +++ b/tests/fixtures/payout_items.json @@ -1,8 +1,10 @@ { + + "list": { "method": "GET", "path_template": "/payout_items", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 3237","before":"example before 7044"},"limit":50},"payout_items":[{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123","refund":"RF123"},"taxes":[{"amount":"1.1","currency":"EUR","destination_amount":"1.1","destination_currency":"EUR","exchange_rate":"1.11205","tax_rate_id":"GB_VAT_1"}],"type":"payment_paid_out"},{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123","refund":"RF123"},"taxes":[{"amount":"1.1","currency":"EUR","destination_amount":"1.1","destination_currency":"EUR","exchange_rate":"1.11205","tax_rate_id":"GB_VAT_1"}],"type":"payment_paid_out"}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"payout_items":[{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123","refund":"RF123"},"taxes":[{"amount":"1.1","currency":"EUR","destination_amount":"1.1","destination_currency":"EUR","exchange_rate":"1.11205","tax_rate_id":"GB_VAT_1"}],"type":"payment_paid_out"},{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123","refund":"RF123"},"taxes":[{"amount":"1.1","currency":"EUR","destination_amount":"1.1","destination_currency":"EUR","exchange_rate":"1.11205","tax_rate_id":"GB_VAT_1"}],"type":"payment_paid_out"}]} } } diff --git a/tests/fixtures/payouts.json b/tests/fixtures/payouts.json index a5804772..66677e02 100644 --- a/tests/fixtures/payouts.json +++ b/tests/fixtures/payouts.json @@ -1,9 +1,11 @@ { + + "list": { "method": "GET", "path_template": "/payouts", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 8784","before":"example before 9338"},"limit":50},"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"},{"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"}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"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"},{"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"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/redirect_flows.json b/tests/fixtures/redirect_flows.json index 7e32e8de..0f9150fe 100644 --- a/tests/fixtures/redirect_flows.json +++ b/tests/fixtures/redirect_flows.json @@ -1,20 +1,22 @@ { + + "create": { "method": "POST", "path_template": "/redirect_flows", "url_params": [], - "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 998","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} + "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 101","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} }, "get": { "method": "GET", "path_template": "/redirect_flows/:identity", "url_params": ["RE123456"], - "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 2523","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} + "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 102","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} }, "complete": { "method": "POST", "path_template": "/redirect_flows/:identity/actions/complete", "url_params": ["RE123456"], - "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 5394","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} + "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 103","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} } } diff --git a/tests/fixtures/refunds.json b/tests/fixtures/refunds.json index 2184b89d..10a50a19 100644 --- a/tests/fixtures/refunds.json +++ b/tests/fixtures/refunds.json @@ -1,4 +1,6 @@ { + + "create": { "method": "POST", "path_template": "/refunds", @@ -9,7 +11,7 @@ "method": "GET", "path_template": "/refunds", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 6362","before":"example before 9995"},"limit":50},"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"},{"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"}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"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"},{"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"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/scenario_simulators.json b/tests/fixtures/scenario_simulators.json index 1be652af..39b6eabd 100644 --- a/tests/fixtures/scenario_simulators.json +++ b/tests/fixtures/scenario_simulators.json @@ -1,4 +1,6 @@ { + + "run": { "method": "POST", "path_template": "/scenario_simulators/:identity/actions/run", diff --git a/tests/fixtures/scheme_identifiers.json b/tests/fixtures/scheme_identifiers.json index d4ce90ce..1baae3f7 100644 --- a/tests/fixtures/scheme_identifiers.json +++ b/tests/fixtures/scheme_identifiers.json @@ -1,20 +1,22 @@ { + + "create": { "method": "POST", "path_template": "/scheme_identifiers", "url_params": [], - "body": {"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 7635","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2079","region":"Greater London","scheme":"bacs","status":"pending"}} + "body": {"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"}} }, "list": { "method": "GET", "path_template": "/scheme_identifiers", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 856","before":"example before 1878"},"limit":50},"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 7107","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1428","region":"Greater London","scheme":"bacs","status":"pending"},{"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 3495","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6082","region":"Greater London","scheme":"bacs","status":"pending"}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"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"},{"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 103","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 103","region":"Greater London","scheme":"bacs","status":"pending"}]} }, "get": { "method": "GET", "path_template": "/scheme_identifiers/:identity", "url_params": ["SU123"], - "body": {"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 72","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 989","region":"Greater London","scheme":"bacs","status":"pending"}} + "body": {"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 104","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 104","region":"Greater London","scheme":"bacs","status":"pending"}} } } diff --git a/tests/fixtures/subscriptions.json b/tests/fixtures/subscriptions.json index dcd98109..ddc3a506 100644 --- a/tests/fixtures/subscriptions.json +++ b/tests/fixtures/subscriptions.json @@ -1,44 +1,46 @@ { + + "create": { "method": "POST", "path_template": "/subscriptions", "url_params": [], - "body": {"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"}]}} + "body": {"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":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "list": { "method": "GET", "path_template": "/subscriptions", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 564","before":"example before 1602"},"limit":50},"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"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":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"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":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]} }, "get": { "method": "GET", "path_template": "/subscriptions/:identity", "url_params": ["SB123"], - "body": {"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "update": { "method": "PUT", "path_template": "/subscriptions/:identity", "url_params": ["SB123"], - "body": {"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"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":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "pause": { "method": "POST", "path_template": "/subscriptions/:identity/actions/pause", "url_params": ["SB123"], - "body": {"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":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "resume": { "method": "POST", "path_template": "/subscriptions/:identity/actions/resume", "url_params": ["SB123"], - "body": {"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"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":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "cancel": { "method": "POST", "path_template": "/subscriptions/:identity/actions/cancel", "url_params": ["SB123"], - "body": {"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"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":true,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} } } diff --git a/tests/fixtures/tax_rates.json b/tests/fixtures/tax_rates.json index be959451..98325ea9 100644 --- a/tests/fixtures/tax_rates.json +++ b/tests/fixtures/tax_rates.json @@ -1,9 +1,11 @@ { + + "list": { "method": "GET", "path_template": "/tax_rates", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 3380","before":"example before 7251"},"limit":50},"tax_rates":[{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"},{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"tax_rates":[{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"},{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/transferred_mandates.json b/tests/fixtures/transferred_mandates.json index 7c47bc11..699abcc1 100644 --- a/tests/fixtures/transferred_mandates.json +++ b/tests/fixtures/transferred_mandates.json @@ -1,8 +1,10 @@ { + + "transferred_mandates": { "method": "GET", "path_template": "/transferred_mandates/:identity", "url_params": ["MD123"], - "body": {"transferred_mandates":{"encrypted_customer_bank_details":"example encrypted_customer_bank_details 3332","encrypted_decryption_key":"example encrypted_decryption_key 9962","links":{"customer_bank_account":"BA123","mandate":"MD123"},"public_key_id":"example public_key_id 4832"}} + "body": {"transferred_mandates":{"encrypted_customer_bank_details":"example encrypted_customer_bank_details 101","encrypted_decryption_key":"example encrypted_decryption_key 101","links":{"customer_bank_account":"BA123","mandate":"MD123"},"public_key_id":"example public_key_id 101"}} } } diff --git a/tests/fixtures/verification_details.json b/tests/fixtures/verification_details.json index 3acd9f3f..a0cea249 100644 --- a/tests/fixtures/verification_details.json +++ b/tests/fixtures/verification_details.json @@ -1,14 +1,16 @@ { + + "create": { "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 6458","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 8464"}],"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","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"}} }, "list": { "method": "GET", "path_template": "/verification_details", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 7356","before":"example before 3416"},"limit":50},"verification_details":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 9438","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 9249"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 5809","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 8788"}],"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","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"}]} } } diff --git a/tests/fixtures/webhooks.json b/tests/fixtures/webhooks.json index d9ec5c25..a973b8a7 100644 --- a/tests/fixtures/webhooks.json +++ b/tests/fixtures/webhooks.json @@ -1,20 +1,22 @@ { + + "list": { "method": "GET", "path_template": "/webhooks", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 1561","before":"example before 4191"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 4633","request_headers":{},"response_body":"example response_body 7346","response_body_truncated":false,"response_code":9243,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":true,"url":"https://example.com/webhooks"},{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 7663","request_headers":{},"response_body":"example response_body 7378","response_body_truncated":true,"response_code":7800,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":true,"url":"https://example.com/webhooks"}]} + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 101","request_headers":{},"response_body":"example response_body 101","response_body_truncated":false,"response_code":101,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":false,"url":"https://example.com/webhooks"},{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 102","request_headers":{},"response_body":"example response_body 102","response_body_truncated":true,"response_code":102,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":true,"successful":true,"url":"https://example.com/webhooks"}]} }, "get": { "method": "GET", "path_template": "/webhooks/:identity", "url_params": ["WB123"], - "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 1312","request_headers":{},"response_body":"example response_body 6383","response_body_truncated":true,"response_code":6312,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":false,"url":"https://example.com/webhooks"}} + "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 103","request_headers":{},"response_body":"example response_body 103","response_body_truncated":false,"response_code":103,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":false,"url":"https://example.com/webhooks"}} }, "retry": { "method": "POST", "path_template": "/webhooks/:identity/actions/retry", "url_params": ["WB123"], - "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 3816","request_headers":{},"response_body":"example response_body 3799","response_body_truncated":true,"response_code":7801,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":false,"successful":true,"url":"https://example.com/webhooks"}} + "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 104","request_headers":{},"response_body":"example response_body 104","response_body_truncated":true,"response_code":104,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":true,"successful":true,"url":"https://example.com/webhooks"}} } } From d8c613c10b86e95c83c98a348aafce68c76450b9 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 10:51:17 +0000 Subject: [PATCH 03/12] Changes generated by 234726d6dc140e92bf4d7209977e64ea268b5267 This commit was automatically created from gocardless/gocardless-pro-python-template@234726d6dc140e92bf4d7209977e64ea268b5267 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-python-template/actions/runs/19534261160 --- .../billing_request_with_actions.json | 2 +- tests/fixtures/billing_requests.json | 20 +++++++++---------- tests/fixtures/events.json | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index 9af83fcf..54f38faa 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 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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 102","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 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_details"}],"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":true,"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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"start_date":"2014-10-21"}}}} } } diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index 7ddb421a..01fa9227 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -11,43 +11,43 @@ "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 104"],"customer_billing_detail":["example customer_billing_detail 104"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 103","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":"managed","links":{"mandate":"example mandate 102"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 103"},"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":false,"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_details"}],"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":true,"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_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":false,"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 106"],"customer_billing_detail":["example customer_billing_detail 106"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 105","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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 105"},"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_details"}],"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":true,"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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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_details"}],"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":"managed","links":{"mandate":"example mandate 104"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 108"],"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_details"}],"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_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 107"},"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"}}} }, "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_details"}],"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":"managed","links":{"mandate":"example mandate 105"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 110"],"customer_billing_detail":["example customer_billing_detail 110"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 109","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_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 109"},"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":false,"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 112"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 111","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_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 112"],"customer_billing_detail":["example customer_billing_detail 112"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 111","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":"managed","links":{"mandate":"example mandate 106"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 111"},"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":false,"start_date":"2014-10-21"}}} }, "list": { "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "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 114"],"customer_billing_detail":["example customer_billing_detail 116"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 115","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":"managed","links":{"mandate":"example mandate 109"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 113"},"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_details"}],"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":true,"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_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":false,"start_date":"2014-10-21"}}} }, "notify": { "method": "POST", @@ -59,18 +59,18 @@ "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 118"],"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_details"}],"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_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 117"},"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_details"}],"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":true,"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_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":false,"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_details"}],"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":"managed","links":{"mandate":"example mandate 112"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 122"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 121","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":"managed","links":{"mandate":"example mandate 112"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 122"],"customer_billing_detail":["example customer_billing_detail 124"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 123","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":"managed","links":{"mandate":"example mandate 113"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 121"},"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 122"],"customer_billing_detail":["example customer_billing_detail 124"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 123","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_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 121"},"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":false,"start_date":"2014-10-21"}}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index 1f06dd66..185d0ae9 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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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 104"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"access_token"}}],"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_details"}],"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":true,"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_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":false,"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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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", From 9dd21e7e442ef6146fa3fe3d2f190c3371c1e902 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 08:35:21 +0000 Subject: [PATCH 04/12] Changes generated by c215dc0ceafcedbbd6659a7f03340dc85b347e9a This commit was automatically created from gocardless/gocardless-pro-python-template@c215dc0ceafcedbbd6659a7f03340dc85b347e9a by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-python-template/actions/runs/19564681360 --- .../billing_request_with_actions.json | 2 +- tests/fixtures/billing_requests.json | 24 +++++++++---------- tests/fixtures/events.json | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index 54f38faa..7d580f3b 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 102","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 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_details"}],"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":true,"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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"start_date":"2014-10-21"}}}} + "body": {"billing_request_with_actions":{"bank_authorisations":{"authorisation_type":"example authorisation_type 102","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 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 102"]}},"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":true,"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 101","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_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":false,"start_date":"2014-10-21"}}}} } } diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index 01fa9227..60ade269 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -5,72 +5,72 @@ "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_details"}],"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":true,"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_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":false,"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_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"}}} }, "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_details"}],"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":true,"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_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":false,"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 104"]}},"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 103","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_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"}}} }, "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_details"}],"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":true,"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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 106"],"customer_billing_detail":["example customer_billing_detail 106"]}},"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 105","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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 105"},"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"}}} }, "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 108"],"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_details"}],"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_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 107"},"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 108"]}},"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 107","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_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"}}} }, "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 110"],"customer_billing_detail":["example customer_billing_detail 110"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 109","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_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 109"},"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":false,"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 110"]}},"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":true,"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 109","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_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":false,"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 112"],"customer_billing_detail":["example customer_billing_detail 112"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 111","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":"managed","links":{"mandate":"example mandate 106"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 111"},"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":false,"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":"managed","links":{"mandate":"example mandate 106"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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"}}} }, "list": { "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "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_details"}],"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":true,"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_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":false,"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 114"],"customer_billing_detail":["example customer_billing_detail 116"]}},"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":true,"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 115","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_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 113"},"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":false,"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_details"}],"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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 118"]}},"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 117","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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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"}}} }, "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_details"}],"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":true,"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_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":false,"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 120"]}},"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 119","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_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"}}} }, "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 122"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 121","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":"managed","links":{"mandate":"example mandate 112"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 120"],"customer_billing_detail":["example customer_billing_detail 122"]}},"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 121","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_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 119"},"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"}}} }, "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 122"],"customer_billing_detail":["example customer_billing_detail 124"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"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":true,"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 123","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_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 121"},"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":false,"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 124"]}},"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 123","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_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"}}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index 185d0ae9..ad9e7a98 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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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 104"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"access_token"}}],"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_details"}],"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":true,"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_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":false,"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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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 104"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"access_token"}}],"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 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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":true,"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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":false,"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", From dd24184976214018797091e6965655ca31d2865a Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 12:01:54 +0000 Subject: [PATCH 05/12] Changes generated by 2b9c78df027200723f5e1668d6f9a2a1960e96e7 This commit was automatically created from gocardless/gocardless-pro-python-template@2b9c78df027200723f5e1668d6f9a2a1960e96e7 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-python-template/actions/runs/19633514419 --- .../billing_request_with_actions.json | 2 +- tests/fixtures/billing_requests.json | 24 +++++++++---------- tests/fixtures/events.json | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index 7d580f3b..16994f6e 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 102","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 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 102"]}},"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":true,"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 101","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_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":false,"start_date":"2014-10-21"}}}} + "body": {"billing_request_with_actions":{"bank_authorisations":{"authorisation_type":"example authorisation_type 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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"}}}} } } diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index 60ade269..284d84c7 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -5,72 +5,72 @@ "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_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 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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_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 101"},"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":false,"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 104"]}},"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 103","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_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 104"]}},"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":true,"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 103","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_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":false,"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 106"],"customer_billing_detail":["example customer_billing_detail 106"]}},"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 105","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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 105"},"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 106"],"customer_billing_detail":["example customer_billing_detail 106"]}},"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 105","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_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 105"},"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"}}} }, "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 108"]}},"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 107","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_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 108"],"customer_billing_detail":["example customer_billing_detail 108"]}},"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 107","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_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 107"},"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"}}} }, "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 110"]}},"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":true,"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 109","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_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":false,"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":true,"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":"managed","links":{"mandate":"example mandate 105"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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":"managed","links":{"mandate":"example mandate 106"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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_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"}}} }, "list": { "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "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 114"],"customer_billing_detail":["example customer_billing_detail 116"]}},"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":true,"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 115","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_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 113"},"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":false,"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 114"],"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":"managed","links":{"mandate":"example mandate 109"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 113"},"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"}}} }, "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 118"]}},"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 117","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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":true,"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_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":false,"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 120"]}},"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 119","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_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_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"}}} }, "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 120"],"customer_billing_detail":["example customer_billing_detail 122"]}},"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 121","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_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 119"},"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 122"]}},"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 121","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_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"}}} }, "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 124"]}},"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 123","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_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 124"]}},"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":true,"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 123","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_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":false,"start_date":"2014-10-21"}}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index ad9e7a98..9be8bd83 100644 --- a/tests/fixtures/events.json +++ b/tests/fixtures/events.json @@ -5,12 +5,12 @@ "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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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 104"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"access_token"}}],"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 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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":true,"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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":false,"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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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_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 101"},"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":false,"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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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", "path_template": "/events/:identity", "url_params": ["EV123"], - "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 106"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}}} + "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 105"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}}} } } From a58e23707f7656d85e7cd29105b6da8eae376462 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 15:31:27 +0000 Subject: [PATCH 06/12] Changes generated by 46bd56f40f4ae789169aa8926f7f5e8c9248ce6a This commit was automatically created from gocardless/gocardless-pro-python-template@46bd56f40f4ae789169aa8926f7f5e8c9248ce6a by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-python-template/actions/runs/19639701848 --- .../billing_request_with_actions.json | 2 +- tests/fixtures/billing_requests.json | 22 +++++++++---------- tests/fixtures/events.json | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index 16994f6e..74fb97de 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 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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":false,"start_date":"2014-10-21"}}}} } } diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index 284d84c7..26248c90 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -5,31 +5,31 @@ "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 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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_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 101"},"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":false,"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":true,"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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 104"]}},"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":true,"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 103","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_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":false,"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 104"],"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":true,"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_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 103"},"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":false,"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 106"],"customer_billing_detail":["example customer_billing_detail 106"]}},"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 105","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_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 105"},"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 106"],"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":true,"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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 105"},"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":false,"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 108"],"customer_billing_detail":["example customer_billing_detail 108"]}},"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 107","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_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 107"},"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 108"],"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_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 107"},"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"}}} }, "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":true,"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":"managed","links":{"mandate":"example mandate 105"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 110"]}},"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":true,"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 109","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_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":false,"start_date":"2014-10-21"}}} }, "cancel": { "method": "POST", @@ -41,36 +41,36 @@ "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "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 114"],"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":"managed","links":{"mandate":"example mandate 109"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 113"},"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 114"],"customer_billing_detail":["example customer_billing_detail 116"]}},"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 115","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_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 113"},"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"}}} }, "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":true,"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_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":false,"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 116"],"customer_billing_detail":["example customer_billing_detail 118"]}},"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 117","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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 115"},"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"}}} }, "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_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 118"],"customer_billing_detail":["example customer_billing_detail 120"]}},"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 119","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_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 117"},"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"}}} }, "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 122"]}},"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 121","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_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 120"],"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":true,"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":"managed","links":{"mandate":"example mandate 112"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 119"},"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":false,"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 124"]}},"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":true,"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 123","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_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":false,"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 122"],"customer_billing_detail":["example customer_billing_detail 124"]}},"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":true,"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 123","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":"managed","links":{"mandate":"example mandate 113"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 121"},"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":false,"start_date":"2014-10-21"}}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index 9be8bd83..e80b59f5 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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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_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 101"},"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":false,"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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 102"],"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":true,"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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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":false,"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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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", From 49acaab9d26f63c5ab3570a8aea82a11d58a9e06 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 10:11:23 +0000 Subject: [PATCH 07/12] Changes generated by 10b172b8f4448636b675ac5150f5a536229e4a3d This commit was automatically created from gocardless/gocardless-pro-python-template@10b172b8f4448636b675ac5150f5a536229e4a3d by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-python-template/actions/runs/19665796352 --- .../billing_request_with_actions.json | 2 +- tests/fixtures/billing_requests.json | 20 +++++++++---------- tests/fixtures/events.json | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index 74fb97de..c96fab7c 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 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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":false,"start_date":"2014-10-21"}}}} + "body": {"billing_request_with_actions":{"bank_authorisations":{"authorisation_type":"example authorisation_type 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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_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 101"},"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":false,"start_date":"2014-10-21"}}}} } } diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index 26248c90..89a70abb 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -5,43 +5,43 @@ "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":true,"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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 102"],"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_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 101"},"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"}}} }, "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 104"],"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":true,"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_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 103"},"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":false,"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_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"}}} }, "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 106"],"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":true,"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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 105"},"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":false,"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":true,"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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 108"],"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_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 107"},"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 108"],"customer_billing_detail":["example customer_billing_detail 108"]}},"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":true,"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 107","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_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 107"},"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":false,"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 110"]}},"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":true,"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 109","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_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":false,"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 110"],"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_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 109"},"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"}}} }, "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_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 112"],"customer_billing_detail":["example customer_billing_detail 112"]}},"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 111","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_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 111"},"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"}}} }, "list": { "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "method": "GET", @@ -53,13 +53,13 @@ "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 116"],"customer_billing_detail":["example customer_billing_detail 118"]}},"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 117","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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 115"},"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":true,"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_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":false,"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 118"],"customer_billing_detail":["example customer_billing_detail 120"]}},"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 119","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_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 117"},"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_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"}}} }, "choose_currency": { "method": "POST", @@ -71,6 +71,6 @@ "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 122"],"customer_billing_detail":["example customer_billing_detail 124"]}},"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":true,"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 123","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":"managed","links":{"mandate":"example mandate 113"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 121"},"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":false,"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 124"]}},"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 123","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_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"}}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index e80b59f5..cb63de28 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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 102"],"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":true,"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":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 101"},"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":false,"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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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_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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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":true,"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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":false,"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", From c6c450af87e3f250c0500fc7ca582b44b1430820 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 12 Dec 2025 13:35:09 +0000 Subject: [PATCH 08/12] Changes generated by 99b1f56642726dcc48c2551d3b02a0c33b7a10d6 This commit was automatically created from gocardless/gocardless-pro-python-template@99b1f56642726dcc48c2551d3b02a0c33b7a10d6 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-python-template/actions/runs/20168382807 --- README.rst | 11 ++ gocardless_pro/client.py | 4 + gocardless_pro/resources/__init__.py | 2 + .../bank_account_holder_verification.py | 54 +++++++++ gocardless_pro/services/__init__.py | 1 + ...nk_account_holder_verifications_service.py | 72 ++++++++++++ tests/client_test.py | 3 + .../bank_account_holder_verifications.json | 16 +++ .../billing_request_with_actions.json | 2 +- tests/fixtures/billing_requests.json | 24 ++-- tests/fixtures/events.json | 4 +- ...t_holder_verifications_integration_test.py | 108 ++++++++++++++++++ 12 files changed, 286 insertions(+), 15 deletions(-) create mode 100644 gocardless_pro/resources/bank_account_holder_verification.py create mode 100644 gocardless_pro/services/bank_account_holder_verifications_service.py create mode 100644 tests/fixtures/bank_account_holder_verifications.json create mode 100644 tests/integration/bank_account_holder_verifications_integration_test.py diff --git a/README.rst b/README.rst index 859fba35..c70a1dd1 100644 --- a/README.rst +++ b/README.rst @@ -95,6 +95,17 @@ Bank account details # Get encrypted bank details client.bank_account_details.get('BA123', params={...}) +Bank account holder verifications +'''''''''''''''''''''''''''''''''''''''''' + +.. code:: python + + # Create a bank account holder verification. + client.bank_account_holder_verifications.create(params={...}) + + # Get a bank account holder verification. + client.bank_account_holder_verifications.get('BAHV123', params={...}) + Bank authorisations '''''''''''''''''''''''''''''''''''''''''' diff --git a/gocardless_pro/client.py b/gocardless_pro/client.py index a33e0be0..939d6a9b 100644 --- a/gocardless_pro/client.py +++ b/gocardless_pro/client.py @@ -45,6 +45,10 @@ def balances(self): def bank_account_details(self): return services.BankAccountDetailsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict) + @property + def bank_account_holder_verifications(self): + return services.BankAccountHolderVerificationsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict) + @property def bank_authorisations(self): return services.BankAuthorisationsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict) diff --git a/gocardless_pro/resources/__init__.py b/gocardless_pro/resources/__init__.py index dccc8b88..04e4a24d 100644 --- a/gocardless_pro/resources/__init__.py +++ b/gocardless_pro/resources/__init__.py @@ -7,6 +7,8 @@ from .bank_account_detail import BankAccountDetail +from .bank_account_holder_verification import BankAccountHolderVerification + from .bank_authorisation import BankAuthorisation from .bank_details_lookup import BankDetailsLookup diff --git a/gocardless_pro/resources/bank_account_holder_verification.py b/gocardless_pro/resources/bank_account_holder_verification.py new file mode 100644 index 00000000..d6867834 --- /dev/null +++ b/gocardless_pro/resources/bank_account_holder_verification.py @@ -0,0 +1,54 @@ +# WARNING: Do not edit by hand, this file was generated by Crank: +# +# https://github.com/gocardless/crank +# + +class BankAccountHolderVerification(object): + """A thin wrapper around a bank_account_holder_verification, providing easy access to its + attributes. + + Example: + bank_account_holder_verification = client.bank_account_holder_verifications.get() + bank_account_holder_verification.id + """ + + def __init__(self, attributes, api_response): + self.attributes = attributes + self.api_response = api_response + + @property + def actual_account_name(self): + return self.attributes.get('actual_account_name') + + + @property + def id(self): + return self.attributes.get('id') + + + @property + def result(self): + return self.attributes.get('result') + + + @property + def status(self): + return self.attributes.get('status') + + + @property + def type(self): + return self.attributes.get('type') + + + + + + + + + + + + + diff --git a/gocardless_pro/services/__init__.py b/gocardless_pro/services/__init__.py index 718c7681..0fd3fc20 100644 --- a/gocardless_pro/services/__init__.py +++ b/gocardless_pro/services/__init__.py @@ -5,6 +5,7 @@ from .balances_service import BalancesService from .bank_account_details_service import BankAccountDetailsService +from .bank_account_holder_verifications_service import BankAccountHolderVerificationsService from .bank_authorisations_service import BankAuthorisationsService from .bank_details_lookups_service import BankDetailsLookupsService from .billing_requests_service import BillingRequestsService diff --git a/gocardless_pro/services/bank_account_holder_verifications_service.py b/gocardless_pro/services/bank_account_holder_verifications_service.py new file mode 100644 index 00000000..31fc5d70 --- /dev/null +++ b/gocardless_pro/services/bank_account_holder_verifications_service.py @@ -0,0 +1,72 @@ +# WARNING: Do not edit by hand, this file was generated by Crank: +# +# https://github.com/gocardless/crank +# + +from . import base_service +from .. import resources +from ..paginator import Paginator +from .. import errors + +class BankAccountHolderVerificationsService(base_service.BaseService): + """Service class that provides access to the bank_account_holder_verifications + endpoints of the GoCardless Pro API. + """ + + RESOURCE_CLASS = resources.BankAccountHolderVerification + RESOURCE_NAME = 'bank_account_holder_verifications' + + + def create(self,params=None, headers=None): + """Create a bank account holder verification.. + + Verify the account holder of the bank account. A complete verification + can be attached when creating an outbound payment. This endpoint allows + partner merchants to create Confirmation of Payee checks on customer + bank accounts before sending outbound payments. + + Args: + params (dict, optional): Request body. + + Returns: + BankAccountHolderVerification + """ + path = '/bank_account_holder_verifications' + + if params is not None: + params = {self._envelope_key(): params} + + try: + response = self._perform_request('POST', path, params, headers, + retry_failures=True) + except errors.IdempotentCreationConflictError as err: + if self.raise_on_idempotency_conflict: + raise err + return self.get(identity=err.conflicting_resource_id, + params=params, + headers=headers) + return self._resource_for(response) + + + def get(self,identity,params=None, headers=None): + """Get a bank account holder verification.. + + Fetches a bank account holder verification by ID. + + Args: + identity (string): The unique identifier for the bank account holder verification resource, e.g. "BAHV123". + params (dict, optional): Query string parameters. + + Returns: + BankAccountHolderVerification + """ + path = self._sub_url_params('/bank_account_holder_verifications/:identity', { + + 'identity': identity, + }) + + + response = self._perform_request('GET', path, params, headers, + retry_failures=True) + return self._resource_for(response) + diff --git a/tests/client_test.py b/tests/client_test.py index 28d05fdd..9141b012 100644 --- a/tests/client_test.py +++ b/tests/client_test.py @@ -23,6 +23,9 @@ def test_balances_returns_service(): def test_bank_account_details_returns_service(): assert isinstance(client.bank_account_details, services.BankAccountDetailsService) +def test_bank_account_holder_verifications_returns_service(): + assert isinstance(client.bank_account_holder_verifications, services.BankAccountHolderVerificationsService) + def test_bank_authorisations_returns_service(): assert isinstance(client.bank_authorisations, services.BankAuthorisationsService) diff --git a/tests/fixtures/bank_account_holder_verifications.json b/tests/fixtures/bank_account_holder_verifications.json new file mode 100644 index 00000000..4b05f396 --- /dev/null +++ b/tests/fixtures/bank_account_holder_verifications.json @@ -0,0 +1,16 @@ +{ + + + "create": { + "method": "POST", + "path_template": "/bank_account_holder_verifications", + "url_params": [], + "body": {"bank_account_holder_verifications":{"actual_account_name":"Jo Doe","id":"BAHV123","result":"partial_match","status":"pending","type":"confirmation_of_payee"}} + }, + "get": { + "method": "GET", + "path_template": "/bank_account_holder_verifications/:identity", + "url_params": ["BAHV123"], + "body": {"bank_account_holder_verifications":{"actual_account_name":"Jo Doe","id":"BAHV123","result":"partial_match","status":"pending","type":"confirmation_of_payee"}} + } +} diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index c96fab7c..1cb2c005 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 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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_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 101"},"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":false,"start_date":"2014-10-21"}}}} + "body": {"billing_request_with_actions":{"bank_authorisations":{"authorisation_type":"example authorisation_type 102","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 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":true,"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_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":false,"start_date":"2014-10-21"}}}} } } diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index 89a70abb..9683f319 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -5,72 +5,72 @@ "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 102"],"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_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 101"},"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":true,"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_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":false,"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_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 104"]}},"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 103","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":"managed","links":{"mandate":"example mandate 102"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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"}}} }, "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":true,"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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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":true,"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_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":false,"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 108"],"customer_billing_detail":["example customer_billing_detail 108"]}},"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":true,"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 107","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_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 107"},"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":false,"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 108"]}},"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":true,"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 107","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":"managed","links":{"mandate":"example mandate 104"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 110"],"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_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 109"},"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_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"}}} }, "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 112"],"customer_billing_detail":["example customer_billing_detail 112"]}},"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 111","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_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 111"},"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 112"],"customer_billing_detail":["example customer_billing_detail 112"]}},"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 111","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":"managed","links":{"mandate":"example mandate 106"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 111"},"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"}}} }, "list": { "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "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 114"],"customer_billing_detail":["example customer_billing_detail 116"]}},"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 115","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_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 113"},"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":true,"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":"managed","links":{"mandate":"example mandate 109"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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":true,"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_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":false,"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 116"],"customer_billing_detail":["example customer_billing_detail 118"]}},"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":true,"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 117","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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 115"},"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":false,"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_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":true,"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":"managed","links":{"mandate":"example mandate 111"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 120"],"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":true,"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":"managed","links":{"mandate":"example mandate 112"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 119"},"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":false,"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 120"],"customer_billing_detail":["example customer_billing_detail 122"]}},"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":true,"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 121","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_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 119"},"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":false,"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 124"]}},"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 123","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_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":true,"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":"managed","links":{"mandate":"example mandate 113"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"start_date":"2014-10-21"}}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index cb63de28..5164cc1a 100644 --- a/tests/fixtures/events.json +++ b/tests/fixtures/events.json @@ -5,12 +5,12 @@ "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 102"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}},{"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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_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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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":true,"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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":false,"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 104"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"access_token"}}],"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":"paper","consent_type":"example consent_type 102","constraints":{"end_date":"example end_date 102","max_amount_per_payment":102,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"month"}],"start_date":"example start_date 102"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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":"telephone","consent_parameters":{"end_date":"example end_date 101","max_amount_per_payment":101,"max_amount_per_period":101,"max_payments_per_period":101,"period":"week","start_date":"example start_date 101"},"consent_type":"example consent_type 101","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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", "path_template": "/events/:identity", "url_params": ["EV123"], - "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 105"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}}} + "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 106"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}}} } } diff --git a/tests/integration/bank_account_holder_verifications_integration_test.py b/tests/integration/bank_account_holder_verifications_integration_test.py new file mode 100644 index 00000000..dddfc748 --- /dev/null +++ b/tests/integration/bank_account_holder_verifications_integration_test.py @@ -0,0 +1,108 @@ +# WARNING: Do not edit by hand, this file was generated by Crank: +# +# https://github.com/gocardless/crank +# + +import json + +import pytest +import requests +import responses + +from gocardless_pro.errors import MalformedResponseError +from gocardless_pro import resources +from gocardless_pro import list_response + +from .. import helpers + + +@responses.activate +def test_bank_account_holder_verifications_create(): + fixture = helpers.load_fixture('bank_account_holder_verifications')['create'] + helpers.stub_response(fixture) + response = helpers.client.bank_account_holder_verifications.create(*fixture['url_params']) + body = fixture['body']['bank_account_holder_verifications'] + + assert isinstance(response, resources.BankAccountHolderVerification) + assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None + assert response.actual_account_name == body.get('actual_account_name') + assert response.id == body.get('id') + assert response.result == body.get('result') + assert response.status == body.get('status') + assert response.type == body.get('type') + +@responses.activate +def test_bank_account_holder_verifications_create_new_idempotency_key_for_each_call(): + fixture = helpers.load_fixture('bank_account_holder_verifications')['create'] + helpers.stub_response(fixture) + helpers.client.bank_account_holder_verifications.create(*fixture['url_params']) + helpers.client.bank_account_holder_verifications.create(*fixture['url_params']) + assert responses.calls[0].request.headers.get('Idempotency-Key') != responses.calls[1].request.headers.get('Idempotency-Key') + +def test_timeout_bank_account_holder_verifications_create_idempotency_conflict(): + create_fixture = helpers.load_fixture('bank_account_holder_verifications')['create'] + get_fixture = helpers.load_fixture('bank_account_holder_verifications')['get'] + with helpers.stub_timeout_then_idempotency_conflict(create_fixture, get_fixture) as rsps: + response = helpers.client.bank_account_holder_verifications.create(*create_fixture['url_params']) + assert len(rsps.calls) == 2 + + assert isinstance(response, resources.BankAccountHolderVerification) + +@responses.activate +def test_timeout_bank_account_holder_verifications_create_retries(): + fixture = helpers.load_fixture('bank_account_holder_verifications')['create'] + with helpers.stub_timeout_then_response(fixture) as rsps: + response = helpers.client.bank_account_holder_verifications.create(*fixture['url_params']) + assert len(rsps.calls) == 2 + assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') + body = fixture['body']['bank_account_holder_verifications'] + + assert isinstance(response, resources.BankAccountHolderVerification) + +def test_502_bank_account_holder_verifications_create_retries(): + fixture = helpers.load_fixture('bank_account_holder_verifications')['create'] + with helpers.stub_502_then_response(fixture) as rsps: + response = helpers.client.bank_account_holder_verifications.create(*fixture['url_params']) + assert len(rsps.calls) == 2 + assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') + body = fixture['body']['bank_account_holder_verifications'] + + assert isinstance(response, resources.BankAccountHolderVerification) + + +@responses.activate +def test_bank_account_holder_verifications_get(): + fixture = helpers.load_fixture('bank_account_holder_verifications')['get'] + helpers.stub_response(fixture) + response = helpers.client.bank_account_holder_verifications.get(*fixture['url_params']) + body = fixture['body']['bank_account_holder_verifications'] + + assert isinstance(response, resources.BankAccountHolderVerification) + assert responses.calls[-1].request.headers.get('Idempotency-Key') is None + assert response.actual_account_name == body.get('actual_account_name') + assert response.id == body.get('id') + assert response.result == body.get('result') + assert response.status == body.get('status') + assert response.type == body.get('type') + +@responses.activate +def test_timeout_bank_account_holder_verifications_get_retries(): + fixture = helpers.load_fixture('bank_account_holder_verifications')['get'] + with helpers.stub_timeout_then_response(fixture) as rsps: + response = helpers.client.bank_account_holder_verifications.get(*fixture['url_params']) + assert len(rsps.calls) == 2 + assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') + body = fixture['body']['bank_account_holder_verifications'] + + assert isinstance(response, resources.BankAccountHolderVerification) + +def test_502_bank_account_holder_verifications_get_retries(): + fixture = helpers.load_fixture('bank_account_holder_verifications')['get'] + with helpers.stub_502_then_response(fixture) as rsps: + response = helpers.client.bank_account_holder_verifications.get(*fixture['url_params']) + assert len(rsps.calls) == 2 + assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') + body = fixture['body']['bank_account_holder_verifications'] + + assert isinstance(response, resources.BankAccountHolderVerification) + From 70b857fc1e4e74b6447b154d4cf39f9ba9cc0483 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 12 Dec 2025 15:43:24 +0000 Subject: [PATCH 09/12] Changes generated by b32716e8dc0be2381602a8faf94f5586b2197c32 This commit was automatically created from gocardless/gocardless-pro-python-template@b32716e8dc0be2381602a8faf94f5586b2197c32 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-python-template/actions/runs/20171862075 --- README.rst | 11 +++ gocardless_pro/client.py | 4 + gocardless_pro/resources/__init__.py | 2 + gocardless_pro/resources/payment_account.py | 79 +++++++++++++++++ gocardless_pro/services/__init__.py | 1 + .../services/payment_accounts_service.py | 45 ++++++++++ tests/client_test.py | 3 + .../billing_request_with_actions.json | 2 +- tests/fixtures/billing_requests.json | 24 ++--- tests/fixtures/events.json | 4 +- tests/fixtures/payment_accounts.json | 10 +++ .../payment_accounts_integration_test.py | 87 +++++++++++++++++++ 12 files changed, 257 insertions(+), 15 deletions(-) create mode 100644 gocardless_pro/resources/payment_account.py create mode 100644 gocardless_pro/services/payment_accounts_service.py create mode 100644 tests/fixtures/payment_accounts.json create mode 100644 tests/integration/payment_accounts_integration_test.py diff --git a/README.rst b/README.rst index c70a1dd1..88de0432 100644 --- a/README.rst +++ b/README.rst @@ -574,6 +574,17 @@ Payments # Retry a payment client.payments.retry('PM123', params={...}) +Payment accounts +'''''''''''''''''''''''''''''''''''''''''' + +.. code:: python + + # List payment accounts + client.payment_accounts.list(params={...}) + + # Iterate through all payment_accounts + client.payment_accounts.all(params={...}) + Payment account transactions '''''''''''''''''''''''''''''''''''''''''' diff --git a/gocardless_pro/client.py b/gocardless_pro/client.py index 939d6a9b..1b1ae0d1 100644 --- a/gocardless_pro/client.py +++ b/gocardless_pro/client.py @@ -157,6 +157,10 @@ def payer_themes(self): def payments(self): return services.PaymentsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict) + @property + def payment_accounts(self): + return services.PaymentAccountsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict) + @property def payment_account_transactions(self): return services.PaymentAccountTransactionsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict) diff --git a/gocardless_pro/resources/__init__.py b/gocardless_pro/resources/__init__.py index 04e4a24d..46fbc517 100644 --- a/gocardless_pro/resources/__init__.py +++ b/gocardless_pro/resources/__init__.py @@ -63,6 +63,8 @@ from .payment import Payment +from .payment_account import PaymentAccount + from .payment_account_transaction import PaymentAccountTransaction from .payout import Payout diff --git a/gocardless_pro/resources/payment_account.py b/gocardless_pro/resources/payment_account.py new file mode 100644 index 00000000..85317c94 --- /dev/null +++ b/gocardless_pro/resources/payment_account.py @@ -0,0 +1,79 @@ +# WARNING: Do not edit by hand, this file was generated by Crank: +# +# https://github.com/gocardless/crank +# + +class PaymentAccount(object): + """A thin wrapper around a payment_account, providing easy access to its + attributes. + + Example: + payment_account = client.payment_accounts.get() + payment_account.id + """ + + def __init__(self, attributes, api_response): + self.attributes = attributes + self.api_response = api_response + + @property + def account_balance(self): + return self.attributes.get('account_balance') + + + @property + def account_holder_name(self): + return self.attributes.get('account_holder_name') + + + @property + def account_number_ending(self): + return self.attributes.get('account_number_ending') + + + @property + def bank_name(self): + return self.attributes.get('bank_name') + + + @property + def currency(self): + return self.attributes.get('currency') + + + @property + def id(self): + return self.attributes.get('id') + + + @property + def links(self): + return self.Links(self.attributes.get('links')) + + + + + + + + + + + + + + + + + class Links(object): + """Wrapper for the response's 'links' attribute.""" + + def __init__(self, attributes): + self.attributes = attributes + + @property + def creditor(self): + return self.attributes.get('creditor') + + + diff --git a/gocardless_pro/services/__init__.py b/gocardless_pro/services/__init__.py index 0fd3fc20..6d16873b 100644 --- a/gocardless_pro/services/__init__.py +++ b/gocardless_pro/services/__init__.py @@ -33,6 +33,7 @@ from .payer_authorisations_service import PayerAuthorisationsService from .payer_themes_service import PayerThemesService from .payments_service import PaymentsService +from .payment_accounts_service import PaymentAccountsService from .payment_account_transactions_service import PaymentAccountTransactionsService from .payouts_service import PayoutsService from .payout_items_service import PayoutItemsService diff --git a/gocardless_pro/services/payment_accounts_service.py b/gocardless_pro/services/payment_accounts_service.py new file mode 100644 index 00000000..d11bded8 --- /dev/null +++ b/gocardless_pro/services/payment_accounts_service.py @@ -0,0 +1,45 @@ +# WARNING: Do not edit by hand, this file was generated by Crank: +# +# https://github.com/gocardless/crank +# + +from . import base_service +from .. import resources +from ..paginator import Paginator +from .. import errors + +class PaymentAccountsService(base_service.BaseService): + """Service class that provides access to the payment_accounts + endpoints of the GoCardless Pro API. + """ + + RESOURCE_CLASS = resources.PaymentAccount + RESOURCE_NAME = 'payment_accounts' + + + def list(self,params=None, headers=None): + """List payment accounts. + + Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your + payment accounts. + + Args: + params (dict, optional): Query string parameters. + + Returns: + ListResponse of PaymentAccount instances + """ + path = '/payment_accounts' + + + response = self._perform_request('GET', path, params, headers, + retry_failures=True) + return self._resource_for(response) + + def all(self,params=None): + if params is None: + params = {} + return Paginator(self, params, identity_params={ + }) + + diff --git a/tests/client_test.py b/tests/client_test.py index 9141b012..262541ff 100644 --- a/tests/client_test.py +++ b/tests/client_test.py @@ -107,6 +107,9 @@ def test_payer_themes_returns_service(): def test_payments_returns_service(): assert isinstance(client.payments, services.PaymentsService) +def test_payment_accounts_returns_service(): + assert isinstance(client.payment_accounts, services.PaymentAccountsService) + def test_payment_account_transactions_returns_service(): assert isinstance(client.payment_account_transactions, services.PaymentAccountTransactionsService) diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index 1cb2c005..c96fab7c 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 102","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 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":true,"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_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":false,"start_date":"2014-10-21"}}}} + "body": {"billing_request_with_actions":{"bank_authorisations":{"authorisation_type":"example authorisation_type 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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_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 101"},"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":false,"start_date":"2014-10-21"}}}} } } diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index 9683f319..8215ce12 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -5,72 +5,72 @@ "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":true,"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_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":false,"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 102"]}},"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":true,"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 101","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_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":false,"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 104"]}},"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 103","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":"managed","links":{"mandate":"example mandate 102"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 104"]}},"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":true,"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 103","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":"managed","links":{"mandate":"example mandate 102"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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":true,"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_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":false,"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 106"],"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":true,"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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 105"},"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":false,"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 108"]}},"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":true,"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 107","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":"managed","links":{"mandate":"example mandate 104"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 108"],"customer_billing_detail":["example customer_billing_detail 108"]}},"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":true,"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 107","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":"managed","links":{"mandate":"example mandate 104"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 107"},"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":false,"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_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":true,"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_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":false,"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 112"],"customer_billing_detail":["example customer_billing_detail 112"]}},"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 111","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":"managed","links":{"mandate":"example mandate 106"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 111"},"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 112"],"customer_billing_detail":["example customer_billing_detail 112"]}},"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":true,"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 111","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_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 111"},"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":false,"start_date":"2014-10-21"}}} }, "list": { "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "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":true,"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":"managed","links":{"mandate":"example mandate 109"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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_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"}}} }, "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 116"],"customer_billing_detail":["example customer_billing_detail 118"]}},"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":true,"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 117","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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 115"},"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":false,"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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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"}}} }, "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":true,"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":"managed","links":{"mandate":"example mandate 111"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 120"]}},"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":true,"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 119","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_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":false,"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 120"],"customer_billing_detail":["example customer_billing_detail 122"]}},"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":true,"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 121","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_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 119"},"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":false,"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 122"]}},"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":true,"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 121","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_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":false,"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":true,"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":"managed","links":{"mandate":"example mandate 113"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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 122"],"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_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 121"},"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"}}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index 5164cc1a..ecba6d65 100644 --- a/tests/fixtures/events.json +++ b/tests/fixtures/events.json @@ -5,12 +5,12 @@ "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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 104"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"access_token"}}],"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":"paper","consent_type":"example consent_type 102","constraints":{"end_date":"example end_date 102","max_amount_per_payment":102,"payment_method":"example payment_method 101","periodic_limits":[{"alignment":"creation_date","max_payments":101,"max_total_amount":101,"period":"month"}],"start_date":"example start_date 102"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 101"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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":"telephone","consent_parameters":{"end_date":"example end_date 101","max_amount_per_payment":101,"max_amount_per_period":101,"max_payments_per_period":101,"period":"week","start_date":"example start_date 101"},"consent_type":"example consent_type 101","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 104"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"access_token"}}],"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":true,"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_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":false,"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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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", "path_template": "/events/:identity", "url_params": ["EV123"], - "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 106"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"user"}}} + "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 105"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}}} } } diff --git a/tests/fixtures/payment_accounts.json b/tests/fixtures/payment_accounts.json new file mode 100644 index 00000000..e8d218ca --- /dev/null +++ b/tests/fixtures/payment_accounts.json @@ -0,0 +1,10 @@ +{ + + + "list": { + "method": "GET", + "path_template": "/payment_accounts", + "url_params": [], + "body": {"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50},"payment_accounts":[{"account_balance":1000,"account_holder_name":"Billie Jean","account_number_ending":"1234","bank_name":"BARCLAYS BANK PLC","currency":"EUR","id":"BA123","links":{"creditor":"CR123"}},{"account_balance":1000,"account_holder_name":"Billie Jean","account_number_ending":"1234","bank_name":"BARCLAYS BANK PLC","currency":"EUR","id":"BA123","links":{"creditor":"CR123"}}]} + } +} diff --git a/tests/integration/payment_accounts_integration_test.py b/tests/integration/payment_accounts_integration_test.py new file mode 100644 index 00000000..d3e91cea --- /dev/null +++ b/tests/integration/payment_accounts_integration_test.py @@ -0,0 +1,87 @@ +# WARNING: Do not edit by hand, this file was generated by Crank: +# +# https://github.com/gocardless/crank +# + +import json + +import pytest +import requests +import responses + +from gocardless_pro.errors import MalformedResponseError +from gocardless_pro import resources +from gocardless_pro import list_response + +from .. import helpers + + +@responses.activate +def test_payment_accounts_list(): + fixture = helpers.load_fixture('payment_accounts')['list'] + helpers.stub_response(fixture) + response = helpers.client.payment_accounts.list(*fixture['url_params']) + body = fixture['body']['payment_accounts'] + + assert isinstance(response, list_response.ListResponse) + assert isinstance(response.records[0], resources.PaymentAccount) + + assert response.before == fixture['body']['meta']['cursors']['before'] + assert response.after == fixture['body']['meta']['cursors']['after'] + assert responses.calls[-1].request.headers.get('Idempotency-Key') is None + assert [r.account_balance for r in response.records] == [b.get('account_balance') for b in body] + assert [r.account_holder_name for r in response.records] == [b.get('account_holder_name') for b in body] + assert [r.account_number_ending for r in response.records] == [b.get('account_number_ending') for b in body] + assert [r.bank_name for r in response.records] == [b.get('bank_name') for b in body] + assert [r.currency for r in response.records] == [b.get('currency') for b in body] + assert [r.id for r in response.records] == [b.get('id') for b in body] + +@responses.activate +def test_timeout_payment_accounts_list_retries(): + fixture = helpers.load_fixture('payment_accounts')['list'] + with helpers.stub_timeout_then_response(fixture) as rsps: + response = helpers.client.payment_accounts.list(*fixture['url_params']) + assert len(rsps.calls) == 2 + assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') + body = fixture['body']['payment_accounts'] + + assert isinstance(response, list_response.ListResponse) + assert isinstance(response.records[0], resources.PaymentAccount) + + assert response.before == fixture['body']['meta']['cursors']['before'] + assert response.after == fixture['body']['meta']['cursors']['after'] + +def test_502_payment_accounts_list_retries(): + fixture = helpers.load_fixture('payment_accounts')['list'] + with helpers.stub_502_then_response(fixture) as rsps: + response = helpers.client.payment_accounts.list(*fixture['url_params']) + assert len(rsps.calls) == 2 + assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') + body = fixture['body']['payment_accounts'] + + assert isinstance(response, list_response.ListResponse) + assert isinstance(response.records[0], resources.PaymentAccount) + + assert response.before == fixture['body']['meta']['cursors']['before'] + assert response.after == fixture['body']['meta']['cursors']['after'] + +@responses.activate +def test_payment_accounts_all(): + fixture = helpers.load_fixture('payment_accounts')['list'] + + def callback(request): + if 'after=123' in request.url: + fixture['body']['meta']['cursors']['after'] = None + else: + fixture['body']['meta']['cursors']['after'] = '123' + return [200, {}, json.dumps(fixture['body'])] + + url_pattern = helpers.url_pattern_for(fixture) + responses.add_callback(fixture['method'], url_pattern, callback) + + all_records = list(helpers.client.payment_accounts.all(*fixture['url_params'])) + assert len(all_records) == len(fixture['body']['payment_accounts']) * 2 + for record in all_records: + assert isinstance(record, resources.PaymentAccount) + + From b6c4ab2e3e66bcf734be969c9771efc7efe84863 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:41:19 +0000 Subject: [PATCH 10/12] Changes generated by 216b3d14ab26a34d6f3abfc06c2d4cea0d4636c4 This commit was automatically created from gocardless/client-library-templates@216b3d14ab26a34d6f3abfc06c2d4cea0d4636c4 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/22349184371 --- README.rst | 14 ++ gocardless_pro/api_client.py | 13 +- gocardless_pro/client.py | 4 + gocardless_pro/resources/__init__.py | 2 + gocardless_pro/resources/billing_request.py | 14 ++ .../resources/billing_request_with_action.py | 8 + gocardless_pro/resources/event.py | 4 + .../resources/funds_availability.py | 26 +++ gocardless_pro/services/__init__.py | 1 + gocardless_pro/services/balances_service.py | 6 +- .../services/bank_account_details_service.py | 14 +- ...nk_account_holder_verifications_service.py | 10 +- .../services/bank_authorisations_service.py | 4 +- .../services/bank_details_lookups_service.py | 68 +++--- gocardless_pro/services/base_service.py | 3 +- .../services/billing_request_flows_service.py | 8 +- .../billing_request_templates_service.py | 12 +- .../billing_request_with_actions_service.py | 12 +- .../services/billing_requests_service.py | 144 ++++++------- gocardless_pro/services/blocks_service.py | 24 +-- .../creditor_bank_accounts_service.py | 24 +-- gocardless_pro/services/creditors_service.py | 12 +- .../currency_exchange_rates_service.py | 4 +- .../customer_bank_accounts_service.py | 50 ++--- .../customer_notifications_service.py | 18 +- gocardless_pro/services/customers_service.py | 28 +-- gocardless_pro/services/events_service.py | 6 +- gocardless_pro/services/exports_service.py | 4 +- .../services/funds_availabilities_service.py | 43 ++++ .../services/instalment_schedules_service.py | 92 ++++----- .../services/institutions_service.py | 8 +- gocardless_pro/services/logos_service.py | 16 +- .../mandate_import_entries_service.py | 32 +-- .../services/mandate_imports_service.py | 54 ++--- .../services/mandate_pdfs_service.py | 70 +++---- gocardless_pro/services/mandates_service.py | 46 ++--- .../negative_balance_limits_service.py | 4 +- .../services/outbound_payments_service.py | 48 +++-- .../services/payer_authorisations_service.py | 69 ++++--- .../services/payer_themes_service.py | 6 +- .../payment_account_transactions_service.py | 2 +- .../services/payment_accounts_service.py | 27 ++- gocardless_pro/services/payments_service.py | 55 ++--- .../services/payout_items_service.py | 14 +- gocardless_pro/services/payouts_service.py | 12 +- .../services/redirect_flows_service.py | 28 +-- gocardless_pro/services/refunds_service.py | 38 ++-- .../services/scenario_simulators_service.py | 4 +- .../services/scheme_identifiers_service.py | 86 ++++---- .../services/subscriptions_service.py | 195 +++++++++--------- gocardless_pro/services/tax_rates_service.py | 6 +- .../services/transferred_mandates_service.py | 4 +- .../services/verification_details_service.py | 4 +- gocardless_pro/services/webhooks_service.py | 8 +- tests/api_client_test.py | 12 ++ tests/client_test.py | 3 + .../billing_request_with_actions.json | 2 +- tests/fixtures/billing_requests.json | 24 +-- tests/fixtures/events.json | 4 +- tests/fixtures/funds_availabilities.json | 10 + tests/fixtures/outbound_payments.json | 6 + tests/fixtures/payment_accounts.json | 6 + .../integration/balances_integration_test.py | 10 +- .../bank_account_details_integration_test.py | 9 +- ...t_holder_verifications_integration_test.py | 17 +- .../bank_authorisations_integration_test.py | 17 +- .../bank_details_lookups_integration_test.py | 9 +- .../billing_request_flows_integration_test.py | 15 +- ...ling_request_templates_integration_test.py | 34 ++- ...g_request_with_actions_integration_test.py | 11 +- .../billing_requests_integration_test.py | 104 +++++++--- tests/integration/blocks_integration_test.py | 44 ++-- ...creditor_bank_accounts_integration_test.py | 32 +-- .../integration/creditors_integration_test.py | 34 ++- ...urrency_exchange_rates_integration_test.py | 10 +- ...customer_bank_accounts_integration_test.py | 40 ++-- ...customer_notifications_integration_test.py | 7 +- .../integration/customers_integration_test.py | 40 ++-- tests/integration/events_integration_test.py | 19 +- tests/integration/exports_integration_test.py | 18 +- .../funds_availabilities_integration_test.py | 44 ++++ .../instalment_schedules_integration_test.py | 48 ++--- .../institutions_integration_test.py | 16 +- tests/integration/logos_integration_test.py | 9 +- ...mandate_import_entries_integration_test.py | 18 +- .../mandate_imports_integration_test.py | 29 +-- .../mandate_pdfs_integration_test.py | 9 +- .../integration/mandates_integration_test.py | 46 +++-- ...egative_balance_limits_integration_test.py | 10 +- .../outbound_payments_integration_test.py | 79 ++++--- .../payer_authorisations_integration_test.py | 37 ++-- .../payer_themes_integration_test.py | 9 +- ...t_account_transactions_integration_test.py | 10 +- .../payment_accounts_integration_test.py | 49 ++++- .../integration/payments_integration_test.py | 46 +++-- .../payout_items_integration_test.py | 10 +- tests/integration/payouts_integration_test.py | 26 ++- .../redirect_flows_integration_test.py | 23 ++- tests/integration/refunds_integration_test.py | 34 ++- .../scenario_simulators_integration_test.py | 7 +- .../scheme_identifiers_integration_test.py | 26 ++- .../subscriptions_integration_test.py | 52 ++--- .../integration/tax_rates_integration_test.py | 18 +- .../transferred_mandates_integration_test.py | 7 +- .../verification_details_integration_test.py | 18 +- .../integration/webhooks_integration_test.py | 24 +-- 106 files changed, 1549 insertions(+), 1200 deletions(-) create mode 100644 gocardless_pro/resources/funds_availability.py create mode 100644 gocardless_pro/services/funds_availabilities_service.py create mode 100644 tests/fixtures/funds_availabilities.json create mode 100644 tests/integration/funds_availabilities_integration_test.py diff --git a/README.rst b/README.rst index 88de0432..8f2451d8 100644 --- a/README.rst +++ b/README.rst @@ -367,6 +367,14 @@ Exports # Iterate through all exports client.exports.all(params={...}) +Funds availabilities +'''''''''''''''''''''''''''''''''''''''''' + +.. code:: python + + # Funds availability + client.funds_availabilities.check('MD123', params={...}) + Instalment schedules '''''''''''''''''''''''''''''''''''''''''' @@ -520,6 +528,9 @@ Outbound payments # Update an outbound payment client.outbound_payments.update('OUT123', params={...}) + # Outbound payment statistics + client.outbound_payments.stats(params={...}) + Payer authorisations '''''''''''''''''''''''''''''''''''''''''' @@ -579,6 +590,9 @@ Payment accounts .. code:: python + # Get a single payment account details + client.payment_accounts.get('BA123', params={...}) + # List payment accounts client.payment_accounts.list(params={...}) diff --git a/gocardless_pro/api_client.py b/gocardless_pro/api_client.py index 9b127d8e..d888496c 100644 --- a/gocardless_pro/api_client.py +++ b/gocardless_pro/api_client.py @@ -131,8 +131,17 @@ def _handle_errors(self, response): if response.status_code < 400: return - error = response.json()['error'] - exception_class = errors.ApiError.exception_for(response.status_code, error['type'], error.get('errors')) + error = response_body.get('error', response_body) + + if isinstance(error, str): + error = { + 'code': response.status_code, + 'message': error, + } + exception_class = errors.ApiError + else: + exception_class = errors.ApiError.exception_for(response.status_code, error['type'], error.get('errors')) + raise exception_class(error) def _url_for(self, path): diff --git a/gocardless_pro/client.py b/gocardless_pro/client.py index 1b1ae0d1..09301e45 100644 --- a/gocardless_pro/client.py +++ b/gocardless_pro/client.py @@ -109,6 +109,10 @@ def events(self): def exports(self): return services.ExportsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict) + @property + def funds_availabilities(self): + return services.FundsAvailabilitiesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict) + @property def instalment_schedules(self): return services.InstalmentSchedulesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict) diff --git a/gocardless_pro/resources/__init__.py b/gocardless_pro/resources/__init__.py index 46fbc517..33b68e06 100644 --- a/gocardless_pro/resources/__init__.py +++ b/gocardless_pro/resources/__init__.py @@ -39,6 +39,8 @@ from .export import Export +from .funds_availability import FundsAvailability + from .instalment_schedule import InstalmentSchedule from .institution import Institution diff --git a/gocardless_pro/resources/billing_request.py b/gocardless_pro/resources/billing_request.py index 9e231691..975bf148 100644 --- a/gocardless_pro/resources/billing_request.py +++ b/gocardless_pro/resources/billing_request.py @@ -61,6 +61,16 @@ def metadata(self): return self.attributes.get('metadata') + @property + def payment_context_code(self): + return self.attributes.get('payment_context_code') + + + @property + def payment_purpose_code(self): + return self.attributes.get('payment_purpose_code') + + @property def payment_request(self): return self.PaymentRequest(self.attributes.get('payment_request')) @@ -275,6 +285,10 @@ def verify(self): + + + + class PaymentRequest(object): """Wrapper for the response's 'payment_request' attribute.""" diff --git a/gocardless_pro/resources/billing_request_with_action.py b/gocardless_pro/resources/billing_request_with_action.py index 25b3d404..f04666dd 100644 --- a/gocardless_pro/resources/billing_request_with_action.py +++ b/gocardless_pro/resources/billing_request_with_action.py @@ -119,6 +119,14 @@ def mandate_request(self): def metadata(self): return self.attributes.get('metadata') + @property + def payment_context_code(self): + return self.attributes.get('payment_context_code') + + @property + def payment_purpose_code(self): + return self.attributes.get('payment_purpose_code') + @property def payment_request(self): return self.attributes.get('payment_request') diff --git a/gocardless_pro/resources/event.py b/gocardless_pro/resources/event.py index 53f2b066..0f4ca4cb 100644 --- a/gocardless_pro/resources/event.py +++ b/gocardless_pro/resources/event.py @@ -187,6 +187,10 @@ def new_mandate(self): def organisation(self): return self.attributes.get('organisation') + @property + def outbound_payment(self): + return self.attributes.get('outbound_payment') + @property def parent_event(self): return self.attributes.get('parent_event') diff --git a/gocardless_pro/resources/funds_availability.py b/gocardless_pro/resources/funds_availability.py new file mode 100644 index 00000000..e7203588 --- /dev/null +++ b/gocardless_pro/resources/funds_availability.py @@ -0,0 +1,26 @@ +# WARNING: Do not edit by hand, this file was generated by Crank: +# +# https://github.com/gocardless/crank +# + +class FundsAvailability(object): + """A thin wrapper around a funds_availability, providing easy access to its + attributes. + + Example: + funds_availability = client.funds_availabilities.get() + funds_availability.id + """ + + def __init__(self, attributes, api_response): + self.attributes = attributes + self.api_response = api_response + + @property + def available(self): + return self.attributes.get('available') + + + + + diff --git a/gocardless_pro/services/__init__.py b/gocardless_pro/services/__init__.py index 6d16873b..ea2bd910 100644 --- a/gocardless_pro/services/__init__.py +++ b/gocardless_pro/services/__init__.py @@ -21,6 +21,7 @@ from .customer_notifications_service import CustomerNotificationsService from .events_service import EventsService from .exports_service import ExportsService +from .funds_availabilities_service import FundsAvailabilitiesService from .instalment_schedules_service import InstalmentSchedulesService from .institutions_service import InstitutionsService from .logos_service import LogosService diff --git a/gocardless_pro/services/balances_service.py b/gocardless_pro/services/balances_service.py index 0419863e..0d2e9f09 100644 --- a/gocardless_pro/services/balances_service.py +++ b/gocardless_pro/services/balances_service.py @@ -20,9 +20,9 @@ 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](#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 1ca3577b..a1b06661 100644 --- a/gocardless_pro/services/bank_account_details_service.py +++ b/gocardless_pro/services/bank_account_details_service.py @@ -20,13 +20,13 @@ class BankAccountDetailsService(base_service.BaseService): def get(self,identity,params=None, headers=None): """Get encrypted bank details. - Returns bank account details in the flattened JSON Web Encryption - 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) - for more details. + Returns bank account details in the flattened JSON Web Encryption + 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) + for more details. Args: identity (string): Unique identifier, beginning with "BA". diff --git a/gocardless_pro/services/bank_account_holder_verifications_service.py b/gocardless_pro/services/bank_account_holder_verifications_service.py index 31fc5d70..c93c6b16 100644 --- a/gocardless_pro/services/bank_account_holder_verifications_service.py +++ b/gocardless_pro/services/bank_account_holder_verifications_service.py @@ -20,10 +20,10 @@ class BankAccountHolderVerificationsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a bank account holder verification.. - Verify the account holder of the bank account. A complete verification - can be attached when creating an outbound payment. This endpoint allows - partner merchants to create Confirmation of Payee checks on customer - bank accounts before sending outbound payments. + Verify the account holder of the bank account. A complete verification + can be attached when creating an outbound payment. This endpoint + allows partner merchants to create Confirmation of Payee checks on + customer bank accounts before sending outbound payments. Args: params (dict, optional): Request body. @@ -51,7 +51,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a bank account holder verification.. - Fetches a bank account holder verification by ID. + Fetches a bank account holder verification by ID. Args: identity (string): The unique identifier for the bank account holder verification resource, e.g. "BAHV123". diff --git a/gocardless_pro/services/bank_authorisations_service.py b/gocardless_pro/services/bank_authorisations_service.py index d6009cd5..33627b83 100644 --- a/gocardless_pro/services/bank_authorisations_service.py +++ b/gocardless_pro/services/bank_authorisations_service.py @@ -20,7 +20,7 @@ class BankAuthorisationsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a Bank Authorisation. - Create a Bank Authorisation. + Create a Bank Authorisation. Args: params (dict, optional): Request body. @@ -48,7 +48,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a Bank Authorisation. - Get a single bank authorisation. + Get a single bank authorisation. Args: identity (string): Unique identifier, beginning with "BAU". diff --git a/gocardless_pro/services/bank_details_lookups_service.py b/gocardless_pro/services/bank_details_lookups_service.py index 41cf2327..d5ea80fc 100644 --- a/gocardless_pro/services/bank_details_lookups_service.py +++ b/gocardless_pro/services/bank_details_lookups_service.py @@ -20,40 +20,40 @@ class BankDetailsLookupsService(base_service.BaseService): def create(self,params=None, headers=None): """Perform a bank details lookup. - Performs a bank details lookup. As part of the lookup, a modulus check - and - reachability check are performed. - - For UK-based bank accounts, where an account holder name is provided - (and an account number, a sort code or an iban - are already present), we verify that the account holder name and bank - account number match the details held by - the relevant bank. - - If your request returns an [error](#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. - - _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 - Direct Debit. If a bank account is discovered to be closed or invalid, - the - 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 - modulus or reachability checking but not for payment collection, please - get in touch. + Performs a bank details lookup. As part of the lookup, a modulus check + and + reachability check are performed. + + For UK-based bank accounts, where an account holder name is provided + (and an account number, a sort code or an iban + are already present), we verify that the account holder name and bank + account number match the details held by + the relevant bank. + + If your request returns an [error](#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. + + _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 + Direct Debit. If a bank account is discovered to be closed or invalid, + the + 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 + modulus or reachability checking but not for payment collection, + please get in touch. Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/base_service.py b/gocardless_pro/services/base_service.py index f9b2a6e2..ea4e4851 100644 --- a/gocardless_pro/services/base_service.py +++ b/gocardless_pro/services/base_service.py @@ -65,7 +65,8 @@ def _envelope_key(self): def _resource_for(self, response): api_response = ApiResponse(response) - data = api_response.body[self._envelope_key()] + body = api_response.body + data = body.get(self._envelope_key()) or body.get("data") or body klass = type(self).RESOURCE_CLASS if isinstance(data, dict): return klass(data, api_response) diff --git a/gocardless_pro/services/billing_request_flows_service.py b/gocardless_pro/services/billing_request_flows_service.py index 96fe3f65..961e1a65 100644 --- a/gocardless_pro/services/billing_request_flows_service.py +++ b/gocardless_pro/services/billing_request_flows_service.py @@ -20,7 +20,7 @@ class BillingRequestFlowsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a Billing Request Flow. - Creates a new billing request flow. + Creates a new billing request flow. Args: params (dict, optional): Request body. @@ -41,9 +41,9 @@ def create(self,params=None, headers=None): def initialise(self,identity,params=None, headers=None): """Initialise a Billing Request Flow. - Returns the flow having generated a fresh session token which can be - used to power - integrations that manipulate the flow. + Returns the flow having generated a fresh session token which can be + used to power + integrations that manipulate the flow. Args: identity (string): Unique identifier, beginning with "BRF". diff --git a/gocardless_pro/services/billing_request_templates_service.py b/gocardless_pro/services/billing_request_templates_service.py index 7ed61982..76d81a74 100644 --- a/gocardless_pro/services/billing_request_templates_service.py +++ b/gocardless_pro/services/billing_request_templates_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of + your Billing Request Templates. Args: params (dict, optional): Query string parameters. @@ -47,7 +47,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single Billing Request Template. - Fetches a Billing Request Template + Fetches a Billing Request Template Args: identity (string): Unique identifier, beginning with "BRT". @@ -70,7 +70,7 @@ def get(self,identity,params=None, headers=None): def create(self,params=None, headers=None): """Create a Billing Request Template. - + Args: params (dict, optional): Request body. @@ -98,8 +98,8 @@ def create(self,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a Billing Request Template. - Updates a Billing Request Template, which will affect all future - Billing Requests created by this template. + Updates a Billing Request Template, which will affect all future + Billing Requests created by this template. Args: identity (string): Unique identifier, beginning with "BRT". diff --git a/gocardless_pro/services/billing_request_with_actions_service.py b/gocardless_pro/services/billing_request_with_actions_service.py index 4d99bffc..430e8d29 100644 --- a/gocardless_pro/services/billing_request_with_actions_service.py +++ b/gocardless_pro/services/billing_request_with_actions_service.py @@ -20,12 +20,12 @@ class BillingRequestWithActionsService(base_service.BaseService): def create_with_actions(self,params=None, headers=None): """Create a Billing Request with Actions. - Creates a billing request and completes any specified actions in a - single request. - This endpoint allows you to create a billing request and immediately - complete actions - such as collecting customer details, bank account details, or other - required actions. + Creates a billing request and completes any specified actions in a + single request. + This endpoint allows you to create a billing request and immediately + complete actions + such as collecting customer details, bank account details, or other + required actions. Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/billing_requests_service.py b/gocardless_pro/services/billing_requests_service.py index 75485e95..d62bec71 100644 --- a/gocardless_pro/services/billing_requests_service.py +++ b/gocardless_pro/services/billing_requests_service.py @@ -20,9 +20,10 @@ 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,17 +51,18 @@ 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 - action, this endpoint can be used to collect the details in order to - complete it. - - The endpoint takes the same payload as Customers, but checks that the - customer fields are populated correctly for the billing request scheme. - - Whatever is provided to this endpoint is used to update the referenced - customer, and will take effect immediately after the request is - successful. + 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. + + The endpoint takes the same payload as Customers, but checks that the + customer fields are populated correctly for the billing request + scheme. + + Whatever is provided to this endpoint is used to update the referenced + customer, and will take effect immediately after the request is + successful. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -84,34 +86,34 @@ def collect_customer_details(self,identity,params=None, headers=None): 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 - used to collect the details in order to complete it. - - The endpoint takes the same payload as Customer Bank Accounts, but - check - the bank account is valid for the billing request scheme before - creating - and attaching it. - - If the scheme is PayTo and the pay_id is available, this can be - included in the payload along with the - country_code. - - _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 - Direct Debit. If a bank account is discovered to be closed or invalid, - the - 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) - 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. + If the billing request has a pending + 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 + check + the bank account is valid for the billing request scheme before + creating + and attaching it. + + If the scheme is PayTo and the pay_id is available, this can be + included in the payload along with the + country_code. + + _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 + Direct Debit. If a bank account is discovered to be closed or invalid, + the + 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) + 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. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -135,10 +137,10 @@ def collect_bank_account(self,identity,params=None, headers=None): def confirm_payer_details(self,identity,params=None, headers=None): """Confirm the payer details. - This is needed when you have a mandate request. As a scheme compliance - rule we are required to - allow the payer to crosscheck the details entered by them and confirm - it. + This is needed when you have a mandate request. As a scheme compliance + rule we are required to + allow the payer to crosscheck the details entered by them and confirm + it. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -162,9 +164,9 @@ def confirm_payer_details(self,identity,params=None, headers=None): def fulfil(self,identity,params=None, headers=None): """Fulfil a Billing Request. - If a billing request is ready to be fulfilled, call this endpoint to - cause - it to fulfil, executing the payment. + If a billing request is ready to be fulfilled, call this endpoint to + cause + it to fulfil, executing the payment. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -188,9 +190,9 @@ def fulfil(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a Billing Request. - Immediately cancels a billing request, causing all billing request - flows - to expire. + Immediately cancels a billing request, causing all billing request + flows + to expire. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -214,8 +216,8 @@ 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](#api-usage-cursor-pagination) list of + your billing requests. Args: params (dict, optional): Query string parameters. @@ -241,7 +243,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single Billing Request. - Fetches a billing request + Fetches a billing request Args: identity (string): Unique identifier, beginning with "BRQ". @@ -264,12 +266,12 @@ def get(self,identity,params=None, headers=None): def notify(self,identity,params=None, headers=None): """Notify the customer. - Notifies the customer linked to the billing request, asking them to - authorise it. - Currently, the customer can only be notified by email. - - This endpoint is currently supported only for Instant Bank Pay Billing - Requests. + Notifies the customer linked to the billing request, asking them to + authorise it. + Currently, the customer can only be notified by email. + + This endpoint is currently supported only for Instant Bank Pay Billing + Requests. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -293,8 +295,8 @@ def notify(self,identity,params=None, headers=None): def fallback(self,identity,params=None, headers=None): """Trigger fallback. - Triggers a fallback from the open-banking flow to direct debit. Note, - the billing request must have fallback enabled. + Triggers a fallback from the open-banking flow to direct debit. Note, + the billing request must have fallback enabled. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -318,13 +320,13 @@ def fallback(self,identity,params=None, headers=None): def choose_currency(self,identity,params=None, headers=None): """Change currency. - This will allow for the updating of the currency and subsequently the - scheme if - needed for a Billing Request. This will only be available for mandate - only flows - which do not have the lock_currency flag set to true on the Billing - Request Flow. It - will also not support any request which has a payments request. + This will allow for the updating of the currency and subsequently the + scheme if + needed for a Billing Request. This will only be available for mandate + only flows + which do not have the lock_currency flag set to true on the Billing + Request Flow. It + will also not support any request which has a payments request. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -348,7 +350,7 @@ def choose_currency(self,identity,params=None, headers=None): def select_institution(self,identity,params=None, headers=None): """Select institution for a Billing Request. - Creates an Institution object and attaches it to the Billing Request + Creates an Institution object and attaches it to the Billing Request Args: identity (string): Unique identifier, beginning with "BRQ". diff --git a/gocardless_pro/services/blocks_service.py b/gocardless_pro/services/blocks_service.py index b57e1a24..987a110f 100644 --- a/gocardless_pro/services/blocks_service.py +++ b/gocardless_pro/services/blocks_service.py @@ -20,7 +20,7 @@ class BlocksService(base_service.BaseService): def create(self,params=None, headers=None): """Create a block. - Creates a new Block of a given type. By default it will be active. + Creates a new Block of a given type. By default it will be active. Args: params (dict, optional): Request body. @@ -48,7 +48,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a single block. - Retrieves the details of an existing block. + Retrieves the details of an existing block. Args: identity (string): Unique identifier, beginning with "BLC". @@ -71,8 +71,8 @@ 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](#api-usage-cursor-pagination) list of + your blocks. Args: params (dict, optional): Query string parameters. @@ -98,7 +98,7 @@ def all(self,params=None): def disable(self,identity,params=None, headers=None): """Disable a block. - Disables a block so that it no longer will prevent mandate creation. + Disables a block so that it no longer will prevent mandate creation. Args: identity (string): Unique identifier, beginning with "BLC". @@ -122,8 +122,8 @@ def disable(self,identity,params=None, headers=None): def enable(self,identity,params=None, headers=None): """Enable a block. - Enables a previously disabled block so that it will prevent mandate - creation + Enables a previously disabled block so that it will prevent mandate + creation Args: identity (string): Unique identifier, beginning with "BLC". @@ -147,11 +147,11 @@ def enable(self,identity,params=None, headers=None): def block_by_ref(self,params=None, headers=None): """Create blocks by reference. - Creates new blocks for a given reference. By default blocks will be - active. - Returns 201 if at least one block was created. Returns 200 if there - were no new - blocks created. + Creates new blocks for a given reference. By default blocks will be + active. + Returns 201 if at least one block was created. Returns 200 if there + were no new + blocks created. Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/creditor_bank_accounts_service.py b/gocardless_pro/services/creditor_bank_accounts_service.py index b9ca1893..04974414 100644 --- a/gocardless_pro/services/creditor_bank_accounts_service.py +++ b/gocardless_pro/services/creditor_bank_accounts_service.py @@ -20,7 +20,7 @@ class CreditorBankAccountsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a creditor bank account. - Creates a new creditor bank account object. + Creates a new creditor bank account object. Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ 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](#api-usage-cursor-pagination) list of + your creditor bank accounts. Args: params (dict, optional): Query string parameters. @@ -75,7 +75,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single creditor bank account. - Retrieves the details of an existing creditor bank account. + Retrieves the details of an existing creditor bank account. Args: identity (string): Unique identifier, beginning with "BA". @@ -98,14 +98,14 @@ def get(self,identity,params=None, headers=None): def disable(self,identity,params=None, headers=None): """Disable a creditor bank account. - Immediately disables the bank account, no money can be paid out to a - disabled account. - - This will return a `disable_failed` error if the bank account has - already been disabled. - - A disabled bank account can be re-enabled by creating a new bank - account resource with the same details. + Immediately disables the bank account, no money can be paid out to a + disabled account. + + This will return a `disable_failed` error if the bank account has + already been disabled. + + A disabled bank account can be re-enabled by creating a new bank + account resource with the same details. Args: identity (string): Unique identifier, beginning with "BA". diff --git a/gocardless_pro/services/creditors_service.py b/gocardless_pro/services/creditors_service.py index 02b2ac95..0fb07177 100644 --- a/gocardless_pro/services/creditors_service.py +++ b/gocardless_pro/services/creditors_service.py @@ -20,7 +20,7 @@ class CreditorsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a creditor. - Creates a new creditor. + Creates a new creditor. Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ 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](#api-usage-cursor-pagination) list of + your creditors. Args: params (dict, optional): Query string parameters. @@ -75,7 +75,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single creditor. - Retrieves the details of an existing creditor. + Retrieves the details of an existing creditor. Args: identity (string): Unique identifier, beginning with "CR". @@ -98,8 +98,8 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a creditor. - Updates a creditor object. Supports all of the fields supported when - creating a creditor. + Updates a creditor object. Supports all of the fields supported when + creating a creditor. Args: identity (string): Unique identifier, beginning with "CR". diff --git a/gocardless_pro/services/currency_exchange_rates_service.py b/gocardless_pro/services/currency_exchange_rates_service.py index 337b30ba..3a496f0a 100644 --- a/gocardless_pro/services/currency_exchange_rates_service.py +++ b/gocardless_pro/services/currency_exchange_rates_service.py @@ -20,8 +20,8 @@ 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](#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 ccc0c9f0..c1e9ce5b 100644 --- a/gocardless_pro/services/customer_bank_accounts_service.py +++ b/gocardless_pro/services/customer_bank_accounts_service.py @@ -20,19 +20,19 @@ class CustomerBankAccountsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a customer bank account. - Creates a new customer bank account object. - - 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) - - For more information on the different fields required in each country, - see [local bank details](#appendix-local-bank-details). + Creates a new customer bank account object. + + 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) + + For more information on the different fields required in each country, + see [local bank details](#appendix-local-bank-details). Args: params (dict, optional): Request body. @@ -60,8 +60,8 @@ 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](#api-usage-cursor-pagination) list of + your bank accounts. Args: params (dict, optional): Query string parameters. @@ -87,7 +87,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single customer bank account. - Retrieves the details of an existing bank account. + Retrieves the details of an existing bank account. Args: identity (string): Unique identifier, beginning with "BA". @@ -110,8 +110,8 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a customer bank account. - Updates a customer bank account object. Only the metadata parameter is - allowed. + Updates a customer bank account object. Only the metadata parameter is + allowed. Args: identity (string): Unique identifier, beginning with "BA". @@ -136,13 +136,13 @@ def update(self,identity,params=None, headers=None): def disable(self,identity,params=None, headers=None): """Disable a customer bank account. - Immediately cancels all associated mandates and cancellable payments. - - This will return a `disable_failed` error if the bank account has - already been disabled. - - A disabled bank account can be re-enabled by creating a new bank - account resource with the same details. + Immediately cancels all associated mandates and cancellable payments. + + This will return a `disable_failed` error if the bank account has + already been disabled. + + A disabled bank account can be re-enabled by creating a new bank + account resource with the same details. Args: identity (string): Unique identifier, beginning with "BA". diff --git a/gocardless_pro/services/customer_notifications_service.py b/gocardless_pro/services/customer_notifications_service.py index 45b92e20..f83135aa 100644 --- a/gocardless_pro/services/customer_notifications_service.py +++ b/gocardless_pro/services/customer_notifications_service.py @@ -20,15 +20,15 @@ class CustomerNotificationsService(base_service.BaseService): def handle(self,identity,params=None, headers=None): """Handle a notification. - "Handling" a notification means that you have sent the notification - yourself (and - don't want GoCardless to send it). - If the notification has already been actioned, or the deadline to - notify has passed, - this endpoint will return an `already_actioned` error and you should - not take - further action. This endpoint takes no additional parameters. - + "Handling" a notification means that you have sent the notification + yourself (and + don't want GoCardless to send it). + If the notification has already been actioned, or the deadline to + notify has passed, + 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 1c8e1bc3..2441a696 100644 --- a/gocardless_pro/services/customers_service.py +++ b/gocardless_pro/services/customers_service.py @@ -20,7 +20,7 @@ class CustomersService(base_service.BaseService): def create(self,params=None, headers=None): """Create a customer. - Creates a new customer object. + Creates a new customer object. Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ 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](#api-usage-cursor-pagination) list of + your customers. Args: params (dict, optional): Query string parameters. @@ -75,7 +75,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single customer. - Retrieves the details of an existing customer. + Retrieves the details of an existing customer. Args: identity (string): Unique identifier, beginning with "CU". @@ -98,8 +98,8 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a customer. - Updates a customer object. Supports all of the fields supported when - creating a customer. + Updates a customer object. Supports all of the fields supported when + creating a customer. Args: identity (string): Unique identifier, beginning with "CU". @@ -124,14 +124,14 @@ def update(self,identity,params=None, headers=None): def remove(self,identity,params=None, headers=None): """Remove a customer. - Removed customers will not appear in search results or lists of - customers (in our API - or exports), and it will not be possible to load an individually - removed customer by - ID. - -

The action of removing a customer - cannot be reversed, so please use with care.

+ Removed customers will not appear in search results or lists of + customers (in our API + or exports), and it will not be possible to load an individually + removed customer by + ID. + +

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 db8a9487..4a83a248 100644 --- a/gocardless_pro/services/events_service.py +++ b/gocardless_pro/services/events_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of + your events. Args: params (dict, optional): Query string parameters. @@ -47,7 +47,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single event. - Retrieves the details of a single event. + Retrieves the details of a single event. Args: identity (string): Unique identifier, beginning with "EV". diff --git a/gocardless_pro/services/exports_service.py b/gocardless_pro/services/exports_service.py index aadbcd1c..f1bd6a6b 100644 --- a/gocardless_pro/services/exports_service.py +++ b/gocardless_pro/services/exports_service.py @@ -20,7 +20,7 @@ class ExportsService(base_service.BaseService): def get(self,identity,params=None, headers=None): """Get a single export. - Returns a single export. + Returns a single export. Args: identity (string): Unique identifier, beginning with "EX". @@ -43,7 +43,7 @@ def get(self,identity,params=None, headers=None): def list(self,params=None, headers=None): """List exports. - Returns a list of exports which are available for download. + Returns a list of exports which are available for download. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/funds_availabilities_service.py b/gocardless_pro/services/funds_availabilities_service.py new file mode 100644 index 00000000..3eb71a87 --- /dev/null +++ b/gocardless_pro/services/funds_availabilities_service.py @@ -0,0 +1,43 @@ +# WARNING: Do not edit by hand, this file was generated by Crank: +# +# https://github.com/gocardless/crank +# + +from . import base_service +from .. import resources +from ..paginator import Paginator +from .. import errors + +class FundsAvailabilitiesService(base_service.BaseService): + """Service class that provides access to the funds_availabilities + endpoints of the GoCardless Pro API. + """ + + RESOURCE_CLASS = resources.FundsAvailability + RESOURCE_NAME = 'funds_availabilities' + + + def check(self,identity,params=None, headers=None): + """Funds availability. + + Checks if the payer's current balance is sufficient to cover the + amount + the merchant wants to charge within the consent parameters defined on + the mandate. + + Args: + identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. + params (dict, optional): Query string parameters. + + Returns: + FundsAvailability + """ + path = self._sub_url_params('/funds_availability/:identity', { + + 'identity': identity, + }) + + response = self._perform_request('GET', path, params, headers, + retry_failures=False) + return self._resource_for(response) + diff --git a/gocardless_pro/services/instalment_schedules_service.py b/gocardless_pro/services/instalment_schedules_service.py index a24fc662..61754fa9 100644 --- a/gocardless_pro/services/instalment_schedules_service.py +++ b/gocardless_pro/services/instalment_schedules_service.py @@ -20,26 +20,26 @@ class InstalmentSchedulesService(base_service.BaseService): def create_with_dates(self,params=None, headers=None): """Create (with dates). - Creates a new instalment schedule object, along with the associated - 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). - - The `instalments` property is an array of payment properties (`amount` - and - `charge_date`). - - It can take quite a while to create the associated payments, so the API - will return - the status as `pending` initially. When processing has completed, a - subsequent GET - request for the instalment schedule will either have the status - `success` and link - to the created payments, or the status `error` and detailed information - about the - failures. + Creates a new instalment schedule object, along with the associated + 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). + + The `instalments` property is an array of payment properties (`amount` + and + `charge_date`). + + It can take quite a while to create the associated payments, so the + API will return + the status as `pending` initially. When processing has completed, a + subsequent GET + request for the instalment schedule will either have the status + `success` and link + to the created payments, or the status `error` and detailed + information about the + failures. Args: params (dict, optional): Request body. @@ -67,22 +67,22 @@ def create_with_dates(self,params=None, headers=None): def create_with_schedule(self,params=None, headers=None): """Create (with schedule). - Creates a new instalment schedule object, along with the associated - 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). - - It can take quite a while to create the associated payments, so the API - will return - the status as `pending` initially. When processing has completed, a - subsequent - GET request for the instalment schedule will either have the status - `success` and link to - the created payments, or the status `error` and detailed information - about the - failures. + Creates a new instalment schedule object, along with the associated + 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). + + It can take quite a while to create the associated payments, so the + API will return + the status as `pending` initially. When processing has completed, a + subsequent + GET request for the instalment schedule will either have the status + `success` and link to + the created payments, or the status `error` and detailed information + about the + failures. Args: params (dict, optional): Request body. @@ -110,8 +110,8 @@ 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](#api-usage-cursor-pagination) list of + your instalment schedules. Args: params (dict, optional): Query string parameters. @@ -137,7 +137,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single instalment schedule. - Retrieves the details of an existing instalment schedule. + Retrieves the details of an existing instalment schedule. Args: identity (string): Unique identifier, beginning with "IS". @@ -160,8 +160,8 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update an instalment schedule. - Updates an instalment schedule. This accepts only the metadata - parameter. + Updates an instalment schedule. This accepts only the metadata + parameter. Args: identity (string): Unique identifier, beginning with "IS". @@ -186,11 +186,11 @@ def update(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel an instalment schedule. - Immediately cancels an instalment schedule; no further payments will be - collected for it. - - This will fail with a `cancellation_failed` error if the instalment - schedule is already cancelled or has completed. + Immediately cancels an instalment schedule; no further payments will + be collected for it. + + This will fail with a `cancellation_failed` error if the instalment + schedule is already cancelled or has completed. Args: identity (string): Unique identifier, beginning with "IS". diff --git a/gocardless_pro/services/institutions_service.py b/gocardless_pro/services/institutions_service.py index 8e691eea..dbf44d36 100644 --- a/gocardless_pro/services/institutions_service.py +++ b/gocardless_pro/services/institutions_service.py @@ -20,7 +20,7 @@ class InstitutionsService(base_service.BaseService): def list(self,params=None, headers=None): """List Institutions. - Returns a list of supported institutions. + Returns a list of supported institutions. Args: params (dict, optional): Query string parameters. @@ -46,9 +46,9 @@ def all(self,params=None): def list_for_billing_request(self,identity,params=None, headers=None): """List institutions for Billing Request. - Returns all institutions valid for a Billing Request. - - This endpoint is currently supported only for FasterPayments. + Returns all institutions valid for a Billing Request. + + This endpoint is currently supported only for FasterPayments. Args: identity (string): Unique identifier, beginning with "BRQ". diff --git a/gocardless_pro/services/logos_service.py b/gocardless_pro/services/logos_service.py index 2607ff7b..a596c663 100644 --- a/gocardless_pro/services/logos_service.py +++ b/gocardless_pro/services/logos_service.py @@ -20,14 +20,14 @@ class LogosService(base_service.BaseService): def create_for_creditor(self,params=None, headers=None): """Create a logo associated with a creditor. - Creates a new logo associated with a creditor. If a creditor already - has a logo, this will update the existing logo linked to the creditor. - - We support JPG and PNG formats. Your logo will be scaled to a maximum - 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). + Creates a new logo associated with a creditor. If a creditor already + has a logo, this will update the existing logo linked to the creditor. + + We support JPG and PNG formats. Your logo will be scaled to a maximum + 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). 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 145aa64c..337145d6 100644 --- a/gocardless_pro/services/mandate_import_entries_service.py +++ b/gocardless_pro/services/mandate_import_entries_service.py @@ -20,13 +20,13 @@ 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 - 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. - If you attempt to go over this limit, the API will return a - `record_limit_exceeded` error. + For an existing [mandate import](#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. + If you attempt to go over this limit, the API will return a + `record_limit_exceeded` error. Args: params (dict, optional): Request body. @@ -47,15 +47,15 @@ def create(self,params=None, headers=None): def list(self,params=None, headers=None): """List all mandate import entries. - For an existing mandate import, this endpoint lists all of the entries - attached. - - After a mandate import has been submitted, you can use this endpoint to - associate records - in your system (using the `record_identifier` that you provided when - creating the - mandate import). - + For an existing mandate import, this endpoint lists all of the entries + attached. + + After a mandate import has been submitted, you can use this endpoint + to associate records + 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 748cb113..0ec8211a 100644 --- a/gocardless_pro/services/mandate_imports_service.py +++ b/gocardless_pro/services/mandate_imports_service.py @@ -20,12 +20,12 @@ class MandateImportsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a new mandate import. - Mandate imports are first created, before mandates are added - one-at-a-time, so - 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. + Mandate imports are first created, before mandates are added + one-at-a-time, so + 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. Args: params (dict, optional): Request body. @@ -53,7 +53,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a mandate import. - Returns a single mandate import. + Returns a single mandate import. Args: identity (string): Unique identifier, beginning with "IM". @@ -76,19 +76,19 @@ def get(self,identity,params=None, headers=None): def submit(self,identity,params=None, headers=None): """Submit a mandate import. - Submits the mandate import, which allows it to be processed by a member - of the - GoCardless team. Once the import has been submitted, it can no longer - have entries - added to it. - - In our sandbox environment, to aid development, we automatically - process mandate - imports approximately 10 seconds after they are submitted. This will - allow you to - test both the "submitted" response and wait for the webhook to confirm - the - processing has begun. + Submits the mandate import, which allows it to be processed by a + member of the + GoCardless team. Once the import has been submitted, it can no longer + have entries + added to it. + + In our sandbox environment, to aid development, we automatically + process mandate + imports approximately 10 seconds after they are submitted. This will + allow you to + test both the "submitted" response and wait for the webhook to confirm + the + processing has begun. Args: identity (string): Unique identifier, beginning with "IM". @@ -112,13 +112,13 @@ def submit(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a mandate import. - Cancels the mandate import, which aborts the import process and stops - the mandates - being set up in GoCardless. Once the import has been cancelled, it can - no longer have - entries added to it. Mandate imports which have already been submitted - or processed - cannot be cancelled. + Cancels the mandate import, which aborts the import process and stops + the mandates + being set up in GoCardless. Once the import has been cancelled, it can + no longer have + entries added to it. Mandate imports which have already been submitted + or processed + cannot be cancelled. Args: identity (string): Unique identifier, beginning with "IM". diff --git a/gocardless_pro/services/mandate_pdfs_service.py b/gocardless_pro/services/mandate_pdfs_service.py index 7cbfb933..25c778a1 100644 --- a/gocardless_pro/services/mandate_pdfs_service.py +++ b/gocardless_pro/services/mandate_pdfs_service.py @@ -20,49 +20,49 @@ class MandatePdfsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a mandate PDF. - Generates a PDF mandate and returns its temporary URL. - - 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). - - 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](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) - language code supported for the scheme. - - | Scheme | Supported languages + Generates a PDF mandate and returns its temporary URL. + + 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). + + 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](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) + language code supported for the scheme. + + | Scheme | Supported languages - | - | :--------------- | - :------------------------------------------------------------------------------------------------------------------------------------------- - | - | ACH | English (`en`) + | + | :--------------- | + :------------------------------------------------------------------------------------------------------------------------------------------- + | + | ACH | English (`en`) - | - | Autogiro | English (`en`), Swedish (`sv`) + | + | Autogiro | English (`en`), Swedish (`sv`) - | - | Bacs | English (`en`) + | + | Bacs | English (`en`) - | - | BECS | English (`en`) + | + | BECS | English (`en`) - | - | BECS NZ | English (`en`) + | + | BECS NZ | English (`en`) - | - | Betalingsservice | Danish (`da`), English (`en`) + | + | Betalingsservice | Danish (`da`), English (`en`) - | - | PAD | English (`en`) + | + | PAD | English (`en`) - | - | SEPA Core | Danish (`da`), Dutch (`nl`), English (`en`), - French (`fr`), German (`de`), Italian (`it`), Portuguese (`pt`), - Spanish (`es`), Swedish (`sv`) | + | + | SEPA Core | Danish (`da`), Dutch (`nl`), English (`en`), + French (`fr`), German (`de`), Italian (`it`), Portuguese (`pt`), + Spanish (`es`), Swedish (`sv`) | Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/mandates_service.py b/gocardless_pro/services/mandates_service.py index a7d5dcc8..81c4b7ff 100644 --- a/gocardless_pro/services/mandates_service.py +++ b/gocardless_pro/services/mandates_service.py @@ -20,7 +20,7 @@ class MandatesService(base_service.BaseService): def create(self,params=None, headers=None): """Create a mandate. - Creates a new mandate object. + Creates a new mandate object. Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ 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](#api-usage-cursor-pagination) list of + your mandates. Args: params (dict, optional): Query string parameters. @@ -75,7 +75,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single mandate. - Retrieves the details of an existing mandate. + Retrieves the details of an existing mandate. Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. @@ -98,7 +98,7 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a mandate. - Updates a mandate object. This accepts only the metadata parameter. + Updates a mandate object. This accepts only the metadata parameter. Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. @@ -123,12 +123,12 @@ def update(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a mandate. - Immediately cancels a mandate and all associated cancellable payments. - Any metadata supplied to this endpoint will be stored on the mandate - cancellation event it causes. - - This will fail with a `cancellation_failed` error if the mandate is - already cancelled. + Immediately cancels a mandate and all associated cancellable payments. + Any metadata supplied to this endpoint will be stored on the mandate + cancellation event it causes. + + This will fail with a `cancellation_failed` error if the mandate is + already cancelled. Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. @@ -152,18 +152,18 @@ 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. - - This will fail with a `mandate_not_inactive` error if the mandate is - already being submitted, or is active. - - Mandates can be resubmitted up to 10 times. + 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. + + Mandates can be resubmitted up to 10 times. Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. diff --git a/gocardless_pro/services/negative_balance_limits_service.py b/gocardless_pro/services/negative_balance_limits_service.py index d4d51061..70509f3d 100644 --- a/gocardless_pro/services/negative_balance_limits_service.py +++ b/gocardless_pro/services/negative_balance_limits_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of + negative balance limits. 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 8f9926f8..f648c6fc 100644 --- a/gocardless_pro/services/outbound_payments_service.py +++ b/gocardless_pro/services/outbound_payments_service.py @@ -20,7 +20,7 @@ class OutboundPaymentsService(base_service.BaseService): def create(self,params=None, headers=None): """Create an outbound payment. - + Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ def create(self,params=None, headers=None): def withdraw(self,params=None, headers=None): """Create a withdrawal outbound payment. - Creates an outbound payment to your verified business bank account as - the recipient. + Creates an outbound payment to your verified business bank account as + the recipient. Args: params (dict, optional): Request body. @@ -69,11 +69,11 @@ def withdraw(self,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel an outbound payment. - Cancels an outbound payment. Only outbound payments with either - `verifying`, `pending_approval`, or `scheduled` status can be - cancelled. - Once an outbound payment is `executing`, the money moving process has - begun and cannot be reversed. + Cancels an outbound payment. Only outbound payments with either + `verifying`, `pending_approval`, or `scheduled` status can be + cancelled. + Once an outbound payment is `executing`, the money moving process has + begun and cannot be reversed. Args: identity (string): Unique identifier of the outbound payment. @@ -97,8 +97,8 @@ def cancel(self,identity,params=None, headers=None): def approve(self,identity,params=None, headers=None): """Approve an outbound payment. - Approves an outbound payment. Only outbound payments with the - “pending_approval” status can be approved. + Approves an outbound payment. Only outbound payments with the + “pending_approval” status can be approved. Args: identity (string): Unique identifier of the outbound payment. @@ -122,7 +122,7 @@ def approve(self,identity,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get an outbound payment. - Fetches an outbound_payment by ID + Fetches an outbound_payment by ID Args: identity (string): Unique identifier of the outbound payment. @@ -145,8 +145,8 @@ 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](#api-usage-cursor-pagination) list of + outbound payments. Args: params (dict, optional): Query string parameters. @@ -172,8 +172,8 @@ def all(self,params=None): def update(self,identity,params=None, headers=None): """Update an outbound payment. - Updates an outbound payment object. This accepts only the metadata - parameter. + Updates an outbound payment object. This accepts only the metadata + parameter. Args: identity (string): Unique identifier of the outbound payment. @@ -194,3 +194,21 @@ def update(self,identity,params=None, headers=None): retry_failures=True) return self._resource_for(response) + + def stats(self,params=None, headers=None): + """Outbound payment statistics. + + Retrieve aggregate statistics on outbound payments. + + Args: + params (dict, optional): Query string parameters. + + Returns: + OutboundPayment + """ + path = '/outbound_payments/stats' + + response = self._perform_request('GET', path, params, headers, + retry_failures=False) + return self._resource_for(response) + diff --git a/gocardless_pro/services/payer_authorisations_service.py b/gocardless_pro/services/payer_authorisations_service.py index ec7beddb..3e60c0db 100644 --- a/gocardless_pro/services/payer_authorisations_service.py +++ b/gocardless_pro/services/payer_authorisations_service.py @@ -20,8 +20,8 @@ class PayerAuthorisationsService(base_service.BaseService): def get(self,identity,params=None, headers=None): """Get a single Payer Authorisation. - Retrieves the details of a single existing Payer Authorisation. It can - be used for polling the status of a Payer Authorisation. + Retrieves the details of a single existing Payer Authorisation. It can + be used for polling the status of a Payer Authorisation. Args: identity (string): Unique identifier, beginning with "PA". @@ -44,12 +44,13 @@ def get(self,identity,params=None, headers=None): def create(self,params=None, headers=None): """Create a Payer Authorisation. - Creates a Payer Authorisation. The resource is saved to the database - even if incomplete. An empty array of incomplete_fields means that the - resource is valid. The ID of the resource is used for the other - actions. 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 as a multi-step form. + Creates a Payer Authorisation. The resource is saved to the database + even if incomplete. An empty array of incomplete_fields means that the + resource is valid. The ID of the resource is used for the other + actions. 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 as a multi-step + form. Args: params (dict, optional): Request body. @@ -77,15 +78,15 @@ def create(self,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a Payer Authorisation. - Updates a Payer Authorisation. Updates the Payer Authorisation with the - request data. Can be invoked as many times as needed. Only fields - present in the request will be modified. An empty array of - 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.

+ Updates a Payer Authorisation. Updates the Payer Authorisation with + the request data. Can be invoked as many times as needed. Only fields + present in the request will be modified. An empty array of + 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.

Args: identity (string): Unique identifier, beginning with "PA". @@ -110,11 +111,11 @@ def update(self,identity,params=None, headers=None): def submit(self,identity,params=None, headers=None): """Submit a Payer Authorisation. - Submits all the data previously pushed to this PayerAuthorisation for - verification. This time, a 200 HTTP status is returned if the resource - is valid and a 422 error response in case of validation errors. After - it is successfully submitted, the Payer Authorisation can no longer be - edited. + Submits all the data previously pushed to this PayerAuthorisation for + verification. This time, a 200 HTTP status is returned if the resource + is valid and a 422 error response in case of validation errors. After + it is successfully submitted, the Payer Authorisation can no longer be + edited. Args: identity (string): Unique identifier, beginning with "PA". @@ -138,18 +139,18 @@ def submit(self,identity,params=None, headers=None): def confirm(self,identity,params=None, headers=None): """Confirm a Payer Authorisation. - Confirms the Payer Authorisation, indicating that the resources are - ready to be created. - 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 go through our flow or make them go through the necessary - verification mechanism (upcoming feature). -

+ Confirms the Payer Authorisation, indicating that the resources are + ready to be created. + 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 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/payer_themes_service.py b/gocardless_pro/services/payer_themes_service.py index e887fd2d..148a3fca 100644 --- a/gocardless_pro/services/payer_themes_service.py +++ b/gocardless_pro/services/payer_themes_service.py @@ -20,9 +20,9 @@ class PayerThemesService(base_service.BaseService): def create_for_creditor(self,params=None, headers=None): """Create a payer theme associated with a creditor. - Creates a new payer theme associated with a creditor. If a creditor - already has payer themes, this will update the existing payer theme - linked to the creditor. + Creates a new payer theme associated with a creditor. If a creditor + already has payer themes, this will update the existing payer theme + linked to the creditor. Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/payment_account_transactions_service.py b/gocardless_pro/services/payment_account_transactions_service.py index d5c2ef1c..5ed4eaff 100644 --- a/gocardless_pro/services/payment_account_transactions_service.py +++ b/gocardless_pro/services/payment_account_transactions_service.py @@ -20,7 +20,7 @@ class PaymentAccountTransactionsService(base_service.BaseService): def list(self,identity,params=None, headers=None): """List payment account transactions. - List transactions for a given payment account. + List transactions for a given payment account. Args: identity (string): The unique ID of the [bank account](#core-endpoints-creditor-bank-accounts) which happens to be the payment account. diff --git a/gocardless_pro/services/payment_accounts_service.py b/gocardless_pro/services/payment_accounts_service.py index d11bded8..cc39168c 100644 --- a/gocardless_pro/services/payment_accounts_service.py +++ b/gocardless_pro/services/payment_accounts_service.py @@ -17,11 +17,34 @@ class PaymentAccountsService(base_service.BaseService): RESOURCE_NAME = 'payment_accounts' + def get(self,identity,params=None, headers=None): + """Get a single payment account details. + + Retrieves the details of an existing payment account. + + Args: + identity (string): Unique identifier, beginning with "BA". + params (dict, optional): Query string parameters. + + Returns: + PaymentAccount + """ + path = self._sub_url_params('/payment_accounts/:identity', { + + 'identity': identity, + }) + + + response = self._perform_request('GET', path, params, headers, + retry_failures=True) + return self._resource_for(response) + + 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](#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 3a736ee0..1c441bd6 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. - - 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`. + 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`. Args: params (dict, optional): Request body. @@ -54,8 +54,8 @@ 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](#api-usage-cursor-pagination) list of + your payments. Args: params (dict, optional): Query string parameters. @@ -81,7 +81,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single payment. - Retrieves the details of a single existing payment. + Retrieves the details of a single existing payment. Args: identity (string): Unique identifier, beginning with "PM". @@ -104,7 +104,7 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a payment. - Updates a payment object. This accepts only the metadata parameter. + Updates a payment object. This accepts only the metadata parameter. Args: identity (string): Unique identifier, beginning with "PM". @@ -129,12 +129,12 @@ def update(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a payment. - Cancels the payment if it has not already been submitted to the banks. - Any metadata supplied to this endpoint will be stored on the payment - cancellation event it causes. - - This will fail with a `cancellation_failed` error unless the payment's - status is `pending_submission`. + Cancels the payment if it has not already been submitted to the banks. + Any metadata supplied to this endpoint will be stored on the payment + cancellation event it causes. + + This will fail with a `cancellation_failed` error unless the payment's + status is `pending_submission`. Args: identity (string): Unique identifier, beginning with "PM". @@ -158,16 +158,17 @@ 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. - - This will return a `retry_failed` error if the payment has not failed. - - Payments can be retried up to 3 times. + 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. + + Payments can be retried up to 3 times. Args: identity (string): Unique identifier, beginning with "PM". diff --git a/gocardless_pro/services/payout_items_service.py b/gocardless_pro/services/payout_items_service.py index 47bc979f..a7201f4a 100644 --- a/gocardless_pro/services/payout_items_service.py +++ b/gocardless_pro/services/payout_items_service.py @@ -20,13 +20,13 @@ 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](#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 50bcb720..f5fc939e 100644 --- a/gocardless_pro/services/payouts_service.py +++ b/gocardless_pro/services/payouts_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of + your payouts. Args: params (dict, optional): Query string parameters. @@ -47,9 +47,9 @@ def all(self,params=None): 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). + 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). Args: identity (string): Unique identifier, beginning with "PO". @@ -72,7 +72,7 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a payout. - Updates a payout object. This accepts only the metadata parameter. + Updates a payout object. This accepts only the metadata parameter. 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 7aeb4e36..fa5b0759 100644 --- a/gocardless_pro/services/redirect_flows_service.py +++ b/gocardless_pro/services/redirect_flows_service.py @@ -20,8 +20,8 @@ class RedirectFlowsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a redirect flow. - Creates a redirect flow object which can then be used to redirect your - customer to the GoCardless hosted payment pages. + Creates a redirect flow object which can then be used to redirect your + customer to the GoCardless hosted payment pages. Args: params (dict, optional): Request body. @@ -49,7 +49,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a single redirect flow. - Returns all details about a single redirect flow + Returns all details about a single redirect flow Args: identity (string): Unique identifier, beginning with "RE". @@ -72,17 +72,17 @@ 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 will return a `redirect_flow_incomplete` error if your customer - has not yet been redirected back to your site, and a - `redirect_flow_already_completed` error if your integration has already - completed this flow. It will return a `bad_request` error if the - `session_token` differs to the one supplied when the redirect flow was - created. + 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 will return a `redirect_flow_incomplete` error if your customer + has not yet been redirected back to your site, and a + `redirect_flow_already_completed` error if your integration has + already completed this flow. It will return a `bad_request` error if + the `session_token` differs to the one supplied when the redirect flow + was created. Args: identity (string): Unique identifier, beginning with "RE". diff --git a/gocardless_pro/services/refunds_service.py b/gocardless_pro/services/refunds_service.py index 19d4d0e6..c7347add 100644 --- a/gocardless_pro/services/refunds_service.py +++ b/gocardless_pro/services/refunds_service.py @@ -20,21 +20,21 @@ class RefundsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a refund. - Creates a new refund object. - - 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 - sufficient balance for refunds available to cover the cost of the - requested refund. - + Creates a new refund object. + + 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 + sufficient balance for refunds available to cover the cost of the + requested refund. + Args: params (dict, optional): Request body. @@ -62,8 +62,8 @@ 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](#api-usage-cursor-pagination) list of + your refunds. Args: params (dict, optional): Query string parameters. @@ -89,7 +89,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single refund. - Retrieves all details for a single refund + Retrieves all details for a single refund Args: identity (string): Unique identifier, beginning with "RF". @@ -112,7 +112,7 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a refund. - Updates a refund object. + Updates a refund object. Args: identity (string): Unique identifier, beginning with "RF". diff --git a/gocardless_pro/services/scenario_simulators_service.py b/gocardless_pro/services/scenario_simulators_service.py index 0802cd17..92cc02ea 100644 --- a/gocardless_pro/services/scenario_simulators_service.py +++ b/gocardless_pro/services/scenario_simulators_service.py @@ -20,7 +20,7 @@ class ScenarioSimulatorsService(base_service.BaseService): def run(self,identity,params=None, headers=None): """Simulate a scenario. - Runs the specific scenario simulator against the specific resource + Runs the specific scenario simulator against the specific resource Args: identity (string): The unique identifier of the simulator, used to initiate simulations. One of: @@ -41,7 +41,7 @@ def run(self,identity,params=None, headers=None):
  • `mandate_customer_approval_skipped`: Transitions a mandate through to `pending_submission`, as if the customer skipped the mandate approval during the mandate creation process. It must start in the `pending_customer_approval` state. Compatible only with Bacs and SEPA mandates, which support customer signatures on the mandate. All payments associated with the mandate will be transitioned to `pending_submission`. All subscriptions associated with the mandate will become `active`.
  • `mandate_failed`: Transitions a mandate through to `failed`, having been submitted to the banks but found to be invalid (for example due to invalid bank details). It must start in the `pending_submission` or `submitted` states. Not compatible with SEPA mandates, which are submitted with their first payment.
  • `mandate_expired`: Transitions a mandate through to `expired`, having been submitted to the banks, set up successfully and then expired because no collection attempts were made against it for longer than the scheme's dormancy period (13 months for Bacs, 3 years for SEPA, 15 months for ACH, Betalingsservice, and BECS). It must start in the `pending_submission` state. Not compatible with Autogiro, BECS NZ, and PAD mandates, which do not expire.
  • -
  • `mandate_transferred`: Transitions a mandate through to `transferred`, having been submitted to the banks, set up successfully and then moved to a new bank account due to the customer using the UK's Current Account Switching Service (CASS). It must start in the `pending_submission` state. Only compatible with Bacs mandates.
  • +
  • `mandate_transferred`: Transitions a mandate through to `transferred`, having been submitted to the banks, set up successfully and then moved to a new bank account due. It must start in the `pending_submission` state. Only compatible with Bacs and SEPA mandates.
  • `mandate_transferred_with_resubmission`: Transitions a mandate through `transferred` and resubmits it to the banks, can be caused be the UK's Current Account Switching Service (CASS) or when a customer contacts GoCardless to change their bank details. It must start in the `pending_submission` state. Only compatible with Bacs mandates.
  • `mandate_suspended_by_payer`: Transitions a mandate to `suspended_by_payer`, as if payer has suspended the mandate after it has been setup successfully. It must start in the `activated` state. Only compatible with PAY_TO mandates.
  • `refund_paid`: Transitions a refund to `paid`. It must start in either the `pending_submission` or `submitted` state.
  • diff --git a/gocardless_pro/services/scheme_identifiers_service.py b/gocardless_pro/services/scheme_identifiers_service.py index 2dc11a46..3f9f29fb 100644 --- a/gocardless_pro/services/scheme_identifiers_service.py +++ b/gocardless_pro/services/scheme_identifiers_service.py @@ -20,46 +20,46 @@ class SchemeIdentifiersService(base_service.BaseService): def create(self,params=None, headers=None): """Create a scheme identifier. - Creates a new scheme identifier. The scheme identifier status will be - `pending` while GoCardless is - processing the request. Once the scheme identifier is ready to be used - the status will be updated to `active`. - At this point, GoCardless will emit a scheme identifier activated event - via webhook to notify you of this change. - In Bacs, it will take up to five working days for a scheme identifier - to become active. On other schemes, including SEPA, - this happens instantly. - - #### Scheme identifier name validations - - The `name` field of a scheme identifier can contain alphanumeric - characters, spaces and - special characters. - - Its maximum length and the special characters it supports depend on the - scheme: - - | __scheme__ | __maximum length__ | __special characters - allowed__ | - | :---------------- | :----------------- | - :-------------------------------------------------- | - | `bacs` | 18 characters | `/` `.` `&` `-` - | - | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` - `+` `&` `<` `>` `'` `"` | - | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` - `'` `+` `-` | - | `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` - `'` `+` `-` | - - The validation error that gets returned for an invalid name will - contain a suggested name - in the metadata that is guaranteed to pass name validations. - - 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. - + Creates a new scheme identifier. The scheme identifier status will be + `pending` while GoCardless is + processing the request. Once the scheme identifier is ready to be used + the status will be updated to `active`. + At this point, GoCardless will emit a scheme identifier activated + event via webhook to notify you of this change. + In Bacs, it will take up to five working days for a scheme identifier + to become active. On other schemes, including SEPA, + this happens instantly. + + #### Scheme identifier name validations + + The `name` field of a scheme identifier can contain alphanumeric + characters, spaces and + special characters. + + Its maximum length and the special characters it supports depend on + the scheme: + + | __scheme__ | __maximum length__ | __special characters + allowed__ | + | :---------------- | :----------------- | + :-------------------------------------------------- | + | `bacs` | 18 characters | `/` `.` `&` `-` + | + | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` + `+` `&` `<` `>` `'` `"` | + | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` + `'` `+` `-` | + | `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` + `'` `+` `-` | + + The validation error that gets returned for an invalid name will + contain a suggested name + in the metadata that is guaranteed to pass name validations. + + 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 +87,8 @@ 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](#api-usage-cursor-pagination) list of + your scheme identifiers. Args: params (dict, optional): Query string parameters. @@ -114,7 +114,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single scheme identifier. - Retrieves the details of an existing scheme identifier. + Retrieves the details of an existing scheme identifier. Args: identity (string): Unique identifier, usually beginning with "SU". diff --git a/gocardless_pro/services/subscriptions_service.py b/gocardless_pro/services/subscriptions_service.py index be5d3c84..5428930c 100644 --- a/gocardless_pro/services/subscriptions_service.py +++ b/gocardless_pro/services/subscriptions_service.py @@ -20,7 +20,7 @@ class SubscriptionsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a subscription. - Creates a new subscription object + Creates a new subscription object Args: params (dict, optional): Request body. @@ -48,10 +48,10 @@ 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](#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. @@ -77,7 +77,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single subscription. - Retrieves the details of a single subscription. + Retrieves the details of a single subscription. Args: identity (string): Unique identifier, beginning with "SB". @@ -100,33 +100,33 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a subscription. - Updates a subscription object. - - This fails with: - - - `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 - 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 - 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 - authenticated as - + Updates a subscription object. + + This fails with: + + - `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 + 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 + 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 + authenticated as + Args: identity (string): Unique identifier, beginning with "SB". @@ -151,47 +151,48 @@ def update(self,identity,params=None, headers=None): def pause(self,identity,params=None, headers=None): """Pause a subscription. - Pause a subscription object. - No payments will be created until it is resumed. - - This can only be used when a subscription is collecting a fixed number - of payments (created using `count`), - when they continue forever (created without `count` or `end_date`) or - the subscription is already paused for a number of cycles. - - When `pause_cycles` is omitted the subscription is paused until the - [resume endpoint](#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. - - When `pause_cycles` is provided the subscription will be paused for the - number of cycles requested. - If the subscription is collecting a fixed number of payments, - `end_date` will be set to a new value. - When paused for a number of cycles, `upcoming_payments` will still - contain the upcoming charge dates. - - This fails with: - - - `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 - pause a subscription. - - - `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 - payments. - - - `pause_cycles_must_be_greater_than_or_equal_to` if the provided value - for `pause_cycles` cannot be satisfied. + Pause a subscription object. + No payments will be created until it is resumed. + + This can only be used when a subscription is collecting a fixed number + of payments (created using `count`), + when they continue forever (created without `count` or `end_date`) or + the subscription is already paused for a number of cycles. + + When `pause_cycles` is omitted the subscription is paused until the + [resume endpoint](#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. + + When `pause_cycles` is provided the subscription will be paused for + the number of cycles requested. + If the subscription is collecting a fixed number of payments, + `end_date` will be set to a new value. + When paused for a number of cycles, `upcoming_payments` will still + contain the upcoming charge dates. + + This fails with: + + - `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 + pause a subscription. + + - `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 + payments. + + - `pause_cycles_must_be_greater_than_or_equal_to` if the provided + value for `pause_cycles` cannot be satisfied. Args: identity (string): Unique identifier, beginning with "SB". @@ -215,23 +216,23 @@ def pause(self,identity,params=None, headers=None): def resume(self,identity,params=None, headers=None): """Resume a subscription. - Resume a subscription object. - Payments will start to be created again based on the subscriptions - recurrence rules. - The `charge_date` on the next payment will be the same as the - subscriptions `earliest_charge_date_after_resume` - - This fails with: - - - `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 - resume a subscription. - - - `subscription_not_paused` if the subscription is not paused. - + Resume a subscription object. + Payments will start to be created again based on the subscriptions + recurrence rules. + The `charge_date` on the next payment will be the same as the + subscriptions `earliest_charge_date_after_resume` + + This fails with: + + - `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 + resume a subscription. + + - `subscription_not_paused` if the subscription is not paused. + Args: identity (string): Unique identifier, beginning with "SB". @@ -255,12 +256,12 @@ def resume(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a subscription. - Immediately cancels a subscription; no more payments will be created - under it. Any metadata supplied to this endpoint will be stored on the - payment cancellation event it causes. - - This will fail with a cancellation_failed error if the subscription is - already cancelled or finished. + Immediately cancels a subscription; no more payments will be created + under it. Any metadata supplied to this endpoint will be stored on the + payment cancellation event it causes. + + This will fail with a cancellation_failed error if the subscription is + already cancelled or finished. 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 20b7842c..16df7929 100644 --- a/gocardless_pro/services/tax_rates_service.py +++ b/gocardless_pro/services/tax_rates_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of all + tax rates. Args: params (dict, optional): Query string parameters. @@ -47,7 +47,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single tax rate. - Retrieves the details of a tax rate. + Retrieves the details of a tax rate. Args: identity (string): The unique identifier created by the jurisdiction, tax type and version diff --git a/gocardless_pro/services/transferred_mandates_service.py b/gocardless_pro/services/transferred_mandates_service.py index 0584df7a..7e35cf33 100644 --- a/gocardless_pro/services/transferred_mandates_service.py +++ b/gocardless_pro/services/transferred_mandates_service.py @@ -20,8 +20,8 @@ class TransferredMandatesService(base_service.BaseService): def transferred_mandates(self,identity,params=None, headers=None): """Get updated customer bank details. - Returns new customer bank details for a mandate that's been recently - transferred + Returns new customer bank details for a mandate that's been recently + transferred Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. diff --git a/gocardless_pro/services/verification_details_service.py b/gocardless_pro/services/verification_details_service.py index 4ea95e7e..502ec61b 100644 --- a/gocardless_pro/services/verification_details_service.py +++ b/gocardless_pro/services/verification_details_service.py @@ -20,7 +20,7 @@ class VerificationDetailsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a verification detail. - Creates a new verification detail + Creates a new verification detail Args: params (dict, optional): Request body. @@ -41,7 +41,7 @@ def create(self,params=None, headers=None): def list(self,params=None, headers=None): """List verification details. - Returns a list of verification details belonging to a creditor. + Returns a list of verification details belonging to a creditor. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/webhooks_service.py b/gocardless_pro/services/webhooks_service.py index 9a12982a..771c2735 100644 --- a/gocardless_pro/services/webhooks_service.py +++ b/gocardless_pro/services/webhooks_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of + your webhooks. Args: params (dict, optional): Query string parameters. @@ -47,7 +47,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single webhook. - Retrieves the details of an existing webhook. + Retrieves the details of an existing webhook. Args: identity (string): Unique identifier, beginning with "WB". @@ -70,7 +70,7 @@ def get(self,identity,params=None, headers=None): def retry(self,identity,params=None, headers=None): """Retry a webhook. - Requests for a previous webhook to be sent again + Requests for a previous webhook to be sent again Args: identity (string): Unique identifier, beginning with "WB". diff --git a/tests/api_client_test.py b/tests/api_client_test.py index a3b13a34..6da7044b 100644 --- a/tests/api_client_test.py +++ b/tests/api_client_test.py @@ -138,3 +138,15 @@ def test_handles_invalid_empty_response(): with pytest.raises(errors.MalformedResponseError): client.post('/test', body={'name': 'Billy Jean'}) + +@responses.activate +def test_handles_string_error_response(): + body = json.dumps({'error': 'bank_account_exists'}) + responses.add(responses.POST, 'http://example.com/test', + body=body, status=400) + + with pytest.raises(errors.ApiError) as exception: + client.post('/test', body={'name': 'Billy Jean'}) + + assert exception.value.message == 'bank_account_exists' + assert exception.value.code == 400 diff --git a/tests/client_test.py b/tests/client_test.py index 262541ff..f73911d9 100644 --- a/tests/client_test.py +++ b/tests/client_test.py @@ -71,6 +71,9 @@ def test_events_returns_service(): def test_exports_returns_service(): assert isinstance(client.exports, services.ExportsService) +def test_funds_availabilities_returns_service(): + assert isinstance(client.funds_availabilities, services.FundsAvailabilitiesService) + def test_instalment_schedules_returns_service(): assert isinstance(client.instalment_schedules, services.InstalmentSchedulesService) diff --git a/tests/fixtures/billing_request_with_actions.json b/tests/fixtures/billing_request_with_actions.json index c96fab7c..7bd3b551 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 102","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 101"},"collect_customer_details":{"default_country_code":"example default_country_code 101","incomplete_fields":{"customer":["example customer 102"],"customer_billing_detail":["example customer_billing_detail 102"]}},"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":true,"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 101","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_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 101"},"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":false,"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":{}},"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 8215ce12..2b589b0a 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -5,72 +5,72 @@ "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 102"]}},"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":true,"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 101","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_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":false,"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":{}},"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 104"]}},"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":true,"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 103","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":"managed","links":{"mandate":"example mandate 102"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":false,"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":{}},"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 106"],"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":true,"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":"managed","links":{"mandate":"example mandate 103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 105"},"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":false,"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":{}},"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 108"],"customer_billing_detail":["example customer_billing_detail 108"]}},"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":true,"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 107","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":"managed","links":{"mandate":"example mandate 104"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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 107"},"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":false,"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":{}},"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":true,"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_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":false,"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":{}},"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 112"],"customer_billing_detail":["example customer_billing_detail 112"]}},"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":true,"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 111","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_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 111"},"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":false,"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":{}},"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", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","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 107"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 113","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 107","constraints":{"end_date":"example end_date 107","max_amount_per_payment":107,"payment_method":"example payment_method 107","periodic_limits":[{"alignment":"creation_date","max_payments":107,"max_total_amount":107,"period":"month"}],"start_date":"example start_date 107"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 107"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","sweeping":false,"verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 107"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 107"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","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 108"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 108","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 114","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 108","constraints":{"end_date":"example end_date 108","max_amount_per_payment":108,"payment_method":"example payment_method 108","periodic_limits":[{"alignment":"calendar","max_payments":108,"max_total_amount":108,"period":"year"}],"start_date":"example start_date 108"},"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"mandate":"example mandate 108"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 108"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"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 108"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 101","before":"example before 101"},"limit":50}} }, "get": { "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_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":{}},"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":"managed","links":{"mandate":"example mandate 110"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","sweeping":true,"verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","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":{}},"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 120"]}},"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":true,"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 119","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_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":false,"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":{}},"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 122"]}},"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":true,"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 121","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_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":false,"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":{}},"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 122"],"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_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 121"},"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":{}},"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/events.json b/tests/fixtures/events.json index ecba6d65..90c5efc4 100644 --- a/tests/fixtures/events.json +++ b/tests/fixtures/events.json @@ -5,12 +5,12 @@ "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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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 104"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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":"access_token"}}],"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":true,"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_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":false,"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 102","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 102","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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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 101","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 101","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_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_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"},"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.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}],"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", "path_template": "/events/:identity", "url_params": ["EV123"], - "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 105"}],"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","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","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"}}} + "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 105"}],"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_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"}}} } } diff --git a/tests/fixtures/funds_availabilities.json b/tests/fixtures/funds_availabilities.json new file mode 100644 index 00000000..3fbeb717 --- /dev/null +++ b/tests/fixtures/funds_availabilities.json @@ -0,0 +1,10 @@ +{ + + + "check": { + "method": "GET", + "path_template": "/funds_availability/:identity", + "url_params": ["MD123"], + "body": {"available":false} + } +} diff --git a/tests/fixtures/outbound_payments.json b/tests/fixtures/outbound_payments.json index 043fdd7d..03e16457 100644 --- a/tests/fixtures/outbound_payments.json +++ b/tests/fixtures/outbound_payments.json @@ -42,5 +42,11 @@ "path_template": "/outbound_payments/:identity", "url_params": ["OUT123"], "body": {"outbound_payments":{"amount":1000,"created_at":"2024-01-01T12:00:00.000Z","currency":"GBP","description":"Reward Payment (August 2024)","execution_date":"2024-08-31","id":"OUT123","is_withdrawal":true,"links":{"creditor":"CR123","customer":"CU123","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"}}}} + }, + "stats": { + "method": "GET", + "path_template": "/outbound_payments/stats", + "url_params": [], + "body": {"outbound_payments":{"executing_amount":101,"executing_count":101,"pending_approval_amount":101,"pending_approval_count":101,"scheduled_amount":101,"scheduled_count":101}} } } diff --git a/tests/fixtures/payment_accounts.json b/tests/fixtures/payment_accounts.json index e8d218ca..040f1a8a 100644 --- a/tests/fixtures/payment_accounts.json +++ b/tests/fixtures/payment_accounts.json @@ -1,6 +1,12 @@ { + "get": { + "method": "GET", + "path_template": "/payment_accounts/:identity", + "url_params": ["BA123"], + "body": {"payment_accounts":{"account_balance":1000,"account_holder_name":"Billie Jean","account_number_ending":"1234","bank_name":"BARCLAYS BANK PLC","currency":"EUR","id":"BA123","links":{"creditor":"CR123"}}} + }, "list": { "method": "GET", "path_template": "/payment_accounts", diff --git a/tests/integration/balances_integration_test.py b/tests/integration/balances_integration_test.py index 79d99606..322b3b81 100644 --- a/tests/integration/balances_integration_test.py +++ b/tests/integration/balances_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_balances_list(): fixture = helpers.load_fixture('balances')['list'] helpers.stub_response(fixture) response = helpers.client.balances.list(*fixture['url_params']) - body = fixture['body']['balances'] + if fixture['body'].get('balances') is not None and isinstance(fixture['body'].get('balances'), (dict, list)): + body = fixture['body']['balances'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Balance) @@ -41,7 +43,6 @@ def test_timeout_balances_list_retries(): response = helpers.client.balances.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['balances'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Balance) @@ -55,7 +56,6 @@ def test_502_balances_list_retries(): response = helpers.client.balances.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['balances'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Balance) @@ -81,5 +81,3 @@ def callback(request): assert len(all_records) == len(fixture['body']['balances']) * 2 for record in all_records: assert isinstance(record, resources.Balance) - - diff --git a/tests/integration/bank_account_details_integration_test.py b/tests/integration/bank_account_details_integration_test.py index 0f0a0d28..cc4c6935 100644 --- a/tests/integration/bank_account_details_integration_test.py +++ b/tests/integration/bank_account_details_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_bank_account_details_get(): fixture = helpers.load_fixture('bank_account_details')['get'] helpers.stub_response(fixture) response = helpers.client.bank_account_details.get(*fixture['url_params']) - body = fixture['body']['bank_account_details'] + if fixture['body'].get('bank_account_details') is not None and isinstance(fixture['body'].get('bank_account_details'), (dict, list)): + body = fixture['body']['bank_account_details'] + else: + body = fixture['body'] assert isinstance(response, resources.BankAccountDetail) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -38,7 +40,6 @@ def test_timeout_bank_account_details_get_retries(): response = helpers.client.bank_account_details.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_account_details'] assert isinstance(response, resources.BankAccountDetail) @@ -48,7 +49,5 @@ def test_502_bank_account_details_get_retries(): response = helpers.client.bank_account_details.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_account_details'] assert isinstance(response, resources.BankAccountDetail) - diff --git a/tests/integration/bank_account_holder_verifications_integration_test.py b/tests/integration/bank_account_holder_verifications_integration_test.py index dddfc748..b1136707 100644 --- a/tests/integration/bank_account_holder_verifications_integration_test.py +++ b/tests/integration/bank_account_holder_verifications_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_bank_account_holder_verifications_create(): fixture = helpers.load_fixture('bank_account_holder_verifications')['create'] helpers.stub_response(fixture) response = helpers.client.bank_account_holder_verifications.create(*fixture['url_params']) - body = fixture['body']['bank_account_holder_verifications'] + if fixture['body'].get('bank_account_holder_verifications') is not None and isinstance(fixture['body'].get('bank_account_holder_verifications'), (dict, list)): + body = fixture['body']['bank_account_holder_verifications'] + else: + body = fixture['body'] assert isinstance(response, resources.BankAccountHolderVerification) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -55,7 +57,6 @@ def test_timeout_bank_account_holder_verifications_create_retries(): response = helpers.client.bank_account_holder_verifications.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_account_holder_verifications'] assert isinstance(response, resources.BankAccountHolderVerification) @@ -65,17 +66,18 @@ def test_502_bank_account_holder_verifications_create_retries(): response = helpers.client.bank_account_holder_verifications.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_account_holder_verifications'] assert isinstance(response, resources.BankAccountHolderVerification) - @responses.activate def test_bank_account_holder_verifications_get(): fixture = helpers.load_fixture('bank_account_holder_verifications')['get'] helpers.stub_response(fixture) response = helpers.client.bank_account_holder_verifications.get(*fixture['url_params']) - body = fixture['body']['bank_account_holder_verifications'] + if fixture['body'].get('bank_account_holder_verifications') is not None and isinstance(fixture['body'].get('bank_account_holder_verifications'), (dict, list)): + body = fixture['body']['bank_account_holder_verifications'] + else: + body = fixture['body'] assert isinstance(response, resources.BankAccountHolderVerification) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -92,7 +94,6 @@ def test_timeout_bank_account_holder_verifications_get_retries(): response = helpers.client.bank_account_holder_verifications.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_account_holder_verifications'] assert isinstance(response, resources.BankAccountHolderVerification) @@ -102,7 +103,5 @@ def test_502_bank_account_holder_verifications_get_retries(): response = helpers.client.bank_account_holder_verifications.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_account_holder_verifications'] assert isinstance(response, resources.BankAccountHolderVerification) - diff --git a/tests/integration/bank_authorisations_integration_test.py b/tests/integration/bank_authorisations_integration_test.py index 3788e442..a473265b 100644 --- a/tests/integration/bank_authorisations_integration_test.py +++ b/tests/integration/bank_authorisations_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_bank_authorisations_create(): fixture = helpers.load_fixture('bank_authorisations')['create'] helpers.stub_response(fixture) response = helpers.client.bank_authorisations.create(*fixture['url_params']) - body = fixture['body']['bank_authorisations'] + if fixture['body'].get('bank_authorisations') is not None and isinstance(fixture['body'].get('bank_authorisations'), (dict, list)): + body = fixture['body']['bank_authorisations'] + else: + body = fixture['body'] assert isinstance(response, resources.BankAuthorisation) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -61,7 +63,6 @@ def test_timeout_bank_authorisations_create_retries(): response = helpers.client.bank_authorisations.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_authorisations'] assert isinstance(response, resources.BankAuthorisation) @@ -71,17 +72,18 @@ def test_502_bank_authorisations_create_retries(): response = helpers.client.bank_authorisations.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_authorisations'] assert isinstance(response, resources.BankAuthorisation) - @responses.activate def test_bank_authorisations_get(): fixture = helpers.load_fixture('bank_authorisations')['get'] helpers.stub_response(fixture) response = helpers.client.bank_authorisations.get(*fixture['url_params']) - body = fixture['body']['bank_authorisations'] + if fixture['body'].get('bank_authorisations') is not None and isinstance(fixture['body'].get('bank_authorisations'), (dict, list)): + body = fixture['body']['bank_authorisations'] + else: + body = fixture['body'] assert isinstance(response, resources.BankAuthorisation) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -104,7 +106,6 @@ def test_timeout_bank_authorisations_get_retries(): response = helpers.client.bank_authorisations.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_authorisations'] assert isinstance(response, resources.BankAuthorisation) @@ -114,7 +115,5 @@ def test_502_bank_authorisations_get_retries(): response = helpers.client.bank_authorisations.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_authorisations'] assert isinstance(response, resources.BankAuthorisation) - diff --git a/tests/integration/bank_details_lookups_integration_test.py b/tests/integration/bank_details_lookups_integration_test.py index 90d9d271..bc75f1e8 100644 --- a/tests/integration/bank_details_lookups_integration_test.py +++ b/tests/integration/bank_details_lookups_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_bank_details_lookups_create(): fixture = helpers.load_fixture('bank_details_lookups')['create'] helpers.stub_response(fixture) response = helpers.client.bank_details_lookups.create(*fixture['url_params']) - body = fixture['body']['bank_details_lookups'] + if fixture['body'].get('bank_details_lookups') is not None and isinstance(fixture['body'].get('bank_details_lookups'), (dict, list)): + body = fixture['body']['bank_details_lookups'] + else: + body = fixture['body'] assert isinstance(response, resources.BankDetailsLookup) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -36,7 +38,6 @@ def test_timeout_bank_details_lookups_create_retries(): response = helpers.client.bank_details_lookups.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_details_lookups'] assert isinstance(response, resources.BankDetailsLookup) @@ -46,7 +47,5 @@ def test_502_bank_details_lookups_create_retries(): response = helpers.client.bank_details_lookups.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['bank_details_lookups'] assert isinstance(response, resources.BankDetailsLookup) - diff --git a/tests/integration/billing_request_flows_integration_test.py b/tests/integration/billing_request_flows_integration_test.py index e984dbb2..9b21503e 100644 --- a/tests/integration/billing_request_flows_integration_test.py +++ b/tests/integration/billing_request_flows_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_billing_request_flows_create(): fixture = helpers.load_fixture('billing_request_flows')['create'] helpers.stub_response(fixture) response = helpers.client.billing_request_flows.create(*fixture['url_params']) - body = fixture['body']['billing_request_flows'] + if fixture['body'].get('billing_request_flows') is not None and isinstance(fixture['body'].get('billing_request_flows'), (dict, list)): + body = fixture['body']['billing_request_flows'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequestFlow) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -64,7 +66,6 @@ def test_timeout_billing_request_flows_create_retries(): response = helpers.client.billing_request_flows.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_flows'] assert isinstance(response, resources.BillingRequestFlow) @@ -74,17 +75,18 @@ def test_502_billing_request_flows_create_retries(): response = helpers.client.billing_request_flows.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_flows'] assert isinstance(response, resources.BillingRequestFlow) - @responses.activate def test_billing_request_flows_initialise(): fixture = helpers.load_fixture('billing_request_flows')['initialise'] helpers.stub_response(fixture) response = helpers.client.billing_request_flows.initialise(*fixture['url_params']) - body = fixture['body']['billing_request_flows'] + if fixture['body'].get('billing_request_flows') is not None and isinstance(fixture['body'].get('billing_request_flows'), (dict, list)): + body = fixture['body']['billing_request_flows'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequestFlow) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -133,4 +135,3 @@ def test_502_billing_request_flows_initialise_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_request_flows.initialise(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/billing_request_templates_integration_test.py b/tests/integration/billing_request_templates_integration_test.py index e2aad811..a11ec0dc 100644 --- a/tests/integration/billing_request_templates_integration_test.py +++ b/tests/integration/billing_request_templates_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_billing_request_templates_list(): fixture = helpers.load_fixture('billing_request_templates')['list'] helpers.stub_response(fixture) response = helpers.client.billing_request_templates.list(*fixture['url_params']) - body = fixture['body']['billing_request_templates'] + if fixture['body'].get('billing_request_templates') is not None and isinstance(fixture['body'].get('billing_request_templates'), (dict, list)): + body = fixture['body']['billing_request_templates'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.BillingRequestTemplate) @@ -54,7 +56,6 @@ def test_timeout_billing_request_templates_list_retries(): response = helpers.client.billing_request_templates.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_templates'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.BillingRequestTemplate) @@ -68,7 +69,6 @@ def test_502_billing_request_templates_list_retries(): response = helpers.client.billing_request_templates.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_templates'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.BillingRequestTemplate) @@ -94,15 +94,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['billing_request_templates']) * 2 for record in all_records: assert isinstance(record, resources.BillingRequestTemplate) - - @responses.activate def test_billing_request_templates_get(): fixture = helpers.load_fixture('billing_request_templates')['get'] helpers.stub_response(fixture) response = helpers.client.billing_request_templates.get(*fixture['url_params']) - body = fixture['body']['billing_request_templates'] + if fixture['body'].get('billing_request_templates') is not None and isinstance(fixture['body'].get('billing_request_templates'), (dict, list)): + body = fixture['body']['billing_request_templates'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequestTemplate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -136,7 +137,6 @@ def test_timeout_billing_request_templates_get_retries(): response = helpers.client.billing_request_templates.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_templates'] assert isinstance(response, resources.BillingRequestTemplate) @@ -146,17 +146,18 @@ def test_502_billing_request_templates_get_retries(): response = helpers.client.billing_request_templates.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_templates'] assert isinstance(response, resources.BillingRequestTemplate) - @responses.activate def test_billing_request_templates_create(): fixture = helpers.load_fixture('billing_request_templates')['create'] helpers.stub_response(fixture) response = helpers.client.billing_request_templates.create(*fixture['url_params']) - body = fixture['body']['billing_request_templates'] + if fixture['body'].get('billing_request_templates') is not None and isinstance(fixture['body'].get('billing_request_templates'), (dict, list)): + body = fixture['body']['billing_request_templates'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequestTemplate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -207,7 +208,6 @@ def test_timeout_billing_request_templates_create_retries(): response = helpers.client.billing_request_templates.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_templates'] assert isinstance(response, resources.BillingRequestTemplate) @@ -217,17 +217,18 @@ def test_502_billing_request_templates_create_retries(): response = helpers.client.billing_request_templates.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_templates'] assert isinstance(response, resources.BillingRequestTemplate) - @responses.activate def test_billing_request_templates_update(): fixture = helpers.load_fixture('billing_request_templates')['update'] helpers.stub_response(fixture) response = helpers.client.billing_request_templates.update(*fixture['url_params']) - body = fixture['body']['billing_request_templates'] + if fixture['body'].get('billing_request_templates') is not None and isinstance(fixture['body'].get('billing_request_templates'), (dict, list)): + body = fixture['body']['billing_request_templates'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequestTemplate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -261,7 +262,6 @@ def test_timeout_billing_request_templates_update_retries(): response = helpers.client.billing_request_templates.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_templates'] assert isinstance(response, resources.BillingRequestTemplate) @@ -271,7 +271,5 @@ def test_502_billing_request_templates_update_retries(): response = helpers.client.billing_request_templates.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_templates'] assert isinstance(response, resources.BillingRequestTemplate) - diff --git a/tests/integration/billing_request_with_actions_integration_test.py b/tests/integration/billing_request_with_actions_integration_test.py index 2ad42481..206cdff5 100644 --- a/tests/integration/billing_request_with_actions_integration_test.py +++ b/tests/integration/billing_request_with_actions_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_billing_request_with_actions_create_with_actions(): fixture = helpers.load_fixture('billing_request_with_actions')['create_with_actions'] helpers.stub_response(fixture) response = helpers.client.billing_request_with_actions.create_with_actions(*fixture['url_params']) - body = fixture['body']['billing_request_with_actions'] + if fixture['body'].get('billing_request_with_actions') is not None and isinstance(fixture['body'].get('billing_request_with_actions'), (dict, list)): + body = fixture['body']['billing_request_with_actions'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequestWithAction) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -44,6 +46,8 @@ def test_billing_request_with_actions_create_with_actions(): assert response.billing_requests.links == body.get('billing_requests')['links'] assert response.billing_requests.mandate_request == body.get('billing_requests')['mandate_request'] assert response.billing_requests.metadata == body.get('billing_requests')['metadata'] + assert response.billing_requests.payment_context_code == body.get('billing_requests')['payment_context_code'] + assert response.billing_requests.payment_purpose_code == body.get('billing_requests')['payment_purpose_code'] assert response.billing_requests.payment_request == body.get('billing_requests')['payment_request'] assert response.billing_requests.purpose_code == body.get('billing_requests')['purpose_code'] assert response.billing_requests.resources == body.get('billing_requests')['resources'] @@ -57,7 +61,6 @@ def test_timeout_billing_request_with_actions_create_with_actions_retries(): response = helpers.client.billing_request_with_actions.create_with_actions(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_with_actions'] assert isinstance(response, resources.BillingRequestWithAction) @@ -67,7 +70,5 @@ def test_502_billing_request_with_actions_create_with_actions_retries(): response = helpers.client.billing_request_with_actions.create_with_actions(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_request_with_actions'] assert isinstance(response, resources.BillingRequestWithAction) - diff --git a/tests/integration/billing_requests_integration_test.py b/tests/integration/billing_requests_integration_test.py index bd6d50ef..45d8b437 100644 --- a/tests/integration/billing_requests_integration_test.py +++ b/tests/integration/billing_requests_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_billing_requests_create(): fixture = helpers.load_fixture('billing_requests')['create'] helpers.stub_response(fixture) response = helpers.client.billing_requests.create(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -31,6 +33,8 @@ def test_billing_requests_create(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -121,7 +125,6 @@ def test_timeout_billing_requests_create_retries(): response = helpers.client.billing_requests.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_requests'] assert isinstance(response, resources.BillingRequest) @@ -131,17 +134,18 @@ def test_502_billing_requests_create_retries(): response = helpers.client.billing_requests.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_requests'] assert isinstance(response, resources.BillingRequest) - @responses.activate def test_billing_requests_collect_customer_details(): fixture = helpers.load_fixture('billing_requests')['collect_customer_details'] helpers.stub_response(fixture) response = helpers.client.billing_requests.collect_customer_details(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -151,6 +155,8 @@ def test_billing_requests_collect_customer_details(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -230,14 +236,16 @@ def test_502_billing_requests_collect_customer_details_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_requests.collect_customer_details(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_billing_requests_collect_bank_account(): fixture = helpers.load_fixture('billing_requests')['collect_bank_account'] helpers.stub_response(fixture) response = helpers.client.billing_requests.collect_bank_account(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -247,6 +255,8 @@ def test_billing_requests_collect_bank_account(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -326,14 +336,16 @@ def test_502_billing_requests_collect_bank_account_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_requests.collect_bank_account(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_billing_requests_confirm_payer_details(): fixture = helpers.load_fixture('billing_requests')['confirm_payer_details'] helpers.stub_response(fixture) response = helpers.client.billing_requests.confirm_payer_details(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -343,6 +355,8 @@ def test_billing_requests_confirm_payer_details(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -422,14 +436,16 @@ def test_502_billing_requests_confirm_payer_details_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_requests.confirm_payer_details(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_billing_requests_fulfil(): fixture = helpers.load_fixture('billing_requests')['fulfil'] helpers.stub_response(fixture) response = helpers.client.billing_requests.fulfil(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -439,6 +455,8 @@ def test_billing_requests_fulfil(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -518,14 +536,16 @@ def test_502_billing_requests_fulfil_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_requests.fulfil(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_billing_requests_cancel(): fixture = helpers.load_fixture('billing_requests')['cancel'] helpers.stub_response(fixture) response = helpers.client.billing_requests.cancel(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -535,6 +555,8 @@ def test_billing_requests_cancel(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -614,14 +636,16 @@ def test_502_billing_requests_cancel_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_requests.cancel(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_billing_requests_list(): fixture = helpers.load_fixture('billing_requests')['list'] helpers.stub_response(fixture) response = helpers.client.billing_requests.list(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.BillingRequest) @@ -635,6 +659,8 @@ def test_billing_requests_list(): assert [r.fallback_occurred for r in response.records] == [b.get('fallback_occurred') 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.payment_context_code for r in response.records] == [b.get('payment_context_code') for b in body] + assert [r.payment_purpose_code for r in response.records] == [b.get('payment_purpose_code') for b in body] assert [r.purpose_code for r in response.records] == [b.get('purpose_code') for b in body] assert [r.status for r in response.records] == [b.get('status') for b in body] @@ -645,7 +671,6 @@ def test_timeout_billing_requests_list_retries(): response = helpers.client.billing_requests.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_requests'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.BillingRequest) @@ -659,7 +684,6 @@ def test_502_billing_requests_list_retries(): response = helpers.client.billing_requests.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_requests'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.BillingRequest) @@ -685,15 +709,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['billing_requests']) * 2 for record in all_records: assert isinstance(record, resources.BillingRequest) - - @responses.activate def test_billing_requests_get(): fixture = helpers.load_fixture('billing_requests')['get'] helpers.stub_response(fixture) response = helpers.client.billing_requests.get(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -703,6 +728,8 @@ def test_billing_requests_get(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -776,7 +803,6 @@ def test_timeout_billing_requests_get_retries(): response = helpers.client.billing_requests.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_requests'] assert isinstance(response, resources.BillingRequest) @@ -786,17 +812,18 @@ def test_502_billing_requests_get_retries(): response = helpers.client.billing_requests.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['billing_requests'] assert isinstance(response, resources.BillingRequest) - @responses.activate def test_billing_requests_notify(): fixture = helpers.load_fixture('billing_requests')['notify'] helpers.stub_response(fixture) response = helpers.client.billing_requests.notify(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -806,6 +833,8 @@ def test_billing_requests_notify(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -885,14 +914,16 @@ def test_502_billing_requests_notify_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_requests.notify(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_billing_requests_fallback(): fixture = helpers.load_fixture('billing_requests')['fallback'] helpers.stub_response(fixture) response = helpers.client.billing_requests.fallback(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -902,6 +933,8 @@ def test_billing_requests_fallback(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -981,14 +1014,16 @@ def test_502_billing_requests_fallback_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_requests.fallback(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_billing_requests_choose_currency(): fixture = helpers.load_fixture('billing_requests')['choose_currency'] helpers.stub_response(fixture) response = helpers.client.billing_requests.choose_currency(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -998,6 +1033,8 @@ def test_billing_requests_choose_currency(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -1077,14 +1114,16 @@ def test_502_billing_requests_choose_currency_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_requests.choose_currency(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_billing_requests_select_institution(): fixture = helpers.load_fixture('billing_requests')['select_institution'] helpers.stub_response(fixture) response = helpers.client.billing_requests.select_institution(*fixture['url_params']) - body = fixture['body']['billing_requests'] + if fixture['body'].get('billing_requests') is not None and isinstance(fixture['body'].get('billing_requests'), (dict, list)): + body = fixture['body']['billing_requests'] + else: + body = fixture['body'] assert isinstance(response, resources.BillingRequest) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -1094,6 +1133,8 @@ def test_billing_requests_select_institution(): assert response.fallback_occurred == body.get('fallback_occurred') assert response.id == body.get('id') assert response.metadata == body.get('metadata') + assert response.payment_context_code == body.get('payment_context_code') + assert response.payment_purpose_code == body.get('payment_purpose_code') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] @@ -1173,4 +1214,3 @@ def test_502_billing_requests_select_institution_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.billing_requests.select_institution(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/blocks_integration_test.py b/tests/integration/blocks_integration_test.py index d062499e..5f421046 100644 --- a/tests/integration/blocks_integration_test.py +++ b/tests/integration/blocks_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_blocks_create(): fixture = helpers.load_fixture('blocks')['create'] helpers.stub_response(fixture) response = helpers.client.blocks.create(*fixture['url_params']) - body = fixture['body']['blocks'] + if fixture['body'].get('blocks') is not None and isinstance(fixture['body'].get('blocks'), (dict, list)): + body = fixture['body']['blocks'] + else: + body = fixture['body'] assert isinstance(response, resources.Block) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -58,7 +60,6 @@ def test_timeout_blocks_create_retries(): response = helpers.client.blocks.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['blocks'] assert isinstance(response, resources.Block) @@ -68,17 +69,18 @@ def test_502_blocks_create_retries(): response = helpers.client.blocks.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['blocks'] assert isinstance(response, resources.Block) - @responses.activate def test_blocks_get(): fixture = helpers.load_fixture('blocks')['get'] helpers.stub_response(fixture) response = helpers.client.blocks.get(*fixture['url_params']) - body = fixture['body']['blocks'] + if fixture['body'].get('blocks') is not None and isinstance(fixture['body'].get('blocks'), (dict, list)): + body = fixture['body']['blocks'] + else: + body = fixture['body'] assert isinstance(response, resources.Block) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -98,7 +100,6 @@ def test_timeout_blocks_get_retries(): response = helpers.client.blocks.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['blocks'] assert isinstance(response, resources.Block) @@ -108,17 +109,18 @@ def test_502_blocks_get_retries(): response = helpers.client.blocks.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['blocks'] assert isinstance(response, resources.Block) - @responses.activate def test_blocks_list(): fixture = helpers.load_fixture('blocks')['list'] helpers.stub_response(fixture) response = helpers.client.blocks.list(*fixture['url_params']) - body = fixture['body']['blocks'] + if fixture['body'].get('blocks') is not None and isinstance(fixture['body'].get('blocks'), (dict, list)): + body = fixture['body']['blocks'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Block) @@ -142,7 +144,6 @@ def test_timeout_blocks_list_retries(): response = helpers.client.blocks.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['blocks'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Block) @@ -156,7 +157,6 @@ def test_502_blocks_list_retries(): response = helpers.client.blocks.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['blocks'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Block) @@ -182,15 +182,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['blocks']) * 2 for record in all_records: assert isinstance(record, resources.Block) - - @responses.activate def test_blocks_disable(): fixture = helpers.load_fixture('blocks')['disable'] helpers.stub_response(fixture) response = helpers.client.blocks.disable(*fixture['url_params']) - body = fixture['body']['blocks'] + if fixture['body'].get('blocks') is not None and isinstance(fixture['body'].get('blocks'), (dict, list)): + body = fixture['body']['blocks'] + else: + body = fixture['body'] assert isinstance(response, resources.Block) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -216,14 +217,16 @@ def test_502_blocks_disable_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.blocks.disable(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_blocks_enable(): fixture = helpers.load_fixture('blocks')['enable'] helpers.stub_response(fixture) response = helpers.client.blocks.enable(*fixture['url_params']) - body = fixture['body']['blocks'] + if fixture['body'].get('blocks') is not None and isinstance(fixture['body'].get('blocks'), (dict, list)): + body = fixture['body']['blocks'] + else: + body = fixture['body'] assert isinstance(response, resources.Block) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -249,14 +252,16 @@ def test_502_blocks_enable_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.blocks.enable(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_blocks_block_by_ref(): fixture = helpers.load_fixture('blocks')['block_by_ref'] helpers.stub_response(fixture) response = helpers.client.blocks.block_by_ref(*fixture['url_params']) - body = fixture['body']['blocks'] + if fixture['body'].get('blocks') is not None and isinstance(fixture['body'].get('blocks'), (dict, list)): + body = fixture['body']['blocks'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Block) @@ -286,4 +291,3 @@ def test_502_blocks_block_by_ref_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.blocks.block_by_ref(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/creditor_bank_accounts_integration_test.py b/tests/integration/creditor_bank_accounts_integration_test.py index dbdc3640..33d94cee 100644 --- a/tests/integration/creditor_bank_accounts_integration_test.py +++ b/tests/integration/creditor_bank_accounts_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_creditor_bank_accounts_create(): fixture = helpers.load_fixture('creditor_bank_accounts')['create'] helpers.stub_response(fixture) response = helpers.client.creditor_bank_accounts.create(*fixture['url_params']) - body = fixture['body']['creditor_bank_accounts'] + if fixture['body'].get('creditor_bank_accounts') is not None and isinstance(fixture['body'].get('creditor_bank_accounts'), (dict, list)): + body = fixture['body']['creditor_bank_accounts'] + else: + body = fixture['body'] assert isinstance(response, resources.CreditorBankAccount) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -62,7 +64,6 @@ def test_timeout_creditor_bank_accounts_create_retries(): response = helpers.client.creditor_bank_accounts.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditor_bank_accounts'] assert isinstance(response, resources.CreditorBankAccount) @@ -72,17 +73,18 @@ def test_502_creditor_bank_accounts_create_retries(): response = helpers.client.creditor_bank_accounts.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditor_bank_accounts'] assert isinstance(response, resources.CreditorBankAccount) - @responses.activate def test_creditor_bank_accounts_list(): fixture = helpers.load_fixture('creditor_bank_accounts')['list'] helpers.stub_response(fixture) response = helpers.client.creditor_bank_accounts.list(*fixture['url_params']) - body = fixture['body']['creditor_bank_accounts'] + if fixture['body'].get('creditor_bank_accounts') is not None and isinstance(fixture['body'].get('creditor_bank_accounts'), (dict, list)): + body = fixture['body']['creditor_bank_accounts'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.CreditorBankAccount) @@ -109,7 +111,6 @@ def test_timeout_creditor_bank_accounts_list_retries(): response = helpers.client.creditor_bank_accounts.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditor_bank_accounts'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.CreditorBankAccount) @@ -123,7 +124,6 @@ def test_502_creditor_bank_accounts_list_retries(): response = helpers.client.creditor_bank_accounts.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditor_bank_accounts'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.CreditorBankAccount) @@ -149,15 +149,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['creditor_bank_accounts']) * 2 for record in all_records: assert isinstance(record, resources.CreditorBankAccount) - - @responses.activate def test_creditor_bank_accounts_get(): fixture = helpers.load_fixture('creditor_bank_accounts')['get'] helpers.stub_response(fixture) response = helpers.client.creditor_bank_accounts.get(*fixture['url_params']) - body = fixture['body']['creditor_bank_accounts'] + if fixture['body'].get('creditor_bank_accounts') is not None and isinstance(fixture['body'].get('creditor_bank_accounts'), (dict, list)): + body = fixture['body']['creditor_bank_accounts'] + else: + body = fixture['body'] assert isinstance(response, resources.CreditorBankAccount) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -181,7 +182,6 @@ def test_timeout_creditor_bank_accounts_get_retries(): response = helpers.client.creditor_bank_accounts.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditor_bank_accounts'] assert isinstance(response, resources.CreditorBankAccount) @@ -191,17 +191,18 @@ def test_502_creditor_bank_accounts_get_retries(): response = helpers.client.creditor_bank_accounts.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditor_bank_accounts'] assert isinstance(response, resources.CreditorBankAccount) - @responses.activate def test_creditor_bank_accounts_disable(): fixture = helpers.load_fixture('creditor_bank_accounts')['disable'] helpers.stub_response(fixture) response = helpers.client.creditor_bank_accounts.disable(*fixture['url_params']) - body = fixture['body']['creditor_bank_accounts'] + if fixture['body'].get('creditor_bank_accounts') is not None and isinstance(fixture['body'].get('creditor_bank_accounts'), (dict, list)): + body = fixture['body']['creditor_bank_accounts'] + else: + body = fixture['body'] assert isinstance(response, resources.CreditorBankAccount) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -231,4 +232,3 @@ def test_502_creditor_bank_accounts_disable_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.creditor_bank_accounts.disable(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/creditors_integration_test.py b/tests/integration/creditors_integration_test.py index 0fd3cf56..9ae8b00d 100644 --- a/tests/integration/creditors_integration_test.py +++ b/tests/integration/creditors_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_creditors_create(): fixture = helpers.load_fixture('creditors')['create'] helpers.stub_response(fixture) response = helpers.client.creditors.create(*fixture['url_params']) - body = fixture['body']['creditors'] + if fixture['body'].get('creditors') is not None and isinstance(fixture['body'].get('creditors'), (dict, list)): + body = fixture['body']['creditors'] + else: + body = fixture['body'] assert isinstance(response, resources.Creditor) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -78,7 +80,6 @@ def test_timeout_creditors_create_retries(): response = helpers.client.creditors.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditors'] assert isinstance(response, resources.Creditor) @@ -88,17 +89,18 @@ def test_502_creditors_create_retries(): response = helpers.client.creditors.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditors'] assert isinstance(response, resources.Creditor) - @responses.activate def test_creditors_list(): fixture = helpers.load_fixture('creditors')['list'] helpers.stub_response(fixture) response = helpers.client.creditors.list(*fixture['url_params']) - body = fixture['body']['creditors'] + if fixture['body'].get('creditors') is not None and isinstance(fixture['body'].get('creditors'), (dict, list)): + body = fixture['body']['creditors'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Creditor) @@ -134,7 +136,6 @@ def test_timeout_creditors_list_retries(): response = helpers.client.creditors.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditors'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Creditor) @@ -148,7 +149,6 @@ def test_502_creditors_list_retries(): response = helpers.client.creditors.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditors'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Creditor) @@ -174,15 +174,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['creditors']) * 2 for record in all_records: assert isinstance(record, resources.Creditor) - - @responses.activate def test_creditors_get(): fixture = helpers.load_fixture('creditors')['get'] helpers.stub_response(fixture) response = helpers.client.creditors.get(*fixture['url_params']) - body = fixture['body']['creditors'] + if fixture['body'].get('creditors') is not None and isinstance(fixture['body'].get('creditors'), (dict, list)): + body = fixture['body']['creditors'] + else: + body = fixture['body'] assert isinstance(response, resources.Creditor) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -222,7 +223,6 @@ def test_timeout_creditors_get_retries(): response = helpers.client.creditors.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditors'] assert isinstance(response, resources.Creditor) @@ -232,17 +232,18 @@ def test_502_creditors_get_retries(): response = helpers.client.creditors.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditors'] assert isinstance(response, resources.Creditor) - @responses.activate def test_creditors_update(): fixture = helpers.load_fixture('creditors')['update'] helpers.stub_response(fixture) response = helpers.client.creditors.update(*fixture['url_params']) - body = fixture['body']['creditors'] + if fixture['body'].get('creditors') is not None and isinstance(fixture['body'].get('creditors'), (dict, list)): + body = fixture['body']['creditors'] + else: + body = fixture['body'] assert isinstance(response, resources.Creditor) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -282,7 +283,6 @@ def test_timeout_creditors_update_retries(): response = helpers.client.creditors.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditors'] assert isinstance(response, resources.Creditor) @@ -292,7 +292,5 @@ def test_502_creditors_update_retries(): response = helpers.client.creditors.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['creditors'] assert isinstance(response, resources.Creditor) - diff --git a/tests/integration/currency_exchange_rates_integration_test.py b/tests/integration/currency_exchange_rates_integration_test.py index 34e7633d..8d62e33d 100644 --- a/tests/integration/currency_exchange_rates_integration_test.py +++ b/tests/integration/currency_exchange_rates_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_currency_exchange_rates_list(): fixture = helpers.load_fixture('currency_exchange_rates')['list'] helpers.stub_response(fixture) response = helpers.client.currency_exchange_rates.list(*fixture['url_params']) - body = fixture['body']['currency_exchange_rates'] + if fixture['body'].get('currency_exchange_rates') is not None and isinstance(fixture['body'].get('currency_exchange_rates'), (dict, list)): + body = fixture['body']['currency_exchange_rates'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.CurrencyExchangeRate) @@ -41,7 +43,6 @@ def test_timeout_currency_exchange_rates_list_retries(): response = helpers.client.currency_exchange_rates.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['currency_exchange_rates'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.CurrencyExchangeRate) @@ -55,7 +56,6 @@ def test_502_currency_exchange_rates_list_retries(): response = helpers.client.currency_exchange_rates.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['currency_exchange_rates'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.CurrencyExchangeRate) @@ -81,5 +81,3 @@ def callback(request): assert len(all_records) == len(fixture['body']['currency_exchange_rates']) * 2 for record in all_records: assert isinstance(record, resources.CurrencyExchangeRate) - - diff --git a/tests/integration/customer_bank_accounts_integration_test.py b/tests/integration/customer_bank_accounts_integration_test.py index 0f3b2b41..254748b5 100644 --- a/tests/integration/customer_bank_accounts_integration_test.py +++ b/tests/integration/customer_bank_accounts_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_customer_bank_accounts_create(): fixture = helpers.load_fixture('customer_bank_accounts')['create'] helpers.stub_response(fixture) response = helpers.client.customer_bank_accounts.create(*fixture['url_params']) - body = fixture['body']['customer_bank_accounts'] + if fixture['body'].get('customer_bank_accounts') is not None and isinstance(fixture['body'].get('customer_bank_accounts'), (dict, list)): + body = fixture['body']['customer_bank_accounts'] + else: + body = fixture['body'] assert isinstance(response, resources.CustomerBankAccount) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -62,7 +64,6 @@ def test_timeout_customer_bank_accounts_create_retries(): response = helpers.client.customer_bank_accounts.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customer_bank_accounts'] assert isinstance(response, resources.CustomerBankAccount) @@ -72,17 +73,18 @@ def test_502_customer_bank_accounts_create_retries(): response = helpers.client.customer_bank_accounts.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customer_bank_accounts'] assert isinstance(response, resources.CustomerBankAccount) - @responses.activate def test_customer_bank_accounts_list(): fixture = helpers.load_fixture('customer_bank_accounts')['list'] helpers.stub_response(fixture) response = helpers.client.customer_bank_accounts.list(*fixture['url_params']) - body = fixture['body']['customer_bank_accounts'] + if fixture['body'].get('customer_bank_accounts') is not None and isinstance(fixture['body'].get('customer_bank_accounts'), (dict, list)): + body = fixture['body']['customer_bank_accounts'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.CustomerBankAccount) @@ -109,7 +111,6 @@ def test_timeout_customer_bank_accounts_list_retries(): response = helpers.client.customer_bank_accounts.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customer_bank_accounts'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.CustomerBankAccount) @@ -123,7 +124,6 @@ def test_502_customer_bank_accounts_list_retries(): response = helpers.client.customer_bank_accounts.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customer_bank_accounts'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.CustomerBankAccount) @@ -149,15 +149,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['customer_bank_accounts']) * 2 for record in all_records: assert isinstance(record, resources.CustomerBankAccount) - - @responses.activate def test_customer_bank_accounts_get(): fixture = helpers.load_fixture('customer_bank_accounts')['get'] helpers.stub_response(fixture) response = helpers.client.customer_bank_accounts.get(*fixture['url_params']) - body = fixture['body']['customer_bank_accounts'] + if fixture['body'].get('customer_bank_accounts') is not None and isinstance(fixture['body'].get('customer_bank_accounts'), (dict, list)): + body = fixture['body']['customer_bank_accounts'] + else: + body = fixture['body'] assert isinstance(response, resources.CustomerBankAccount) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -181,7 +182,6 @@ def test_timeout_customer_bank_accounts_get_retries(): response = helpers.client.customer_bank_accounts.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customer_bank_accounts'] assert isinstance(response, resources.CustomerBankAccount) @@ -191,17 +191,18 @@ def test_502_customer_bank_accounts_get_retries(): response = helpers.client.customer_bank_accounts.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customer_bank_accounts'] assert isinstance(response, resources.CustomerBankAccount) - @responses.activate def test_customer_bank_accounts_update(): fixture = helpers.load_fixture('customer_bank_accounts')['update'] helpers.stub_response(fixture) response = helpers.client.customer_bank_accounts.update(*fixture['url_params']) - body = fixture['body']['customer_bank_accounts'] + if fixture['body'].get('customer_bank_accounts') is not None and isinstance(fixture['body'].get('customer_bank_accounts'), (dict, list)): + body = fixture['body']['customer_bank_accounts'] + else: + body = fixture['body'] assert isinstance(response, resources.CustomerBankAccount) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -225,7 +226,6 @@ def test_timeout_customer_bank_accounts_update_retries(): response = helpers.client.customer_bank_accounts.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customer_bank_accounts'] assert isinstance(response, resources.CustomerBankAccount) @@ -235,17 +235,18 @@ def test_502_customer_bank_accounts_update_retries(): response = helpers.client.customer_bank_accounts.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customer_bank_accounts'] assert isinstance(response, resources.CustomerBankAccount) - @responses.activate def test_customer_bank_accounts_disable(): fixture = helpers.load_fixture('customer_bank_accounts')['disable'] helpers.stub_response(fixture) response = helpers.client.customer_bank_accounts.disable(*fixture['url_params']) - body = fixture['body']['customer_bank_accounts'] + if fixture['body'].get('customer_bank_accounts') is not None and isinstance(fixture['body'].get('customer_bank_accounts'), (dict, list)): + body = fixture['body']['customer_bank_accounts'] + else: + body = fixture['body'] assert isinstance(response, resources.CustomerBankAccount) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -275,4 +276,3 @@ def test_502_customer_bank_accounts_disable_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.customer_bank_accounts.disable(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/customer_notifications_integration_test.py b/tests/integration/customer_notifications_integration_test.py index 66a3b422..ff50f729 100644 --- a/tests/integration/customer_notifications_integration_test.py +++ b/tests/integration/customer_notifications_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_customer_notifications_handle(): fixture = helpers.load_fixture('customer_notifications')['handle'] helpers.stub_response(fixture) response = helpers.client.customer_notifications.handle(*fixture['url_params']) - body = fixture['body']['customer_notifications'] + if fixture['body'].get('customer_notifications') is not None and isinstance(fixture['body'].get('customer_notifications'), (dict, list)): + body = fixture['body']['customer_notifications'] + else: + body = fixture['body'] assert isinstance(response, resources.CustomerNotification) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -50,4 +52,3 @@ def test_502_customer_notifications_handle_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.customer_notifications.handle(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/customers_integration_test.py b/tests/integration/customers_integration_test.py index e200c7c3..03b98bc6 100644 --- a/tests/integration/customers_integration_test.py +++ b/tests/integration/customers_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_customers_create(): fixture = helpers.load_fixture('customers')['create'] helpers.stub_response(fixture) response = helpers.client.customers.create(*fixture['url_params']) - body = fixture['body']['customers'] + if fixture['body'].get('customers') is not None and isinstance(fixture['body'].get('customers'), (dict, list)): + body = fixture['body']['customers'] + else: + body = fixture['body'] assert isinstance(response, resources.Customer) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -68,7 +70,6 @@ def test_timeout_customers_create_retries(): response = helpers.client.customers.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customers'] assert isinstance(response, resources.Customer) @@ -78,17 +79,18 @@ def test_502_customers_create_retries(): response = helpers.client.customers.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customers'] assert isinstance(response, resources.Customer) - @responses.activate def test_customers_list(): fixture = helpers.load_fixture('customers')['list'] helpers.stub_response(fixture) response = helpers.client.customers.list(*fixture['url_params']) - body = fixture['body']['customers'] + if fixture['body'].get('customers') is not None and isinstance(fixture['body'].get('customers'), (dict, list)): + body = fixture['body']['customers'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Customer) @@ -122,7 +124,6 @@ def test_timeout_customers_list_retries(): response = helpers.client.customers.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customers'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Customer) @@ -136,7 +137,6 @@ def test_502_customers_list_retries(): response = helpers.client.customers.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customers'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Customer) @@ -162,15 +162,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['customers']) * 2 for record in all_records: assert isinstance(record, resources.Customer) - - @responses.activate def test_customers_get(): fixture = helpers.load_fixture('customers')['get'] helpers.stub_response(fixture) response = helpers.client.customers.get(*fixture['url_params']) - body = fixture['body']['customers'] + if fixture['body'].get('customers') is not None and isinstance(fixture['body'].get('customers'), (dict, list)): + body = fixture['body']['customers'] + else: + body = fixture['body'] assert isinstance(response, resources.Customer) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -200,7 +201,6 @@ def test_timeout_customers_get_retries(): response = helpers.client.customers.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customers'] assert isinstance(response, resources.Customer) @@ -210,17 +210,18 @@ def test_502_customers_get_retries(): response = helpers.client.customers.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customers'] assert isinstance(response, resources.Customer) - @responses.activate def test_customers_update(): fixture = helpers.load_fixture('customers')['update'] helpers.stub_response(fixture) response = helpers.client.customers.update(*fixture['url_params']) - body = fixture['body']['customers'] + if fixture['body'].get('customers') is not None and isinstance(fixture['body'].get('customers'), (dict, list)): + body = fixture['body']['customers'] + else: + body = fixture['body'] assert isinstance(response, resources.Customer) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -250,7 +251,6 @@ def test_timeout_customers_update_retries(): response = helpers.client.customers.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customers'] assert isinstance(response, resources.Customer) @@ -260,17 +260,18 @@ def test_502_customers_update_retries(): response = helpers.client.customers.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['customers'] assert isinstance(response, resources.Customer) - @responses.activate def test_customers_remove(): fixture = helpers.load_fixture('customers')['remove'] helpers.stub_response(fixture) response = helpers.client.customers.remove(*fixture['url_params']) - body = fixture['body']['customers'] + if fixture['body'].get('customers') is not None and isinstance(fixture['body'].get('customers'), (dict, list)): + body = fixture['body']['customers'] + else: + body = fixture['body'] assert isinstance(response, resources.Customer) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -306,4 +307,3 @@ def test_502_customers_remove_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.customers.remove(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/events_integration_test.py b/tests/integration/events_integration_test.py index 4acd6c35..9a1e4067 100644 --- a/tests/integration/events_integration_test.py +++ b/tests/integration/events_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_events_list(): fixture = helpers.load_fixture('events')['list'] helpers.stub_response(fixture) response = helpers.client.events.list(*fixture['url_params']) - body = fixture['body']['events'] + if fixture['body'].get('events') is not None and isinstance(fixture['body'].get('events'), (dict, list)): + body = fixture['body']['events'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Event) @@ -44,7 +46,6 @@ def test_timeout_events_list_retries(): response = helpers.client.events.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['events'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Event) @@ -58,7 +59,6 @@ def test_502_events_list_retries(): response = helpers.client.events.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['events'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Event) @@ -84,15 +84,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['events']) * 2 for record in all_records: assert isinstance(record, resources.Event) - - @responses.activate def test_events_get(): fixture = helpers.load_fixture('events')['get'] helpers.stub_response(fixture) response = helpers.client.events.get(*fixture['url_params']) - body = fixture['body']['events'] + if fixture['body'].get('events') is not None and isinstance(fixture['body'].get('events'), (dict, list)): + body = fixture['body']['events'] + else: + body = fixture['body'] assert isinstance(response, resources.Event) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -127,6 +128,7 @@ def test_events_get(): assert response.links.new_customer_bank_account == body.get('links')['new_customer_bank_account'] assert response.links.new_mandate == body.get('links')['new_mandate'] assert response.links.organisation == body.get('links')['organisation'] + assert response.links.outbound_payment == body.get('links')['outbound_payment'] assert response.links.parent_event == body.get('links')['parent_event'] assert response.links.payer_authorisation == body.get('links')['payer_authorisation'] assert response.links.payment == body.get('links')['payment'] @@ -146,7 +148,6 @@ def test_timeout_events_get_retries(): response = helpers.client.events.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['events'] assert isinstance(response, resources.Event) @@ -156,7 +157,5 @@ def test_502_events_get_retries(): response = helpers.client.events.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['events'] assert isinstance(response, resources.Event) - diff --git a/tests/integration/exports_integration_test.py b/tests/integration/exports_integration_test.py index 2e6e47cf..f49d3d09 100644 --- a/tests/integration/exports_integration_test.py +++ b/tests/integration/exports_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_exports_get(): fixture = helpers.load_fixture('exports')['get'] helpers.stub_response(fixture) response = helpers.client.exports.get(*fixture['url_params']) - body = fixture['body']['exports'] + if fixture['body'].get('exports') is not None and isinstance(fixture['body'].get('exports'), (dict, list)): + body = fixture['body']['exports'] + else: + body = fixture['body'] assert isinstance(response, resources.Export) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -38,7 +40,6 @@ def test_timeout_exports_get_retries(): response = helpers.client.exports.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['exports'] assert isinstance(response, resources.Export) @@ -48,17 +49,18 @@ def test_502_exports_get_retries(): response = helpers.client.exports.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['exports'] assert isinstance(response, resources.Export) - @responses.activate def test_exports_list(): fixture = helpers.load_fixture('exports')['list'] helpers.stub_response(fixture) response = helpers.client.exports.list(*fixture['url_params']) - body = fixture['body']['exports'] + if fixture['body'].get('exports') is not None and isinstance(fixture['body'].get('exports'), (dict, list)): + body = fixture['body']['exports'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Export) @@ -79,7 +81,6 @@ def test_timeout_exports_list_retries(): response = helpers.client.exports.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['exports'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Export) @@ -93,7 +94,6 @@ def test_502_exports_list_retries(): response = helpers.client.exports.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['exports'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Export) @@ -119,5 +119,3 @@ def callback(request): assert len(all_records) == len(fixture['body']['exports']) * 2 for record in all_records: assert isinstance(record, resources.Export) - - diff --git a/tests/integration/funds_availabilities_integration_test.py b/tests/integration/funds_availabilities_integration_test.py new file mode 100644 index 00000000..4cd09782 --- /dev/null +++ b/tests/integration/funds_availabilities_integration_test.py @@ -0,0 +1,44 @@ +# WARNING: Do not edit by hand, this file was generated by Crank: +# +# https://github.com/gocardless/crank +# + +import json + +import pytest +import requests +import responses + +from gocardless_pro.errors import MalformedResponseError +from gocardless_pro import resources +from gocardless_pro import list_response + +from .. import helpers + +@responses.activate +def test_funds_availabilities_check(): + fixture = helpers.load_fixture('funds_availabilities')['check'] + helpers.stub_response(fixture) + response = helpers.client.funds_availabilities.check(*fixture['url_params']) + if fixture['body'].get('available') is not None and isinstance(fixture['body'].get('available'), (dict, list)): + body = fixture['body']['available'] + else: + body = fixture['body'] + + assert isinstance(response, resources.FundsAvailability) + assert responses.calls[-1].request.headers.get('Idempotency-Key') is None + assert response.available == body.get('available') + +def test_timeout_funds_availabilities_check_doesnt_retry(): + fixture = helpers.load_fixture('funds_availabilities')['check'] + with helpers.stub_timeout(fixture) as rsps: + with pytest.raises(requests.ConnectTimeout): + response = helpers.client.funds_availabilities.check(*fixture['url_params']) + assert len(rsps.calls) == 1 + +def test_502_funds_availabilities_check_doesnt_retry(): + fixture = helpers.load_fixture('funds_availabilities')['check'] + with helpers.stub_502(fixture) as rsps: + with pytest.raises(MalformedResponseError): + response = helpers.client.funds_availabilities.check(*fixture['url_params']) + assert len(rsps.calls) == 1 diff --git a/tests/integration/instalment_schedules_integration_test.py b/tests/integration/instalment_schedules_integration_test.py index 6bdd1a09..d512f3e6 100644 --- a/tests/integration/instalment_schedules_integration_test.py +++ b/tests/integration/instalment_schedules_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_instalment_schedules_create_with_dates(): fixture = helpers.load_fixture('instalment_schedules')['create_with_dates'] helpers.stub_response(fixture) response = helpers.client.instalment_schedules.create_with_dates(*fixture['url_params']) - body = fixture['body']['instalment_schedules'] + if fixture['body'].get('instalment_schedules') is not None and isinstance(fixture['body'].get('instalment_schedules'), (dict, list)): + body = fixture['body']['instalment_schedules'] + else: + body = fixture['body'] assert isinstance(response, resources.InstalmentSchedule) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -61,7 +63,6 @@ def test_timeout_instalment_schedules_create_with_dates_retries(): response = helpers.client.instalment_schedules.create_with_dates(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, resources.InstalmentSchedule) @@ -71,17 +72,18 @@ def test_502_instalment_schedules_create_with_dates_retries(): response = helpers.client.instalment_schedules.create_with_dates(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, resources.InstalmentSchedule) - @responses.activate def test_instalment_schedules_create_with_schedule(): fixture = helpers.load_fixture('instalment_schedules')['create_with_schedule'] helpers.stub_response(fixture) response = helpers.client.instalment_schedules.create_with_schedule(*fixture['url_params']) - body = fixture['body']['instalment_schedules'] + if fixture['body'].get('instalment_schedules') is not None and isinstance(fixture['body'].get('instalment_schedules'), (dict, list)): + body = fixture['body']['instalment_schedules'] + else: + body = fixture['body'] assert isinstance(response, resources.InstalmentSchedule) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -121,7 +123,6 @@ def test_timeout_instalment_schedules_create_with_schedule_retries(): response = helpers.client.instalment_schedules.create_with_schedule(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, resources.InstalmentSchedule) @@ -131,17 +132,18 @@ def test_502_instalment_schedules_create_with_schedule_retries(): response = helpers.client.instalment_schedules.create_with_schedule(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, resources.InstalmentSchedule) - @responses.activate def test_instalment_schedules_list(): fixture = helpers.load_fixture('instalment_schedules')['list'] helpers.stub_response(fixture) response = helpers.client.instalment_schedules.list(*fixture['url_params']) - body = fixture['body']['instalment_schedules'] + if fixture['body'].get('instalment_schedules') is not None and isinstance(fixture['body'].get('instalment_schedules'), (dict, list)): + body = fixture['body']['instalment_schedules'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.InstalmentSchedule) @@ -165,7 +167,6 @@ def test_timeout_instalment_schedules_list_retries(): response = helpers.client.instalment_schedules.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.InstalmentSchedule) @@ -179,7 +180,6 @@ def test_502_instalment_schedules_list_retries(): response = helpers.client.instalment_schedules.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.InstalmentSchedule) @@ -205,15 +205,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['instalment_schedules']) * 2 for record in all_records: assert isinstance(record, resources.InstalmentSchedule) - - @responses.activate def test_instalment_schedules_get(): fixture = helpers.load_fixture('instalment_schedules')['get'] helpers.stub_response(fixture) response = helpers.client.instalment_schedules.get(*fixture['url_params']) - body = fixture['body']['instalment_schedules'] + if fixture['body'].get('instalment_schedules') is not None and isinstance(fixture['body'].get('instalment_schedules'), (dict, list)): + body = fixture['body']['instalment_schedules'] + else: + body = fixture['body'] assert isinstance(response, resources.InstalmentSchedule) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -236,7 +237,6 @@ def test_timeout_instalment_schedules_get_retries(): response = helpers.client.instalment_schedules.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, resources.InstalmentSchedule) @@ -246,17 +246,18 @@ def test_502_instalment_schedules_get_retries(): response = helpers.client.instalment_schedules.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, resources.InstalmentSchedule) - @responses.activate def test_instalment_schedules_update(): fixture = helpers.load_fixture('instalment_schedules')['update'] helpers.stub_response(fixture) response = helpers.client.instalment_schedules.update(*fixture['url_params']) - body = fixture['body']['instalment_schedules'] + if fixture['body'].get('instalment_schedules') is not None and isinstance(fixture['body'].get('instalment_schedules'), (dict, list)): + body = fixture['body']['instalment_schedules'] + else: + body = fixture['body'] assert isinstance(response, resources.InstalmentSchedule) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -279,7 +280,6 @@ def test_timeout_instalment_schedules_update_retries(): response = helpers.client.instalment_schedules.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, resources.InstalmentSchedule) @@ -289,17 +289,18 @@ def test_502_instalment_schedules_update_retries(): response = helpers.client.instalment_schedules.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['instalment_schedules'] assert isinstance(response, resources.InstalmentSchedule) - @responses.activate def test_instalment_schedules_cancel(): fixture = helpers.load_fixture('instalment_schedules')['cancel'] helpers.stub_response(fixture) response = helpers.client.instalment_schedules.cancel(*fixture['url_params']) - body = fixture['body']['instalment_schedules'] + if fixture['body'].get('instalment_schedules') is not None and isinstance(fixture['body'].get('instalment_schedules'), (dict, list)): + body = fixture['body']['instalment_schedules'] + else: + body = fixture['body'] assert isinstance(response, resources.InstalmentSchedule) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -328,4 +329,3 @@ def test_502_instalment_schedules_cancel_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.instalment_schedules.cancel(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/institutions_integration_test.py b/tests/integration/institutions_integration_test.py index 83ea46cc..51f1722d 100644 --- a/tests/integration/institutions_integration_test.py +++ b/tests/integration/institutions_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_institutions_list(): fixture = helpers.load_fixture('institutions')['list'] helpers.stub_response(fixture) response = helpers.client.institutions.list(*fixture['url_params']) - body = fixture['body']['institutions'] + if fixture['body'].get('institutions') is not None and isinstance(fixture['body'].get('institutions'), (dict, list)): + body = fixture['body']['institutions'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Institution) @@ -44,7 +46,6 @@ def test_timeout_institutions_list_retries(): response = helpers.client.institutions.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['institutions'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Institution) @@ -58,7 +59,6 @@ def test_502_institutions_list_retries(): response = helpers.client.institutions.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['institutions'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Institution) @@ -84,15 +84,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['institutions']) * 2 for record in all_records: assert isinstance(record, resources.Institution) - - @responses.activate def test_institutions_list_for_billing_request(): fixture = helpers.load_fixture('institutions')['list_for_billing_request'] helpers.stub_response(fixture) response = helpers.client.institutions.list_for_billing_request(*fixture['url_params']) - body = fixture['body']['institutions'] + if fixture['body'].get('institutions') is not None and isinstance(fixture['body'].get('institutions'), (dict, list)): + body = fixture['body']['institutions'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Institution) @@ -121,4 +122,3 @@ def test_502_institutions_list_for_billing_request_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.institutions.list_for_billing_request(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/logos_integration_test.py b/tests/integration/logos_integration_test.py index 3c58d022..21ec3ce9 100644 --- a/tests/integration/logos_integration_test.py +++ b/tests/integration/logos_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_logos_create_for_creditor(): fixture = helpers.load_fixture('logos')['create_for_creditor'] helpers.stub_response(fixture) response = helpers.client.logos.create_for_creditor(*fixture['url_params']) - body = fixture['body']['logos'] + if fixture['body'].get('logos') is not None and isinstance(fixture['body'].get('logos'), (dict, list)): + body = fixture['body']['logos'] + else: + body = fixture['body'] assert isinstance(response, resources.Logo) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -34,7 +36,6 @@ def test_timeout_logos_create_for_creditor_retries(): response = helpers.client.logos.create_for_creditor(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['logos'] assert isinstance(response, resources.Logo) @@ -44,7 +45,5 @@ def test_502_logos_create_for_creditor_retries(): response = helpers.client.logos.create_for_creditor(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['logos'] assert isinstance(response, resources.Logo) - diff --git a/tests/integration/mandate_import_entries_integration_test.py b/tests/integration/mandate_import_entries_integration_test.py index 391bc28b..da19bd06 100644 --- a/tests/integration/mandate_import_entries_integration_test.py +++ b/tests/integration/mandate_import_entries_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_mandate_import_entries_create(): fixture = helpers.load_fixture('mandate_import_entries')['create'] helpers.stub_response(fixture) response = helpers.client.mandate_import_entries.create(*fixture['url_params']) - body = fixture['body']['mandate_import_entries'] + if fixture['body'].get('mandate_import_entries') is not None and isinstance(fixture['body'].get('mandate_import_entries'), (dict, list)): + body = fixture['body']['mandate_import_entries'] + else: + body = fixture['body'] assert isinstance(response, resources.MandateImportEntry) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -40,7 +42,6 @@ def test_timeout_mandate_import_entries_create_retries(): response = helpers.client.mandate_import_entries.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_import_entries'] assert isinstance(response, resources.MandateImportEntry) @@ -50,17 +51,18 @@ def test_502_mandate_import_entries_create_retries(): response = helpers.client.mandate_import_entries.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_import_entries'] assert isinstance(response, resources.MandateImportEntry) - @responses.activate def test_mandate_import_entries_list(): fixture = helpers.load_fixture('mandate_import_entries')['list'] helpers.stub_response(fixture) response = helpers.client.mandate_import_entries.list(*fixture['url_params']) - body = fixture['body']['mandate_import_entries'] + if fixture['body'].get('mandate_import_entries') is not None and isinstance(fixture['body'].get('mandate_import_entries'), (dict, list)): + body = fixture['body']['mandate_import_entries'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.MandateImportEntry) @@ -79,7 +81,6 @@ def test_timeout_mandate_import_entries_list_retries(): response = helpers.client.mandate_import_entries.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_import_entries'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.MandateImportEntry) @@ -93,7 +94,6 @@ def test_502_mandate_import_entries_list_retries(): response = helpers.client.mandate_import_entries.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_import_entries'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.MandateImportEntry) @@ -119,5 +119,3 @@ def callback(request): assert len(all_records) == len(fixture['body']['mandate_import_entries']) * 2 for record in all_records: assert isinstance(record, resources.MandateImportEntry) - - diff --git a/tests/integration/mandate_imports_integration_test.py b/tests/integration/mandate_imports_integration_test.py index d88608cb..91067e61 100644 --- a/tests/integration/mandate_imports_integration_test.py +++ b/tests/integration/mandate_imports_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_mandate_imports_create(): fixture = helpers.load_fixture('mandate_imports')['create'] helpers.stub_response(fixture) response = helpers.client.mandate_imports.create(*fixture['url_params']) - body = fixture['body']['mandate_imports'] + if fixture['body'].get('mandate_imports') is not None and isinstance(fixture['body'].get('mandate_imports'), (dict, list)): + body = fixture['body']['mandate_imports'] + else: + body = fixture['body'] assert isinstance(response, resources.MandateImport) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -55,7 +57,6 @@ def test_timeout_mandate_imports_create_retries(): response = helpers.client.mandate_imports.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_imports'] assert isinstance(response, resources.MandateImport) @@ -65,17 +66,18 @@ def test_502_mandate_imports_create_retries(): response = helpers.client.mandate_imports.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_imports'] assert isinstance(response, resources.MandateImport) - @responses.activate def test_mandate_imports_get(): fixture = helpers.load_fixture('mandate_imports')['get'] helpers.stub_response(fixture) response = helpers.client.mandate_imports.get(*fixture['url_params']) - body = fixture['body']['mandate_imports'] + if fixture['body'].get('mandate_imports') is not None and isinstance(fixture['body'].get('mandate_imports'), (dict, list)): + body = fixture['body']['mandate_imports'] + else: + body = fixture['body'] assert isinstance(response, resources.MandateImport) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -92,7 +94,6 @@ def test_timeout_mandate_imports_get_retries(): response = helpers.client.mandate_imports.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_imports'] assert isinstance(response, resources.MandateImport) @@ -102,17 +103,18 @@ def test_502_mandate_imports_get_retries(): response = helpers.client.mandate_imports.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_imports'] assert isinstance(response, resources.MandateImport) - @responses.activate def test_mandate_imports_submit(): fixture = helpers.load_fixture('mandate_imports')['submit'] helpers.stub_response(fixture) response = helpers.client.mandate_imports.submit(*fixture['url_params']) - body = fixture['body']['mandate_imports'] + if fixture['body'].get('mandate_imports') is not None and isinstance(fixture['body'].get('mandate_imports'), (dict, list)): + body = fixture['body']['mandate_imports'] + else: + body = fixture['body'] assert isinstance(response, resources.MandateImport) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -135,14 +137,16 @@ def test_502_mandate_imports_submit_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.mandate_imports.submit(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_mandate_imports_cancel(): fixture = helpers.load_fixture('mandate_imports')['cancel'] helpers.stub_response(fixture) response = helpers.client.mandate_imports.cancel(*fixture['url_params']) - body = fixture['body']['mandate_imports'] + if fixture['body'].get('mandate_imports') is not None and isinstance(fixture['body'].get('mandate_imports'), (dict, list)): + body = fixture['body']['mandate_imports'] + else: + body = fixture['body'] assert isinstance(response, resources.MandateImport) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -165,4 +169,3 @@ def test_502_mandate_imports_cancel_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.mandate_imports.cancel(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/mandate_pdfs_integration_test.py b/tests/integration/mandate_pdfs_integration_test.py index 978e6b94..68347faa 100644 --- a/tests/integration/mandate_pdfs_integration_test.py +++ b/tests/integration/mandate_pdfs_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_mandate_pdfs_create(): fixture = helpers.load_fixture('mandate_pdfs')['create'] helpers.stub_response(fixture) response = helpers.client.mandate_pdfs.create(*fixture['url_params']) - body = fixture['body']['mandate_pdfs'] + if fixture['body'].get('mandate_pdfs') is not None and isinstance(fixture['body'].get('mandate_pdfs'), (dict, list)): + body = fixture['body']['mandate_pdfs'] + else: + body = fixture['body'] assert isinstance(response, resources.MandatePdf) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -35,7 +37,6 @@ def test_timeout_mandate_pdfs_create_retries(): response = helpers.client.mandate_pdfs.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_pdfs'] assert isinstance(response, resources.MandatePdf) @@ -45,7 +46,5 @@ def test_502_mandate_pdfs_create_retries(): response = helpers.client.mandate_pdfs.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandate_pdfs'] assert isinstance(response, resources.MandatePdf) - diff --git a/tests/integration/mandates_integration_test.py b/tests/integration/mandates_integration_test.py index 5f02bdb6..f881fe93 100644 --- a/tests/integration/mandates_integration_test.py +++ b/tests/integration/mandates_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_mandates_create(): fixture = helpers.load_fixture('mandates')['create'] helpers.stub_response(fixture) response = helpers.client.mandates.create(*fixture['url_params']) - body = fixture['body']['mandates'] + if fixture['body'].get('mandates') is not None and isinstance(fixture['body'].get('mandates'), (dict, list)): + body = fixture['body']['mandates'] + else: + body = fixture['body'] assert isinstance(response, resources.Mandate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -73,7 +75,6 @@ def test_timeout_mandates_create_retries(): response = helpers.client.mandates.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandates'] assert isinstance(response, resources.Mandate) @@ -83,17 +84,18 @@ def test_502_mandates_create_retries(): response = helpers.client.mandates.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandates'] assert isinstance(response, resources.Mandate) - @responses.activate def test_mandates_list(): fixture = helpers.load_fixture('mandates')['list'] helpers.stub_response(fixture) response = helpers.client.mandates.list(*fixture['url_params']) - body = fixture['body']['mandates'] + if fixture['body'].get('mandates') is not None and isinstance(fixture['body'].get('mandates'), (dict, list)): + body = fixture['body']['mandates'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Mandate) @@ -122,7 +124,6 @@ def test_timeout_mandates_list_retries(): response = helpers.client.mandates.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandates'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Mandate) @@ -136,7 +137,6 @@ def test_502_mandates_list_retries(): response = helpers.client.mandates.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandates'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Mandate) @@ -162,15 +162,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['mandates']) * 2 for record in all_records: assert isinstance(record, resources.Mandate) - - @responses.activate def test_mandates_get(): fixture = helpers.load_fixture('mandates')['get'] helpers.stub_response(fixture) response = helpers.client.mandates.get(*fixture['url_params']) - body = fixture['body']['mandates'] + if fixture['body'].get('mandates') is not None and isinstance(fixture['body'].get('mandates'), (dict, list)): + body = fixture['body']['mandates'] + else: + body = fixture['body'] assert isinstance(response, resources.Mandate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -205,7 +206,6 @@ def test_timeout_mandates_get_retries(): response = helpers.client.mandates.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandates'] assert isinstance(response, resources.Mandate) @@ -215,17 +215,18 @@ def test_502_mandates_get_retries(): response = helpers.client.mandates.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandates'] assert isinstance(response, resources.Mandate) - @responses.activate def test_mandates_update(): fixture = helpers.load_fixture('mandates')['update'] helpers.stub_response(fixture) response = helpers.client.mandates.update(*fixture['url_params']) - body = fixture['body']['mandates'] + if fixture['body'].get('mandates') is not None and isinstance(fixture['body'].get('mandates'), (dict, list)): + body = fixture['body']['mandates'] + else: + body = fixture['body'] assert isinstance(response, resources.Mandate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -260,7 +261,6 @@ def test_timeout_mandates_update_retries(): response = helpers.client.mandates.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandates'] assert isinstance(response, resources.Mandate) @@ -270,17 +270,18 @@ def test_502_mandates_update_retries(): response = helpers.client.mandates.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['mandates'] assert isinstance(response, resources.Mandate) - @responses.activate def test_mandates_cancel(): fixture = helpers.load_fixture('mandates')['cancel'] helpers.stub_response(fixture) response = helpers.client.mandates.cancel(*fixture['url_params']) - body = fixture['body']['mandates'] + if fixture['body'].get('mandates') is not None and isinstance(fixture['body'].get('mandates'), (dict, list)): + body = fixture['body']['mandates'] + else: + body = fixture['body'] assert isinstance(response, resources.Mandate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -321,14 +322,16 @@ def test_502_mandates_cancel_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.mandates.cancel(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_mandates_reinstate(): fixture = helpers.load_fixture('mandates')['reinstate'] helpers.stub_response(fixture) response = helpers.client.mandates.reinstate(*fixture['url_params']) - body = fixture['body']['mandates'] + if fixture['body'].get('mandates') is not None and isinstance(fixture['body'].get('mandates'), (dict, list)): + body = fixture['body']['mandates'] + else: + body = fixture['body'] assert isinstance(response, resources.Mandate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -369,4 +372,3 @@ def test_502_mandates_reinstate_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.mandates.reinstate(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/negative_balance_limits_integration_test.py b/tests/integration/negative_balance_limits_integration_test.py index 88eb61eb..0463a932 100644 --- a/tests/integration/negative_balance_limits_integration_test.py +++ b/tests/integration/negative_balance_limits_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_negative_balance_limits_list(): fixture = helpers.load_fixture('negative_balance_limits')['list'] helpers.stub_response(fixture) response = helpers.client.negative_balance_limits.list(*fixture['url_params']) - body = fixture['body']['negative_balance_limits'] + if fixture['body'].get('negative_balance_limits') is not None and isinstance(fixture['body'].get('negative_balance_limits'), (dict, list)): + body = fixture['body']['negative_balance_limits'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.NegativeBalanceLimit) @@ -41,7 +43,6 @@ def test_timeout_negative_balance_limits_list_retries(): response = helpers.client.negative_balance_limits.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['negative_balance_limits'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.NegativeBalanceLimit) @@ -55,7 +56,6 @@ def test_502_negative_balance_limits_list_retries(): response = helpers.client.negative_balance_limits.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['negative_balance_limits'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.NegativeBalanceLimit) @@ -81,5 +81,3 @@ def callback(request): assert len(all_records) == len(fixture['body']['negative_balance_limits']) * 2 for record in all_records: assert isinstance(record, resources.NegativeBalanceLimit) - - diff --git a/tests/integration/outbound_payments_integration_test.py b/tests/integration/outbound_payments_integration_test.py index 637086f0..174db76a 100644 --- a/tests/integration/outbound_payments_integration_test.py +++ b/tests/integration/outbound_payments_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_outbound_payments_create(): fixture = helpers.load_fixture('outbound_payments')['create'] helpers.stub_response(fixture) response = helpers.client.outbound_payments.create(*fixture['url_params']) - body = fixture['body']['outbound_payments'] + if fixture['body'].get('outbound_payments') is not None and isinstance(fixture['body'].get('outbound_payments'), (dict, list)): + body = fixture['body']['outbound_payments'] + else: + body = fixture['body'] assert isinstance(response, resources.OutboundPayment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -65,7 +67,6 @@ def test_timeout_outbound_payments_create_retries(): response = helpers.client.outbound_payments.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['outbound_payments'] assert isinstance(response, resources.OutboundPayment) @@ -75,17 +76,18 @@ def test_502_outbound_payments_create_retries(): response = helpers.client.outbound_payments.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['outbound_payments'] assert isinstance(response, resources.OutboundPayment) - @responses.activate def test_outbound_payments_withdraw(): fixture = helpers.load_fixture('outbound_payments')['withdraw'] helpers.stub_response(fixture) response = helpers.client.outbound_payments.withdraw(*fixture['url_params']) - body = fixture['body']['outbound_payments'] + if fixture['body'].get('outbound_payments') is not None and isinstance(fixture['body'].get('outbound_payments'), (dict, list)): + body = fixture['body']['outbound_payments'] + else: + body = fixture['body'] assert isinstance(response, resources.OutboundPayment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -118,14 +120,16 @@ def test_502_outbound_payments_withdraw_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.outbound_payments.withdraw(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_outbound_payments_cancel(): fixture = helpers.load_fixture('outbound_payments')['cancel'] helpers.stub_response(fixture) response = helpers.client.outbound_payments.cancel(*fixture['url_params']) - body = fixture['body']['outbound_payments'] + if fixture['body'].get('outbound_payments') is not None and isinstance(fixture['body'].get('outbound_payments'), (dict, list)): + body = fixture['body']['outbound_payments'] + else: + body = fixture['body'] assert isinstance(response, resources.OutboundPayment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -158,14 +162,16 @@ def test_502_outbound_payments_cancel_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.outbound_payments.cancel(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_outbound_payments_approve(): fixture = helpers.load_fixture('outbound_payments')['approve'] helpers.stub_response(fixture) response = helpers.client.outbound_payments.approve(*fixture['url_params']) - body = fixture['body']['outbound_payments'] + if fixture['body'].get('outbound_payments') is not None and isinstance(fixture['body'].get('outbound_payments'), (dict, list)): + body = fixture['body']['outbound_payments'] + else: + body = fixture['body'] assert isinstance(response, resources.OutboundPayment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -198,14 +204,16 @@ def test_502_outbound_payments_approve_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.outbound_payments.approve(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_outbound_payments_get(): fixture = helpers.load_fixture('outbound_payments')['get'] helpers.stub_response(fixture) response = helpers.client.outbound_payments.get(*fixture['url_params']) - body = fixture['body']['outbound_payments'] + if fixture['body'].get('outbound_payments') is not None and isinstance(fixture['body'].get('outbound_payments'), (dict, list)): + body = fixture['body']['outbound_payments'] + else: + body = fixture['body'] assert isinstance(response, resources.OutboundPayment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -232,7 +240,6 @@ def test_timeout_outbound_payments_get_retries(): response = helpers.client.outbound_payments.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['outbound_payments'] assert isinstance(response, resources.OutboundPayment) @@ -242,17 +249,18 @@ def test_502_outbound_payments_get_retries(): response = helpers.client.outbound_payments.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['outbound_payments'] assert isinstance(response, resources.OutboundPayment) - @responses.activate def test_outbound_payments_list(): fixture = helpers.load_fixture('outbound_payments')['list'] helpers.stub_response(fixture) response = helpers.client.outbound_payments.list(*fixture['url_params']) - body = fixture['body']['outbound_payments'] + if fixture['body'].get('outbound_payments') is not None and isinstance(fixture['body'].get('outbound_payments'), (dict, list)): + body = fixture['body']['outbound_payments'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.OutboundPayment) @@ -279,7 +287,6 @@ def test_timeout_outbound_payments_list_retries(): response = helpers.client.outbound_payments.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['outbound_payments'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.OutboundPayment) @@ -293,7 +300,6 @@ def test_502_outbound_payments_list_retries(): response = helpers.client.outbound_payments.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['outbound_payments'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.OutboundPayment) @@ -319,15 +325,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['outbound_payments']) * 2 for record in all_records: assert isinstance(record, resources.OutboundPayment) - - @responses.activate def test_outbound_payments_update(): fixture = helpers.load_fixture('outbound_payments')['update'] helpers.stub_response(fixture) response = helpers.client.outbound_payments.update(*fixture['url_params']) - body = fixture['body']['outbound_payments'] + if fixture['body'].get('outbound_payments') is not None and isinstance(fixture['body'].get('outbound_payments'), (dict, list)): + body = fixture['body']['outbound_payments'] + else: + body = fixture['body'] assert isinstance(response, resources.OutboundPayment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -354,7 +361,6 @@ def test_timeout_outbound_payments_update_retries(): response = helpers.client.outbound_payments.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['outbound_payments'] assert isinstance(response, resources.OutboundPayment) @@ -364,7 +370,32 @@ def test_502_outbound_payments_update_retries(): response = helpers.client.outbound_payments.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['outbound_payments'] assert isinstance(response, resources.OutboundPayment) - + +@responses.activate +def test_outbound_payments_stats(): + fixture = helpers.load_fixture('outbound_payments')['stats'] + helpers.stub_response(fixture) + response = helpers.client.outbound_payments.stats(*fixture['url_params']) + if fixture['body'].get('outbound_payments') is not None and isinstance(fixture['body'].get('outbound_payments'), (dict, list)): + body = fixture['body']['outbound_payments'] + else: + body = fixture['body'] + + assert isinstance(response, resources.OutboundPayment) + assert responses.calls[-1].request.headers.get('Idempotency-Key') is None + +def test_timeout_outbound_payments_stats_doesnt_retry(): + fixture = helpers.load_fixture('outbound_payments')['stats'] + with helpers.stub_timeout(fixture) as rsps: + with pytest.raises(requests.ConnectTimeout): + response = helpers.client.outbound_payments.stats(*fixture['url_params']) + assert len(rsps.calls) == 1 + +def test_502_outbound_payments_stats_doesnt_retry(): + fixture = helpers.load_fixture('outbound_payments')['stats'] + with helpers.stub_502(fixture) as rsps: + with pytest.raises(MalformedResponseError): + response = helpers.client.outbound_payments.stats(*fixture['url_params']) + assert len(rsps.calls) == 1 diff --git a/tests/integration/payer_authorisations_integration_test.py b/tests/integration/payer_authorisations_integration_test.py index faa8abce..49296517 100644 --- a/tests/integration/payer_authorisations_integration_test.py +++ b/tests/integration/payer_authorisations_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_payer_authorisations_get(): fixture = helpers.load_fixture('payer_authorisations')['get'] helpers.stub_response(fixture) response = helpers.client.payer_authorisations.get(*fixture['url_params']) - body = fixture['body']['payer_authorisations'] + if fixture['body'].get('payer_authorisations') is not None and isinstance(fixture['body'].get('payer_authorisations'), (dict, list)): + body = fixture['body']['payer_authorisations'] + else: + body = fixture['body'] assert isinstance(response, resources.PayerAuthorisation) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -70,7 +72,6 @@ def test_timeout_payer_authorisations_get_retries(): response = helpers.client.payer_authorisations.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payer_authorisations'] assert isinstance(response, resources.PayerAuthorisation) @@ -80,17 +81,18 @@ def test_502_payer_authorisations_get_retries(): response = helpers.client.payer_authorisations.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payer_authorisations'] assert isinstance(response, resources.PayerAuthorisation) - @responses.activate def test_payer_authorisations_create(): fixture = helpers.load_fixture('payer_authorisations')['create'] helpers.stub_response(fixture) response = helpers.client.payer_authorisations.create(*fixture['url_params']) - body = fixture['body']['payer_authorisations'] + if fixture['body'].get('payer_authorisations') is not None and isinstance(fixture['body'].get('payer_authorisations'), (dict, list)): + body = fixture['body']['payer_authorisations'] + else: + body = fixture['body'] assert isinstance(response, resources.PayerAuthorisation) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -156,7 +158,6 @@ def test_timeout_payer_authorisations_create_retries(): response = helpers.client.payer_authorisations.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payer_authorisations'] assert isinstance(response, resources.PayerAuthorisation) @@ -166,17 +167,18 @@ def test_502_payer_authorisations_create_retries(): response = helpers.client.payer_authorisations.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payer_authorisations'] assert isinstance(response, resources.PayerAuthorisation) - @responses.activate def test_payer_authorisations_update(): fixture = helpers.load_fixture('payer_authorisations')['update'] helpers.stub_response(fixture) response = helpers.client.payer_authorisations.update(*fixture['url_params']) - body = fixture['body']['payer_authorisations'] + if fixture['body'].get('payer_authorisations') is not None and isinstance(fixture['body'].get('payer_authorisations'), (dict, list)): + body = fixture['body']['payer_authorisations'] + else: + body = fixture['body'] assert isinstance(response, resources.PayerAuthorisation) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -225,7 +227,6 @@ def test_timeout_payer_authorisations_update_retries(): response = helpers.client.payer_authorisations.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payer_authorisations'] assert isinstance(response, resources.PayerAuthorisation) @@ -235,17 +236,18 @@ def test_502_payer_authorisations_update_retries(): response = helpers.client.payer_authorisations.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payer_authorisations'] assert isinstance(response, resources.PayerAuthorisation) - @responses.activate def test_payer_authorisations_submit(): fixture = helpers.load_fixture('payer_authorisations')['submit'] helpers.stub_response(fixture) response = helpers.client.payer_authorisations.submit(*fixture['url_params']) - body = fixture['body']['payer_authorisations'] + if fixture['body'].get('payer_authorisations') is not None and isinstance(fixture['body'].get('payer_authorisations'), (dict, list)): + body = fixture['body']['payer_authorisations'] + else: + body = fixture['body'] assert isinstance(response, resources.PayerAuthorisation) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -300,14 +302,16 @@ def test_502_payer_authorisations_submit_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.payer_authorisations.submit(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_payer_authorisations_confirm(): fixture = helpers.load_fixture('payer_authorisations')['confirm'] helpers.stub_response(fixture) response = helpers.client.payer_authorisations.confirm(*fixture['url_params']) - body = fixture['body']['payer_authorisations'] + if fixture['body'].get('payer_authorisations') is not None and isinstance(fixture['body'].get('payer_authorisations'), (dict, list)): + body = fixture['body']['payer_authorisations'] + else: + body = fixture['body'] assert isinstance(response, resources.PayerAuthorisation) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -362,4 +366,3 @@ def test_502_payer_authorisations_confirm_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.payer_authorisations.confirm(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/payer_themes_integration_test.py b/tests/integration/payer_themes_integration_test.py index 1a82522e..e9e1af95 100644 --- a/tests/integration/payer_themes_integration_test.py +++ b/tests/integration/payer_themes_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_payer_themes_create_for_creditor(): fixture = helpers.load_fixture('payer_themes')['create_for_creditor'] helpers.stub_response(fixture) response = helpers.client.payer_themes.create_for_creditor(*fixture['url_params']) - body = fixture['body']['payer_themes'] + if fixture['body'].get('payer_themes') is not None and isinstance(fixture['body'].get('payer_themes'), (dict, list)): + body = fixture['body']['payer_themes'] + else: + body = fixture['body'] assert isinstance(response, resources.PayerTheme) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -34,7 +36,6 @@ def test_timeout_payer_themes_create_for_creditor_retries(): response = helpers.client.payer_themes.create_for_creditor(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payer_themes'] assert isinstance(response, resources.PayerTheme) @@ -44,7 +45,5 @@ def test_502_payer_themes_create_for_creditor_retries(): response = helpers.client.payer_themes.create_for_creditor(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payer_themes'] assert isinstance(response, resources.PayerTheme) - diff --git a/tests/integration/payment_account_transactions_integration_test.py b/tests/integration/payment_account_transactions_integration_test.py index 6b2a1597..1f0f44ca 100644 --- a/tests/integration/payment_account_transactions_integration_test.py +++ b/tests/integration/payment_account_transactions_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_payment_account_transactions_list(): fixture = helpers.load_fixture('payment_account_transactions')['list'] helpers.stub_response(fixture) response = helpers.client.payment_account_transactions.list(*fixture['url_params']) - body = fixture['body']['payment_account_transactions'] + if fixture['body'].get('payment_account_transactions') is not None and isinstance(fixture['body'].get('payment_account_transactions'), (dict, list)): + body = fixture['body']['payment_account_transactions'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.PaymentAccountTransaction) @@ -46,7 +48,6 @@ def test_timeout_payment_account_transactions_list_retries(): response = helpers.client.payment_account_transactions.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payment_account_transactions'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.PaymentAccountTransaction) @@ -60,7 +61,6 @@ def test_502_payment_account_transactions_list_retries(): response = helpers.client.payment_account_transactions.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payment_account_transactions'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.PaymentAccountTransaction) @@ -86,5 +86,3 @@ def callback(request): assert len(all_records) == len(fixture['body']['payment_account_transactions']) * 2 for record in all_records: assert isinstance(record, resources.PaymentAccountTransaction) - - diff --git a/tests/integration/payment_accounts_integration_test.py b/tests/integration/payment_accounts_integration_test.py index d3e91cea..f1ffdc6d 100644 --- a/tests/integration/payment_accounts_integration_test.py +++ b/tests/integration/payment_accounts_integration_test.py @@ -14,14 +14,55 @@ from gocardless_pro import list_response from .. import helpers - + +@responses.activate +def test_payment_accounts_get(): + fixture = helpers.load_fixture('payment_accounts')['get'] + helpers.stub_response(fixture) + response = helpers.client.payment_accounts.get(*fixture['url_params']) + if fixture['body'].get('payment_accounts') is not None and isinstance(fixture['body'].get('payment_accounts'), (dict, list)): + body = fixture['body']['payment_accounts'] + else: + body = fixture['body'] + + assert isinstance(response, resources.PaymentAccount) + assert responses.calls[-1].request.headers.get('Idempotency-Key') is None + assert response.account_balance == body.get('account_balance') + assert response.account_holder_name == body.get('account_holder_name') + assert response.account_number_ending == body.get('account_number_ending') + assert response.bank_name == body.get('bank_name') + assert response.currency == body.get('currency') + assert response.id == body.get('id') + assert response.links.creditor == body.get('links')['creditor'] + +@responses.activate +def test_timeout_payment_accounts_get_retries(): + fixture = helpers.load_fixture('payment_accounts')['get'] + with helpers.stub_timeout_then_response(fixture) as rsps: + response = helpers.client.payment_accounts.get(*fixture['url_params']) + assert len(rsps.calls) == 2 + assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') + + assert isinstance(response, resources.PaymentAccount) + +def test_502_payment_accounts_get_retries(): + fixture = helpers.load_fixture('payment_accounts')['get'] + with helpers.stub_502_then_response(fixture) as rsps: + response = helpers.client.payment_accounts.get(*fixture['url_params']) + assert len(rsps.calls) == 2 + assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') + + assert isinstance(response, resources.PaymentAccount) @responses.activate def test_payment_accounts_list(): fixture = helpers.load_fixture('payment_accounts')['list'] helpers.stub_response(fixture) response = helpers.client.payment_accounts.list(*fixture['url_params']) - body = fixture['body']['payment_accounts'] + if fixture['body'].get('payment_accounts') is not None and isinstance(fixture['body'].get('payment_accounts'), (dict, list)): + body = fixture['body']['payment_accounts'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.PaymentAccount) @@ -43,7 +84,6 @@ def test_timeout_payment_accounts_list_retries(): response = helpers.client.payment_accounts.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payment_accounts'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.PaymentAccount) @@ -57,7 +97,6 @@ def test_502_payment_accounts_list_retries(): response = helpers.client.payment_accounts.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payment_accounts'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.PaymentAccount) @@ -83,5 +122,3 @@ def callback(request): assert len(all_records) == len(fixture['body']['payment_accounts']) * 2 for record in all_records: assert isinstance(record, resources.PaymentAccount) - - diff --git a/tests/integration/payments_integration_test.py b/tests/integration/payments_integration_test.py index 7c586f46..5dd9e013 100644 --- a/tests/integration/payments_integration_test.py +++ b/tests/integration/payments_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_payments_create(): fixture = helpers.load_fixture('payments')['create'] helpers.stub_response(fixture) response = helpers.client.payments.create(*fixture['url_params']) - body = fixture['body']['payments'] + if fixture['body'].get('payments') is not None and isinstance(fixture['body'].get('payments'), (dict, list)): + body = fixture['body']['payments'] + else: + body = fixture['body'] assert isinstance(response, resources.Payment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -72,7 +74,6 @@ def test_timeout_payments_create_retries(): response = helpers.client.payments.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payments'] assert isinstance(response, resources.Payment) @@ -82,17 +83,18 @@ def test_502_payments_create_retries(): response = helpers.client.payments.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payments'] assert isinstance(response, resources.Payment) - @responses.activate def test_payments_list(): fixture = helpers.load_fixture('payments')['list'] helpers.stub_response(fixture) response = helpers.client.payments.list(*fixture['url_params']) - body = fixture['body']['payments'] + if fixture['body'].get('payments') is not None and isinstance(fixture['body'].get('payments'), (dict, list)): + body = fixture['body']['payments'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Payment) @@ -121,7 +123,6 @@ def test_timeout_payments_list_retries(): response = helpers.client.payments.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payments'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Payment) @@ -135,7 +136,6 @@ def test_502_payments_list_retries(): response = helpers.client.payments.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payments'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Payment) @@ -161,15 +161,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['payments']) * 2 for record in all_records: assert isinstance(record, resources.Payment) - - @responses.activate def test_payments_get(): fixture = helpers.load_fixture('payments')['get'] helpers.stub_response(fixture) response = helpers.client.payments.get(*fixture['url_params']) - body = fixture['body']['payments'] + if fixture['body'].get('payments') is not None and isinstance(fixture['body'].get('payments'), (dict, list)): + body = fixture['body']['payments'] + else: + body = fixture['body'] assert isinstance(response, resources.Payment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -203,7 +204,6 @@ def test_timeout_payments_get_retries(): response = helpers.client.payments.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payments'] assert isinstance(response, resources.Payment) @@ -213,17 +213,18 @@ def test_502_payments_get_retries(): response = helpers.client.payments.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payments'] assert isinstance(response, resources.Payment) - @responses.activate def test_payments_update(): fixture = helpers.load_fixture('payments')['update'] helpers.stub_response(fixture) response = helpers.client.payments.update(*fixture['url_params']) - body = fixture['body']['payments'] + if fixture['body'].get('payments') is not None and isinstance(fixture['body'].get('payments'), (dict, list)): + body = fixture['body']['payments'] + else: + body = fixture['body'] assert isinstance(response, resources.Payment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -257,7 +258,6 @@ def test_timeout_payments_update_retries(): response = helpers.client.payments.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payments'] assert isinstance(response, resources.Payment) @@ -267,17 +267,18 @@ def test_502_payments_update_retries(): response = helpers.client.payments.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payments'] assert isinstance(response, resources.Payment) - @responses.activate def test_payments_cancel(): fixture = helpers.load_fixture('payments')['cancel'] helpers.stub_response(fixture) response = helpers.client.payments.cancel(*fixture['url_params']) - body = fixture['body']['payments'] + if fixture['body'].get('payments') is not None and isinstance(fixture['body'].get('payments'), (dict, list)): + body = fixture['body']['payments'] + else: + body = fixture['body'] assert isinstance(response, resources.Payment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -317,14 +318,16 @@ def test_502_payments_cancel_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.payments.cancel(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_payments_retry(): fixture = helpers.load_fixture('payments')['retry'] helpers.stub_response(fixture) response = helpers.client.payments.retry(*fixture['url_params']) - body = fixture['body']['payments'] + if fixture['body'].get('payments') is not None and isinstance(fixture['body'].get('payments'), (dict, list)): + body = fixture['body']['payments'] + else: + body = fixture['body'] assert isinstance(response, resources.Payment) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -364,4 +367,3 @@ def test_502_payments_retry_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.payments.retry(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/payout_items_integration_test.py b/tests/integration/payout_items_integration_test.py index e64c8565..da186b01 100644 --- a/tests/integration/payout_items_integration_test.py +++ b/tests/integration/payout_items_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_payout_items_list(): fixture = helpers.load_fixture('payout_items')['list'] helpers.stub_response(fixture) response = helpers.client.payout_items.list(*fixture['url_params']) - body = fixture['body']['payout_items'] + if fixture['body'].get('payout_items') is not None and isinstance(fixture['body'].get('payout_items'), (dict, list)): + body = fixture['body']['payout_items'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.PayoutItem) @@ -40,7 +42,6 @@ def test_timeout_payout_items_list_retries(): response = helpers.client.payout_items.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payout_items'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.PayoutItem) @@ -54,7 +55,6 @@ def test_502_payout_items_list_retries(): response = helpers.client.payout_items.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payout_items'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.PayoutItem) @@ -80,5 +80,3 @@ def callback(request): assert len(all_records) == len(fixture['body']['payout_items']) * 2 for record in all_records: assert isinstance(record, resources.PayoutItem) - - diff --git a/tests/integration/payouts_integration_test.py b/tests/integration/payouts_integration_test.py index 082e3ae9..9434ba6c 100644 --- a/tests/integration/payouts_integration_test.py +++ b/tests/integration/payouts_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_payouts_list(): fixture = helpers.load_fixture('payouts')['list'] helpers.stub_response(fixture) response = helpers.client.payouts.list(*fixture['url_params']) - body = fixture['body']['payouts'] + if fixture['body'].get('payouts') is not None and isinstance(fixture['body'].get('payouts'), (dict, list)): + body = fixture['body']['payouts'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Payout) @@ -48,7 +50,6 @@ def test_timeout_payouts_list_retries(): response = helpers.client.payouts.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payouts'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Payout) @@ -62,7 +63,6 @@ def test_502_payouts_list_retries(): response = helpers.client.payouts.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payouts'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Payout) @@ -88,15 +88,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['payouts']) * 2 for record in all_records: assert isinstance(record, resources.Payout) - - @responses.activate def test_payouts_get(): fixture = helpers.load_fixture('payouts')['get'] helpers.stub_response(fixture) response = helpers.client.payouts.get(*fixture['url_params']) - body = fixture['body']['payouts'] + if fixture['body'].get('payouts') is not None and isinstance(fixture['body'].get('payouts'), (dict, list)): + body = fixture['body']['payouts'] + else: + body = fixture['body'] assert isinstance(response, resources.Payout) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -125,7 +126,6 @@ def test_timeout_payouts_get_retries(): response = helpers.client.payouts.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payouts'] assert isinstance(response, resources.Payout) @@ -135,17 +135,18 @@ def test_502_payouts_get_retries(): response = helpers.client.payouts.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payouts'] assert isinstance(response, resources.Payout) - @responses.activate def test_payouts_update(): fixture = helpers.load_fixture('payouts')['update'] helpers.stub_response(fixture) response = helpers.client.payouts.update(*fixture['url_params']) - body = fixture['body']['payouts'] + if fixture['body'].get('payouts') is not None and isinstance(fixture['body'].get('payouts'), (dict, list)): + body = fixture['body']['payouts'] + else: + body = fixture['body'] assert isinstance(response, resources.Payout) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -174,7 +175,6 @@ def test_timeout_payouts_update_retries(): response = helpers.client.payouts.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payouts'] assert isinstance(response, resources.Payout) @@ -184,7 +184,5 @@ def test_502_payouts_update_retries(): response = helpers.client.payouts.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['payouts'] assert isinstance(response, resources.Payout) - diff --git a/tests/integration/redirect_flows_integration_test.py b/tests/integration/redirect_flows_integration_test.py index 56854243..6d190865 100644 --- a/tests/integration/redirect_flows_integration_test.py +++ b/tests/integration/redirect_flows_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_redirect_flows_create(): fixture = helpers.load_fixture('redirect_flows')['create'] helpers.stub_response(fixture) response = helpers.client.redirect_flows.create(*fixture['url_params']) - body = fixture['body']['redirect_flows'] + if fixture['body'].get('redirect_flows') is not None and isinstance(fixture['body'].get('redirect_flows'), (dict, list)): + body = fixture['body']['redirect_flows'] + else: + body = fixture['body'] assert isinstance(response, resources.RedirectFlow) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -65,7 +67,6 @@ def test_timeout_redirect_flows_create_retries(): response = helpers.client.redirect_flows.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['redirect_flows'] assert isinstance(response, resources.RedirectFlow) @@ -75,17 +76,18 @@ def test_502_redirect_flows_create_retries(): response = helpers.client.redirect_flows.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['redirect_flows'] assert isinstance(response, resources.RedirectFlow) - @responses.activate def test_redirect_flows_get(): fixture = helpers.load_fixture('redirect_flows')['get'] helpers.stub_response(fixture) response = helpers.client.redirect_flows.get(*fixture['url_params']) - body = fixture['body']['redirect_flows'] + if fixture['body'].get('redirect_flows') is not None and isinstance(fixture['body'].get('redirect_flows'), (dict, list)): + body = fixture['body']['redirect_flows'] + else: + body = fixture['body'] assert isinstance(response, resources.RedirectFlow) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -112,7 +114,6 @@ def test_timeout_redirect_flows_get_retries(): response = helpers.client.redirect_flows.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['redirect_flows'] assert isinstance(response, resources.RedirectFlow) @@ -122,17 +123,18 @@ def test_502_redirect_flows_get_retries(): response = helpers.client.redirect_flows.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['redirect_flows'] assert isinstance(response, resources.RedirectFlow) - @responses.activate def test_redirect_flows_complete(): fixture = helpers.load_fixture('redirect_flows')['complete'] helpers.stub_response(fixture) response = helpers.client.redirect_flows.complete(*fixture['url_params']) - body = fixture['body']['redirect_flows'] + if fixture['body'].get('redirect_flows') is not None and isinstance(fixture['body'].get('redirect_flows'), (dict, list)): + body = fixture['body']['redirect_flows'] + else: + body = fixture['body'] assert isinstance(response, resources.RedirectFlow) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -165,4 +167,3 @@ def test_502_redirect_flows_complete_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.redirect_flows.complete(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/refunds_integration_test.py b/tests/integration/refunds_integration_test.py index ec939a17..69be506f 100644 --- a/tests/integration/refunds_integration_test.py +++ b/tests/integration/refunds_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_refunds_create(): fixture = helpers.load_fixture('refunds')['create'] helpers.stub_response(fixture) response = helpers.client.refunds.create(*fixture['url_params']) - body = fixture['body']['refunds'] + if fixture['body'].get('refunds') is not None and isinstance(fixture['body'].get('refunds'), (dict, list)): + body = fixture['body']['refunds'] + else: + body = fixture['body'] assert isinstance(response, resources.Refund) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -63,7 +65,6 @@ def test_timeout_refunds_create_retries(): response = helpers.client.refunds.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['refunds'] assert isinstance(response, resources.Refund) @@ -73,17 +74,18 @@ def test_502_refunds_create_retries(): response = helpers.client.refunds.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['refunds'] assert isinstance(response, resources.Refund) - @responses.activate def test_refunds_list(): fixture = helpers.load_fixture('refunds')['list'] helpers.stub_response(fixture) response = helpers.client.refunds.list(*fixture['url_params']) - body = fixture['body']['refunds'] + if fixture['body'].get('refunds') is not None and isinstance(fixture['body'].get('refunds'), (dict, list)): + body = fixture['body']['refunds'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Refund) @@ -106,7 +108,6 @@ def test_timeout_refunds_list_retries(): response = helpers.client.refunds.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['refunds'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Refund) @@ -120,7 +121,6 @@ def test_502_refunds_list_retries(): response = helpers.client.refunds.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['refunds'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Refund) @@ -146,15 +146,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['refunds']) * 2 for record in all_records: assert isinstance(record, resources.Refund) - - @responses.activate def test_refunds_get(): fixture = helpers.load_fixture('refunds')['get'] helpers.stub_response(fixture) response = helpers.client.refunds.get(*fixture['url_params']) - body = fixture['body']['refunds'] + if fixture['body'].get('refunds') is not None and isinstance(fixture['body'].get('refunds'), (dict, list)): + body = fixture['body']['refunds'] + else: + body = fixture['body'] assert isinstance(response, resources.Refund) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -179,7 +180,6 @@ def test_timeout_refunds_get_retries(): response = helpers.client.refunds.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['refunds'] assert isinstance(response, resources.Refund) @@ -189,17 +189,18 @@ def test_502_refunds_get_retries(): response = helpers.client.refunds.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['refunds'] assert isinstance(response, resources.Refund) - @responses.activate def test_refunds_update(): fixture = helpers.load_fixture('refunds')['update'] helpers.stub_response(fixture) response = helpers.client.refunds.update(*fixture['url_params']) - body = fixture['body']['refunds'] + if fixture['body'].get('refunds') is not None and isinstance(fixture['body'].get('refunds'), (dict, list)): + body = fixture['body']['refunds'] + else: + body = fixture['body'] assert isinstance(response, resources.Refund) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -224,7 +225,6 @@ def test_timeout_refunds_update_retries(): response = helpers.client.refunds.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['refunds'] assert isinstance(response, resources.Refund) @@ -234,7 +234,5 @@ def test_502_refunds_update_retries(): response = helpers.client.refunds.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['refunds'] assert isinstance(response, resources.Refund) - diff --git a/tests/integration/scenario_simulators_integration_test.py b/tests/integration/scenario_simulators_integration_test.py index 1062e0f2..e19d0fe6 100644 --- a/tests/integration/scenario_simulators_integration_test.py +++ b/tests/integration/scenario_simulators_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_scenario_simulators_run(): fixture = helpers.load_fixture('scenario_simulators')['run'] helpers.stub_response(fixture) response = helpers.client.scenario_simulators.run(*fixture['url_params']) - body = fixture['body']['scenario_simulators'] + if fixture['body'].get('scenario_simulators') is not None and isinstance(fixture['body'].get('scenario_simulators'), (dict, list)): + body = fixture['body']['scenario_simulators'] + else: + body = fixture['body'] assert isinstance(response, resources.ScenarioSimulator) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -40,4 +42,3 @@ def test_502_scenario_simulators_run_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.scenario_simulators.run(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/scheme_identifiers_integration_test.py b/tests/integration/scheme_identifiers_integration_test.py index 8bfb356c..8aef278e 100644 --- a/tests/integration/scheme_identifiers_integration_test.py +++ b/tests/integration/scheme_identifiers_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_scheme_identifiers_create(): fixture = helpers.load_fixture('scheme_identifiers')['create'] helpers.stub_response(fixture) response = helpers.client.scheme_identifiers.create(*fixture['url_params']) - body = fixture['body']['scheme_identifiers'] + if fixture['body'].get('scheme_identifiers') is not None and isinstance(fixture['body'].get('scheme_identifiers'), (dict, list)): + body = fixture['body']['scheme_identifiers'] + else: + body = fixture['body'] assert isinstance(response, resources.SchemeIdentifier) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -68,7 +70,6 @@ def test_timeout_scheme_identifiers_create_retries(): response = helpers.client.scheme_identifiers.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['scheme_identifiers'] assert isinstance(response, resources.SchemeIdentifier) @@ -78,17 +79,18 @@ def test_502_scheme_identifiers_create_retries(): response = helpers.client.scheme_identifiers.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['scheme_identifiers'] assert isinstance(response, resources.SchemeIdentifier) - @responses.activate def test_scheme_identifiers_list(): fixture = helpers.load_fixture('scheme_identifiers')['list'] helpers.stub_response(fixture) response = helpers.client.scheme_identifiers.list(*fixture['url_params']) - body = fixture['body']['scheme_identifiers'] + if fixture['body'].get('scheme_identifiers') is not None and isinstance(fixture['body'].get('scheme_identifiers'), (dict, list)): + body = fixture['body']['scheme_identifiers'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.SchemeIdentifier) @@ -122,7 +124,6 @@ def test_timeout_scheme_identifiers_list_retries(): response = helpers.client.scheme_identifiers.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['scheme_identifiers'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.SchemeIdentifier) @@ -136,7 +137,6 @@ def test_502_scheme_identifiers_list_retries(): response = helpers.client.scheme_identifiers.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['scheme_identifiers'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.SchemeIdentifier) @@ -162,15 +162,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['scheme_identifiers']) * 2 for record in all_records: assert isinstance(record, resources.SchemeIdentifier) - - @responses.activate def test_scheme_identifiers_get(): fixture = helpers.load_fixture('scheme_identifiers')['get'] helpers.stub_response(fixture) response = helpers.client.scheme_identifiers.get(*fixture['url_params']) - body = fixture['body']['scheme_identifiers'] + if fixture['body'].get('scheme_identifiers') is not None and isinstance(fixture['body'].get('scheme_identifiers'), (dict, list)): + body = fixture['body']['scheme_identifiers'] + else: + body = fixture['body'] assert isinstance(response, resources.SchemeIdentifier) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -200,7 +201,6 @@ def test_timeout_scheme_identifiers_get_retries(): response = helpers.client.scheme_identifiers.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['scheme_identifiers'] assert isinstance(response, resources.SchemeIdentifier) @@ -210,7 +210,5 @@ def test_502_scheme_identifiers_get_retries(): response = helpers.client.scheme_identifiers.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['scheme_identifiers'] assert isinstance(response, resources.SchemeIdentifier) - diff --git a/tests/integration/subscriptions_integration_test.py b/tests/integration/subscriptions_integration_test.py index 7327a4f2..25d7a364 100644 --- a/tests/integration/subscriptions_integration_test.py +++ b/tests/integration/subscriptions_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_subscriptions_create(): fixture = helpers.load_fixture('subscriptions')['create'] helpers.stub_response(fixture) response = helpers.client.subscriptions.create(*fixture['url_params']) - body = fixture['body']['subscriptions'] + if fixture['body'].get('subscriptions') is not None and isinstance(fixture['body'].get('subscriptions'), (dict, list)): + body = fixture['body']['subscriptions'] + else: + body = fixture['body'] assert isinstance(response, resources.Subscription) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -71,7 +73,6 @@ def test_timeout_subscriptions_create_retries(): response = helpers.client.subscriptions.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['subscriptions'] assert isinstance(response, resources.Subscription) @@ -81,17 +82,18 @@ def test_502_subscriptions_create_retries(): response = helpers.client.subscriptions.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['subscriptions'] assert isinstance(response, resources.Subscription) - @responses.activate def test_subscriptions_list(): fixture = helpers.load_fixture('subscriptions')['list'] helpers.stub_response(fixture) response = helpers.client.subscriptions.list(*fixture['url_params']) - body = fixture['body']['subscriptions'] + if fixture['body'].get('subscriptions') is not None and isinstance(fixture['body'].get('subscriptions'), (dict, list)): + body = fixture['body']['subscriptions'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Subscription) @@ -127,7 +129,6 @@ def test_timeout_subscriptions_list_retries(): response = helpers.client.subscriptions.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['subscriptions'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Subscription) @@ -141,7 +142,6 @@ def test_502_subscriptions_list_retries(): response = helpers.client.subscriptions.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['subscriptions'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Subscription) @@ -167,15 +167,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['subscriptions']) * 2 for record in all_records: assert isinstance(record, resources.Subscription) - - @responses.activate def test_subscriptions_get(): fixture = helpers.load_fixture('subscriptions')['get'] helpers.stub_response(fixture) response = helpers.client.subscriptions.get(*fixture['url_params']) - body = fixture['body']['subscriptions'] + if fixture['body'].get('subscriptions') is not None and isinstance(fixture['body'].get('subscriptions'), (dict, list)): + body = fixture['body']['subscriptions'] + else: + body = fixture['body'] assert isinstance(response, resources.Subscription) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -208,7 +209,6 @@ def test_timeout_subscriptions_get_retries(): response = helpers.client.subscriptions.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['subscriptions'] assert isinstance(response, resources.Subscription) @@ -218,17 +218,18 @@ def test_502_subscriptions_get_retries(): response = helpers.client.subscriptions.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['subscriptions'] assert isinstance(response, resources.Subscription) - @responses.activate def test_subscriptions_update(): fixture = helpers.load_fixture('subscriptions')['update'] helpers.stub_response(fixture) response = helpers.client.subscriptions.update(*fixture['url_params']) - body = fixture['body']['subscriptions'] + if fixture['body'].get('subscriptions') is not None and isinstance(fixture['body'].get('subscriptions'), (dict, list)): + body = fixture['body']['subscriptions'] + else: + body = fixture['body'] assert isinstance(response, resources.Subscription) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -261,7 +262,6 @@ def test_timeout_subscriptions_update_retries(): response = helpers.client.subscriptions.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['subscriptions'] assert isinstance(response, resources.Subscription) @@ -271,17 +271,18 @@ def test_502_subscriptions_update_retries(): response = helpers.client.subscriptions.update(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['subscriptions'] assert isinstance(response, resources.Subscription) - @responses.activate def test_subscriptions_pause(): fixture = helpers.load_fixture('subscriptions')['pause'] helpers.stub_response(fixture) response = helpers.client.subscriptions.pause(*fixture['url_params']) - body = fixture['body']['subscriptions'] + if fixture['body'].get('subscriptions') is not None and isinstance(fixture['body'].get('subscriptions'), (dict, list)): + body = fixture['body']['subscriptions'] + else: + body = fixture['body'] assert isinstance(response, resources.Subscription) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -320,14 +321,16 @@ def test_502_subscriptions_pause_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.subscriptions.pause(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_subscriptions_resume(): fixture = helpers.load_fixture('subscriptions')['resume'] helpers.stub_response(fixture) response = helpers.client.subscriptions.resume(*fixture['url_params']) - body = fixture['body']['subscriptions'] + if fixture['body'].get('subscriptions') is not None and isinstance(fixture['body'].get('subscriptions'), (dict, list)): + body = fixture['body']['subscriptions'] + else: + body = fixture['body'] assert isinstance(response, resources.Subscription) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -366,14 +369,16 @@ def test_502_subscriptions_resume_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.subscriptions.resume(*fixture['url_params']) assert len(rsps.calls) == 1 - @responses.activate def test_subscriptions_cancel(): fixture = helpers.load_fixture('subscriptions')['cancel'] helpers.stub_response(fixture) response = helpers.client.subscriptions.cancel(*fixture['url_params']) - body = fixture['body']['subscriptions'] + if fixture['body'].get('subscriptions') is not None and isinstance(fixture['body'].get('subscriptions'), (dict, list)): + body = fixture['body']['subscriptions'] + else: + body = fixture['body'] assert isinstance(response, resources.Subscription) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -412,4 +417,3 @@ def test_502_subscriptions_cancel_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.subscriptions.cancel(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/tax_rates_integration_test.py b/tests/integration/tax_rates_integration_test.py index 6fb5102e..a5801b98 100644 --- a/tests/integration/tax_rates_integration_test.py +++ b/tests/integration/tax_rates_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_tax_rates_list(): fixture = helpers.load_fixture('tax_rates')['list'] helpers.stub_response(fixture) response = helpers.client.tax_rates.list(*fixture['url_params']) - body = fixture['body']['tax_rates'] + if fixture['body'].get('tax_rates') is not None and isinstance(fixture['body'].get('tax_rates'), (dict, list)): + body = fixture['body']['tax_rates'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.TaxRate) @@ -43,7 +45,6 @@ def test_timeout_tax_rates_list_retries(): response = helpers.client.tax_rates.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['tax_rates'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.TaxRate) @@ -57,7 +58,6 @@ def test_502_tax_rates_list_retries(): response = helpers.client.tax_rates.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['tax_rates'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.TaxRate) @@ -83,15 +83,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['tax_rates']) * 2 for record in all_records: assert isinstance(record, resources.TaxRate) - - @responses.activate def test_tax_rates_get(): fixture = helpers.load_fixture('tax_rates')['get'] helpers.stub_response(fixture) response = helpers.client.tax_rates.get(*fixture['url_params']) - body = fixture['body']['tax_rates'] + if fixture['body'].get('tax_rates') is not None and isinstance(fixture['body'].get('tax_rates'), (dict, list)): + body = fixture['body']['tax_rates'] + else: + body = fixture['body'] assert isinstance(response, resources.TaxRate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -109,7 +110,6 @@ def test_timeout_tax_rates_get_retries(): response = helpers.client.tax_rates.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['tax_rates'] assert isinstance(response, resources.TaxRate) @@ -119,7 +119,5 @@ def test_502_tax_rates_get_retries(): response = helpers.client.tax_rates.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['tax_rates'] assert isinstance(response, resources.TaxRate) - diff --git a/tests/integration/transferred_mandates_integration_test.py b/tests/integration/transferred_mandates_integration_test.py index 56facbb7..572af845 100644 --- a/tests/integration/transferred_mandates_integration_test.py +++ b/tests/integration/transferred_mandates_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_transferred_mandates_transferred_mandates(): fixture = helpers.load_fixture('transferred_mandates')['transferred_mandates'] helpers.stub_response(fixture) response = helpers.client.transferred_mandates.transferred_mandates(*fixture['url_params']) - body = fixture['body']['transferred_mandates'] + if fixture['body'].get('transferred_mandates') is not None and isinstance(fixture['body'].get('transferred_mandates'), (dict, list)): + body = fixture['body']['transferred_mandates'] + else: + body = fixture['body'] assert isinstance(response, resources.TransferredMandate) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -44,4 +46,3 @@ def test_502_transferred_mandates_transferred_mandates_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.transferred_mandates.transferred_mandates(*fixture['url_params']) assert len(rsps.calls) == 1 - diff --git a/tests/integration/verification_details_integration_test.py b/tests/integration/verification_details_integration_test.py index a24fffa7..86c8a084 100644 --- a/tests/integration/verification_details_integration_test.py +++ b/tests/integration/verification_details_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_verification_details_create(): fixture = helpers.load_fixture('verification_details')['create'] helpers.stub_response(fixture) response = helpers.client.verification_details.create(*fixture['url_params']) - body = fixture['body']['verification_details'] + if fixture['body'].get('verification_details') is not None and isinstance(fixture['body'].get('verification_details'), (dict, list)): + body = fixture['body']['verification_details'] + else: + body = fixture['body'] assert isinstance(response, resources.VerificationDetail) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -43,7 +45,6 @@ def test_timeout_verification_details_create_retries(): response = helpers.client.verification_details.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['verification_details'] assert isinstance(response, resources.VerificationDetail) @@ -53,17 +54,18 @@ def test_502_verification_details_create_retries(): response = helpers.client.verification_details.create(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['verification_details'] assert isinstance(response, resources.VerificationDetail) - @responses.activate def test_verification_details_list(): fixture = helpers.load_fixture('verification_details')['list'] helpers.stub_response(fixture) response = helpers.client.verification_details.list(*fixture['url_params']) - body = fixture['body']['verification_details'] + if fixture['body'].get('verification_details') is not None and isinstance(fixture['body'].get('verification_details'), (dict, list)): + body = fixture['body']['verification_details'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.VerificationDetail) @@ -88,7 +90,6 @@ def test_timeout_verification_details_list_retries(): response = helpers.client.verification_details.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['verification_details'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.VerificationDetail) @@ -102,7 +103,6 @@ def test_502_verification_details_list_retries(): response = helpers.client.verification_details.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['verification_details'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.VerificationDetail) @@ -128,5 +128,3 @@ def callback(request): assert len(all_records) == len(fixture['body']['verification_details']) * 2 for record in all_records: assert isinstance(record, resources.VerificationDetail) - - diff --git a/tests/integration/webhooks_integration_test.py b/tests/integration/webhooks_integration_test.py index 7593bab6..a2dadef5 100644 --- a/tests/integration/webhooks_integration_test.py +++ b/tests/integration/webhooks_integration_test.py @@ -14,14 +14,16 @@ from gocardless_pro import list_response from .. import helpers - @responses.activate def test_webhooks_list(): fixture = helpers.load_fixture('webhooks')['list'] helpers.stub_response(fixture) response = helpers.client.webhooks.list(*fixture['url_params']) - body = fixture['body']['webhooks'] + if fixture['body'].get('webhooks') is not None and isinstance(fixture['body'].get('webhooks'), (dict, list)): + body = fixture['body']['webhooks'] + else: + body = fixture['body'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Webhook) @@ -50,7 +52,6 @@ def test_timeout_webhooks_list_retries(): response = helpers.client.webhooks.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['webhooks'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Webhook) @@ -64,7 +65,6 @@ def test_502_webhooks_list_retries(): response = helpers.client.webhooks.list(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['webhooks'] assert isinstance(response, list_response.ListResponse) assert isinstance(response.records[0], resources.Webhook) @@ -90,15 +90,16 @@ def callback(request): assert len(all_records) == len(fixture['body']['webhooks']) * 2 for record in all_records: assert isinstance(record, resources.Webhook) - - @responses.activate def test_webhooks_get(): fixture = helpers.load_fixture('webhooks')['get'] helpers.stub_response(fixture) response = helpers.client.webhooks.get(*fixture['url_params']) - body = fixture['body']['webhooks'] + if fixture['body'].get('webhooks') is not None and isinstance(fixture['body'].get('webhooks'), (dict, list)): + body = fixture['body']['webhooks'] + else: + body = fixture['body'] assert isinstance(response, resources.Webhook) assert responses.calls[-1].request.headers.get('Idempotency-Key') is None @@ -123,7 +124,6 @@ def test_timeout_webhooks_get_retries(): response = helpers.client.webhooks.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['webhooks'] assert isinstance(response, resources.Webhook) @@ -133,17 +133,18 @@ def test_502_webhooks_get_retries(): response = helpers.client.webhooks.get(*fixture['url_params']) assert len(rsps.calls) == 2 assert rsps.calls[0].request.headers.get('Idempotency-Key') == rsps.calls[1].request.headers.get('Idempotency-Key') - body = fixture['body']['webhooks'] assert isinstance(response, resources.Webhook) - @responses.activate def test_webhooks_retry(): fixture = helpers.load_fixture('webhooks')['retry'] helpers.stub_response(fixture) response = helpers.client.webhooks.retry(*fixture['url_params']) - body = fixture['body']['webhooks'] + if fixture['body'].get('webhooks') is not None and isinstance(fixture['body'].get('webhooks'), (dict, list)): + body = fixture['body']['webhooks'] + else: + body = fixture['body'] assert isinstance(response, resources.Webhook) assert responses.calls[-1].request.headers.get('Idempotency-Key') is not None @@ -174,4 +175,3 @@ def test_502_webhooks_retry_doesnt_retry(): with pytest.raises(MalformedResponseError): response = helpers.client.webhooks.retry(*fixture['url_params']) assert len(rsps.calls) == 1 - From 725218e77808e7f15b30bd3538aef0583bf8007c Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 12:19:24 +0000 Subject: [PATCH 11/12] Changes generated by 5d2d4d1c6a43a98a45ac8d0f4ffd64e70fdaf418 This commit was automatically created from gocardless/client-library-templates@5d2d4d1c6a43a98a45ac8d0f4ffd64e70fdaf418 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/22485866045 --- gocardless_pro/services/balances_service.py | 6 +- .../services/bank_account_details_service.py | 14 +- ...nk_account_holder_verifications_service.py | 10 +- .../services/bank_authorisations_service.py | 4 +- .../services/bank_details_lookups_service.py | 68 +++--- .../services/billing_request_flows_service.py | 8 +- .../billing_request_templates_service.py | 12 +- .../billing_request_with_actions_service.py | 12 +- .../services/billing_requests_service.py | 144 +++++++------ gocardless_pro/services/blocks_service.py | 24 +-- .../creditor_bank_accounts_service.py | 24 +-- gocardless_pro/services/creditors_service.py | 12 +- .../currency_exchange_rates_service.py | 4 +- .../customer_bank_accounts_service.py | 50 ++--- .../customer_notifications_service.py | 18 +- gocardless_pro/services/customers_service.py | 28 +-- gocardless_pro/services/events_service.py | 6 +- gocardless_pro/services/exports_service.py | 4 +- .../services/funds_availabilities_service.py | 7 +- .../services/instalment_schedules_service.py | 92 ++++----- .../services/institutions_service.py | 8 +- gocardless_pro/services/logos_service.py | 16 +- .../mandate_import_entries_service.py | 32 +-- .../services/mandate_imports_service.py | 54 ++--- .../services/mandate_pdfs_service.py | 70 +++---- gocardless_pro/services/mandates_service.py | 46 ++--- .../negative_balance_limits_service.py | 4 +- .../services/outbound_payments_service.py | 32 +-- .../services/payer_authorisations_service.py | 69 +++---- .../services/payer_themes_service.py | 6 +- .../payment_account_transactions_service.py | 2 +- .../services/payment_accounts_service.py | 6 +- gocardless_pro/services/payments_service.py | 55 +++-- .../services/payout_items_service.py | 14 +- gocardless_pro/services/payouts_service.py | 12 +- .../services/redirect_flows_service.py | 28 +-- gocardless_pro/services/refunds_service.py | 38 ++-- .../services/scenario_simulators_service.py | 2 +- .../services/scheme_identifiers_service.py | 86 ++++---- .../services/subscriptions_service.py | 195 +++++++++--------- gocardless_pro/services/tax_rates_service.py | 6 +- .../services/transferred_mandates_service.py | 4 +- .../services/verification_details_service.py | 4 +- gocardless_pro/services/webhooks_service.py | 8 +- 44 files changed, 669 insertions(+), 675 deletions(-) diff --git a/gocardless_pro/services/balances_service.py b/gocardless_pro/services/balances_service.py index 0d2e9f09..0419863e 100644 --- a/gocardless_pro/services/balances_service.py +++ b/gocardless_pro/services/balances_service.py @@ -20,9 +20,9 @@ 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](#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 a1b06661..1ca3577b 100644 --- a/gocardless_pro/services/bank_account_details_service.py +++ b/gocardless_pro/services/bank_account_details_service.py @@ -20,13 +20,13 @@ class BankAccountDetailsService(base_service.BaseService): def get(self,identity,params=None, headers=None): """Get encrypted bank details. - Returns bank account details in the flattened JSON Web Encryption - 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) - for more details. + Returns bank account details in the flattened JSON Web Encryption + 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) + for more details. Args: identity (string): Unique identifier, beginning with "BA". diff --git a/gocardless_pro/services/bank_account_holder_verifications_service.py b/gocardless_pro/services/bank_account_holder_verifications_service.py index c93c6b16..31fc5d70 100644 --- a/gocardless_pro/services/bank_account_holder_verifications_service.py +++ b/gocardless_pro/services/bank_account_holder_verifications_service.py @@ -20,10 +20,10 @@ class BankAccountHolderVerificationsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a bank account holder verification.. - Verify the account holder of the bank account. A complete verification - can be attached when creating an outbound payment. This endpoint - allows partner merchants to create Confirmation of Payee checks on - customer bank accounts before sending outbound payments. + Verify the account holder of the bank account. A complete verification + can be attached when creating an outbound payment. This endpoint allows + partner merchants to create Confirmation of Payee checks on customer + bank accounts before sending outbound payments. Args: params (dict, optional): Request body. @@ -51,7 +51,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a bank account holder verification.. - Fetches a bank account holder verification by ID. + Fetches a bank account holder verification by ID. Args: identity (string): The unique identifier for the bank account holder verification resource, e.g. "BAHV123". diff --git a/gocardless_pro/services/bank_authorisations_service.py b/gocardless_pro/services/bank_authorisations_service.py index 33627b83..d6009cd5 100644 --- a/gocardless_pro/services/bank_authorisations_service.py +++ b/gocardless_pro/services/bank_authorisations_service.py @@ -20,7 +20,7 @@ class BankAuthorisationsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a Bank Authorisation. - Create a Bank Authorisation. + Create a Bank Authorisation. Args: params (dict, optional): Request body. @@ -48,7 +48,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a Bank Authorisation. - Get a single bank authorisation. + Get a single bank authorisation. Args: identity (string): Unique identifier, beginning with "BAU". diff --git a/gocardless_pro/services/bank_details_lookups_service.py b/gocardless_pro/services/bank_details_lookups_service.py index d5ea80fc..41cf2327 100644 --- a/gocardless_pro/services/bank_details_lookups_service.py +++ b/gocardless_pro/services/bank_details_lookups_service.py @@ -20,40 +20,40 @@ class BankDetailsLookupsService(base_service.BaseService): def create(self,params=None, headers=None): """Perform a bank details lookup. - Performs a bank details lookup. As part of the lookup, a modulus check - and - reachability check are performed. - - For UK-based bank accounts, where an account holder name is provided - (and an account number, a sort code or an iban - are already present), we verify that the account holder name and bank - account number match the details held by - the relevant bank. - - If your request returns an [error](#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. - - _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 - Direct Debit. If a bank account is discovered to be closed or invalid, - the - 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 - modulus or reachability checking but not for payment collection, - please get in touch. + Performs a bank details lookup. As part of the lookup, a modulus check + and + reachability check are performed. + + For UK-based bank accounts, where an account holder name is provided + (and an account number, a sort code or an iban + are already present), we verify that the account holder name and bank + account number match the details held by + the relevant bank. + + If your request returns an [error](#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. + + _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 + Direct Debit. If a bank account is discovered to be closed or invalid, + the + 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 + modulus or reachability checking but not for payment collection, please + get in touch. Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/billing_request_flows_service.py b/gocardless_pro/services/billing_request_flows_service.py index 961e1a65..96fe3f65 100644 --- a/gocardless_pro/services/billing_request_flows_service.py +++ b/gocardless_pro/services/billing_request_flows_service.py @@ -20,7 +20,7 @@ class BillingRequestFlowsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a Billing Request Flow. - Creates a new billing request flow. + Creates a new billing request flow. Args: params (dict, optional): Request body. @@ -41,9 +41,9 @@ def create(self,params=None, headers=None): def initialise(self,identity,params=None, headers=None): """Initialise a Billing Request Flow. - Returns the flow having generated a fresh session token which can be - used to power - integrations that manipulate the flow. + Returns the flow having generated a fresh session token which can be + used to power + integrations that manipulate the flow. Args: identity (string): Unique identifier, beginning with "BRF". diff --git a/gocardless_pro/services/billing_request_templates_service.py b/gocardless_pro/services/billing_request_templates_service.py index 76d81a74..7ed61982 100644 --- a/gocardless_pro/services/billing_request_templates_service.py +++ b/gocardless_pro/services/billing_request_templates_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of your + Billing Request Templates. Args: params (dict, optional): Query string parameters. @@ -47,7 +47,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single Billing Request Template. - Fetches a Billing Request Template + Fetches a Billing Request Template Args: identity (string): Unique identifier, beginning with "BRT". @@ -70,7 +70,7 @@ def get(self,identity,params=None, headers=None): def create(self,params=None, headers=None): """Create a Billing Request Template. - + Args: params (dict, optional): Request body. @@ -98,8 +98,8 @@ def create(self,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a Billing Request Template. - Updates a Billing Request Template, which will affect all future - Billing Requests created by this template. + Updates a Billing Request Template, which will affect all future + Billing Requests created by this template. Args: identity (string): Unique identifier, beginning with "BRT". diff --git a/gocardless_pro/services/billing_request_with_actions_service.py b/gocardless_pro/services/billing_request_with_actions_service.py index 430e8d29..4d99bffc 100644 --- a/gocardless_pro/services/billing_request_with_actions_service.py +++ b/gocardless_pro/services/billing_request_with_actions_service.py @@ -20,12 +20,12 @@ class BillingRequestWithActionsService(base_service.BaseService): def create_with_actions(self,params=None, headers=None): """Create a Billing Request with Actions. - Creates a billing request and completes any specified actions in a - single request. - This endpoint allows you to create a billing request and immediately - complete actions - such as collecting customer details, bank account details, or other - required actions. + Creates a billing request and completes any specified actions in a + single request. + This endpoint allows you to create a billing request and immediately + complete actions + such as collecting customer details, bank account details, or other + required actions. Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/billing_requests_service.py b/gocardless_pro/services/billing_requests_service.py index d62bec71..75485e95 100644 --- a/gocardless_pro/services/billing_requests_service.py +++ b/gocardless_pro/services/billing_requests_service.py @@ -20,10 +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. @@ -51,18 +50,17 @@ 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 - action, this endpoint can be used to collect the details in order to - complete it. - - The endpoint takes the same payload as Customers, but checks that the - customer fields are populated correctly for the billing request - scheme. - - Whatever is provided to this endpoint is used to update the referenced - customer, and will take effect immediately after the request is - successful. + 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. + + The endpoint takes the same payload as Customers, but checks that the + customer fields are populated correctly for the billing request scheme. + + Whatever is provided to this endpoint is used to update the referenced + customer, and will take effect immediately after the request is + successful. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -86,34 +84,34 @@ def collect_customer_details(self,identity,params=None, headers=None): 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 - used to collect the details in order to complete it. - - The endpoint takes the same payload as Customer Bank Accounts, but - check - the bank account is valid for the billing request scheme before - creating - and attaching it. - - If the scheme is PayTo and the pay_id is available, this can be - included in the payload along with the - country_code. - - _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 - Direct Debit. If a bank account is discovered to be closed or invalid, - the - 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) - 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. + If the billing request has a pending + 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 + check + the bank account is valid for the billing request scheme before + creating + and attaching it. + + If the scheme is PayTo and the pay_id is available, this can be + included in the payload along with the + country_code. + + _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 + Direct Debit. If a bank account is discovered to be closed or invalid, + the + 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) + 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. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -137,10 +135,10 @@ def collect_bank_account(self,identity,params=None, headers=None): def confirm_payer_details(self,identity,params=None, headers=None): """Confirm the payer details. - This is needed when you have a mandate request. As a scheme compliance - rule we are required to - allow the payer to crosscheck the details entered by them and confirm - it. + This is needed when you have a mandate request. As a scheme compliance + rule we are required to + allow the payer to crosscheck the details entered by them and confirm + it. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -164,9 +162,9 @@ def confirm_payer_details(self,identity,params=None, headers=None): def fulfil(self,identity,params=None, headers=None): """Fulfil a Billing Request. - If a billing request is ready to be fulfilled, call this endpoint to - cause - it to fulfil, executing the payment. + If a billing request is ready to be fulfilled, call this endpoint to + cause + it to fulfil, executing the payment. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -190,9 +188,9 @@ def fulfil(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a Billing Request. - Immediately cancels a billing request, causing all billing request - flows - to expire. + Immediately cancels a billing request, causing all billing request + flows + to expire. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -216,8 +214,8 @@ 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](#api-usage-cursor-pagination) list of your + billing requests. Args: params (dict, optional): Query string parameters. @@ -243,7 +241,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single Billing Request. - Fetches a billing request + Fetches a billing request Args: identity (string): Unique identifier, beginning with "BRQ". @@ -266,12 +264,12 @@ def get(self,identity,params=None, headers=None): def notify(self,identity,params=None, headers=None): """Notify the customer. - Notifies the customer linked to the billing request, asking them to - authorise it. - Currently, the customer can only be notified by email. - - This endpoint is currently supported only for Instant Bank Pay Billing - Requests. + Notifies the customer linked to the billing request, asking them to + authorise it. + Currently, the customer can only be notified by email. + + This endpoint is currently supported only for Instant Bank Pay Billing + Requests. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -295,8 +293,8 @@ def notify(self,identity,params=None, headers=None): def fallback(self,identity,params=None, headers=None): """Trigger fallback. - Triggers a fallback from the open-banking flow to direct debit. Note, - the billing request must have fallback enabled. + Triggers a fallback from the open-banking flow to direct debit. Note, + the billing request must have fallback enabled. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -320,13 +318,13 @@ def fallback(self,identity,params=None, headers=None): def choose_currency(self,identity,params=None, headers=None): """Change currency. - This will allow for the updating of the currency and subsequently the - scheme if - needed for a Billing Request. This will only be available for mandate - only flows - which do not have the lock_currency flag set to true on the Billing - Request Flow. It - will also not support any request which has a payments request. + This will allow for the updating of the currency and subsequently the + scheme if + needed for a Billing Request. This will only be available for mandate + only flows + which do not have the lock_currency flag set to true on the Billing + Request Flow. It + will also not support any request which has a payments request. Args: identity (string): Unique identifier, beginning with "BRQ". @@ -350,7 +348,7 @@ def choose_currency(self,identity,params=None, headers=None): def select_institution(self,identity,params=None, headers=None): """Select institution for a Billing Request. - Creates an Institution object and attaches it to the Billing Request + Creates an Institution object and attaches it to the Billing Request Args: identity (string): Unique identifier, beginning with "BRQ". diff --git a/gocardless_pro/services/blocks_service.py b/gocardless_pro/services/blocks_service.py index 987a110f..b57e1a24 100644 --- a/gocardless_pro/services/blocks_service.py +++ b/gocardless_pro/services/blocks_service.py @@ -20,7 +20,7 @@ class BlocksService(base_service.BaseService): def create(self,params=None, headers=None): """Create a block. - Creates a new Block of a given type. By default it will be active. + Creates a new Block of a given type. By default it will be active. Args: params (dict, optional): Request body. @@ -48,7 +48,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a single block. - Retrieves the details of an existing block. + Retrieves the details of an existing block. Args: identity (string): Unique identifier, beginning with "BLC". @@ -71,8 +71,8 @@ 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](#api-usage-cursor-pagination) list of your + blocks. Args: params (dict, optional): Query string parameters. @@ -98,7 +98,7 @@ def all(self,params=None): def disable(self,identity,params=None, headers=None): """Disable a block. - Disables a block so that it no longer will prevent mandate creation. + Disables a block so that it no longer will prevent mandate creation. Args: identity (string): Unique identifier, beginning with "BLC". @@ -122,8 +122,8 @@ def disable(self,identity,params=None, headers=None): def enable(self,identity,params=None, headers=None): """Enable a block. - Enables a previously disabled block so that it will prevent mandate - creation + Enables a previously disabled block so that it will prevent mandate + creation Args: identity (string): Unique identifier, beginning with "BLC". @@ -147,11 +147,11 @@ def enable(self,identity,params=None, headers=None): def block_by_ref(self,params=None, headers=None): """Create blocks by reference. - Creates new blocks for a given reference. By default blocks will be - active. - Returns 201 if at least one block was created. Returns 200 if there - were no new - blocks created. + Creates new blocks for a given reference. By default blocks will be + active. + Returns 201 if at least one block was created. Returns 200 if there + were no new + blocks created. Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/creditor_bank_accounts_service.py b/gocardless_pro/services/creditor_bank_accounts_service.py index 04974414..b9ca1893 100644 --- a/gocardless_pro/services/creditor_bank_accounts_service.py +++ b/gocardless_pro/services/creditor_bank_accounts_service.py @@ -20,7 +20,7 @@ class CreditorBankAccountsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a creditor bank account. - Creates a new creditor bank account object. + Creates a new creditor bank account object. Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ 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](#api-usage-cursor-pagination) list of your + creditor bank accounts. Args: params (dict, optional): Query string parameters. @@ -75,7 +75,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single creditor bank account. - Retrieves the details of an existing creditor bank account. + Retrieves the details of an existing creditor bank account. Args: identity (string): Unique identifier, beginning with "BA". @@ -98,14 +98,14 @@ def get(self,identity,params=None, headers=None): def disable(self,identity,params=None, headers=None): """Disable a creditor bank account. - Immediately disables the bank account, no money can be paid out to a - disabled account. - - This will return a `disable_failed` error if the bank account has - already been disabled. - - A disabled bank account can be re-enabled by creating a new bank - account resource with the same details. + Immediately disables the bank account, no money can be paid out to a + disabled account. + + This will return a `disable_failed` error if the bank account has + already been disabled. + + A disabled bank account can be re-enabled by creating a new bank + account resource with the same details. Args: identity (string): Unique identifier, beginning with "BA". diff --git a/gocardless_pro/services/creditors_service.py b/gocardless_pro/services/creditors_service.py index 0fb07177..02b2ac95 100644 --- a/gocardless_pro/services/creditors_service.py +++ b/gocardless_pro/services/creditors_service.py @@ -20,7 +20,7 @@ class CreditorsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a creditor. - Creates a new creditor. + Creates a new creditor. Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ 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](#api-usage-cursor-pagination) list of your + creditors. Args: params (dict, optional): Query string parameters. @@ -75,7 +75,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single creditor. - Retrieves the details of an existing creditor. + Retrieves the details of an existing creditor. Args: identity (string): Unique identifier, beginning with "CR". @@ -98,8 +98,8 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a creditor. - Updates a creditor object. Supports all of the fields supported when - creating a creditor. + Updates a creditor object. Supports all of the fields supported when + creating a creditor. Args: identity (string): Unique identifier, beginning with "CR". diff --git a/gocardless_pro/services/currency_exchange_rates_service.py b/gocardless_pro/services/currency_exchange_rates_service.py index 3a496f0a..337b30ba 100644 --- a/gocardless_pro/services/currency_exchange_rates_service.py +++ b/gocardless_pro/services/currency_exchange_rates_service.py @@ -20,8 +20,8 @@ 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](#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 c1e9ce5b..ccc0c9f0 100644 --- a/gocardless_pro/services/customer_bank_accounts_service.py +++ b/gocardless_pro/services/customer_bank_accounts_service.py @@ -20,19 +20,19 @@ class CustomerBankAccountsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a customer bank account. - Creates a new customer bank account object. - - 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) - - For more information on the different fields required in each country, - see [local bank details](#appendix-local-bank-details). + Creates a new customer bank account object. + + 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) + + For more information on the different fields required in each country, + see [local bank details](#appendix-local-bank-details). Args: params (dict, optional): Request body. @@ -60,8 +60,8 @@ 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](#api-usage-cursor-pagination) list of your + bank accounts. Args: params (dict, optional): Query string parameters. @@ -87,7 +87,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single customer bank account. - Retrieves the details of an existing bank account. + Retrieves the details of an existing bank account. Args: identity (string): Unique identifier, beginning with "BA". @@ -110,8 +110,8 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a customer bank account. - Updates a customer bank account object. Only the metadata parameter is - allowed. + Updates a customer bank account object. Only the metadata parameter is + allowed. Args: identity (string): Unique identifier, beginning with "BA". @@ -136,13 +136,13 @@ def update(self,identity,params=None, headers=None): def disable(self,identity,params=None, headers=None): """Disable a customer bank account. - Immediately cancels all associated mandates and cancellable payments. - - This will return a `disable_failed` error if the bank account has - already been disabled. - - A disabled bank account can be re-enabled by creating a new bank - account resource with the same details. + Immediately cancels all associated mandates and cancellable payments. + + This will return a `disable_failed` error if the bank account has + already been disabled. + + A disabled bank account can be re-enabled by creating a new bank + account resource with the same details. Args: identity (string): Unique identifier, beginning with "BA". diff --git a/gocardless_pro/services/customer_notifications_service.py b/gocardless_pro/services/customer_notifications_service.py index f83135aa..45b92e20 100644 --- a/gocardless_pro/services/customer_notifications_service.py +++ b/gocardless_pro/services/customer_notifications_service.py @@ -20,15 +20,15 @@ class CustomerNotificationsService(base_service.BaseService): def handle(self,identity,params=None, headers=None): """Handle a notification. - "Handling" a notification means that you have sent the notification - yourself (and - don't want GoCardless to send it). - If the notification has already been actioned, or the deadline to - notify has passed, - this endpoint will return an `already_actioned` error and you should - not take - further action. This endpoint takes no additional parameters. - + "Handling" a notification means that you have sent the notification + yourself (and + don't want GoCardless to send it). + If the notification has already been actioned, or the deadline to + notify has passed, + 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 2441a696..1c8e1bc3 100644 --- a/gocardless_pro/services/customers_service.py +++ b/gocardless_pro/services/customers_service.py @@ -20,7 +20,7 @@ class CustomersService(base_service.BaseService): def create(self,params=None, headers=None): """Create a customer. - Creates a new customer object. + Creates a new customer object. Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ 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](#api-usage-cursor-pagination) list of your + customers. Args: params (dict, optional): Query string parameters. @@ -75,7 +75,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single customer. - Retrieves the details of an existing customer. + Retrieves the details of an existing customer. Args: identity (string): Unique identifier, beginning with "CU". @@ -98,8 +98,8 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a customer. - Updates a customer object. Supports all of the fields supported when - creating a customer. + Updates a customer object. Supports all of the fields supported when + creating a customer. Args: identity (string): Unique identifier, beginning with "CU". @@ -124,14 +124,14 @@ def update(self,identity,params=None, headers=None): def remove(self,identity,params=None, headers=None): """Remove a customer. - Removed customers will not appear in search results or lists of - customers (in our API - or exports), and it will not be possible to load an individually - removed customer by - ID. - -

    The action of removing a customer - cannot be reversed, so please use with care.

    + Removed customers will not appear in search results or lists of + customers (in our API + or exports), and it will not be possible to load an individually + removed customer by + ID. + +

    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 4a83a248..db8a9487 100644 --- a/gocardless_pro/services/events_service.py +++ b/gocardless_pro/services/events_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of your + events. Args: params (dict, optional): Query string parameters. @@ -47,7 +47,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single event. - Retrieves the details of a single event. + Retrieves the details of a single event. Args: identity (string): Unique identifier, beginning with "EV". diff --git a/gocardless_pro/services/exports_service.py b/gocardless_pro/services/exports_service.py index f1bd6a6b..aadbcd1c 100644 --- a/gocardless_pro/services/exports_service.py +++ b/gocardless_pro/services/exports_service.py @@ -20,7 +20,7 @@ class ExportsService(base_service.BaseService): def get(self,identity,params=None, headers=None): """Get a single export. - Returns a single export. + Returns a single export. Args: identity (string): Unique identifier, beginning with "EX". @@ -43,7 +43,7 @@ def get(self,identity,params=None, headers=None): def list(self,params=None, headers=None): """List exports. - Returns a list of exports which are available for download. + Returns a list of exports which are available for download. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/funds_availabilities_service.py b/gocardless_pro/services/funds_availabilities_service.py index 3eb71a87..c8b80b96 100644 --- a/gocardless_pro/services/funds_availabilities_service.py +++ b/gocardless_pro/services/funds_availabilities_service.py @@ -20,10 +20,9 @@ class FundsAvailabilitiesService(base_service.BaseService): def check(self,identity,params=None, headers=None): """Funds availability. - Checks if the payer's current balance is sufficient to cover the - amount - the merchant wants to charge within the consent parameters defined on - the mandate. + Checks if the payer's current balance is sufficient to cover the amount + the merchant wants to charge within the consent parameters defined on + the mandate. Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. diff --git a/gocardless_pro/services/instalment_schedules_service.py b/gocardless_pro/services/instalment_schedules_service.py index 61754fa9..a24fc662 100644 --- a/gocardless_pro/services/instalment_schedules_service.py +++ b/gocardless_pro/services/instalment_schedules_service.py @@ -20,26 +20,26 @@ class InstalmentSchedulesService(base_service.BaseService): def create_with_dates(self,params=None, headers=None): """Create (with dates). - Creates a new instalment schedule object, along with the associated - 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). - - The `instalments` property is an array of payment properties (`amount` - and - `charge_date`). - - It can take quite a while to create the associated payments, so the - API will return - the status as `pending` initially. When processing has completed, a - subsequent GET - request for the instalment schedule will either have the status - `success` and link - to the created payments, or the status `error` and detailed - information about the - failures. + Creates a new instalment schedule object, along with the associated + 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). + + The `instalments` property is an array of payment properties (`amount` + and + `charge_date`). + + It can take quite a while to create the associated payments, so the API + will return + the status as `pending` initially. When processing has completed, a + subsequent GET + request for the instalment schedule will either have the status + `success` and link + to the created payments, or the status `error` and detailed information + about the + failures. Args: params (dict, optional): Request body. @@ -67,22 +67,22 @@ def create_with_dates(self,params=None, headers=None): def create_with_schedule(self,params=None, headers=None): """Create (with schedule). - Creates a new instalment schedule object, along with the associated - 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). - - It can take quite a while to create the associated payments, so the - API will return - the status as `pending` initially. When processing has completed, a - subsequent - GET request for the instalment schedule will either have the status - `success` and link to - the created payments, or the status `error` and detailed information - about the - failures. + Creates a new instalment schedule object, along with the associated + 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). + + It can take quite a while to create the associated payments, so the API + will return + the status as `pending` initially. When processing has completed, a + subsequent + GET request for the instalment schedule will either have the status + `success` and link to + the created payments, or the status `error` and detailed information + about the + failures. Args: params (dict, optional): Request body. @@ -110,8 +110,8 @@ 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](#api-usage-cursor-pagination) list of your + instalment schedules. Args: params (dict, optional): Query string parameters. @@ -137,7 +137,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single instalment schedule. - Retrieves the details of an existing instalment schedule. + Retrieves the details of an existing instalment schedule. Args: identity (string): Unique identifier, beginning with "IS". @@ -160,8 +160,8 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update an instalment schedule. - Updates an instalment schedule. This accepts only the metadata - parameter. + Updates an instalment schedule. This accepts only the metadata + parameter. Args: identity (string): Unique identifier, beginning with "IS". @@ -186,11 +186,11 @@ def update(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel an instalment schedule. - Immediately cancels an instalment schedule; no further payments will - be collected for it. - - This will fail with a `cancellation_failed` error if the instalment - schedule is already cancelled or has completed. + Immediately cancels an instalment schedule; no further payments will be + collected for it. + + This will fail with a `cancellation_failed` error if the instalment + schedule is already cancelled or has completed. Args: identity (string): Unique identifier, beginning with "IS". diff --git a/gocardless_pro/services/institutions_service.py b/gocardless_pro/services/institutions_service.py index dbf44d36..8e691eea 100644 --- a/gocardless_pro/services/institutions_service.py +++ b/gocardless_pro/services/institutions_service.py @@ -20,7 +20,7 @@ class InstitutionsService(base_service.BaseService): def list(self,params=None, headers=None): """List Institutions. - Returns a list of supported institutions. + Returns a list of supported institutions. Args: params (dict, optional): Query string parameters. @@ -46,9 +46,9 @@ def all(self,params=None): def list_for_billing_request(self,identity,params=None, headers=None): """List institutions for Billing Request. - Returns all institutions valid for a Billing Request. - - This endpoint is currently supported only for FasterPayments. + Returns all institutions valid for a Billing Request. + + This endpoint is currently supported only for FasterPayments. Args: identity (string): Unique identifier, beginning with "BRQ". diff --git a/gocardless_pro/services/logos_service.py b/gocardless_pro/services/logos_service.py index a596c663..2607ff7b 100644 --- a/gocardless_pro/services/logos_service.py +++ b/gocardless_pro/services/logos_service.py @@ -20,14 +20,14 @@ class LogosService(base_service.BaseService): def create_for_creditor(self,params=None, headers=None): """Create a logo associated with a creditor. - Creates a new logo associated with a creditor. If a creditor already - has a logo, this will update the existing logo linked to the creditor. - - We support JPG and PNG formats. Your logo will be scaled to a maximum - 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). + Creates a new logo associated with a creditor. If a creditor already + has a logo, this will update the existing logo linked to the creditor. + + We support JPG and PNG formats. Your logo will be scaled to a maximum + 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). 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 337145d6..145aa64c 100644 --- a/gocardless_pro/services/mandate_import_entries_service.py +++ b/gocardless_pro/services/mandate_import_entries_service.py @@ -20,13 +20,13 @@ 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 - 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. - If you attempt to go over this limit, the API will return a - `record_limit_exceeded` error. + For an existing [mandate import](#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. + If you attempt to go over this limit, the API will return a + `record_limit_exceeded` error. Args: params (dict, optional): Request body. @@ -47,15 +47,15 @@ def create(self,params=None, headers=None): def list(self,params=None, headers=None): """List all mandate import entries. - For an existing mandate import, this endpoint lists all of the entries - attached. - - After a mandate import has been submitted, you can use this endpoint - to associate records - in your system (using the `record_identifier` that you provided when - creating the - mandate import). - + For an existing mandate import, this endpoint lists all of the entries + attached. + + After a mandate import has been submitted, you can use this endpoint to + associate records + 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 0ec8211a..748cb113 100644 --- a/gocardless_pro/services/mandate_imports_service.py +++ b/gocardless_pro/services/mandate_imports_service.py @@ -20,12 +20,12 @@ class MandateImportsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a new mandate import. - Mandate imports are first created, before mandates are added - one-at-a-time, so - 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. + Mandate imports are first created, before mandates are added + one-at-a-time, so + 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. Args: params (dict, optional): Request body. @@ -53,7 +53,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a mandate import. - Returns a single mandate import. + Returns a single mandate import. Args: identity (string): Unique identifier, beginning with "IM". @@ -76,19 +76,19 @@ def get(self,identity,params=None, headers=None): def submit(self,identity,params=None, headers=None): """Submit a mandate import. - Submits the mandate import, which allows it to be processed by a - member of the - GoCardless team. Once the import has been submitted, it can no longer - have entries - added to it. - - In our sandbox environment, to aid development, we automatically - process mandate - imports approximately 10 seconds after they are submitted. This will - allow you to - test both the "submitted" response and wait for the webhook to confirm - the - processing has begun. + Submits the mandate import, which allows it to be processed by a member + of the + GoCardless team. Once the import has been submitted, it can no longer + have entries + added to it. + + In our sandbox environment, to aid development, we automatically + process mandate + imports approximately 10 seconds after they are submitted. This will + allow you to + test both the "submitted" response and wait for the webhook to confirm + the + processing has begun. Args: identity (string): Unique identifier, beginning with "IM". @@ -112,13 +112,13 @@ def submit(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a mandate import. - Cancels the mandate import, which aborts the import process and stops - the mandates - being set up in GoCardless. Once the import has been cancelled, it can - no longer have - entries added to it. Mandate imports which have already been submitted - or processed - cannot be cancelled. + Cancels the mandate import, which aborts the import process and stops + the mandates + being set up in GoCardless. Once the import has been cancelled, it can + no longer have + entries added to it. Mandate imports which have already been submitted + or processed + cannot be cancelled. Args: identity (string): Unique identifier, beginning with "IM". diff --git a/gocardless_pro/services/mandate_pdfs_service.py b/gocardless_pro/services/mandate_pdfs_service.py index 25c778a1..7cbfb933 100644 --- a/gocardless_pro/services/mandate_pdfs_service.py +++ b/gocardless_pro/services/mandate_pdfs_service.py @@ -20,49 +20,49 @@ class MandatePdfsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a mandate PDF. - Generates a PDF mandate and returns its temporary URL. - - 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). - - 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](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) - language code supported for the scheme. - - | Scheme | Supported languages + Generates a PDF mandate and returns its temporary URL. + + 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). + + 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](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) + language code supported for the scheme. + + | Scheme | Supported languages - | - | :--------------- | - :------------------------------------------------------------------------------------------------------------------------------------------- - | - | ACH | English (`en`) + | + | :--------------- | + :------------------------------------------------------------------------------------------------------------------------------------------- + | + | ACH | English (`en`) - | - | Autogiro | English (`en`), Swedish (`sv`) + | + | Autogiro | English (`en`), Swedish (`sv`) - | - | Bacs | English (`en`) + | + | Bacs | English (`en`) - | - | BECS | English (`en`) + | + | BECS | English (`en`) - | - | BECS NZ | English (`en`) + | + | BECS NZ | English (`en`) - | - | Betalingsservice | Danish (`da`), English (`en`) + | + | Betalingsservice | Danish (`da`), English (`en`) - | - | PAD | English (`en`) + | + | PAD | English (`en`) - | - | SEPA Core | Danish (`da`), Dutch (`nl`), English (`en`), - French (`fr`), German (`de`), Italian (`it`), Portuguese (`pt`), - Spanish (`es`), Swedish (`sv`) | + | + | SEPA Core | Danish (`da`), Dutch (`nl`), English (`en`), + French (`fr`), German (`de`), Italian (`it`), Portuguese (`pt`), + Spanish (`es`), Swedish (`sv`) | Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/mandates_service.py b/gocardless_pro/services/mandates_service.py index 81c4b7ff..a7d5dcc8 100644 --- a/gocardless_pro/services/mandates_service.py +++ b/gocardless_pro/services/mandates_service.py @@ -20,7 +20,7 @@ class MandatesService(base_service.BaseService): def create(self,params=None, headers=None): """Create a mandate. - Creates a new mandate object. + Creates a new mandate object. Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ 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](#api-usage-cursor-pagination) list of your + mandates. Args: params (dict, optional): Query string parameters. @@ -75,7 +75,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single mandate. - Retrieves the details of an existing mandate. + Retrieves the details of an existing mandate. Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. @@ -98,7 +98,7 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a mandate. - Updates a mandate object. This accepts only the metadata parameter. + Updates a mandate object. This accepts only the metadata parameter. Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. @@ -123,12 +123,12 @@ def update(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a mandate. - Immediately cancels a mandate and all associated cancellable payments. - Any metadata supplied to this endpoint will be stored on the mandate - cancellation event it causes. - - This will fail with a `cancellation_failed` error if the mandate is - already cancelled. + Immediately cancels a mandate and all associated cancellable payments. + Any metadata supplied to this endpoint will be stored on the mandate + cancellation event it causes. + + This will fail with a `cancellation_failed` error if the mandate is + already cancelled. Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. @@ -152,18 +152,18 @@ 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. - - This will fail with a `mandate_not_inactive` error if the mandate is - already being submitted, or is active. - - Mandates can be resubmitted up to 10 times. + 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. + + Mandates can be resubmitted up to 10 times. Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. diff --git a/gocardless_pro/services/negative_balance_limits_service.py b/gocardless_pro/services/negative_balance_limits_service.py index 70509f3d..d4d51061 100644 --- a/gocardless_pro/services/negative_balance_limits_service.py +++ b/gocardless_pro/services/negative_balance_limits_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of + negative balance limits. 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 f648c6fc..db35614d 100644 --- a/gocardless_pro/services/outbound_payments_service.py +++ b/gocardless_pro/services/outbound_payments_service.py @@ -20,7 +20,7 @@ class OutboundPaymentsService(base_service.BaseService): def create(self,params=None, headers=None): """Create an outbound payment. - + Args: params (dict, optional): Request body. @@ -48,8 +48,8 @@ def create(self,params=None, headers=None): def withdraw(self,params=None, headers=None): """Create a withdrawal outbound payment. - Creates an outbound payment to your verified business bank account as - the recipient. + Creates an outbound payment to your verified business bank account as + the recipient. Args: params (dict, optional): Request body. @@ -69,11 +69,11 @@ def withdraw(self,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel an outbound payment. - Cancels an outbound payment. Only outbound payments with either - `verifying`, `pending_approval`, or `scheduled` status can be - cancelled. - Once an outbound payment is `executing`, the money moving process has - begun and cannot be reversed. + Cancels an outbound payment. Only outbound payments with either + `verifying`, `pending_approval`, or `scheduled` status can be + cancelled. + Once an outbound payment is `executing`, the money moving process has + begun and cannot be reversed. Args: identity (string): Unique identifier of the outbound payment. @@ -97,8 +97,8 @@ def cancel(self,identity,params=None, headers=None): def approve(self,identity,params=None, headers=None): """Approve an outbound payment. - Approves an outbound payment. Only outbound payments with the - “pending_approval” status can be approved. + Approves an outbound payment. Only outbound payments with the + “pending_approval” status can be approved. Args: identity (string): Unique identifier of the outbound payment. @@ -122,7 +122,7 @@ def approve(self,identity,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get an outbound payment. - Fetches an outbound_payment by ID + Fetches an outbound_payment by ID Args: identity (string): Unique identifier of the outbound payment. @@ -145,8 +145,8 @@ 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](#api-usage-cursor-pagination) list of + outbound payments. Args: params (dict, optional): Query string parameters. @@ -172,8 +172,8 @@ def all(self,params=None): def update(self,identity,params=None, headers=None): """Update an outbound payment. - Updates an outbound payment object. This accepts only the metadata - parameter. + Updates an outbound payment object. This accepts only the metadata + parameter. Args: identity (string): Unique identifier of the outbound payment. @@ -198,7 +198,7 @@ def update(self,identity,params=None, headers=None): def stats(self,params=None, headers=None): """Outbound payment statistics. - Retrieve aggregate statistics on outbound payments. + Retrieve aggregate statistics on 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 3e60c0db..ec7beddb 100644 --- a/gocardless_pro/services/payer_authorisations_service.py +++ b/gocardless_pro/services/payer_authorisations_service.py @@ -20,8 +20,8 @@ class PayerAuthorisationsService(base_service.BaseService): def get(self,identity,params=None, headers=None): """Get a single Payer Authorisation. - Retrieves the details of a single existing Payer Authorisation. It can - be used for polling the status of a Payer Authorisation. + Retrieves the details of a single existing Payer Authorisation. It can + be used for polling the status of a Payer Authorisation. Args: identity (string): Unique identifier, beginning with "PA". @@ -44,13 +44,12 @@ def get(self,identity,params=None, headers=None): def create(self,params=None, headers=None): """Create a Payer Authorisation. - Creates a Payer Authorisation. The resource is saved to the database - even if incomplete. An empty array of incomplete_fields means that the - resource is valid. The ID of the resource is used for the other - actions. 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 as a multi-step - form. + Creates a Payer Authorisation. The resource is saved to the database + even if incomplete. An empty array of incomplete_fields means that the + resource is valid. The ID of the resource is used for the other + actions. 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 as a multi-step form. Args: params (dict, optional): Request body. @@ -78,15 +77,15 @@ def create(self,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a Payer Authorisation. - Updates a Payer Authorisation. Updates the Payer Authorisation with - the request data. Can be invoked as many times as needed. Only fields - present in the request will be modified. An empty array of - 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.

    + Updates a Payer Authorisation. Updates the Payer Authorisation with the + request data. Can be invoked as many times as needed. Only fields + present in the request will be modified. An empty array of + 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.

    Args: identity (string): Unique identifier, beginning with "PA". @@ -111,11 +110,11 @@ def update(self,identity,params=None, headers=None): def submit(self,identity,params=None, headers=None): """Submit a Payer Authorisation. - Submits all the data previously pushed to this PayerAuthorisation for - verification. This time, a 200 HTTP status is returned if the resource - is valid and a 422 error response in case of validation errors. After - it is successfully submitted, the Payer Authorisation can no longer be - edited. + Submits all the data previously pushed to this PayerAuthorisation for + verification. This time, a 200 HTTP status is returned if the resource + is valid and a 422 error response in case of validation errors. After + it is successfully submitted, the Payer Authorisation can no longer be + edited. Args: identity (string): Unique identifier, beginning with "PA". @@ -139,18 +138,18 @@ def submit(self,identity,params=None, headers=None): def confirm(self,identity,params=None, headers=None): """Confirm a Payer Authorisation. - Confirms the Payer Authorisation, indicating that the resources are - ready to be created. - 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 go through our flow or make them go through the necessary - verification mechanism (upcoming feature). -

    + Confirms the Payer Authorisation, indicating that the resources are + ready to be created. + 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 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/payer_themes_service.py b/gocardless_pro/services/payer_themes_service.py index 148a3fca..e887fd2d 100644 --- a/gocardless_pro/services/payer_themes_service.py +++ b/gocardless_pro/services/payer_themes_service.py @@ -20,9 +20,9 @@ class PayerThemesService(base_service.BaseService): def create_for_creditor(self,params=None, headers=None): """Create a payer theme associated with a creditor. - Creates a new payer theme associated with a creditor. If a creditor - already has payer themes, this will update the existing payer theme - linked to the creditor. + Creates a new payer theme associated with a creditor. If a creditor + already has payer themes, this will update the existing payer theme + linked to the creditor. Args: params (dict, optional): Request body. diff --git a/gocardless_pro/services/payment_account_transactions_service.py b/gocardless_pro/services/payment_account_transactions_service.py index 5ed4eaff..d5c2ef1c 100644 --- a/gocardless_pro/services/payment_account_transactions_service.py +++ b/gocardless_pro/services/payment_account_transactions_service.py @@ -20,7 +20,7 @@ class PaymentAccountTransactionsService(base_service.BaseService): def list(self,identity,params=None, headers=None): """List payment account transactions. - List transactions for a given payment account. + List transactions for a given payment account. Args: identity (string): The unique ID of the [bank account](#core-endpoints-creditor-bank-accounts) which happens to be the payment account. diff --git a/gocardless_pro/services/payment_accounts_service.py b/gocardless_pro/services/payment_accounts_service.py index cc39168c..54681940 100644 --- a/gocardless_pro/services/payment_accounts_service.py +++ b/gocardless_pro/services/payment_accounts_service.py @@ -20,7 +20,7 @@ class PaymentAccountsService(base_service.BaseService): def get(self,identity,params=None, headers=None): """Get a single payment account details. - Retrieves the details of an existing payment account. + Retrieves the details of an existing payment account. Args: identity (string): Unique identifier, beginning with "BA". @@ -43,8 +43,8 @@ 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](#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 1c441bd6..3a736ee0 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. - - 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`. + 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`. Args: params (dict, optional): Request body. @@ -54,8 +54,8 @@ 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](#api-usage-cursor-pagination) list of your + payments. Args: params (dict, optional): Query string parameters. @@ -81,7 +81,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single payment. - Retrieves the details of a single existing payment. + Retrieves the details of a single existing payment. Args: identity (string): Unique identifier, beginning with "PM". @@ -104,7 +104,7 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a payment. - Updates a payment object. This accepts only the metadata parameter. + Updates a payment object. This accepts only the metadata parameter. Args: identity (string): Unique identifier, beginning with "PM". @@ -129,12 +129,12 @@ def update(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a payment. - Cancels the payment if it has not already been submitted to the banks. - Any metadata supplied to this endpoint will be stored on the payment - cancellation event it causes. - - This will fail with a `cancellation_failed` error unless the payment's - status is `pending_submission`. + Cancels the payment if it has not already been submitted to the banks. + Any metadata supplied to this endpoint will be stored on the payment + cancellation event it causes. + + This will fail with a `cancellation_failed` error unless the payment's + status is `pending_submission`. Args: identity (string): Unique identifier, beginning with "PM". @@ -158,17 +158,16 @@ 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. - - This will return a `retry_failed` error if the payment has not failed. - - Payments can be retried up to 3 times. + 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. + + Payments can be retried up to 3 times. Args: identity (string): Unique identifier, beginning with "PM". diff --git a/gocardless_pro/services/payout_items_service.py b/gocardless_pro/services/payout_items_service.py index a7201f4a..47bc979f 100644 --- a/gocardless_pro/services/payout_items_service.py +++ b/gocardless_pro/services/payout_items_service.py @@ -20,13 +20,13 @@ 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](#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 f5fc939e..50bcb720 100644 --- a/gocardless_pro/services/payouts_service.py +++ b/gocardless_pro/services/payouts_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of your + payouts. Args: params (dict, optional): Query string parameters. @@ -47,9 +47,9 @@ def all(self,params=None): 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). + 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). Args: identity (string): Unique identifier, beginning with "PO". @@ -72,7 +72,7 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a payout. - Updates a payout object. This accepts only the metadata parameter. + Updates a payout object. This accepts only the metadata parameter. 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 fa5b0759..7aeb4e36 100644 --- a/gocardless_pro/services/redirect_flows_service.py +++ b/gocardless_pro/services/redirect_flows_service.py @@ -20,8 +20,8 @@ class RedirectFlowsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a redirect flow. - Creates a redirect flow object which can then be used to redirect your - customer to the GoCardless hosted payment pages. + Creates a redirect flow object which can then be used to redirect your + customer to the GoCardless hosted payment pages. Args: params (dict, optional): Request body. @@ -49,7 +49,7 @@ def create(self,params=None, headers=None): def get(self,identity,params=None, headers=None): """Get a single redirect flow. - Returns all details about a single redirect flow + Returns all details about a single redirect flow Args: identity (string): Unique identifier, beginning with "RE". @@ -72,17 +72,17 @@ 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 will return a `redirect_flow_incomplete` error if your customer - has not yet been redirected back to your site, and a - `redirect_flow_already_completed` error if your integration has - already completed this flow. It will return a `bad_request` error if - the `session_token` differs to the one supplied when the redirect flow - was created. + 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 will return a `redirect_flow_incomplete` error if your customer + has not yet been redirected back to your site, and a + `redirect_flow_already_completed` error if your integration has already + completed this flow. It will return a `bad_request` error if the + `session_token` differs to the one supplied when the redirect flow was + created. Args: identity (string): Unique identifier, beginning with "RE". diff --git a/gocardless_pro/services/refunds_service.py b/gocardless_pro/services/refunds_service.py index c7347add..19d4d0e6 100644 --- a/gocardless_pro/services/refunds_service.py +++ b/gocardless_pro/services/refunds_service.py @@ -20,21 +20,21 @@ class RefundsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a refund. - Creates a new refund object. - - 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 - sufficient balance for refunds available to cover the cost of the - requested refund. - + Creates a new refund object. + + 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 + sufficient balance for refunds available to cover the cost of the + requested refund. + Args: params (dict, optional): Request body. @@ -62,8 +62,8 @@ 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](#api-usage-cursor-pagination) list of your + refunds. Args: params (dict, optional): Query string parameters. @@ -89,7 +89,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single refund. - Retrieves all details for a single refund + Retrieves all details for a single refund Args: identity (string): Unique identifier, beginning with "RF". @@ -112,7 +112,7 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a refund. - Updates a refund object. + Updates a refund object. Args: identity (string): Unique identifier, beginning with "RF". diff --git a/gocardless_pro/services/scenario_simulators_service.py b/gocardless_pro/services/scenario_simulators_service.py index 92cc02ea..2b9ddebc 100644 --- a/gocardless_pro/services/scenario_simulators_service.py +++ b/gocardless_pro/services/scenario_simulators_service.py @@ -20,7 +20,7 @@ class ScenarioSimulatorsService(base_service.BaseService): def run(self,identity,params=None, headers=None): """Simulate a scenario. - Runs the specific scenario simulator against the specific resource + Runs the specific scenario simulator against the specific resource Args: identity (string): The unique identifier of the simulator, used to initiate simulations. One of: diff --git a/gocardless_pro/services/scheme_identifiers_service.py b/gocardless_pro/services/scheme_identifiers_service.py index 3f9f29fb..2dc11a46 100644 --- a/gocardless_pro/services/scheme_identifiers_service.py +++ b/gocardless_pro/services/scheme_identifiers_service.py @@ -20,46 +20,46 @@ class SchemeIdentifiersService(base_service.BaseService): def create(self,params=None, headers=None): """Create a scheme identifier. - Creates a new scheme identifier. The scheme identifier status will be - `pending` while GoCardless is - processing the request. Once the scheme identifier is ready to be used - the status will be updated to `active`. - At this point, GoCardless will emit a scheme identifier activated - event via webhook to notify you of this change. - In Bacs, it will take up to five working days for a scheme identifier - to become active. On other schemes, including SEPA, - this happens instantly. - - #### Scheme identifier name validations - - The `name` field of a scheme identifier can contain alphanumeric - characters, spaces and - special characters. - - Its maximum length and the special characters it supports depend on - the scheme: - - | __scheme__ | __maximum length__ | __special characters - allowed__ | - | :---------------- | :----------------- | - :-------------------------------------------------- | - | `bacs` | 18 characters | `/` `.` `&` `-` - | - | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` - `+` `&` `<` `>` `'` `"` | - | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` - `'` `+` `-` | - | `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` - `'` `+` `-` | - - The validation error that gets returned for an invalid name will - contain a suggested name - in the metadata that is guaranteed to pass name validations. - - 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. - + Creates a new scheme identifier. The scheme identifier status will be + `pending` while GoCardless is + processing the request. Once the scheme identifier is ready to be used + the status will be updated to `active`. + At this point, GoCardless will emit a scheme identifier activated event + via webhook to notify you of this change. + In Bacs, it will take up to five working days for a scheme identifier + to become active. On other schemes, including SEPA, + this happens instantly. + + #### Scheme identifier name validations + + The `name` field of a scheme identifier can contain alphanumeric + characters, spaces and + special characters. + + Its maximum length and the special characters it supports depend on the + scheme: + + | __scheme__ | __maximum length__ | __special characters + allowed__ | + | :---------------- | :----------------- | + :-------------------------------------------------- | + | `bacs` | 18 characters | `/` `.` `&` `-` + | + | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` + `+` `&` `<` `>` `'` `"` | + | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` + `'` `+` `-` | + | `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` + `'` `+` `-` | + + The validation error that gets returned for an invalid name will + contain a suggested name + in the metadata that is guaranteed to pass name validations. + + 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 +87,8 @@ 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](#api-usage-cursor-pagination) list of your + scheme identifiers. Args: params (dict, optional): Query string parameters. @@ -114,7 +114,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single scheme identifier. - Retrieves the details of an existing scheme identifier. + Retrieves the details of an existing scheme identifier. Args: identity (string): Unique identifier, usually beginning with "SU". diff --git a/gocardless_pro/services/subscriptions_service.py b/gocardless_pro/services/subscriptions_service.py index 5428930c..be5d3c84 100644 --- a/gocardless_pro/services/subscriptions_service.py +++ b/gocardless_pro/services/subscriptions_service.py @@ -20,7 +20,7 @@ class SubscriptionsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a subscription. - Creates a new subscription object + Creates a new subscription object Args: params (dict, optional): Request body. @@ -48,10 +48,10 @@ 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](#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. @@ -77,7 +77,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single subscription. - Retrieves the details of a single subscription. + Retrieves the details of a single subscription. Args: identity (string): Unique identifier, beginning with "SB". @@ -100,33 +100,33 @@ def get(self,identity,params=None, headers=None): def update(self,identity,params=None, headers=None): """Update a subscription. - Updates a subscription object. - - This fails with: - - - `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 - 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 - 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 - authenticated as - + Updates a subscription object. + + This fails with: + + - `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 + 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 + 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 + authenticated as + Args: identity (string): Unique identifier, beginning with "SB". @@ -151,48 +151,47 @@ def update(self,identity,params=None, headers=None): def pause(self,identity,params=None, headers=None): """Pause a subscription. - Pause a subscription object. - No payments will be created until it is resumed. - - This can only be used when a subscription is collecting a fixed number - of payments (created using `count`), - when they continue forever (created without `count` or `end_date`) or - the subscription is already paused for a number of cycles. - - When `pause_cycles` is omitted the subscription is paused until the - [resume endpoint](#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. - - When `pause_cycles` is provided the subscription will be paused for - the number of cycles requested. - If the subscription is collecting a fixed number of payments, - `end_date` will be set to a new value. - When paused for a number of cycles, `upcoming_payments` will still - contain the upcoming charge dates. - - This fails with: - - - `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 - pause a subscription. - - - `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 - payments. - - - `pause_cycles_must_be_greater_than_or_equal_to` if the provided - value for `pause_cycles` cannot be satisfied. + Pause a subscription object. + No payments will be created until it is resumed. + + This can only be used when a subscription is collecting a fixed number + of payments (created using `count`), + when they continue forever (created without `count` or `end_date`) or + the subscription is already paused for a number of cycles. + + When `pause_cycles` is omitted the subscription is paused until the + [resume endpoint](#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. + + When `pause_cycles` is provided the subscription will be paused for the + number of cycles requested. + If the subscription is collecting a fixed number of payments, + `end_date` will be set to a new value. + When paused for a number of cycles, `upcoming_payments` will still + contain the upcoming charge dates. + + This fails with: + + - `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 + pause a subscription. + + - `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 + payments. + + - `pause_cycles_must_be_greater_than_or_equal_to` if the provided value + for `pause_cycles` cannot be satisfied. Args: identity (string): Unique identifier, beginning with "SB". @@ -216,23 +215,23 @@ def pause(self,identity,params=None, headers=None): def resume(self,identity,params=None, headers=None): """Resume a subscription. - Resume a subscription object. - Payments will start to be created again based on the subscriptions - recurrence rules. - The `charge_date` on the next payment will be the same as the - subscriptions `earliest_charge_date_after_resume` - - This fails with: - - - `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 - resume a subscription. - - - `subscription_not_paused` if the subscription is not paused. - + Resume a subscription object. + Payments will start to be created again based on the subscriptions + recurrence rules. + The `charge_date` on the next payment will be the same as the + subscriptions `earliest_charge_date_after_resume` + + This fails with: + + - `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 + resume a subscription. + + - `subscription_not_paused` if the subscription is not paused. + Args: identity (string): Unique identifier, beginning with "SB". @@ -256,12 +255,12 @@ def resume(self,identity,params=None, headers=None): def cancel(self,identity,params=None, headers=None): """Cancel a subscription. - Immediately cancels a subscription; no more payments will be created - under it. Any metadata supplied to this endpoint will be stored on the - payment cancellation event it causes. - - This will fail with a cancellation_failed error if the subscription is - already cancelled or finished. + Immediately cancels a subscription; no more payments will be created + under it. Any metadata supplied to this endpoint will be stored on the + payment cancellation event it causes. + + This will fail with a cancellation_failed error if the subscription is + already cancelled or finished. 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 16df7929..20b7842c 100644 --- a/gocardless_pro/services/tax_rates_service.py +++ b/gocardless_pro/services/tax_rates_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of all + tax rates. Args: params (dict, optional): Query string parameters. @@ -47,7 +47,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single tax rate. - Retrieves the details of a tax rate. + Retrieves the details of a tax rate. Args: identity (string): The unique identifier created by the jurisdiction, tax type and version diff --git a/gocardless_pro/services/transferred_mandates_service.py b/gocardless_pro/services/transferred_mandates_service.py index 7e35cf33..0584df7a 100644 --- a/gocardless_pro/services/transferred_mandates_service.py +++ b/gocardless_pro/services/transferred_mandates_service.py @@ -20,8 +20,8 @@ class TransferredMandatesService(base_service.BaseService): def transferred_mandates(self,identity,params=None, headers=None): """Get updated customer bank details. - Returns new customer bank details for a mandate that's been recently - transferred + Returns new customer bank details for a mandate that's been recently + transferred Args: identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. diff --git a/gocardless_pro/services/verification_details_service.py b/gocardless_pro/services/verification_details_service.py index 502ec61b..4ea95e7e 100644 --- a/gocardless_pro/services/verification_details_service.py +++ b/gocardless_pro/services/verification_details_service.py @@ -20,7 +20,7 @@ class VerificationDetailsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a verification detail. - Creates a new verification detail + Creates a new verification detail Args: params (dict, optional): Request body. @@ -41,7 +41,7 @@ def create(self,params=None, headers=None): def list(self,params=None, headers=None): """List verification details. - Returns a list of verification details belonging to a creditor. + Returns a list of verification details belonging to a creditor. Args: params (dict, optional): Query string parameters. diff --git a/gocardless_pro/services/webhooks_service.py b/gocardless_pro/services/webhooks_service.py index 771c2735..9a12982a 100644 --- a/gocardless_pro/services/webhooks_service.py +++ b/gocardless_pro/services/webhooks_service.py @@ -20,8 +20,8 @@ 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](#api-usage-cursor-pagination) list of your + webhooks. Args: params (dict, optional): Query string parameters. @@ -47,7 +47,7 @@ def all(self,params=None): def get(self,identity,params=None, headers=None): """Get a single webhook. - Retrieves the details of an existing webhook. + Retrieves the details of an existing webhook. Args: identity (string): Unique identifier, beginning with "WB". @@ -70,7 +70,7 @@ def get(self,identity,params=None, headers=None): def retry(self,identity,params=None, headers=None): """Retry a webhook. - Requests for a previous webhook to be sent again + Requests for a previous webhook to be sent again Args: identity (string): Unique identifier, beginning with "WB". From 61a4b000cac6c268a1ff772192a84580abe7e79b Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 14:58:42 +0000 Subject: [PATCH 12/12] Changes generated by 90089b2a9317aea916d0d9b4819917ba9e599e29 This commit was automatically created from gocardless/client-library-templates@90089b2a9317aea916d0d9b4819917ba9e599e29 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/22491179361 --- gocardless_pro/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gocardless_pro/client.py b/gocardless_pro/client.py index 09301e45..b37e1788 100644 --- a/gocardless_pro/client.py +++ b/gocardless_pro/client.py @@ -13,7 +13,7 @@ class Client(object): use the resource methods to access the API. Args: - access_token (str): Find or generate this in your GoCardless Pro dashboard + access_token (str): Find or generate this in your GoCardless dashboard (https://manage.gocardless.com/organisation/access-tokens). environment (str): Either 'sandbox' or 'live'. base_url (str): Manually set a base URL. Most people should use