woob.capabilities.bank.transfer
¶
- exception AddRecipientBankError(description=None, message=None)[source]¶
Bases:
AddRecipientError
The new recipient was rejected by the bank with a message.
- code = 'bankMessage'¶
- exception AddRecipientError(description=None, message=None)[source]¶
Bases:
UserError
Failed trying to add a recipient.
- Parameters:
- code = 'AddRecipientError'¶
- exception AddRecipientStep(recipient, *values)[source]¶
Bases:
BrowserQuestion
- exception AddRecipientTimeout(description=None, message=None)[source]¶
Bases:
AddRecipientError
Add new recipient request has timeout
- code = 'timeout'¶
- class BeneficiaryType(*args, **kwargs)[source]¶
Bases:
Enum
Type of the Transfer.beneficiary_number property.
- IBAN = 'iban'¶
beneficiary number is an IBAN as defined in ISO 13616
- SORT_CODE_ACCOUNT_NUMBER = 'sort_code_account_number'¶
account number is a national UK/Ireland number including sortcode
- PHONE_NUMBER = 'phone_number'¶
beneficiary number is an E.164 encoded phone number
- RECIPIENT = 'recipient'¶
beneficiary number is a beneficiary identifier as returned by the iter_transfer_recipients method.
- class CapBankTransfer[source]¶
Bases:
CapBank
,CapTransfer
- 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
- transfer_with_debtor_account = 'mandatory'¶
- class CapBankTransferAddRecipient[source]¶
Bases:
CapBankTransfer
- class CapTransfer[source]¶
Bases:
Capability
- 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 = True¶
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
- can_do_transfer_cancellation = False¶
- sca_required_for_transfer_cancellation = False¶
The default behavior is that we don’t need to validate a payment cancellation through a SCA. If a SCA is required after sending a transfer cancellation request to validate it, the module should set this to True.
- accepted_beneficiary_types = ('recipient',)¶
- accepted_execution_date_types = ('first_open_day', 'deferred')¶
- accepted_execution_frequencies = {'biannual', 'bimonthly', 'daily', 'four-monthly', 'monthly', 'quarterly', 'semiannually', 'two-monthly', 'two-weekly', 'weekly', 'yearly'}¶
- maximum_number_of_instructions = 1¶
- transfer_with_debtor_account = 'not_used'¶
- partial_transfer_status_tracking = ()¶
-
is_app_to_app_used_for_transfer:
dict
[Platform
,bool
|None
] = {Platform.ANDROID: None, Platform.IOS: None}¶ Is an App2App flow used for the payment if the PSU has the bank’s app installed. None means unknown
-
bank_provides_payer_account:
bool
|None
= None¶ Once the payment is initiated, does the bank return the payer’s account identifier? None means unknown
-
bank_provides_payer_label:
bool
|None
= None¶ Once the payment is initiated, does the bank return the payer’s label? None means unknown
-
transfer_date_types_where_trusted_beneficiary_required:
Iterable
[TransferDateType
] = {}¶ Set of TransferDateType where the beneficiary must be trusted or registered on the payer’s banking service. If iter_transfer_recipients is implemented, such beneficiaries may be found.
- iter_transfer_recipients(account)[source]¶
Iter recipients availables for a transfer from a specific account.
- Parameters:
account (
Account
) – account which initiate the transfer- Return type:
iter[
Recipient
]- Raises:
AccountNotFound
- init_transfer(transfer, **params)[source]¶
Initiate a transfer.
:param
Transfer
:rtype:Transfer
:raises:TransferError
- execute_transfer(transfer, **params)[source]¶
Execute a transfer.
:param
Transfer
:rtype:Transfer
:raises:TransferError
- confirm_transfer(transfer, **params)[source]¶
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
- confirm_transfer_cancellation(transfer, **params)[source]¶
Confirm transfer cancellation after a redirect flow.
:param
Transfer
:rtype:Transfer
:raises:AssertionError
: If the payment is not actually cancelled after the whole process
- optional_confirm_transfer_cancellation(transfer, **params)[source]¶
Proceed with the actual cancellation confirmation.
This method MUST NOT be called by any external caller. Said caller should actually call confirm_transfer_cancellation which may call the current method if it sees fit.
The default implementation does not run an explicit confirmation step, it only fetches the up-to-date transfer.
Modules requiring an explicit cancellation confirmation should overwrite this method, returning the up-to-date transfer at the end.
- Return type:
- transfer(transfer, **params)[source]¶
Do a transfer from an account to a recipient.
:param
Transfer
:rtype:Transfer
:raises:TransferError
- iter_transfers(account=None)[source]¶
Iter transfer transactions.
- Parameters:
account (
Account
) – account to get transfer history (or None for all accounts) (default:None
)- Return type:
iter[
Transfer
]- Raises:
AccountNotFound
- class Emitter(id='0', url=NotLoaded)[source]¶
Bases:
BaseAccount
Transfer emitter account.
- class EmitterNumberType(*args, **kwargs)[source]¶
Bases:
Enum
- UNKNOWN = 'unknown'¶
- IBAN = 'iban'¶
- BBAN = 'bban'¶
- class Recipient(id='0', url=NotLoaded)[source]¶
Bases:
BaseAccount
Recipient of a transfer.
- Variables:
url – (
str
) urllabel – (
str
) Pretty labelcurrency – (
str
) Currency (default: None)bank_name – (
str
) Bank Nameenabled_at – (
date
,datetime
) Date of availabilitycategory – (
str
) Recipient categoryiban – (
str
) International Bank Account Numberorigin_account_id – (
str
) Account id which recipient belong toorigin_account_iban – (
str
) Account iban which recipient belong to
- exception RecipientInvalidIban(description=None, message=None)[source]¶
Bases:
AddRecipientError
- code = 'invalidIban'¶
- exception RecipientInvalidLabel(description=None, message=None)[source]¶
Bases:
AddRecipientError
- code = 'invalidLabel'¶
- exception RecipientInvalidOTP(description=None, message=None)[source]¶
Bases:
AddRecipientError
- code = 'invalidOTP'¶
- exception RecipientNotFound(msg='Recipient not found')[source]¶
Bases:
ObjectNotFound
Raised when a recipient is not found.
- class Transfer(id='', url=NotLoaded, backend=None)[source]¶
Bases:
BaseObject
,Currency
Transfer from an account to a recipient.
- Variables:
url – (
str
) urlamount – (
Decimal
) Amount to transfercurrency – (
str
) Currency (default: None)fees – (
Decimal
) Fees (default: None)exec_date – (
date
,datetime
) Date of transferlabel – (
str
) Reasonaccount_id – (
str
) ID of origin accountaccount_iban – (
str
) International Bank Account Numberaccount_label – (
str
) Label of origin accountaccount_balance – (
Decimal
) Balance of origin account before transferrecipient_id – (
str
) ID of recipient accountrecipient_iban – (
str
) International Bank Account Numberrecipient_label – (
str
) Label of recipient accountbeneficiary_type – (
str
) Transfer creditor number type (default: recipient)beneficiary_number – (
str
) Transfer creditor numberbeneficiary_label – (
str
) Transfer creditor labelbeneficiary_bic – (
str
) Transfer creditor BICdate_type – (
str
) Transfer execution date typefrequency – (
str
) Frequency of periodic transferfirst_due_date – (
date
,datetime
) Date of first transfer of periodic transferlast_due_date – (
date
,datetime
) Date of last transfer of periodic transfercreation_date – (
date
,datetime
) Creation date of transferstatus – (
str
) Transfer statuscancelled_exception – (
TransferError
) Transfer cancelled reasonreference_id – (
str
) End to end ID given by client
- exception TransferBankError(description=None, message=None)[source]¶
Bases:
TransferError
The transfer was rejected by the bank with a message.
- code = 'bankMessage'¶
- exception TransferCancelledByUser(description=None, message=None)[source]¶
Bases:
TransferError
The transfer is cancelled by the emitter or an authorized user
- code = 'cancelledByUser'¶
- class TransferDateType(*args, **kwargs)[source]¶
Bases:
Enum
- FIRST_OPEN_DAY = 'first_open_day'¶
Transfer to execute when possible (accounting opening days)
- INSTANT = 'instant'¶
Transfer to execute immediately (not accounting opening days)
- DEFERRED = 'deferred'¶
Transfer to execute on a chosen date
- PERIODIC = 'periodic'¶
Transfer to execute periodically
- exception TransferError(description=None, message=None)[source]¶
Bases:
UserError
A transfer has failed.
- Parameters:
- code = 'transferError'¶
- class TransferFrequency(*args, **kwargs)[source]¶
Bases:
Enum
- UNKNOWN = 'unknown'¶
- DAILY = 'daily'¶
- WEEKLY = 'weekly'¶
- TWOWEEKLY = 'two-weekly'¶
- MONTHLY = 'monthly'¶
- TWOMONTHLY = 'two-monthly'¶
- QUARTERLY = 'quarterly'¶
- FOURMONTHLY = 'four-monthly'¶
- SEMIANNUALLY = 'semiannually'¶
- YEARLY = 'yearly'¶
- BIMONTHLY = 'bimonthly'¶
- BIANNUAL = 'biannual'¶
- exception TransferInsufficientFunds(description=None, message=None)[source]¶
Bases:
TransferInvalidAmount
Not enough funds on emitter account.
- code = 'insufficientFunds'¶
- exception TransferInvalidAmount(description=None, message=None)[source]¶
Bases:
TransferError
This amount is not allowed.
- code = 'invalidAmount'¶
- exception TransferInvalidCurrency(description=None, message=None)[source]¶
Bases:
TransferInvalidAmount
The transfer currency is invalid.
- code = 'invalidCurrency'¶
- exception TransferInvalidDate(description=None, message=None)[source]¶
Bases:
TransferError
This execution date cannot be used.
- code = 'invalidDate'¶
- exception TransferInvalidEmitter(description=None, message=None)[source]¶
Bases:
TransferError
The emitter account cannot be used for transfers.
- code = 'invalidEmitter'¶
- exception TransferInvalidLabel(description=None, message=None)[source]¶
Bases:
TransferError
The transfer label is invalid.
- code = 'invalidLabel'¶
- exception TransferTimeout(description=None, message=None)[source]¶
Bases:
TransferError
The transfer request timed out
- code = 'timeout'¶
- exception TransferInvalidOTP(description=None, message=None)[source]¶
Bases:
TransferError
- code = 'invalidOTP'¶
- exception TransferInvalidRecipient(description=None, message=None)[source]¶
Bases:
TransferError
The emitter cannot transfer to this recipient.
- code = 'invalidRecipient'¶
- class TransferStatus(*args, **kwargs)[source]¶
Bases:
Enum
- UNKNOWN = 'unknown'¶
- INTERMEDIATE = 'intermediate'¶
Transfer is not validated yet
- SCHEDULED = 'scheduled'¶
Transfer to be executed later
- ACTIVE = 'active'¶
Periodic transfer is still active
- DONE = 'done'¶
Transfer was executed
- CANCELLED = 'cancelled'¶
Transfer was cancelled by the bank or by the user
- ACCEPTED_NO_BANK_STATUS = 'accepted_no_bank_status'¶
Transfer was sent to the bank but we will not get more information after that. This is used for banks that do not give us final states after pending.
- exception TransferStep(transfer, *values)[source]¶
Bases:
BrowserQuestion