Sending Money to your Customer's Accounts

The Scenario

Your business needs the ability to 1) accept credit card payments from customers through the front door and 2) send electronic payments out the back door (could be to vendors, affiliates, employees, etc.). Using our payment platform, you can send money from your checking account to another checking account (bank to bank transfer).

Money can even be sent to a credit card (also known as an unreferenced credit) in special circumstances as the Card Associations prohibit it as a normal practice. Such a circumstance may be if you are converting over to process with Braintree but need to issue refunds to customers that processed through your old system. In that situation, you would not have a transaction ID to reference the refund to so you could use our system to issue the unreferenced credit.

This article will briefly show you how to send money from your merchant account to someone else’s banking account by building a query string as an example.

The Setup

To begin with, you’ll need to request to have EFT transactions turned on. You can simply send an email to support@getbraintree.com. We have this turned off by default as an added security measure. As a side note, you’ll also need to request to have echecks turned on as well. Normally these 2 things go hand-in-hand, but there may be the odd case where you would want one, and not the other.

Next, you’ll need to have a working application that processes credit card transactions to your merchant account. See some of the other articles for pointers. Once that is complete, you should have a working store-type application where customer’s can purchase items and pay for them using a credit card.

Finally, you’ll need to decide how you’re going to settle with your vendors. There is really 2 options; 1) Settle their transactions at the time of purchase, or 2) Complete settlement with your vendors during a batch process run at a specific interval. For the purposes of this article, I’m going to show you how to complete each settlement at the time of the original transaction.

How To Do It

This article assumes that you are using the DirectPost authentication method, meaning that you will be communicating server to server, so I’m making sure to complete include my authentication credentials in the query string. This would be the most common method for completing this type of transaction, but bear in mind that it could be completed using the Transaction Redirect Authentication Method.

The important thing to remember about completing EFT transactions with the Braintree API is that the transaction type will be credit. This is separate from a refund where you would have a transaction_id available to refund to the original purchaser. The first part of our query string would look like this:

username=demo&password=password&type=credit

I’m also going to include a transaction amount of $10.00, meaning that I’m going to be taking $10.00 from my account and sending it to the account specified. That leaves us with this:

username=demo&password=password&type=credit&amount=10.00

Here’s a table of the parameters that you’ll need to send if you are processing an EFT transaction against either a checking or savings account:

payment Either check or creditcard, in this case, check.
checkname The name on the account.
checkaba Bank Routing number
checkaccount Bank Account number
account_type checking or savings

I’m going to run this transaction against the checking account number and routing number that’s setup in our test sandbox. Combining this what we’ve already got will leave us with the following:

username=demo&password=password&type=credit&amount=10.00 \ 
&payment=check&checkname=Bob%20Dobbs&checkaba=123123123& \ 
checkaccount=123123123&account_type=checking

For things like checkname, make sure you escape the values so they can properly be passed through HTTP.

Discussion

Please ask any questions on this article in the Articles Discussion Forum.