Across the Board

Blog on e-business and online payments.

Implementation of Credit Card Payments for Your SaaS Business (via API)

Implementing Credit Card payments is not as tough a task as it may seem at a first glance.

Although it takes a few steps to have everything set up and ready to collect money from customers’ accounts, it is worth the effort in the end.

To get accustomed to the process, we will walk through it using PayLane’s routine as an example. Generally, with every single provider the whole thing looks nearly identical or exactly the same.

Let’s set up a test account (for our purposes imaginary one will do) and give it a whirl!

1. Assessment on a Provider’s Offer

Before we decide on integrating a payment system into our SaaS, we should make sure the chosen solution accommodates our needs in 100%.

To do this, we can visit the provider’s page and register for a test account.

This kind of account is free. Usually, the only thing you are allowed to do with it is to check the provider’s capabilities. In some cases, you may also start integrating your SaaS with the provider.

Transactions processed via test account are not real. The funds are not collected from clients’ cards and bank accounts.

2. Your Merchant Account Verification

To get the verification from your payment provider you need to send them required information. Along with delivering the info and necessary documents you let the provider know about your needs.

Most often the verification is made by a division of compliance. If there are no additional formalities in the way, they verify merchant account and then the provider contacts you.

Next comes the signing of a contract.

3. Green Light! – but Not Ready to Collect Yet

After verification and signing an agreement, you get a fully operational account. For an entrepreneur, it means that they are able to start making real transactions and getting paid. What is left is to ensure that everything gets properly configured. Only then will you be able to collect money from your clients.

4. Tying up Loose Ends

You got the account up and running. You got the information that it was verified.

What comes next?

As I have mentioned in the first point: there are situations where you don’t get to implement the payment in your service during setting a test account.

If that’s what it was in your case – now would be the high time to do this.

5. Learning How to Pull the Strings

To familiarize yourself with the options that your provider delivers, you need to do some reading.

From the specification documents, you will find out how to implement payments in such a way, that there is no redirection to the provider’ s page while checking out. After all, you want to keep your client on your SaaS’s page until the very end of the checkout.

To do this, you look up Application Programming Interface (API) information and code. Thanks to it, your integration will be seamless.

6. Integration Intricacies

Every self-respecting payment provider allows integration with Representational State Transfer (REST) API. What’s more, most of the good providers supply their clients with JavaScript libraries.

JS unburdens merchants from the necessity of processing and transmitting data manually, and takes over most of the PCI responsibilities. It’ s convenient because on the merchant’s side those obligations can be kept to a minimum. While using this solution the merchant does not have to process the credit card information.

7. Fleshing out Your Payment Form

By now, you are ready to integrate your SaaS with the provider via API.

On the SaaS’s site, you create a payment form in HTML (or add payment field to an existing one, e.g. your registration form.)

When allowing a card payment, you include following fields on the form: credit card number, card expiration date, name on the card and CVV/CVC.

8. Letting JavaScript Do the Job

If you are using JS library – you attach it to the form.

When the customer submits the form – the JS library will send the card information to the payment provider’s server, and the server will answer with a generated token. (It is automatically added to the payment form.)

All the other data from the form (including token) will land on the SaaS’s server. The merchant who is in possession of the data and token is able to use a chosen method from provider’s API (for instance: saleByToken or authorizationByToken.) You will find more on this matter in PayLane’s developer zone.

9. Processing the Credit Card Data

If you are not using JS library, it consequently means that you want to process and transmit the data yourself. In this situation – after a client submits a payment form, all the form data (including card information) lands on your server. Only after the data is collected and placed there, you send it to the provider’s API. To do this, you are using methods that don’t require a token (for instance sale or authorization.)

10. Getting Your First Payment

Now everything looks prepared and ready to work. Time for some real transactions!

The provider, upon receiving the information necessary to go through with the payment, sends you an answer with the transaction status and a unique id of the transaction (it’s good to have those saved in your database.)

If the transaction is successful, an informational message should be shown in your SaaS. If not – an alert should inform the user about a failed transaction and encourage to repeat the necessary steps.

Get Paid Swiftly, the Way You Want It

Done! The imaginary payment for your SaaS service went through. Now you are prepared for the real thing.

To sum things up: your payment provider integration gives you a fair amount of control over the way you process clients’ data. You can process credit card information yourself if you want to, but if you wish to get rid of this part of the payment process from your system, the provider gives you tools for it.


You should also read: 10 Steps to Implement Credit Card Payments (via Secure Form)

mm

Experienced executive, people-oriented leader, doer, entrepreneur. CEO at PayLane. Business educator on KarolZielinski.com. Also on Twitter.

Are you a business looking for a payment processor?


Don't miss any articles!

Leave your email and get regular updates!

Close window