Connecting to the LinkPoint staging server for payments integration

Posted by


I’ve build payments and licensing infrastructure for my ScreamingToaster ONE Platform, that allows mobile, web, and desktop software to share the same payments and licensing services. For payments, I integrated with FirstData Global Gateway, using the LinkPoint API. The LinkPoint API is good and FirstData provides lots of documentation that shows you how to get started. However, there is one huge flaw in their API and support docs – they don’t show you how to connect to the LinkPoint TEST gateway. All the code and examples are geared to connect to the PRODUCTION/LIVE gateway. If you’re like me, you want to test your stuff before hooking up to the LIVE gateway 🙂 . So this tutorial is dedicated to simply connecting to their TEST gateway, so that you can test your code before going live.

Even if you have a production account, in order to connect to the test gateway, you will need a test account. Sign up for one here from FirstData. LinkPoint is used by lots of payment gateway services, not just FirstData, so this information should be relevant to anyone using LinkPoint APIs.

Using LinkPoint staging server

The LinkPoint staging server uses a self signed certificate. This makes it tough to connect to the server from Java. You have to import the certificate of the staging server into your Java VM. You must have a openssl for this to work. Here’s how:

Step1: openssl s_client -connect

This will get the certificate from the server. Copy the bits between begin and end certificate. Here’s a screenshot:


Here’s what it looks like:


Save this certificate as “staging_cert.pem”.

Step2: keytool -import -file staging_cert.pem -alias linkptstaging

This will import the staging certificate file into a keystore file, using the JDK’s keytool program. The keystore file is stored in $home/.keystore by default. So you can either move it to a folder of your choice or leave it there. In this example I’m moving the keystore file to “/myfolder”.

Step3: java …

When you start up your Java VM, you have to reference the .keystore file you created in order for your program to connect to the staging server. This is accomplished by passing the path to the keystore file in the command line parameter. If you are using Tomcat or another app server to connect to the staging server, then you must include this in the startup script for Tomcat. If it’s a desktop app, then this has to be passed to the script that launches the desktop app.

That’s pretty much it. Now that your Java VM can connect to the staging server, you can test out all the payments code using the LinkPoint API. Be sure in your code to point to the test server, and not the production server! The host name for the LinkPoint test server is “”.