woob.capabilities.bank.transfer

exception woob.capabilities.bank.transfer.AddRecipientBankError(description=None, message=None)

Bases: woob.capabilities.bank.transfer.AddRecipientError

The new recipient was rejected by the bank with a message.

Parameters

message – error message from the bank, if any

code = 'bankMessage'
exception woob.capabilities.bank.transfer.AddRecipientError(description=None, message=None)

Bases: woob.capabilities.base.UserError

Failed trying to add a recipient.

Parameters

message – error message from the bank, if any

code = 'AddRecipientError'
exception woob.capabilities.bank.transfer.AddRecipientStep(recipient, *values)

Bases: woob.exceptions.BrowserQuestion

exception woob.capabilities.bank.transfer.AddRecipientTimeout(description=None, message=None)

Bases: woob.capabilities.bank.transfer.AddRecipientError

Add new recipient request has timeout

Parameters

message – error message from the bank, if any

code = 'timeout'
class woob.capabilities.bank.transfer.BeneficiaryType

Bases: object

IBAN = 'iban'
PHONE_NUMBER = 'phone_number'
RECIPIENT = 'recipient'
class woob.capabilities.bank.transfer.CapBankTransfer

Bases: woob.capabilities.bank.base.CapBank, woob.capabilities.bank.transfer.CapTransfer

account_to_emitter(account)
class woob.capabilities.bank.transfer.CapBankTransferAddRecipient

Bases: woob.capabilities.bank.transfer.CapBankTransfer

add_recipient(recipient, **params)

Add a recipient to the connection.

Parameters
  • iban (str) – iban of the new recipient.

  • label (:class`str`) – label of the new recipient.

Raises

BrowserQuestion

Raises

AddRecipientError

Return type

Recipient

new_recipient(recipient, **params)
class woob.capabilities.bank.transfer.CapTransfer

Bases: woob.capabilities.base.Capability

accepted_beneficiary_types = ('recipient',)
accepted_execution_date_types = ('first_open_day', 'deferred')
can_do_transfer_to_untrusted_beneficiary = False

The module can do transfer to untrusted beneficiary, for example: when module can’t add new beneficiary without doing a transfer like n26 or when module can do transfer to a beneficiary not listed in iter_transfer_recipients like for PSD2 modules

can_do_transfer_without_emitter = False

The module can do transfer without giving the emitter, for example: when there is only, and will be only, one account like wallet or when the module can initiate transfer without emitter and the emitter is chosen afterwards like for PSD2 modules

confirm_transfer(transfer, **params)

Transfer confirmation after multiple SCA from the Emitter. This method is only used for PSD2 purpose. Return the transfer with the new status.

:param Transfer :rtype: Transfer :raises: TransferError

execute_transfer(transfer, **params)

Execute a transfer.

:param Transfer :rtype: Transfer :raises: TransferError

get_transfer(id)

Get a transfer from its id.

Parameters

id (str) – ID of the Transfer

Return type

Transfer

init_transfer(transfer, **params)

Initiate a transfer.

:param Transfer :rtype: Transfer :raises: TransferError

iter_emitters()

Iter transfer emitter accounts.

Return type

iter[Emitter]

iter_transfer_recipients(account)

Iter recipients availables for a transfer from a specific account.

Parameters

account (Account) – account which initiate the transfer

Return type

iter[Recipient]

Raises

AccountNotFound

iter_transfers(account=None)

Iter transfer transactions.

Parameters

account (Account) – account to get transfer history (or None for all accounts)

Return type

iter[Transfer]

Raises

AccountNotFound

transfer(transfer, **params)

Do a transfer from an account to a recipient.

:param Transfer :rtype: Transfer :raises: TransferError

transfer_check_label(old, new)
class woob.capabilities.bank.transfer.Emitter(id='0', url=None)

Bases: woob.capabilities.bank.base.BaseAccount

Transfer emitter account.

Variables
  • number_type – (str) Account number type (default: unknown)

  • number – (str) Account number value

  • balance – (Decimal) Balance of emitter account

class woob.capabilities.bank.transfer.EmitterNumberType(*args, **kwargs)

Bases: woob.capabilities.base.Enum

BBAN = 'bban'
IBAN = 'iban'
UNKNOWN = 'unknown'
class woob.capabilities.bank.transfer.Recipient(id='0', url=None)

Bases: woob.capabilities.bank.base.BaseAccount

Recipient of a transfer.

Variables
  • enabled_at – (date, datetime) Date of availability

  • category – (str) Recipient category

  • iban – (str) International Bank Account Number

  • origin_account_id – (str) Account id which recipient belong to

  • origin_account_iban – (str) Account iban which recipient belong to

exception woob.capabilities.bank.transfer.RecipientInvalidIban(description=None, message=None)

Bases: woob.capabilities.bank.transfer.AddRecipientError

Parameters

message – error message from the bank, if any

code = 'invalidIban'
exception woob.capabilities.bank.transfer.RecipientInvalidLabel(description=None, message=None)

Bases: woob.capabilities.bank.transfer.AddRecipientError

Parameters

message – error message from the bank, if any

code = 'invalidLabel'
exception woob.capabilities.bank.transfer.RecipientInvalidOTP(description=None, message=None)

Bases: woob.capabilities.bank.transfer.AddRecipientError

Parameters

message – error message from the bank, if any

code = 'invalidOTP'
exception woob.capabilities.bank.transfer.RecipientNotFound(msg='Recipient not found')

