<p><a href="https://stackoverflow.com/questions/2556/whats-the-best-online-payment-processing-solution">This question</a> talks about different payment processors and what they cost, but I'm looking for the answer to what do I need to do if I want to accept credit card payments?</p>

<p>Assume I need to <em>store</em> credit card numbers for customers, so that the obvious solution of relying on the credit card processor to do the heavy lifting is not available.</p>

<p><a href="https://www.pcisecuritystandards.org/security_standards/pci_dss.shtml" rel="noreferrer">PCI Data Security</a>, which is apparently the standard for storing credit card info, has a bunch of general requirements, but <a href="http://en.wikipedia.org/wiki/PCI_DSS" rel="noreferrer">how does one implement them</a>? </p>

<p>And what about the vendors, like <a href="http://usa.visa.com/merchants/risk_management/cisp_payment_applications.html" rel="noreferrer">Visa</a>, who have their own best practices?</p>

<p>Do I need to have keyfob access to the machine? What about physically protecting it from hackers in the building?  Or even what if someone got their hands on the backup files with the sql server data files on it?</p>

<p>What about backups? Are there other physical copies of that data around?</p>

<p>Tip: <a href="http://transfs.com/blog/" rel="noreferrer">If you get a merchant account, you should negotiate that they charge you "interchange-plus" instead of tiered pricing.</a>  With tiered pricing, they will charge you different rates based on what type of Visa/MC is used -- ie. they charge you more for cards with big rewards attached to them.  Interchange plus billing means you only pay the processor what Visa/MC charges them, plus a flat fee.  (Amex and Discover charge their own rates directly to merchants, so this doesn't apply to those cards.  You'll find Amex rates to be in the 3% range and Discover could be as low as 1%.  Visa/MC is in the 2% range).  <a href="http://transfs.com/" rel="noreferrer">This service is supposed to do the negotiation for you</a> (I haven't used it, this is not an ad, and I'm not affiliated with the website, but this service is greatly needed.)</p>

<p><em>This blog post gives a <a href="http://blog.boxedice.com/2009/05/20/taking-payments-online-merchant-account-payment-processor-fees/" rel="noreferrer">complete rundown of handling credit cards</a> (specifically for the UK).</em></p>

<hr>

<p>Perhaps I phrased the question wrong, but I'm looking for tips like these:</p>

<ol>
<li>Use <a href="http://www.rsa.com/node.aspx?id=1156" rel="noreferrer">SecurID</a> or <a href="http://www.aladdin.com/etoken/" rel="noreferrer">eToken</a> to add an additional password layer to the physical box.</li>
<li>Make sure the box is in a room with a physical lock or keycode combination.</li>
</ol>

