
Ask HN: Where/How do I learn about credit card payments and payment gateways - yalogin
I hope this is not the wrong place to post this.<p>I have been trying to learn about credit card payment gateways and I am not finding the proper resources. Specifically -  
* I read (on HN) sometime ago that there is a specific way the card numbers are issued by companies and that you could tell by the number which company issued it. Where do I get this information? 
* What exactly do the different players do in the ecosystem? We have the providers (Visa, MC), issuers (Citibank), payment gateways, processors.
* When I swipe my card at Best Buy what happens after the card is read?<p>Could someone please point me in the right direction?
======
tzs
This comment (and the two below it, since it got too long to fit in one
comment) I wrote about 6 months ago covers my best attempt to figure out what
the various players do: <http://news.ycombinator.com/item?id=2445866>

~~~
yalogin
This is great! Thanks for the reply. I am guessing all these are custom
networks with their own API and no fixed interoperability between payment
processors, correct?

------
magicofpi
FeeFighters has a pretty good free ebook called "How to Be a Credit Card
Processing Ninja" - [http://feefighters.com/blog/free-ebook-launch-how-to-be-
a-cr...](http://feefighters.com/blog/free-ebook-launch-how-to-be-a-credit-
card-processing-ninja/)

~~~
colinloretz
FeeFighter's ebook and many of their blog posts are a pretty great resource.
Another great resource (especially for Rubyists) is Amy Hoy and Thomas Fuchs'
<http://jumpstartcc.com/>

If you don't want to bother worrying about the details of setting it all up,
look into Stripe.com or Samurai from Feefighters

------
qq66
Read Gus Fuldner's posts on Quora. <http://www.quora.com/Gus-Fuldner/answers>

~~~
jacobolus
Seconded.

Also, Carol Benson & Scott Loftesness’s book, _Payments Systems in the U.S._ ,
is quite an excellent introduction: <http://www.amazon.com/dp/098278970X>

------
jknipp
I work in the debit side of things (well for only about the next few months)
so my experience is a tad bit different, I'll approach it from a debit
perspective, credit should be somewhat similar.

The device you swipe your card at Best Buy is a merchant device. Best Buy has
made an agreement with the device vendor to route its traffic over a specific
network, say First Data.

When you swipe the card the network(gateway) decides where to 'route' the
request based on the BIN (typically first 6 digits of the card number, can be
more depending on how the card profile is setup). The network has BIN tables
setup so they can easily identify which cards go where. After the merchants
gateway has determined where to route the card, the request then propagates to
the issuing network, from there it is sent to the issuer to approve/deny the
request.

This is a simple high level overview and by no means complete.

Ex. path

User swipes card @ device -> Merchant devices sends transaction to First Data
(where FDC is the merchant device gateway) -> First Data routes transaction to
issuing network (Visa, MC, Cirrus) -> Issuing Network forwards request to
issuer (issuance processor) for approval

In debit world, it used to be that the more 'hops' a request took to route
back to the issuer, the more that interchange that was incurred.

There are all sorts of scenarios that can occur, for example, I'm working on a
project that would circumvent the networks if the transaction is for a card
issued by our bank (closed loop transaction), which avoids interchange fees
paid to the network.

------
oasisbob
This is a big topic. The keyword you're looking for is the four-party system.
Take a look at the GAO or Federal Reserve papers on interchange reform, they
give a good high-level view. Gateways and merchant accounts are only half of
the equation.

------
auston
It's been a while since I've seen an HN post where I can give valuable
feedback, thanks for the questions!

1\. Here is a way to do it, in Python:
[https://github.com/abunsen/Paython/blob/master/paython/lib/u...](https://github.com/abunsen/Paython/blob/master/paython/lib/utils.py#L102)

2\. Not sure on providers other than that they lend their brand / set
guidelines for the banks that issue cards (Citibank). On the other hand,
you've got a processor, like First Data who allow you to process cards (on the
internet) via a gateway, like Authorize.Net. In some cases, the processor &
the gateway are bundled, like in the case of the new Stripe payments.

3\. AFAIK: Your cards magnetic strip is converted to numbers, sent to a
gateway to be processed as a "card present" transaction (different, typically
lower, fees for these) & asked for approval from the issuing bank, once
approved the amount collected will sit in limbo for 1-7 days then deposited
into Best Buys bank account.

------
byoung2
_there is a specific way the card numbers are issued by companies and that you
could tell by the number which company issued it._

Here is a good resource for that info:
<http://www.merriampark.com/anatomycc.htm>

------
jabo
You should try out Stripe (<https://stripe.com/>). They make credit card
processing a piece of cake.

~~~
abengoam
Agreed. I checked out Stripe last week and they look terrific. I am planning
to use them for any payment processing that I may need. To simplify the task I
have created a Clojure binding for their api, you can check it out at
<https://github.com/abengoa/clj-stripe> . Just started, lot of work to do, but
the functionality is all there. Feedback welcome, and much appreciated.

------
rizumu
I learned a lot from this pivotal labs podcast and recommend giving it a
listen: <http://pivotallabs.com/talks/88-demystifying-online-billing>

[http://www.slideshare.net/Recurly/lessons-learned-in-
online-...](http://www.slideshare.net/Recurly/lessons-learned-in-online-
billing)

------
helipad
I think you're referring to the Mint infographic, "Cracking the Credit Card
code"

Link: <http://www.mint.com/blog/trends/credit-card-code-01202011/>

------
awk
The creators of freckle offer a good overview of credit card processing:
<http://jumpstartcc.com/>

------
omarchowdhury
<http://en.wikipedia.org/wiki/Bank_card_number>

[http://en.wikipedia.org/wiki/List_of_Bank_Identification_Num...](http://en.wikipedia.org/wiki/List_of_Bank_Identification_Numbers)

<http://en.wikipedia.org/wiki/Interchange_fees>

------
mahcode
There was a post about stripe.com not too long ago. Perhaps you should try
checking them out

