.. |pypi-badge| image:: https://badge.fury.io/py/gocardless_pro.svg
:target: https://pypi.python.org/pypi/gocardless_pro
GoCardless Pro Python client library
============================================
A Python client for interacting with the GoCardless Pro API.
|pypi-badge|
Tested against Python 3.8, 3.9, 3.10 and 3.11.
- `"Getting Started" guide <https://developer.gocardless.com/getting-started/api/introduction/?lang=python>`_ with copy and paste Python code samples
- `API reference`_
------------
Install from PyPI:
.. code:: bash
$ pip install gocardless_pro
Usage
-----
Create a ``Client`` instance, providing your access token and the environment
you want to use:
.. code:: python
import gocardless_pro
token = os.environ['ACCESS_TOKEN']
client = gocardless_pro.Client(access_token=token, environment='live')
Access API endpoints using the corresponding methods on the client object:
.. code:: python
# Create a new customer. We automatically add idempotency keys to requests to create
# resources, stopping duplicates accidentally getting created if something goes wrong
# with the API (e.g. networking problems) - see https://developer.gocardless.com/api
# -reference/#making-requests-idempotency-keys for details
customer = client.customers.create(params={'email': 'jane@example.com'})
# Fetch a payment by its ID
payment = client.payments.get("PA123")
# Loop through a page of payments, printing each payment's amount
for payment in client.payments.list().records:
decimal_amount = decimal.Decimal(payment.amount) / 100
print('Payment for £{0}'.format(decimal_amount))
# Create a mandate PDF in a specific language
client.mandate_pdfs.create(
params={'links': {'mandate': 'MD00001234XYZ'}},
headers={'Accept-Language': 'fr'}
)
Rate limit response headers can be read:
.. code:: python
# Note these properties will be None until you make an API request with the client
client.rate_limit.limit
client.rate_limit.remaining
client.rate_limit.reset
For full documentation, see our `API reference`_.
.. _API reference: https://developer.gocardless.com/api-reference
Available resources
```````````````````
Bank authorisations
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a Bank Authorisation
client.bank_authorisations.create(params={...})
# Get a Bank Authorisation
client.bank_authorisations.get('BAU123', params={...})
Bank details lookups
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Perform a bank details lookup
client.bank_details_lookups.create(params={...})
Billing requests
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a Billing Request
client.billing_requests.create(params={...})
# Collect customer details
client.billing_requests.collect_customer_details('BRQ123', params={...})
# Collect bank account details
client.billing_requests.collect_bank_account('BRQ123', params={...})
# Confirm the payer details
client.billing_requests.confirm_payer_details('BRQ123', params={...})
# Fulfil a Billing Request
client.billing_requests.fulfil('BRQ123', params={...})
# Cancel a Billing Request
client.billing_requests.cancel('BRQ123', params={...})
# List Billing Requests
client.billing_requests.list(params={...})
# Iterate through all billing_requests
client.billing_requests.all(params={...})
# Get a single Billing Request
client.billing_requests.get('BRQ123', params={...})
# Notify the customer
client.billing_requests.notify('BRQ123', params={...})
# Trigger fallback
client.billing_requests.fallback('BRQ123', params={...})
# Change currency
client.billing_requests.choose_currency('BRQ123', params={...})
# Select institution for a Billing Request
client.billing_requests.select_institution('BRQ123', params={...})
Billing request flows
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a Billing Request Flow
client.billing_request_flows.create(params={...})
# Initialise a Billing Request Flow
client.billing_request_flows.initialise('BRF123', params={...})
Billing request templates
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# List Billing Request Templates
client.billing_request_templates.list(params={...})
# Iterate through all billing_request_templates
client.billing_request_templates.all(params={...})
# Get a single Billing Request Template
client.billing_request_templates.get('BRT123', params={...})
# Create a Billing Request Template
client.billing_request_templates.create(params={...})
# Update a Billing Request Template
client.billing_request_templates.update('BRQ123', params={...})
Blocks
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a block
client.blocks.create(params={...})
# Get a single block
client.blocks.get('BLC123', params={...})
# List multiple blocks
client.blocks.list(params={...})
# Iterate through all blocks
client.blocks.all(params={...})
# Disable a block
client.blocks.disable('BLC123', params={...})
# Enable a block
client.blocks.enable('BLC123', params={...})
# Create blocks by reference
client.blocks.block_by_ref(params={...})
Creditors
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a creditor
client.creditors.create(params={...})
# List creditors
client.creditors.list(params={...})
# Iterate through all creditors
client.creditors.all(params={...})
# Get a single creditor
client.creditors.get('CR123', params={...})
# Update a creditor
client.creditors.update('CR123', params={...})
Creditor bank accounts
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a creditor bank account
client.creditor_bank_accounts.create(params={...})
# List creditor bank accounts
client.creditor_bank_accounts.list(params={...})
# Iterate through all creditor_bank_accounts
client.creditor_bank_accounts.all(params={...})
# Get a single creditor bank account
client.creditor_bank_accounts.get('BA123', params={...})
# Disable a creditor bank account
client.creditor_bank_accounts.disable('BA123', params={...})
Currency exchange rates
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# List exchange rates
client.currency_exchange_rates.list(params={...})
# Iterate through all currency_exchange_rates
client.currency_exchange_rates.all(params={...})
Customers
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a customer
client.customers.create(params={...})
# List customers
client.customers.list(params={...})
# Iterate through all customers
client.customers.all(params={...})
# Get a single customer
client.customers.get('CU123', params={...})
# Update a customer
client.customers.update('CU123', params={...})
# Remove a customer
client.customers.remove('CU123', params={...})
Customer bank accounts
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a customer bank account
client.customer_bank_accounts.create(params={...})
# List customer bank accounts
client.customer_bank_accounts.list(params={...})
# Iterate through all customer_bank_accounts
client.customer_bank_accounts.all(params={...})
# Get a single customer bank account
client.customer_bank_accounts.get('BA123', params={...})
# Update a customer bank account
client.customer_bank_accounts.update('BA123', params={...})
# Disable a customer bank account
client.customer_bank_accounts.disable('BA123', params={...})
Customer notifications
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Handle a notification
client.customer_notifications.handle('PCN123', params={...})
Events
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# List events
client.events.list(params={...})
# Iterate through all events
client.events.all(params={...})
# Get a single event
client.events.get('EV123', params={...})
Instalment schedules
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create (with dates)
client.instalment_schedules.create_with_dates(params={...})
# Create (with schedule)
client.instalment_schedules.create_with_schedule(params={...})
# List instalment schedules
client.instalment_schedules.list(params={...})
# Iterate through all instalment_schedules
client.instalment_schedules.all(params={...})
# Get a single instalment schedule
client.instalment_schedules.get('IS123', params={...})
# Update an instalment schedule
client.instalment_schedules.update('IS123', params={...})
# Cancel an instalment schedule
client.instalment_schedules.cancel('IS123', params={...})
Institutions
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# List Institutions
client.institutions.list(params={...})
# Iterate through all institutions
client.institutions.all(params={...})
# List institutions for Billing Request
client.institutions.list_for_billing_request('BRQ123', params={...})
Mandates
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a mandate
client.mandates.create(params={...})
# List mandates
client.mandates.list(params={...})
# Iterate through all mandates
client.mandates.all(params={...})
# Get a single mandate
client.mandates.get('MD123', params={...})
# Update a mandate
client.mandates.update('MD123', params={...})
# Cancel a mandate
client.mandates.cancel('MD123', params={...})
# Reinstate a mandate
client.mandates.reinstate('MD123', params={...})
Mandate imports
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a new mandate import
client.mandate_imports.create(params={...})
# Get a mandate import
client.mandate_imports.get('IM000010790WX1', params={...})
# Submit a mandate import
client.mandate_imports.submit('IM000010790WX1', params={...})
# Cancel a mandate import
client.mandate_imports.cancel('IM000010790WX1', params={...})
Mandate import entries
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Add a mandate import entry
client.mandate_import_entries.create(params={...})
# List all mandate import entries
client.mandate_import_entries.list(params={...})
# Iterate through all mandate_import_entries
client.mandate_import_entries.all(params={...})
Mandate pdfs
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a mandate PDF
client.mandate_pdfs.create(params={...})
Negative balance limits
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# List negative balance limits
client.negative_balance_limits.list(params={...})
# Iterate through all negative_balance_limits
client.negative_balance_limits.all(params={...})
# Create a negative balance limit
client.negative_balance_limits.create(params={...})
Payer authorisations
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Get a single Payer Authorisation
client.payer_authorisations.get('PA123', params={...})
# Create a Payer Authorisation
client.payer_authorisations.create(params={...})
# Update a Payer Authorisation
client.payer_authorisations.update('PA123', params={...})
# Submit a Payer Authorisation
client.payer_authorisations.submit('PA123', params={...})
# Confirm a Payer Authorisation
client.payer_authorisations.confirm('PA123', params={...})
Payments
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a payment
client.payments.create(params={...})
# List payments
client.payments.list(params={...})
# Iterate through all payments
client.payments.all(params={...})
# Get a single payment
client.payments.get('PM123', params={...})
# Update a payment
client.payments.update('PM123', params={...})
# Cancel a payment
client.payments.cancel('PM123', params={...})
# Retry a payment
client.payments.retry('PM123', params={...})
Payouts
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# List payouts
client.payouts.list(params={...})
# Iterate through all payouts
client.payouts.all(params={...})
# Get a single payout
client.payouts.get('PO123', params={...})
# Update a payout
client.payouts.update('PO123', params={...})
Payout items
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Get all payout items in a single payout
client.payout_items.list(params={...})
# Iterate through all payout_items
client.payout_items.all(params={...})
Redirect flows
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a redirect flow
client.redirect_flows.create(params={...})
# Get a single redirect flow
client.redirect_flows.get('RE123456', params={...})
# Complete a redirect flow
client.redirect_flows.complete('RE123456', params={...})
Refunds
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a refund
client.refunds.create(params={...})
# List refunds
client.refunds.list(params={...})
# Iterate through all refunds
client.refunds.all(params={...})
# Get a single refund
client.refunds.get('RF123', params={...})
# Update a refund
client.refunds.update('RF123', params={...})
Scenario simulators
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Simulate a scenario
client.scenario_simulators.run('payment_failed', params={...})
Schemeentifiers
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a scheme identifier
client.scheme_identifiers.create(params={...})
# List scheme identifiers
client.scheme_identifiers.list(params={...})
# Iterate through all scheme_identifiers
client.scheme_identifiers.all(params={...})
# Get a single scheme identifier
client.scheme_identifiers.get('SU123', params={...})
Subscriptions
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a subscription
client.subscriptions.create(params={...})
# List subscriptions
client.subscriptions.list(params={...})
# Iterate through all subscriptions
client.subscriptions.all(params={...})
# Get a single subscription
client.subscriptions.get('SB123', params={...})
# Update a subscription
client.subscriptions.update('SB123', params={...})
# Pause a subscription
client.subscriptions.pause('SB123', params={...})
# Resume a subscription
client.subscriptions.resume('SB123', params={...})
# Cancel a subscription
client.subscriptions.cancel('SB123', params={...})
Tax rates
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# List tax rates
client.tax_rates.list(params={...})
# Iterate through all tax_rates
client.tax_rates.all(params={...})
# Get a single tax rate
client.tax_rates.get('GB_VAT_1', params={...})
Verification details
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# Create a verification detail
client.verification_details.create(params={...})
# List verification details
client.verification_details.list(params={...})
# Iterate through all verification_details
client.verification_details.all(params={...})
Webhooks
''''''''''''''''''''''''''''''''''''''''''
.. code:: python
# List webhooks
client.webhooks.list(params={...})
# Iterate through all webhooks
client.webhooks.all(params={...})
# Get a single webhook
client.webhooks.get('WB123', params={...})
# Retry a webhook
client.webhooks.retry('WB123', params={...})
Running tests
-------------
First, install the development dependencies:
.. code:: bash
$ pip install -r requirements-dev.txt
To run the test suite against the current Python version, run ``pytest``.
To run the test suite against multiple Python versions, run ``tox``.
If you don't have all versions of Python installed, you can run the tests in
a Docker container by running ``make``.
Raw data
{
"_id": null,
"home_page": "https://github.com/gocardless/gocardless-pro-python",
"name": "gocardless-pro",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "gocardless directdebit payments sepa bacs",
"author": "GoCardless",
"author_email": "engineering@gocardless.com",
"download_url": "https://files.pythonhosted.org/packages/34/dc/5e04289aa6270d0d1060b46cd17466fb5ec4e93fec8a55ad75dcdbfbcd5c/gocardless_pro-1.48.0.tar.gz",
"platform": null,
"description": ".. |pypi-badge| image:: https://badge.fury.io/py/gocardless_pro.svg\n :target: https://pypi.python.org/pypi/gocardless_pro\n\nGoCardless Pro Python client library\n============================================\n\nA Python client for interacting with the GoCardless Pro API.\n\n|pypi-badge|\n\nTested against Python 3.8, 3.9, 3.10 and 3.11.\n\n- `\"Getting Started\" guide <https://developer.gocardless.com/getting-started/api/introduction/?lang=python>`_ with copy and paste Python code samples\n- `API reference`_\n\n------------\n\nInstall from PyPI:\n\n.. code:: bash\n\n $ pip install gocardless_pro\n\n\nUsage\n-----\n\nCreate a ``Client`` instance, providing your access token and the environment\nyou want to use:\n\n.. code:: python\n\n import gocardless_pro\n token = os.environ['ACCESS_TOKEN']\n client = gocardless_pro.Client(access_token=token, environment='live')\n\nAccess API endpoints using the corresponding methods on the client object:\n\n.. code:: python\n\n # Create a new customer. We automatically add idempotency keys to requests to create\n # resources, stopping duplicates accidentally getting created if something goes wrong\n # with the API (e.g. networking problems) - see https://developer.gocardless.com/api\n # -reference/#making-requests-idempotency-keys for details\n customer = client.customers.create(params={'email': 'jane@example.com'})\n\n # Fetch a payment by its ID\n payment = client.payments.get(\"PA123\")\n\n # Loop through a page of payments, printing each payment's amount\n for payment in client.payments.list().records:\n decimal_amount = decimal.Decimal(payment.amount) / 100\n print('Payment for \u00a3{0}'.format(decimal_amount))\n\n # Create a mandate PDF in a specific language\n client.mandate_pdfs.create(\n params={'links': {'mandate': 'MD00001234XYZ'}},\n headers={'Accept-Language': 'fr'}\n )\n\nRate limit response headers can be read:\n\n.. code:: python\n\n # Note these properties will be None until you make an API request with the client\n client.rate_limit.limit\n client.rate_limit.remaining\n client.rate_limit.reset\n\n\nFor full documentation, see our `API reference`_.\n\n.. _API reference: https://developer.gocardless.com/api-reference\n\n\nAvailable resources\n```````````````````\n\nBank authorisations\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a Bank Authorisation\n client.bank_authorisations.create(params={...})\n\n # Get a Bank Authorisation\n client.bank_authorisations.get('BAU123', params={...})\n\nBank details lookups\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Perform a bank details lookup\n client.bank_details_lookups.create(params={...})\n\nBilling requests\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a Billing Request\n client.billing_requests.create(params={...})\n\n # Collect customer details\n client.billing_requests.collect_customer_details('BRQ123', params={...})\n\n # Collect bank account details\n client.billing_requests.collect_bank_account('BRQ123', params={...})\n\n # Confirm the payer details\n client.billing_requests.confirm_payer_details('BRQ123', params={...})\n\n # Fulfil a Billing Request\n client.billing_requests.fulfil('BRQ123', params={...})\n\n # Cancel a Billing Request\n client.billing_requests.cancel('BRQ123', params={...})\n\n # List Billing Requests\n client.billing_requests.list(params={...})\n\n # Iterate through all billing_requests\n client.billing_requests.all(params={...})\n\n # Get a single Billing Request\n client.billing_requests.get('BRQ123', params={...})\n\n # Notify the customer\n client.billing_requests.notify('BRQ123', params={...})\n\n # Trigger fallback\n client.billing_requests.fallback('BRQ123', params={...})\n\n # Change currency\n client.billing_requests.choose_currency('BRQ123', params={...})\n\n # Select institution for a Billing Request\n client.billing_requests.select_institution('BRQ123', params={...})\n\nBilling request flows\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a Billing Request Flow\n client.billing_request_flows.create(params={...})\n\n # Initialise a Billing Request Flow\n client.billing_request_flows.initialise('BRF123', params={...})\n\nBilling request templates\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # List Billing Request Templates\n client.billing_request_templates.list(params={...})\n\n # Iterate through all billing_request_templates\n client.billing_request_templates.all(params={...})\n\n # Get a single Billing Request Template\n client.billing_request_templates.get('BRT123', params={...})\n\n # Create a Billing Request Template\n client.billing_request_templates.create(params={...})\n\n # Update a Billing Request Template\n client.billing_request_templates.update('BRQ123', params={...})\n\nBlocks\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a block\n client.blocks.create(params={...})\n\n # Get a single block\n client.blocks.get('BLC123', params={...})\n\n # List multiple blocks\n client.blocks.list(params={...})\n\n # Iterate through all blocks\n client.blocks.all(params={...})\n\n # Disable a block\n client.blocks.disable('BLC123', params={...})\n\n # Enable a block\n client.blocks.enable('BLC123', params={...})\n\n # Create blocks by reference\n client.blocks.block_by_ref(params={...})\n\nCreditors\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a creditor\n client.creditors.create(params={...})\n\n # List creditors\n client.creditors.list(params={...})\n\n # Iterate through all creditors\n client.creditors.all(params={...})\n\n # Get a single creditor\n client.creditors.get('CR123', params={...})\n\n # Update a creditor\n client.creditors.update('CR123', params={...})\n\nCreditor bank accounts\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a creditor bank account\n client.creditor_bank_accounts.create(params={...})\n\n # List creditor bank accounts\n client.creditor_bank_accounts.list(params={...})\n\n # Iterate through all creditor_bank_accounts\n client.creditor_bank_accounts.all(params={...})\n\n # Get a single creditor bank account\n client.creditor_bank_accounts.get('BA123', params={...})\n\n # Disable a creditor bank account\n client.creditor_bank_accounts.disable('BA123', params={...})\n\nCurrency exchange rates\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # List exchange rates\n client.currency_exchange_rates.list(params={...})\n\n # Iterate through all currency_exchange_rates\n client.currency_exchange_rates.all(params={...})\n\nCustomers\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a customer\n client.customers.create(params={...})\n\n # List customers\n client.customers.list(params={...})\n\n # Iterate through all customers\n client.customers.all(params={...})\n\n # Get a single customer\n client.customers.get('CU123', params={...})\n\n # Update a customer\n client.customers.update('CU123', params={...})\n\n # Remove a customer\n client.customers.remove('CU123', params={...})\n\nCustomer bank accounts\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a customer bank account\n client.customer_bank_accounts.create(params={...})\n\n # List customer bank accounts\n client.customer_bank_accounts.list(params={...})\n\n # Iterate through all customer_bank_accounts\n client.customer_bank_accounts.all(params={...})\n\n # Get a single customer bank account\n client.customer_bank_accounts.get('BA123', params={...})\n\n # Update a customer bank account\n client.customer_bank_accounts.update('BA123', params={...})\n\n # Disable a customer bank account\n client.customer_bank_accounts.disable('BA123', params={...})\n\nCustomer notifications\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Handle a notification\n client.customer_notifications.handle('PCN123', params={...})\n\nEvents\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # List events\n client.events.list(params={...})\n\n # Iterate through all events\n client.events.all(params={...})\n\n # Get a single event\n client.events.get('EV123', params={...})\n\nInstalment schedules\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create (with dates)\n client.instalment_schedules.create_with_dates(params={...})\n\n # Create (with schedule)\n client.instalment_schedules.create_with_schedule(params={...})\n\n # List instalment schedules\n client.instalment_schedules.list(params={...})\n\n # Iterate through all instalment_schedules\n client.instalment_schedules.all(params={...})\n\n # Get a single instalment schedule\n client.instalment_schedules.get('IS123', params={...})\n\n # Update an instalment schedule\n client.instalment_schedules.update('IS123', params={...})\n\n # Cancel an instalment schedule\n client.instalment_schedules.cancel('IS123', params={...})\n\nInstitutions\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # List Institutions\n client.institutions.list(params={...})\n\n # Iterate through all institutions\n client.institutions.all(params={...})\n\n # List institutions for Billing Request\n client.institutions.list_for_billing_request('BRQ123', params={...})\n\nMandates\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a mandate\n client.mandates.create(params={...})\n\n # List mandates\n client.mandates.list(params={...})\n\n # Iterate through all mandates\n client.mandates.all(params={...})\n\n # Get a single mandate\n client.mandates.get('MD123', params={...})\n\n # Update a mandate\n client.mandates.update('MD123', params={...})\n\n # Cancel a mandate\n client.mandates.cancel('MD123', params={...})\n\n # Reinstate a mandate\n client.mandates.reinstate('MD123', params={...})\n\nMandate imports\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a new mandate import\n client.mandate_imports.create(params={...})\n\n # Get a mandate import\n client.mandate_imports.get('IM000010790WX1', params={...})\n\n # Submit a mandate import\n client.mandate_imports.submit('IM000010790WX1', params={...})\n\n # Cancel a mandate import\n client.mandate_imports.cancel('IM000010790WX1', params={...})\n\nMandate import entries\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Add a mandate import entry\n client.mandate_import_entries.create(params={...})\n\n # List all mandate import entries\n client.mandate_import_entries.list(params={...})\n\n # Iterate through all mandate_import_entries\n client.mandate_import_entries.all(params={...})\n\nMandate pdfs\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a mandate PDF\n client.mandate_pdfs.create(params={...})\n\nNegative balance limits\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # List negative balance limits\n client.negative_balance_limits.list(params={...})\n\n # Iterate through all negative_balance_limits\n client.negative_balance_limits.all(params={...})\n\n # Create a negative balance limit\n client.negative_balance_limits.create(params={...})\n\nPayer authorisations\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Get a single Payer Authorisation\n client.payer_authorisations.get('PA123', params={...})\n\n # Create a Payer Authorisation\n client.payer_authorisations.create(params={...})\n\n # Update a Payer Authorisation\n client.payer_authorisations.update('PA123', params={...})\n\n # Submit a Payer Authorisation\n client.payer_authorisations.submit('PA123', params={...})\n\n # Confirm a Payer Authorisation\n client.payer_authorisations.confirm('PA123', params={...})\n\nPayments\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a payment\n client.payments.create(params={...})\n\n # List payments\n client.payments.list(params={...})\n\n # Iterate through all payments\n client.payments.all(params={...})\n\n # Get a single payment\n client.payments.get('PM123', params={...})\n\n # Update a payment\n client.payments.update('PM123', params={...})\n\n # Cancel a payment\n client.payments.cancel('PM123', params={...})\n\n # Retry a payment\n client.payments.retry('PM123', params={...})\n\nPayouts\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # List payouts\n client.payouts.list(params={...})\n\n # Iterate through all payouts\n client.payouts.all(params={...})\n\n # Get a single payout\n client.payouts.get('PO123', params={...})\n\n # Update a payout\n client.payouts.update('PO123', params={...})\n\nPayout items\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Get all payout items in a single payout\n client.payout_items.list(params={...})\n\n # Iterate through all payout_items\n client.payout_items.all(params={...})\n\nRedirect flows\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a redirect flow\n client.redirect_flows.create(params={...})\n\n # Get a single redirect flow\n client.redirect_flows.get('RE123456', params={...})\n\n # Complete a redirect flow\n client.redirect_flows.complete('RE123456', params={...})\n\nRefunds\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a refund\n client.refunds.create(params={...})\n\n # List refunds\n client.refunds.list(params={...})\n\n # Iterate through all refunds\n client.refunds.all(params={...})\n\n # Get a single refund\n client.refunds.get('RF123', params={...})\n\n # Update a refund\n client.refunds.update('RF123', params={...})\n\nScenario simulators\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Simulate a scenario\n client.scenario_simulators.run('payment_failed', params={...})\n\nSchemeentifiers\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a scheme identifier\n client.scheme_identifiers.create(params={...})\n\n # List scheme identifiers\n client.scheme_identifiers.list(params={...})\n\n # Iterate through all scheme_identifiers\n client.scheme_identifiers.all(params={...})\n\n # Get a single scheme identifier\n client.scheme_identifiers.get('SU123', params={...})\n\nSubscriptions\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a subscription\n client.subscriptions.create(params={...})\n\n # List subscriptions\n client.subscriptions.list(params={...})\n\n # Iterate through all subscriptions\n client.subscriptions.all(params={...})\n\n # Get a single subscription\n client.subscriptions.get('SB123', params={...})\n\n # Update a subscription\n client.subscriptions.update('SB123', params={...})\n\n # Pause a subscription\n client.subscriptions.pause('SB123', params={...})\n\n # Resume a subscription\n client.subscriptions.resume('SB123', params={...})\n\n # Cancel a subscription\n client.subscriptions.cancel('SB123', params={...})\n\nTax rates\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # List tax rates\n client.tax_rates.list(params={...})\n\n # Iterate through all tax_rates\n client.tax_rates.all(params={...})\n\n # Get a single tax rate\n client.tax_rates.get('GB_VAT_1', params={...})\n\nVerification details\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # Create a verification detail\n client.verification_details.create(params={...})\n\n # List verification details\n client.verification_details.list(params={...})\n\n # Iterate through all verification_details\n client.verification_details.all(params={...})\n\nWebhooks\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n # List webhooks\n client.webhooks.list(params={...})\n\n # Iterate through all webhooks\n client.webhooks.all(params={...})\n\n # Get a single webhook\n client.webhooks.get('WB123', params={...})\n\n # Retry a webhook\n client.webhooks.retry('WB123', params={...})\n\n\n\nRunning tests\n-------------\n\nFirst, install the development dependencies:\n\n.. code:: bash\n\n $ pip install -r requirements-dev.txt\n\nTo run the test suite against the current Python version, run ``pytest``.\n\nTo run the test suite against multiple Python versions, run ``tox``.\n\nIf you don't have all versions of Python installed, you can run the tests in\na Docker container by running ``make``.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A client library for the GoCardless Pro API.",
"version": "1.48.0",
"project_urls": {
"Homepage": "https://github.com/gocardless/gocardless-pro-python"
},
"split_keywords": [
"gocardless",
"directdebit",
"payments",
"sepa",
"bacs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "12f7ff9e35d17abc7fbe5e25b0070aceb3201aba3224fc2a4ded5cf87ec8793f",
"md5": "48abe3458f78494875be25af29816484",
"sha256": "75a577c9b60e41e9ee45f5f999ae56444ffe66a2d9cb44dd096a9f09c0692e20"
},
"downloads": -1,
"filename": "gocardless_pro-1.48.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "48abe3458f78494875be25af29816484",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 123921,
"upload_time": "2023-10-26T12:52:01",
"upload_time_iso_8601": "2023-10-26T12:52:01.308599Z",
"url": "https://files.pythonhosted.org/packages/12/f7/ff9e35d17abc7fbe5e25b0070aceb3201aba3224fc2a4ded5cf87ec8793f/gocardless_pro-1.48.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "34dc5e04289aa6270d0d1060b46cd17466fb5ec4e93fec8a55ad75dcdbfbcd5c",
"md5": "3667b6a8d22673543da7fea0b8dfaf9a",
"sha256": "c830997ffc72c69c830c8a4b25cc1a236b73fe69517ca1abd74eabe8730d9b92"
},
"downloads": -1,
"filename": "gocardless_pro-1.48.0.tar.gz",
"has_sig": false,
"md5_digest": "3667b6a8d22673543da7fea0b8dfaf9a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 52321,
"upload_time": "2023-10-26T12:52:04",
"upload_time_iso_8601": "2023-10-26T12:52:04.059474Z",
"url": "https://files.pythonhosted.org/packages/34/dc/5e04289aa6270d0d1060b46cd17466fb5ec4e93fec8a55ad75dcdbfbcd5c/gocardless_pro-1.48.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-26 12:52:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gocardless",
"github_project": "gocardless-pro-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "gocardless-pro"
}