Building a rudimentary accounting app [closed] - api

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I'm building a simple accounting app to be used for personal finance.
A user might keep track of purchases, upcoming bills, recurring deposits, etc. It will be verrrrry simple.
Two questions:
1) Any advice I should keep in mind? Obviously, I'll use transactions where appropriate, but proper datatypes and other considerations would be nice to know about.
2) Are there any APIs you know of I could use to periodically get a user's balance from their bank? i.e., an API that would make it simple to query their account, regardless of whether they're at Chase, BofA or other?
Thanks very much,
Michael

Having just completed version 1.0 of some custom written online accounting software for school related non-profits I have some advice :)
Use standard double entry accounting/bookkeeping (debits and credits) as the basis for your financial engine. You will find this will serve you well when it comes to not only storing data on transactions but also generating reports. Assets = Liabilies + Equity is a tried and true approach for tracking who owns what.
Use decimal types for money.
Use transactions.
Keep the interface as simple as
possible.
You will need to have a method to
allow the user to reconcile the bank
records with their own records.
Pulling in bank data would help this
process but you will need to provide
the user with a method to compare.
You can use bank statements for this
process.
The bank is always considered to be right.
If there is a discrepancy between
the bank and the user records... the
fault almost always is with the user
records.
Make sure you provide some sort of
backup facility for the user
Secure the users data
Make sure you fully understand the process you are automating. Do not make assumptions. Run your ideas by an accountant who specializes in personal finance. Having this vetting will help quite a bit.
Be prepared to write ALOT of code. Accounting software has been around for years, the list of "standard features" for a typical accounting package has grown, and there are quite a few players in the market. If you are planning on selling this product you will need to provide those standard features and then find some way of differentiating it from what is already available with additional features.
TEST TEST TEST and TEST again. You
are keeping records of peoples
personal financial transactions
(their money). Errors are not taken
lightly.

I will add a few tips as I am finishing a POS system that focuses on ACCOUNTING - meaning the purchases, expenses, invoicing, accounts, credit cards, cash, vehicles, etc all need to be tracked. The concepts will eventually be applied to a personal system.
The best advice is to look at your paperwork and try to form your database around what you need to do to translate your physical documents to the computer. Combine this with the first couple of chapters of an accounting textbook which talks about accounts, chart of accounts, and journals.
The books I used :
Accounting at your fingertips by George Murray
Finance and Accounting for Entrepenuers by Suzanne Caplan
Introduction To Accounting by Ainsworth
Accounting, Information technology, and Business Solutions By Hollander
Once you have your source documents entered into the system you can then run queries to get to your answers. Doing this eliminated the concept of the "General Ledger" and "trial balance" because you simply correct or add to your source documents. So the "General Ledger" becomes a calculation. That was super confusing to me. Again, all the source documents will be put into 'Journals', which can be your database tables. I use a general journal, a purchases journal, a payments or cash disbursements journal, a sales journal, and a cash receipts journal. Keep in mind the term "CASH" refers to cash, credit, check, debit.
For example I have a "general journal" which is basically what you need. In this journal I keep track of 'source receipts'. A receipt might be an invoice, like time warner cable, which has an account number. In that case I create an 'account' for time warner. The time warner account will link to a 'chart of accounts' which will specify the type of expense as "internet". The invoice then gets entered with the date, the amount, etc. The invoice links to the account for time warner. Once the invoice is entered it is unpaid. You then need to add payment. Of course you could pay the bill in full as you should, but you might need to do two payments, or split payments, or not pay in full. This will lead you to a 'Payments Journal" in combination with a 'invoice to payments lookup table' which will need to have an applied amount to apply to an invoice. This applied amount is important because you might have 4 unpaid time warner bills and you just send over $200 in a panic to get your account back on. This payment then needs to split across the invoices with amounts to apply to each. And of course the payment account will link back to your accounts.
For the case of entering a receipt, the account is not used. Say you pick up some lingerie at embrasse-moi, and pay cash. Your system will take the supplier, embrasse-moi, the date, the cost, I added a 'use tax' in case you purchase over the internet and did not pay tax but you still owe it, the amount, and the 'Chart of accounts' which is essentially what category is your expense. That all goes to the general journal. On the same form you will have the payment method. I made a simplified form for an expense + exact payment as that is very common. If the payment is split then you will need to enter the receipt using one form, then create multiple payments linking to that receipt with other forms.
So in the end your database for this simple accounting app will have the following tables:
Accounts (the account information including an account type like cc/debit card, checking, cash, inventory account for business purchases, expense account like utilities, the default chart of account)
Chart of accounts (basically a list describing how to classify expenses and accounts which will flow to your operating statement, i put mine here for you to check out:
http://embrasse-moi.com/exampleData/pos_chart_of_accounts.csv)
I have a table for opening balances for accounts, because you have to start somewhere
Account type - meaning credit card, debit card, etc. Keep in mind the accounting equation basicaly switches based on the account. Checking accounts debits are "bad" because you gave away your money and credits are "good" because you took in money while credit cards debits are "good" because you reduced your debt and credits are "bad" becasue you added to your debt
Chart of account types, which is an 'asset, liability, long term asset, etc. This could be included in the cart of accounts as an Enum type
Then there is the general journal, which as described contains enough information to describe your document. Is it on account? Date, amount, the type (receipt or invoice) due date, i keep a 'paid' flag to ease the querying.
Then you have a lookup between the 'general journal' table and the payment table
Then you have the payment table.
Once you have all this information in, you will almost never use your bank as sources, as they are not always correct, at least my bank makes mistakes. So this type of structure will keep you on top of your information, and at the end of the month this system will produce a statement that looks identical to your account statements. And that is the goal.

About APIs for getting info from your bank: not simple, if at all possible. You can imagine the lengths your bank will go through to make sure everything is secured. I don't think it'll be possible to automatically connect.
Usually there's a way to download data through manual downloading of a file, after you logged into your online banking (if you have that available). Hopefully it'll be in CSV format or something similar ;-)
[edit]
Apparently I was wrong here, major banks DO allow direct connection. I guess you'll have to consult your bank techsupport on that then.
[/edit]
As for datatypes to use, I'd at least recommend decimals for money values, instead of doubles/floats. see this SO question thread about that too.

