We explain what we came to understand after a year and a half of working with gateways, and why we decided to also use a Chinese payment aggregator.
VPN-application with payment subscription
Integrate popular payment systems to make it convenient for users to pay for a subscription
- Stripe, PayPal, Apple In-app purchase, and Google Play Billing are payment gateways for traditional cashless payments.
- CoinPayments is a gateway for crypto payments.
- Paymentwall is a payment aggregator that supports 150 payment methods in 200 countries.
- 5 payment gateways connected within 4 months
- Working now on adding a payment aggregator that will compensate for the shortcomings of current payment methods, and help the company expand into the Asian market.
- Users can securely pay for their subscription using any payment method available in their country.
Developed a VPN app for a Canadian company
The Canadian company owns an entertainment content platform used by people all over the world. Some users cannot enter the platform due to blocking. Their countries, for political reasons, block access to some sites and applications. To open access and protect users' personal data, the company decided to release its own VPN application with a monthly paid subscription. Initially, the company hired the team that offered the lowest price for this job. They worked on the project for almost a year, but without success. It was then that the company turned to OrbitSoft.
We audited the old version, fixed the bugs, improved the design, tested the MVP, rendered it a fully functional application, and finally published it on the App Store and Google Play. Read more about the project in the article. «VPN App: How We Fixed Other’s Mistakes and Launched the Project». In this article, we focus on how we set up payment methods in the application.
To allow users to pay for subscriptions, payment gateways were needed
Online stores, websites, and applications offer users payment through various payment systems, such as PayPal and Apple Pay, for example. There are also systems designed specifically for cryptocurrencies, such as CoinPayments. Each system provides its own payment gateway.
For an application, a payment gateway is a «bridge» through which it transmits transaction data to the payment system. For the user, this is the order payment page, where the user needs to enter bank card details. It’s the gateway that determines whether to approve or reject the transaction.
If a company for some reason wants to stop using existing payment gateways, it will have to spend time and money developing its own gateway, as well as take on the responsibilities of the payment system:
- Open a bank account for trading operations
- Store transaction data on a server
- Be certified according to the PCI DSS protocol, a standard for the security of bank card data when paying for goods and services online. If there are violations, fines can reach as high as 200 thousand dollars.
It’s worth developing a gateway only if one hopes to sell it as a standalone product.
We connected 5 payment gateways
The more payment methods available in an application, the more users will find a convenient option to pay for a subscription, and, consequently, the greater a company’s profit. Our customer decided to implement the 5 most popular payment gateways:
- First, we connected Google Play Billing and Apple In-app purchase for payment from smartphones.
- Then we connected Stripe to pay for a subscription through the browser. This method is suitable for those who don’t want the transaction to go through Apple and Google services, as well as for users from countries where these services do not work.
- Additionally, we connected PayPal, as many users already have accounts with this service, and are used to using it.
- To expand the audience, we also connected CoinPayments, which is a gateway for paying with cryptocurrency.
It took from 2 to 4 weeks to connect each payment gateway. The action plan is:
- Developers review documentation and determine if a solution is appropriate:
- The payment gateway must support annual, monthly, and trial subscriptions.
- Check if the trial period has ended so that the user cannot subscribe to the free version multiple times.
- Provide API. This is code that describes how the application should work with the gateway.
- Designer adds a payment page layout to the application.
- Developers add API support.
- QA checks the code and operation of the gateway simultaneously in the test environment provided by the gateway and on the customer’s servers.
- Bring the application to market.
Which of the gateways turned out to be the most convenient?
For the customer to be able to evaluate the operation of the gateways in real time, we developed an analytics service. It showed which gateways had errors more often and how this affected subscriptions. For a year and a half of the application’s operation, we compiled a rating of payment gateways:
1. Competent documentation
Detailed technical documentation saves time for developers. All questions about working with the gateway are together in one document. This also helps to estimate the cost of development in advance, to agree on the functionality of the future system, and to plan its further development.
We found it most convenient to work with the documentation from Stripe, Google Play Billing, and CoinPayments. Therefore, the API of Stripe and CoinPayments is clear and well documented, and the library has many ready-made solutions in different languages. Stripe offers the Stripe Elements UI library, which allows one to customize the payment form for any resource.
Google documentation has code examples and a detailed description of how to integrate and test the gateway. The general process for receiving money is described, and there is a video with explanations. Transparent transaction statistics help one to quickly find errors.
2. Detailed testing environment
A test environment helps with checking the operation of the gateway before its implementation, and so to correct possible errors ahead of time.
QA prepare test cases: they describe all possible scenarios of user interaction with the gateway. For example: how the gateway will react if the user’s card has exceeded the transfer limit, if the user has not entered all the data, if the card has been canceled or expired, or if the code to confirm the payment doesn’t work for some reason.
The scripts are tested in the test environment provided by the gateway. The more scenarios the environment allows one to check, the fewer errors one has in the finished application. For example, with Stripe and CoinPayments, you can test any scenario.
It happens that occasionally the test environment doesn’t work correctly. For example, in an Apple In-app purchase, we tested the scenario when a user subscribes for the first time. For this, a tool was needed that clears the purchase history. The gateway test environment provided such a tool, but the interface did not always work, i.e. the history wasn’t cleared. We had to spend more time to test this scenario multiple times.
Some payment gateways allow for full testing, while others allow for partial testing. In the second case, testers use real money and cryptocurrencies to test scenarios that are not in the gateway test environment. This increases the cost of testing.
3. Anonymity of payment
Some users prefer not to store their personal data with services such as PayPal. When you create a PayPal account, you need to provide a name, phone number, billing address, and register a bank card. This option is not suitable for those who value anonymity in a transaction. In addition, the service can independently write off money at any time.
In Stripe, payment takes more time, but it doesn’t require filling in many fields or linking a specific card to the service. A user simply enters the number of the card they wish to pay with. This option is also suitable for users from countries where Apple Pay, Google Pay, and PayPal do not work.
4. Payment speed
The fewer clicks a payment takes, the more users will complete it. Therefore, the fastest way to pay is through Apple and Google gateways: users don’t go to other pages… they pay for a subscription directly in the application, using just one click.
An online support service saves developers time if they have questions regarding connecting a gateway to the application. It’s also important for users to solve problems with payment.
In Stripe, users and developers can contact the «HelpDesk», or the forum, and the problem will be quickly resolved. Support for Apple, Google, and PayPal services is worse. Our requests were either not processed, or answered within a few days or weeks. By this point, some users had already left, and the company was losing potential income.
6. Transaction fees
The customer wanted to connect the CoinPayments gateway to expand the audience, making it possible to pay in cryptocurrency. But due to the high fees involved in using CoinPayments, users generally chose other payment methods.
After over one-and-a-half years in operation, the Stripe payment gateway has proven to be user-friendly and developer-friendly. Although it still doesn’t work quite as fast as the Apple and Google services. Apple and Google offer one-click payment, but are slow to resolve user issues, and require a lot of personal information. CoinPayments turned out to be convenient and anonymous, but due to the high fees, most people chose other payment methods. PayPal is neither user-friendly nor developer-friendly, but it is still used by a subset of buyers.
Integrated Chinese payment aggregator Paymentwall
To compensate for the shortcomings of the existing payment methods the customer wanted to add more payment gateways to the application. Instead, we suggested that he connect a payment aggregator. It combines many payment methods together in one convenient location. Users in any country in the world will be able to choose the appropriate one for them.
We chose the Paymentwall aggregator from a Chinese developer. It supports 150 payment methods in 200 countries, including crypto payments. The user selects a region and immediately sees the available payment options. This aggregator also helps the customer to easily enter the Asian market.
Result: 5 payment methods integrated in 4 months
Users can pay for the app subscription through 4 popular payment gateways, as well as an aggregator that supports 150 payment methods in 200 countries, including crypto payments:
- PayPal, Apple Pay, and Google Pay are used by subscribers who are accustomed to these services.
- Stripe has fewer bugs. It’s convenient for new users, for those who need fast payments, as well as for those who prefer anonymity close to that of cryptocurrency.
- The project will continue: OrbitSoft will integrate a payment aggregator. This will solve problems with payments in different countries, help the application enter the Asian market, and attract new subscribers.