[{'answer_id': 51099, 'author': 'Kibbee', 'author_id': 1862, 'author_profile': 'https://Stackoverflow.com/users/1862', 'pm_score': 2, 'selected': False, 'text': "<p>There's a lot to the whole process. The single easiest way to do it is to use services similar to paypal, so that you never actually handle any credit card data.  Apart from that, there's a quite a bit of stuff to go through to get approved to offer credit card services on your website.  You should probably talk with your bank, and the people who issue your merchant ID to help you in setting up the process.</p>\n"}, {'answer_id': 51575, 'author': 'Vagnerr', 'author_id': 3720, 'author_profile': 'https://Stackoverflow.com/users/3720', 'pm_score': 2, 'selected': False, 'text': '<p>As others have mentioned the easiest way into this area is with the use of <a href="http://www.paypal.com/" rel="nofollow noreferrer">Paypal</a>, <a href="http://www.google.com/checkout" rel="nofollow noreferrer">Google checkout</a> or <a href="http://www.nochex.com/" rel="nofollow noreferrer">Nochex</a>. However if you intend to to a significant amount of business you may wish to look up "upgrading" to higher level site integrations services such as <a href="http://worldpay.com/" rel="nofollow noreferrer">WorldPay</a>, <a href="http://www.netbanx.com/" rel="nofollow noreferrer">NetBanx (UK)</a> or <a href="http://www.neteller-group.com/" rel="nofollow noreferrer">Neteller (US)</a>. All of these services are reasonably easy to set up. And I know that Netbanx offers convenient integration into some of the off the shelf shopping cart solutions such as <a href="http://www.intershop.com/" rel="nofollow noreferrer">Intershop</a> (because I wrote some of them). Beyond that you are looking at direct integration with the banking systems (and their APAX systems) but thats hard and at that point you also need to prove to the Credit card companies that you are handling the credit card numbers securely (probably not worth considering if you are not taking $100k\'s worth per month). </p>\n\n<p>Working from 1st to last the cost/benefits are that the early options are much easier (quicker/cheaper) to set up put you pay quite high handling charges for each transaction. the later ones are much more costly to set up but you pay less in the long run.</p>\n\n<p>The other advantage of the most of the non dedicated solutions is that you don\'t need to keep encrypted credit card numbers secure. Thats someone else\'s problem :-)</p>\n'}, {'answer_id': 52640, 'author': 'Dale Ragan', 'author_id': 1117, 'author_profile': 'https://Stackoverflow.com/users/1117', 'pm_score': 9, 'selected': True, 'text': '<p>I went through this process not to long ago with a company I worked for and I plan on going through it again soon with my own business.  If you have some network technical knowledge, it really isn\'t that bad.  Otherwise you will be better off using Paypal or another type of service.</p>\n\n<p>The process starts by getting a <strong><a href="https://stackoverflow.com/questions/2556/whats-the-best-online-payment-processing-solution">merchant account</a></strong> setup and tied to your bank account.  You may want to check with your bank, because a lot of major banks provide merchant services.  You may be able to get deals, because you are already a customer of theirs, but if not, then you can shop around.  If you plan on accepting Discover or American Express, those will be separate, because they provide the merchant services for their cards, no getting around this.  There are other special cases also.  This is an application process, be prepared.</p>\n\n<p>Next you will want to purchase an <strong>SSL certificate</strong> that you can use for securing your communications for when the credit card info is transmitted over public networks.  There are plenty of vendors, but my rule of thumb is to pick one that is a brand name in a way.  The better they are known, the better your customer has probably heard of them.</p>\n\n<p>Next you will want to find a <strong><a href="http://en.wikipedia.org/wiki/Payment_gateway" rel="noreferrer">payment gateway</a></strong> to use with your site.  Although this can be optional depending on how big you are, but majority of the time it won\'t be.  You will need one.  The payment gateway vendors provide a way to talk to the Internet Gateway API that you will communicate with.  Most vendors provide HTTP or TCP/IP communication with their API.  They will process the credit card information on your behalf.  Two vendors are <a href="http://www.authorize.net/" rel="noreferrer">Authorize.Net</a> and <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-pro-overview-outside" rel="noreferrer">PayFlow Pro</a>.  The link I provide below has some more information on other vendors.</p>\n\n<p>Now what? For starters there are guidelines on what your application has to adhere to for transmitting the transactions.  During the process of getting everything setup, someone will look at your site or application and make sure you are adhering to the guidelines, like using SSL and that you have terms of use and policy documentation on what the information the user is giving you is used for.  Don\'t steal this from another site.  Come up with your own, hire a lawyer if you need to.  Most of these things fall under the PCI Data Security link Michael provided in his question.</p>\n\n<p>If you plan on storing the credit card numbers, then you better be prepared to put some security measures in place internally to protect the info.  Make sure the server the information is stored on is only accessible to members who need to have access.  Like any good security, you do things in layers.  The more layers you put in place the better.  If you want you can use key fob type security, like <a href="http://www.rsa.com/node.aspx?id=1156" rel="noreferrer">SecureID</a> or <a href="http://www.aladdin.com/etoken/default.aspx" rel="noreferrer">eToken</a> to protect the room the server is in.  If you can\'t afford the key fob route, then use the two key method.  Allow a person who has access to the room to sign out a key, which goes along with a key they already carry.  They will need both keys to access the room.  Next you protect the communication to the server with policies.  My policy is that the only thing communicating to it over the network is the application and that information is encrypted.  The server should not be accessible in any other form.  For backups, I use <a href="http://www.truecrypt.org/" rel="noreferrer">truecrypt</a> to encrypt the volumes the backups will be saved to.  Anytime the data is removed or stored somewhere else, then again you use truecrypt to encrypt the volume the data is on.  Basically where ever the data is, it needs to be encrypted.  Make sure all processes for getting at the data carries auditing trails.  use logs for access to the server room, use cameras if you can, etc...  Another measure is to encrypt the credit card information in the database.  This makes sure that the data can only be viewed in your application where you can enforce who sees the information.</p>\n\n<p>I use <a href="http://www.pfsense.com/" rel="noreferrer">pfsense</a> for my firewall.  I run it off a compact flash card and have two servers setup.  One is for fail over for redundancy.</p>\n\n<p>I found this <a href="http://www.west-wind.com/presentations/aspnetecommerce/aspnetecommerce.asp" rel="noreferrer">blog post</a> by Rick Strahl which helped tremendously to understand doing e-commerce and what it takes to accept credit cards through a web application.</p>\n\n<p>Well, this turned out to be a long answer.  I hope these tips help. </p>\n'}, {'answer_id': 52736, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 5, 'selected': False, 'text': "<p>Ask yourself the following question: <em>why do you want to store credit card numbers in the first place</em>? Chances are that you don't. In fact, if you <em>do</em> store them and manage to have one stolen, you could be looking at some serious liability.</p>\n\n<p>I've written an app that does store credit card numbers (since the transactions were processed offline). Here's a good way to do it:</p>\n\n<ul>\n<li>Get an SSL certificate!</li>\n<li>Create a form to get CC# from the user.</li>\n<li>Encrypt part (not all!) of the CC# and store it in your database. (I'd suggest the middle 8 digits.) Use a strong encryption method and a secret key.</li>\n<li>Mail the remainder of the CC# to whoever processes your transactions (probably yourself) with the ID of the person to process.</li>\n<li>When you log in later, you will type in the ID and the mailed-out portion of the CC#. Your system can decrypt the other portion and recombine to get the full number so you can process the transaction.</li>\n<li>Finally, delete the online record. My paranoid solution was to overwrite the record with random data before deletion, to remove the possibility of an undelete.</li>\n</ul>\n\n<p>This sounds like a lot of work, but by never recording a complete CC# anywhere, you make it extremely hard for a hacker to find anything of value on your webserver. Trust me, it's worth the peace of mind.</p>\n"}, {'answer_id': 219677, 'author': 'Zak', 'author_id': 2112692, 'author_profile': 'https://Stackoverflow.com/users/2112692', 'pm_score': 4, 'selected': False, 'text': '<p>The PCI 1.2 document just came out. It gives a process for how to implement PCI compliance along with the requirements. You can find the full doc here:</p>\n\n<p><a href="https://www.pcisecuritystandards.org/security_standards/pci_dss.shtml" rel="noreferrer">https://www.pcisecuritystandards.org/security_standards/pci_dss.shtml</a></p>\n\n<p>Long story short, create a separate network segment for whichever servers will be dedicated to storing CC info (usually DB server(s)). Isolate the data as much as possible, and ensure only the minimum access necessary to access the data is present. Encrypt it when you store it. Never store PAN\'s. Purge old data and rotate your encryption keys.</p>\n\n<p>Example Don\'ts :</p>\n\n<ul>\n<li>Don\'t let the same account that can lookup general info in the database look up CC info.</li>\n<li>Don\'t keep your CC database on the same physical server as your web server.</li>\n<li>Don\'t allow external (Internet) traffic into your CC database network segment.</li>\n</ul>\n\n<p>Example Dos:</p>\n\n<ul>\n<li>Use a separate Database account to query CC info.</li>\n<li>Disallow all but required traffic to CC database server via firewall/access-lists</li>\n<li>Restrict access to CC server to a limited set of authorized users.</li>\n</ul>\n'}, {'answer_id': 767210, 'author': 'Cruachan', 'author_id': 7315, 'author_profile': 'https://Stackoverflow.com/users/7315', 'pm_score': 4, 'selected': False, 'text': "<p>I'd like to add a non-technical comment that you may wish to think about</p>\n\n<p>Several of my clients run e-commerce sites, including a couple who have moderately large stores.  Both of those, whilst they certainly could implement a payment gateway choose not too, they take the cc number, store it temporarily encrypted online and process it manually.</p>\n\n<p>They do this because of the high incidence of fraud and manual processing allows them to take additional checks before filling an order.  I'm told that they reject a little over 20% of all their transactions - processing manually certainly takes extra time and in one case they have an employee who does nothing but process transactions, but the cost of paying his salary is apparently less than their exposure if they just passed cc numbers though an online gateway.</p>\n\n<p>Both of these clients are delivering physical goods with resale value, so are particularly exposed and for items like software where a fraudulent sale wouldn't result in any actual loss your mileage would vary, but it's worth considering above the technical aspects of an online gateway if implementing such is really what you want.</p>\n\n<p>EDIT: And since creating this answer I'd like to add a cautionary tale and say that the time is past when this was a good idea.</p>\n\n<p>Why?  Because I know of another contact who was taking a similar approach.  The card details were stored encrypted, the website was accessed by SSL, and the numbers were deleted immediately after processing.  Secure you think?</p>\n\n<p>No - one machine on their network got infected by a key logging Trojan. As a result they were identified as being the source for several score credit card forgeries - and were consequently hit by a large fine. </p>\n\n<p>As a result of this I now <strong>never</strong> advise anyone to handle credit cards themselves.  Payment gateways have since become much more competitive and cost effective, and fraud measures have improved.  The risk is now no longer worth it.</p>\n\n<p>I could delete this answer, but I think best to leave up edited as a cautionary tale.</p>\n"}, {'answer_id': 799900, 'author': 'denton', 'author_id': 96001, 'author_profile': 'https://Stackoverflow.com/users/96001', 'pm_score': 3, 'selected': False, 'text': "<p>Why bother with PCI compliance?? At best you'll shave a fraction of a percent off your processing fees. This is one of those cases where you gotta be sure this is what you want to be doing with your time both upfront in development and over time in keeping up with the latest requirements.</p>\n\n<p>In our case, it made the most sense to use a subscription-savy gateway and pair that with a merchant account. The subscription-savy gateway allows you to skip all the PCI compliance and do nothing more than process the transaction proper.</p>\n\n<p>We use TrustCommerce as our gateway and are happy with their service/pricing. They have code for a bunch of languages that makes integration pretty easy.</p>\n"}, {'answer_id': 1426488, 'author': 'andora', 'author_id': 113825, 'author_profile': 'https://Stackoverflow.com/users/113825', 'pm_score': 2, 'selected': False, 'text': "<p>Be sure to get a handle on the extra work and budget required for PCI. PCI may require huge external audit fees and internal effort/support. Also be aware of the fines/penalties that can be unilaterally levied on you, often hugely disproportionate to the scale of the 'ofense'.</p>\n"}, {'answer_id': 3125933, 'author': 'joe snyder', 'author_id': 357174, 'author_profile': 'https://Stackoverflow.com/users/357174', 'pm_score': 3, 'selected': False, 'text': "<p>Keep in mind that using SSL to send a card number from a browser to a server is like covering your credit card number with your thumb when you hand your card to a cashier in a restaurant:  your thumb (SSL) prevents other customers in the restaurant (the Net) from seeing the card, but once the card is in the hands of the cashier (a web server) the card is no longer protected by the SSL exchange, and the cashier could be doing anything with that card.  Access to a saved card number can only be stopped by the security on the web server.  Ie, most card thefts on the net aren't done during transmission, they're done by breaking through poor server security and stealing databases.</p>\n"}]
['https://Stackoverflow.com/questions/51094', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/245/']