Related

Can Verisign/Authorize.Net split a transaction into more than account?

I wonder if its possible to have logic where for every transaction 10% goes to a different account. It does not have to be Verisign, or Authorize.Net even, but whatever it is has to be a good tool.
As of right now you the only payment option that allows you to split payments is Paypal Adaptive Payments. Verisign, Authorize.Net, and other similar payment gateways do not offer this functionality.
Have a look at our product, Balanced which is designed specifically for this task.
The core concept is that debits (money in from buyers), and credits (money out to your sellers) are split into two separate transactions which means you can debit a buyer, and then create two (or one, or three...) separate credits to pay the resulting money. This typically would be two credits, one for your seller and a second for yourself to collect a fee, however you could split it further.

Estimate tax based on zip code

Using Google Checkout, I'm able to estimate tax based on the zip code that's assoicated with a user's account when they click "Buy." The user then sees the tax amount when they checkout.
Is it possible to estimate tax based on the user-entered zip code before a user reaches the checkout page? This is similar to the functionality in Google Products currently. I see some data here (http://code.google.com/apis/checkout/articles/Google_Checkout_Articles_Zip_Level_Taxes.html) but am not sure how to implement it within the checkout button I have.
Is there any other tax table or API that allows estimation of taxes based on zip code? Does Paypal offer this functionality?
have you looked at AvaTax module?
http://www.magentocommerce.com/magento-connect/one-pica-avatax-connector.html
If your building a cart from scratch you can use avalara's api. If your using a specific package such as magento, 3dcart, or so on they already connect to the major solutions. Avalara's solution also bridges the gap between the sales software and the accounting software such as Quickbooks and Sage.
Otherwise if the company your building this for is small enough and has time to update them manually, you can go to the states website or go to a place that compiles free tax rate tables such as taxrates.com
One major warning with any solution, sales tax taxability rules can be complex, this compounds when your scaling an e-commerce business. Even if your a small business in one state, there are multiple layers to the rules. Best to work talk with an accountant to double check when your initially setting this up.

Authorize.Net Partial Authorization Question

I am making changes to my companies internal paysite in order to come into compliance with the new credit card regulations. We have decided that when we get a split tender transaction that comes through we want to get the remaining balance along with how much was on the card to start out with and send that info back to the customer service rep with a message relaying the need for another payment source along with the remaining balance and the amount that was originally on the card.
Instead of chaining the transactions together with the split tender Id we have decided we would like to finalize each split tender transaction with a prior_auth_capture and then request the next payment source and amount and process that transaction in the same manner. I know that we are side stepping the functionality some but those are my orders.
My questions are, is this feasible and possible and how do you do this in code? I am using the C# SDK to implement this in VB.NET 2008
My thoughts are that I would have to process the transaction for the amount passed as a auth_capture transaction and then some how do the prior_auth_transaction with a zero amount or something?
How would this work?
Thanks for much for your help.
James
This is not feasible to do. The purpose of split tender payments is to logically group together split payments into one transaction. By breaking it up into multiple transactions it can get confusing for you, the users, and the processor. Especially if you have issues getting the user to make full payment on their transaction. Failing to void the other transactions would be very problematic. This almost certainly will result in an increased exposure to chargebacks.

How to implement eCommerce susbscription service with multiple products

I've been researching eCommerce payment gateways and service offerings, but I'm an eCommerce novice, so please excuse my ignorance.
I wish to set up an eCommerce solution with the following requirements:
User "subscribes" to the service on a yearly basis. This service includes a single product subscription for a set amount (let's say $50/yr).
User can "subscribe" to additional product services for a lesser rate per year (let's say $25/yr).
I will need to store a product service unique Id of some sort for each product subscription the user subscribes to in order to show them product unique information. I also need to prevent duplicates...for example, user can subscribe to product ABC and XYZ, but not 2 of ABC.
Is PayPal the best solution for something like this? Is there a better solution? Any assistance is greatly appreciated, even if just links to specific tutorials or examples.
Update: It looks like Chargify could be the perfect solution.
You can also use Authorize.Net's CIM solution which, based on what I read at the chargify website, does most of what chargify does except your customers never need to leave your website. The Customer Information Manager allows you to create profiles for your members. These profiles store sensitive information like credit card numbers and billing information so you don't have to worry about PCI compliance or hackers stealing your information. You then can schedule a cron job to charge them monthly for whatever amount they owe based on their current subscription. Since you control when the payments happen it also allows you to charge them pro-rated amounts for subscription changes mid-month.
[link text][1] seems to be the best solution for me. I still need a merchant account, but this takes a lot of the headache out of handling the subscriptions.
[1]: http://chargify.com Chargify

Technical issue surrounding asking for credit card BEFORE address?

I'm considering asking for credit card details BEFORE an address for a physical product with average purchase price between $10-$50
What might be the technical (or non technical) issues surrounding doing this?
What comes to mind is :
This seems a little non-standard from the users perspective
We cant do address verification if we find we're having issues with fraud (not an issue so far)
Users may be more likely to complete the sale since they've committed to their most important piece of information first
By asking for zipcode we can populate city/state when we do ask for the address
Are there any dealbreakers i'm missing or things I'm not considering?
I'm trying to make the system as flexible as possible, but would prefer to getit right first time without barking up the wrong tree.
My advice to you is don't do it.
I often cancelled buy attempts and abandoned the sites when I got asked for my credit card number right in the face.
Often, the site is so poorly designed with no answers to obvious questions that you have to go through the complete form hoping to find answer in the process. Do they offer this particular shipment option? How much does this cost? Do they send to a package station or only to my home address? Do they provide an extra line for an address for me to use the "c/o" technique? I often could not find answers to these question anywhere on the site. So I either found them in the form before entering my payment details, in very few cases I did call them, in most others I just chose other places to buy from.
One more use case. In many places I've seen they only show you if they have an item on stock on the very last page of the order form. Not many people would want to "commit" to the payment right away without getting all the required information. You enter your credit card number, then on the second page you see they don't offer the shipment option you need, on the last page it says "the item is currently out of stock - delivery awaited in 3-4 weeks". And the order is already placed. Then it is a commitment from the user but not from the company, many will react emotionally to this approach as to scam and request their money back immediately.
The important thing is to behave friendly to your customers, don't scare them away, don't raise suspicions in them, don't make them regret they committed to their buying. Make them feel relaxed and happy and never with their arms bound.
This may seem non-standard from a consumer perspective, but this is perfectly normal in B2B systems. You can collect personal/company & payment details, then shipping & payment addresses, and then present the user with a final confirmation screen showing tax & delivery charges before processing the order. Only then do you process the credit card payment.
However, the issue that "New in town" mentions is a very valid one, where the customer is left thinking:
Hang on, why are you asking for my credit card details when I haven't seen the final amount yet?
I think this is perhaps down to a site not having a clearly defined order creation process (or at least one that is not clearly communicated to the customer), so that the customer is under the impression that by entering their CC details at that point, the payment will be processed there and then.
It may be best to do things the way other popular online stores do, Principle of Least Astonishment and all that, but if you really want to do it in this order then perhaps a simple progress bar to indicate order creation flow would help allay customer fears. Don't bet on it though, online consumers are rightly paranoid when it comes to their credit card details these days. ;)
As someone who has done quite a bit of online purchases, I can say that I would be extremely worried if a site first asks for my creditcard information before it asks for anything else. It tends to trigger my "Fraud Detector". Am not sure why this is, but I just get worried that the site is going to forget about asking for my address.
As mentioned, in B2B environments, this is a bit more common, though. Then again, in many B2B environments, the visitor first creates a business account before he even starts ordering. Part of setting up this business account is providing the creditcard information. To be honest, many B2B also provide services and digital downloads which don't even need a shipping address.
Many people use the ship to address page to determine if the site will ship to their region/country. They are not likely to bother giving CC info before they even know you'll ship to them.
I live in outside the US and MOST sites fail to recognize that there are customers outside of the US. Often the only way to determine if they will ship to me is to go through the order process to find out they have a finite list of "states" they will ship to and no "country" drop down.