Bases: woob.capabilities.bank.base.ObjectNotFound

Raised when a recipient is not found.

class woob.capabilities.bank.transfer.Transfer(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject, woob.capabilities.base.Currency

Transfer from an account to a recipient.

Variables
  • amount – (Decimal) Amount to transfer

  • currency – (str) Currency (default: None)

  • fees – (Decimal) Fees (default: None)

  • exec_date – (date, datetime) Date of transfer

  • label – (str) Reason

  • account_id – (str) ID of origin account

  • account_iban – (str) International Bank Account Number

  • account_label – (str) Label of origin account

  • account_balance – (Decimal) Balance of origin account before transfer

  • recipient_id – (str) ID of recipient account

  • recipient_iban – (str) International Bank Account Number

  • recipient_label – (str) Label of recipient account

  • beneficiary_type – (str) Transfer creditor number type (default: recipient)

  • beneficiary_number – (str) Transfer creditor number

  • beneficiary_label – (str) Transfer creditor label

  • beneficiary_bic – (str) Transfer creditor BIC

  • date_type – (str) Transfer execution date type

  • frequency – (str) Frequency of periodic transfer

  • first_due_date – (date, datetime) Date of first transfer of periodic transfer

  • last_due_date – (date, datetime) Date of last transfer of periodic transfer

  • creation_date – (date, datetime) Creation date of transfer

  • status – (str) Transfer status

  • cancelled_exception – (TransferError) Transfer cancelled reason

exception woob.capabilities.bank.transfer.TransferBankError(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferError

The transfer was rejected by the bank with a message.

Parameters

message – error message from the bank, if any

code = 'bankMessage'
exception woob.capabilities.bank.transfer.TransferCancelledByUser(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferError

The transfer is cancelled by the emitter or an authorized user

Parameters

message – error message from the bank, if any

code = 'cancelledByUser'
class woob.capabilities.bank.transfer.TransferDateType(*args, **kwargs)

Bases: woob.capabilities.base.Enum

DEFERRED = 'deferred'

Transfer to execute on a chosen date

FIRST_OPEN_DAY = 'first_open_day'

Transfer to execute when possible (accounting opening days)

INSTANT = 'instant'

Transfer to execute immediately (not accounting opening days)

PERIODIC = 'periodic'

Transfer to execute periodically

exception woob.capabilities.bank.transfer.TransferError(description=None, message=None)

Bases: woob.capabilities.base.UserError

A transfer has failed.

Parameters

message – error message from the bank, if any

code = 'transferError'
class woob.capabilities.bank.transfer.TransferFrequency(*args, **kwargs)

Bases: woob.capabilities.base.Enum

BIANNUAL = 'biannual'
BIMONTHLY = 'bimonthly'
MONTHLY = 'monthly'
QUARTERLY = 'quarterly'
UNKNOWN = 'unknown'
WEEKLY = 'weekly'
YEARLY = 'yearly'
exception woob.capabilities.bank.transfer.TransferInsufficientFunds(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferInvalidAmount

Not enough funds on emitter account.

Parameters

message – error message from the bank, if any

code = 'insufficientFunds'
exception woob.capabilities.bank.transfer.TransferInvalidAmount(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferError

This amount is not allowed.

Parameters

message – error message from the bank, if any

code = 'invalidAmount'
exception woob.capabilities.bank.transfer.TransferInvalidCurrency(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferInvalidAmount

The transfer currency is invalid.

Parameters

message – error message from the bank, if any

code = 'invalidCurrency'
exception woob.capabilities.bank.transfer.TransferInvalidDate(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferError

This execution date cannot be used.

Parameters

message – error message from the bank, if any

code = 'invalidDate'
exception woob.capabilities.bank.transfer.TransferInvalidEmitter(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferError

The emitter account cannot be used for transfers.

Parameters

message – error message from the bank, if any

code = 'invalidEmitter'
exception woob.capabilities.bank.transfer.TransferInvalidLabel(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferError

The transfer label is invalid.

Parameters

message – error message from the bank, if any

code = 'invalidLabel'
exception woob.capabilities.bank.transfer.TransferInvalidOTP(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferError

Parameters

message – error message from the bank, if any

code = 'invalidOTP'
exception woob.capabilities.bank.transfer.TransferInvalidRecipient(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferError

The emitter cannot transfer to this recipient.

Parameters

message – error message from the bank, if any

code = 'invalidRecipient'
exception woob.capabilities.bank.transfer.TransferNotFound(msg='Transfer not found')

Bases: woob.capabilities.bank.base.ObjectNotFound

class woob.capabilities.bank.transfer.TransferStatus(*args, **kwargs)

Bases: woob.capabilities.base.Enum

CANCELLED = 'cancelled'

Transfer was cancelled by the bank or by the user

DONE = 'done'

Transfer was executed

INTERMEDIATE = 'intermediate'

Transfer is not validated yet

SCHEDULED = 'scheduled'

Transfer to be executed later

UNKNOWN = 'unknown'
exception woob.capabilities.bank.transfer.TransferStep(transfer, *values)

Bases: woob.exceptions.BrowserQuestion

exception woob.capabilities.bank.transfer.TransferTimeout(description=None, message=None)

Bases: woob.capabilities.bank.transfer.TransferError

The transfer request timed out

Parameters

message – error message from the bank, if any

code = 'timeout'