
Hello! I am working on an e-commerce startup in the states and recently managed to work with a number of electronic payment services, namely
Stripe ,
Braintree and
Paypal . Today I want to talk a little about what features of electronic payments are in the States, about the practical experience of using the above services and also a number of general thoughts on this topic.
So, at the beginning of a little theory. Let's start, perhaps, with what types of payment cards are, because at one time it was a small discovery. So, there are the following types of cards:
- Debit card (debit card) - most often we meet them in the form of salary cards
- Overdraft cards are practically the same debit cards, but there is a possibility of withdrawing money, so to say, “on credit”, when your fixed assets are finished
- Credit card
- Prepaid cards (prepaid cards) are a prepaid card used to pay for goods or services within the prepaid amount. About them a little more will be lower.
- Local cards - local (national) payment system card
- International cards - Visa (Visa Electron, Visa Classic, Visa Gold, Visa Platinum), MasterCard (Cirrus, Maestro, MasterCard Standard, MasterCard Gold, MasterCard Platinum), Diners Club, American Express, JCB and China Unionpay.
- Virtual card - bank prepaid card without a material carrier
So, about prepaid cards. In the States, they are very popular and you can buy them at any Walmart, T-Mobile or another major store. How it is used. Suppose you have a beloved nephew and you decided to give him money for his birthday. But since donating a cache is not fashionable, and a nephew buys something, let's say on Amazon, then you go and buy such a card, for example, for $ 50. After that, the nephew activates it on the Internet and is ready, he has a $ 50 card. There is also a subspecies prepaid card that can be replenished. The bottom line is that these cards are popular in the US, because they allow you not to shine your personal card on the Internet. What a plus. However, from the point of view of a company that, for example, does not charge the entire amount for service immediately (charge upfront), this is a big risk, because you can never show anything on such a card unless you can withdraw money. More precisely, you can, and there are even special procedures for this, but sometimes it is simply not worth it. You can understand what type of card you are working with using the first 6 digits of the card (bin number) and such a
service . By the way, the
link is a good infographics about what the number on payment cards means.
')
The second wonderful thing that you will surely come across when you start working with any payment systems is an error message. More precisely with their description. Why? Because most banks do not have a clear specification of what a particular code means, and when the service receives an error and cannot recognize it, you will see “Payment was declined”, which is really bad not for you, but for your user, who will be surprised and actively continue to press the button “Place order”, nothing will work, he will be offended and will go on forever. Although he may not be trite money on the card. To this we must be prepared and give a more detailed description of the error.
Now, a little about the payment service, or rather what functionality should have a good payment service.
General requirements:
- Understandable policy of use, so that you are not suddenly turned off, as Braintree did to us once (who is interested - I can tell you in person);
- Simple and clear dashboard, so that it can be used not only by programmers, but also by customer service;
- The most transparent documentation on the connection, and the following items must be clearly stated in it:
- Getting started
- API Docs
- Testing
- Two sites - test / production
- Troubleshooting
- Working with widgets (if any)
- Adequate support.
Functional requirements:
- Work with users, their maps and additional data;
- Data validation;
- Making payments;
- Subscription;
- Discount coupons;
- Work with invoices;
- Accounting
It goes without saying that all this should have a clear REST API that can be taken and used without additional gestures. An example of additional gestures - there is such a service stamps.com, which allows you to integrate with all sorts of USPS, FedEx and other services. To access their API, you need to send a request where to include the IP of all developers, so that these IPs are added to whitelist. After that, wait 2-3 days and there will be happiness. Enterprise is such an enterprise.
Actually, it's time to compare the services that I listed at the beginning. We will not go far, Stripe wins, which we actively use. The reasons:
- the most comprehensible documentation which I ever read - I never googled anything extra;
- easy to connect - almost copy-paste from the same documentation;
- very responsive support, and indeed an example of a company that values ​​customers (if interested, I can tell you in person);
- the simplest interface of the personal account is intuitively clear where it is.
The same braintree loses due to the fact that it is impossible without a bottle how to connect it, and I am silent about their documentation. As an example - try to find the numbers of cards for testing in the sandbox, good luck.
About paypal. Paypal is good when you sell electronic goods or service. In other cases - forget about it. Why? Here is a simple picture of how to integrate with it:
By the way, Paypal bought Braintree not so long ago and now gives them all sorts of new things to develop, because "they are a startup and can do it quickly and efficiently."
How to connect Stripe. Step one - javascript:
Now there is a server code - grails / java
Actually everything, you had a payment. The same code, for example on Braintree, will be 2.5 times longer.
On this, perhaps, everything. Ask questions in the comments, the topic is interesting, and I have collected enough rake in it.