Bank Accounts¶
Bank accounts must be associated to a customer profile on the Authorize.net server. A bank account can be associated when a new customer is created, to see how this is handled refer to the Customer API documentation.
Note
The ability to process transactions from a bank account is not a standard gateway account feature. You must register for eCheck functionality seperately. For more information see Authorize.net’s eCheck documentation.
Create¶
To add a bank account to an existing user, the minimal amount of information
required is the routing number, account number, name on the account and the
customer profile ID. The customer profile ID is passed as the first argument
to the create method.
Minimal Example¶
result = authorize.BankAccount.create('customer_id', {
'routing_number': '322271627',
'account_number': '00987467838473',
'name_on_account': 'Rob Otron',
})
result.payment_id
# e.g. '17633593'
Full Example¶
When creating a new bank account, the billing address information can also be associated to the account.
result = authorize.BankAccount.create('customer_id', {
'customer_type': 'individual',
'account_type': 'checking',
'routing_number': '322271627',
'account_number': '00987467838473',
'name_on_account': 'Rob Otron',
'bank_name': 'Evil Bank Co.',
'echeck_type': 'CCD',
'billing': {
'first_name': 'Rob',
'last_name': 'Oteron',
'company': 'Robotron Studios',
'address': '101 Computer Street',
'city': 'Tucson',
'state': 'AZ',
'zip': '85704',
'country': 'US',
'phone_number': '520-123-4567',
'fax_number': '520-456-7890',
},
})
result.payment_id
# e.g. '17633614'
Details¶
The details method returns the information for a given customer payment
profile. This method takes both the customer profile ID and customer payment
profile ID.
The following information is returned in the result attribute dictionary:
payment_profile.payment_idpayment_profile.customer_typepayment_profile.payment.bank_account.account_typepayment_profile.payment.bank_account.routin_numberpayment_profile.payment.bank_account.account_numberpayment_profile.payment.bank_account.name_on_accountpayment_profile.payment.bank_account.bank_namepayment_profile.payment.bank_account.echeck_typepayment_profile.bill_to.companypayment_profile.bill_to.first_namepayment_profile.bill_to.last_namepayment_profile.bill_to.addresspayment_profile.bill_to.citypayment_profile.bill_to.statepayment_profile.bill_to.zippayment_profile.bill_to.countrypayment_profile.bill_to.phone_numberpayment_profile.bill_to.fax_number
result = authorize.BankAccount.details('customer_id', '17633614')
Update¶
The update method will update the bank account information for a given
payment profile ID. The method requires the customer profile ID, the payment
profile ID and the new bank account information.
result = authorize.BankAccount.update('customer_id', '17633614', {
'customer_type': 'individual',
'account_type': 'checking',
'routing_number': '322271627',
'account_number': '00987467838473',
'name_on_account': 'Rob Otron',
'bank_name': 'Evil Bank Co.',
'echeck_type': 'CCD',
'billing': {
'first_name': 'Rob',
'last_name': 'Oteron',
'company': 'Robotron Studios',
'address': '101 Computer Street',
'city': 'Tucson',
'state': 'AZ',
'zip': '85704',
'country': 'US',
'phone_number': '520-123-4567',
'fax_number': '520-456-7890',
},
})
Delete¶
Deleting a customer bank account will remove the payment profile from the given customer.
result = authorize.BankAccount.delete('customer_id', '17633319')
Transactions¶
For information on how to run transactions against stored credit cards, please refer to the Transaction documentation.