/lockstep-sdk-java

Lockstep Platform SDK for Java

Primary LanguageJavaMIT LicenseMIT

Lockstep SDK For Java

maven-central

A financial service SDK for Java for innovative accounting solutions providers.

Who are we?

Lockstep automates accounting workflows to improve your operational efficiency and cash flow. Accelerate payments through automated customer communications, enhanced collections activity management, and innovative forecasting and reporting.

Getting Started

Here's how to add the Lockstep Java SDK to your project.

  1. Download the JAR file from the Lockstep documentation and import it into your Java Project;

  2. Obtain an API key for the Lockstep Platform API by visiting: API Key

  3. Create a LockstepAPI Client in your .java file

Map<String, String> environment = System.getenv();
String key = environment.getOrDefault("PASS_ENVIRONMENT_HERE", null);
//You can use either "sbx" or "dev"
LockstepApi client = LockstepApi.withEnvironment("sbx");
client.withApiKey(INSERT_API_KEY);
  1. Make a ping call to make sure you're connected https://developer.lockstep.io/reference/v1_status_retrievestatus
LockstepResponse<StatusModel> response = client.getStatusClient().ping();
System.out.println("Ping result: " + response.isSuccess());

You now have your API credentials and have successfully created your client.

How to Use (Basic Usage)

This example will show you how to call the Lockstep API, using the Query Invoices API to retrieve a collection of invoices.

# Connect to Client
# Lockstep provides sandbox and production environments

LockstepApi client = LockstepApi.withEnvironment("sbx");

client.withApiKey(INSERT_API_KEY);

InvoicesClient invoiceClient = client.getInvoicesClient();
LockstepResponse<FetchResult<InvoiceModel>> invoices = invoiceClient.queryInvoices("invoiceDate", "Company", "invoiceDate asc", 10, 0);
InvoiceModel[] invoiceModelList = invoices.getValue().getRecords();

for (InvoiceModel currentInvoice : InvoiceModel) {
    System.out.println("Invoice " + count + ":" + currentInvoice.getInvoiceId());
}

Sample Project

Collections Report Sample Java Project