paydock logo on transparent background
  • Solutions

    Solutions

    For Banks

    For Merchants

    Generic selectors
    Exact matches only
    Search in title
    Search in content
    Post Type Selectors
    post
    page
    • Expand Market Share
    • Elevate Merchant Experience
    • Offer the Latest Payment Technology
    • Rocket Launch New Merchant Services
    • Minimising Payment Tech Risk
    • Ever Fresh Payment Experiences
    • Deep Security and Stability Uplift
    • Reporting and Reconciliation Fixes
  • Our Platform

    Our Platform​

    Paydock

    Quick Contact

    Generic selectors
    Exact matches only
    Search in title
    Search in content
    Post Type Selectors
    post
    page
    • Our Platform
    • Features
    • For Banks
    • For Merchants
    • Our Platform
    • Features
    • Contact Support
    • Our Helpdesk
    • Contact Us
  • Developers

    Developers

    Paydock

    Resources

    Generic selectors
    Exact matches only
    Search in title
    Search in content
    Post Type Selectors
    post
    page
    • Status Page
    • Documentation
    • Support
    • Our Helpdesk
    • Release Notes
    • Changelog
    • GitHub
    • Boilerplates
    • NPM
    • Responsible Disclosure
  • About

    About

    Paydock

    Newsroom

    Generic selectors
    Exact matches only
    Search in title
    Search in content
    Post Type Selectors
    post
    page
    • Values
    • Careers at Paydock
    • Our Team
    • About Us - Our History
    • Newsroom
    • Contact Us
    • Blogs
    • Press Releases
    • Podcasts
  • Search

    Generic selectors
    Exact matches only
    Search in title
    Search in content
    Post Type Selectors
    post
    page

    Most Searched

    • Features
    • Contact Us
    • Banks
    • Merchants
Get Started
Log In

Java SDK

  • Press Releases
Java logo with a laptop that has been partially closed in the background.

PayDock has now released Java SDK, which can be downloaded from JCentre. There are different dependency snippets to be inserted in your code based on your selected build settings (we support Gradle, Maven or Ivy).

The library is opened sourced and can be found here. Specific tests for you to reference in your program are here.

Planning

Writing the Java SDK was interesting and our approach changed over time. There were a few considerations

  1. Which HTTP library to use: I settled on HttpsURLConnection instead of Apache’s client. I found an example which worked early on so I didn’t change it.
  2. Which JSON library to use to map the data models: I settled on the GSON library from Google as it also handled the date format.
  3. How to deal with ever increasing API functionality while keeping the the code base similar: You will find I extend a few base classes to try maintain the peace.

IDE

I used Android Studio to write the PayDock Java SDK. As I was also planning to write an Android SDK, it only felt natural that I use this IDE to create the library. Creating Java libraries in this IDE are quite simple and it allowed me to use the same repository and build scripts that I would for the Android SDK. Having written a few projects in Android Studio in the past made me feel comfortable using it. From the one IDE, I had the ability to write the Java library, include the functionality tests, link into GitHub for source control and then upload the library to JCentre for distribution. In the project file, I had a simple app which referenced the remote Java library on JCentre. This allowed me to verify that the library worked as expected when downloaded from the repository.

Structure of the SDK

The SDK is split into three sections:

  • Models – contained the structure of the data to be sent and received.
  • Services – contained the methods exposed in the SDK, such as add charges.
  • Tools – contained helpful methods that the services used, such as the HTTP connection class and the query string to url class.

Using this format made it easy to add new endpoints and features as they were added to the API.

Publishing

I used some libraries which easily allowed me to upload the SDK to Jcentre via Bintray. Once some of the artifacts were set, all I had to do was change the library version every time I wanted to upload the library. After the initial set up it now only takes a few seconds to upload a new version of the library to JCentre.

You can use the following steps to upload the library to Bintray, assuming you have already set up an account with them:

  1. In local.properties of your project file set your bintray credentials
    bintray.apikey=<your api key here>
    bintray.user=<your user name>
  2. Add the correct scripts and the library artifacts in your build.gradle
    My build.gradle can be found here
  3. Run the following commands in the terminal
    ./gradlew build
    ./gradlew install
    ./gradlew bintrayUpload

Use the SDK

I put a link to the SDK earlier in the piece so you can download the SDK and I look forward to any reviews and comments. Happy coding!

More from the Vault

  • Press Releases
  • 15 Apr 2025

Paydock Announces Leadership Changes to Accelerate Growth

[London, 15th April 2025] Paydock, the world’s first and only fully bank-grade payments enablement platform,

Paydock and Forter partnership
  • Press Releases
  • 15 Nov 2024

Paydock and Forter: Empowering Merchants and Financial Institutions with Seamless Payments and Fraud Prevention

Paydock and Forter: Empowering Merchants and Financial Institutions with Seamless Payments and Fraud Prevention Paydock

Aevi and Paydock partnership
  • Press Releases
  • 30 Oct 2024

Aevi and Paydock Unite to Revolutionize Omnichannel Payment

[London, 29th October 2024] Paydock, a leading eCommerce payment orchestration platform, has announced a strategic

Contacts

Orchestrate without clutter, confusion or code. Connect a world of payments and
commerce services to your business.

Contacts

Orchestrate without clutter, confusion or code. Connect a world of payments and commerce services to your business.

Sales

[email protected]

Support

[email protected]

Partnerships

[email protected]

Talent & Careers

[email protected]

Phone: 02035144739

Media, General

[email protected]

Accounts

[email protected]

Payments fly, profits rise and progress soars.

By creating a new money system that runs on our desire for more, we are the commerce orchestrators ensuring everyone walks away a winner.

  • Merchants plug-in
  • Paydock opens the door
  • Build meaningful payment experiences
Get started now
See all features
white paydock logo on transparent background
👋 we are hiring self-motivated people to join our team

Solutions

  • For Banks
  • For Merchants

Our Platform

  • Our Platform
  • Features

Developers

  • Status Page
  • Documentation
  • Support
  • Helpdesk
  • Release Notes
  • Changelog

About

  • Values
  • Careers at Paydock
  • Team
  • About Us - Our History
  • Newsroom
  • Contact Us
  • Solutions
    • For Banks
      • Expand Market Share
      • Elevate Merchant Experience
      • Offer the Latest Payment Technology
      • Rocket Launch New Merchant Services
    • For Merchants
      • Eliminating Payment Tech Risk
      • Ever Fresh Payment Experiences
      • Deep Security and Stability Uplift
      • Reporting and Reconciliation Fixes
      • Be A Master Merchant
  • Our Platform
    • Features
  • Developers
    • Status page
    • Paydock Documentation
    • Paydock Support
    • Our Helpdesk
  • About
    • Our Values
    • Careers
    • Our Team
    • About Us
    • Newsroom
    • Contact Us
Black Linkedin Logo On Transparent Background Black X Logo On Transparent Background Black Youtube Logo On Transparent Background Black Instagram Logo On Transparent Background

Paydock Holdings Pty Limited
L40,
2 Park Street,
Sydney,
NSW 2000,
Australia

 

 

Paydock Ltd
Arquen House,
4-6 Spicer Street,
St. Albans,
Hertfordshire,
England,
AL3 4PQ

Copyright © Paydock 2023. All Rights Reserved | Privacy Policy | Website Terms of Use 

Manage Cookie Consent
We collect cookies to analyse our website traffic and performance.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}