Integrating a Payment API in your On-Demand Service : Part Six of the User Journey Series
This is the sixth part of an 8 part series called ‘User Journey on an On-Demand Business Platform’
There are many questions that need to be answered in order to determine how Payments are going to work for your platform, such as – what different modes of payments to support, which payment gateway or digital wallet to use, to deduct payment at what stage in the user journey. It is also imperative to ensure information security in the on-demand economy while creating a structured approach towards planning payments flow. The following write-up takes you through the payments module in detail:
Here’s what a typical payment flow looks like:
- Customer adds a Credit Card to his profile. A token i.e. an encrypted code is created corresponding to each card and is attached to Customer ID. Customer’s payment information is saved in vault at payment gateway’s end.
- At the time of payment, payment is deducted from customer’s card through payment gateway.
- Depending on application logic, payment is either split and paid out to business owner’s and service provider’s accounts OR entire amount is credited to business owner’s account.
Payment Stages in the Customer Journey
Payment can be made at different stages in customer journey depending on your business model. Some examples are –
- After service is performed – e.g. in a transport application such as Uber, payment is made after the service is completed because fare calculation logic takes into account distance traveled and time taken to complete the ride.
- When service provider accepts the job – e.g. in an on-demand beauty solution, when customer selects a set of services and time, a request is sent out to registered stylists. Payment is deducted from customer account when a stylist accepts the request.
- When customer makes booking – e.g. in an on-demand meal delivery application, payment is made as soon as customer selects his food items and places the order.
When a customer makes a payment through your app, it will be transferred to your payment gateway account. You will be able to transfer money received in your PG account to your linked bank account later.
You can either create a merchant account or a marketplace account with your payment gateway. A merchant account can only receive payments via PG, whereas, a marketplace account can do both i.e. receive and make payments via PG. If you choose a business model wherein you want to receive complete payment made by customer and pay your service providers later, you will need to create a marketplace account. However, if you choose to go for a split payment system, you may go for either a merchant account or a marketplace account.
Paying your Service Providers
SPs can add their credit card details on their profile on service provider’s app. This will again be saved in the form of a token. OR you may take their CC or Bank account details offline and add those in admin panel corresponding to each service provider.
Payments to SPs can be made:
- After fixed intervals – You may choose to pay your service providers on a weekly/bi-weekly/monthly basis. System will keep a tab on payments accrued by each service provider and you will be able to view this information and make payments directly from admin panel.
- Immediately – Payment gateways such as Braintree and Stripe Connect allow you to split the payment received from customer into two parts and simultaneously direct these split payments to Braintree/Stripe account of business owner and CC / Bank Account of service provider respectively. As per client’s requirement, logic will be built into backend code to calculate respective payouts for service provider and merchant for each customer transaction and these values are sent to Payment gateway API to make required payments.
Note: Above method does not mean that payment will be credited to service provider’s accounts instantly. It only means that from your platform’s end, payment to SP’s account will be initiated as soon as it is deducted from customer’s card. It may however take 4-6 days for the payment to show up in SP’s account depending on their bank’s processing timelines.
Available Payment Gateways
This largely depends on what options are available in the service area of your application. Some implementations we have done in the past:
- USA – Stripe, Braintree, Paypal, Authorize.net, Heartland
- UAE – Payfort
- India – PayU, PayTM
- Bermuda – PayEasy
- Nigeria – Firstdata
- Uganda -PesaPal
Integrating Payment Gateways
Most payment gateways provide a mobile SDK (software development kit) and offer native mobile libraries for Android and iOS. Our development team will use these libraries to integrate the payment gateway with your solution.
Please note that in some cases (e.g. Stripe), these libraries provide their own payment UI screens and can not be customized. Braintree allows UI customization.
It is NOT necessary for your credit card to be PCI compliant.
Anyone who accepts credit card payments needs to comply with latest PCI DSS rules, but this is covered by integrating your payment system with a PG. Because when you use a payment gateway, its libraries send credit card data directly to PG’s servers, where this is converted to tokens – thereby eliminating the need to store sensitive credit card data on your servers. You can charge these tokens later in your server side code.
Cost of Integrating a Payment Gateway
There is no cost involved in setting up or integrating a payment gateway to your solution. They take a percentage of transaction amount. e.g. Braintree and Stripe charge 2.9% + $ 0.30 per successful transaction.
Some payment gateways set a limit on minimum transaction amount e.g. Stripe requires a minimum of $0.50 for each charge.
Business owner can go to merchant PG account and initiate a refund to customer account.
- Tokenization – Customer payment information is converted into an encrypted code and saved in a vault at PG’s end. No payment information is saved on your application servers.
- All APIs of payment gateways are on SSL, thus providing an encrypted communication link for API requests and responses.
Additional Features – Scanning your Card
By using card.io, i.e. a free Android / iOS SDK provided by PayPal that can be integrated to your solution to enable scanning credit cards in your mobile app.
Difference between PayPal and Stripe/Braintree
PayPal is a wallet, whereas Stripe/Braintree are payment gateways. We recommend using a PG over a wallet because in case of a wallet, there is no tokenization. A customer will need to enter his credit card information every time he makes a purchase through your app. If you are using a PG, his payment information is securely saved and does not need to be re-entered at the time of purchase.
Testing your Payment System
Testing is done in sandbox environment for which integrated PG provides a test credit card that is linked to your product key.
In our experience, we have found that Customers’ Amex cards do not directly work with Braintree and Stripe PGs. Merchant or the business owner has to submit a request to Braintree or Stripe to enable processing of these cards on their Payment Gateway.
Get in Touch with us if you are looking to create the next big disruption with your on-demand business idea! We have got your tech covered. no worries. To know more about Juggernaut, go to the homepage .