Omise Java Library
Latest commit 681a276 Jul 17, 2018


Maven Central Circle CI Discourse Forum

This library has been updated to v2.7.5, check the v1 branch for the previous version.

Omise-java provides a set of Java bindings to the Omise REST API. Please contact if you have any questions regarding this library and the functionality it provides.



WARNING: Android users should check out our omise-android repository instead.

This library requires Java 7 and up and is meant to be used with Java server implementations.


Adds to your build.gradle file.

dependencies {
    compile 'co.omise:omise-java:2.7.5'

Shadow JAR

If you have dependency conflicts with omise-java jar you can try using the shadowed JAR version which has the JAR dependencies relocated to the co.omise.dependencies package.

You can obtain a shadowed jar by manually cloing the project and running the shadowJar task:

$ git clone git://
$ cd omise-java
$ gradle shadowJar


$ ls builds/libs


Obtain a set of API keys from the Omise Dashboard and creates a Client object:

Client client = new Client("pkey_test_123", "skey_test_123");

Access the API by calling methods on the provided Resource classes, for example to get current balance:

long money = client.balance().get().getTotal();

Creating a charge from a token:

Client client = new Client("pkey_test_123");

try {
    Charge charge = client.charges().create(new Charge.Create()
            .amount(100000) // THB 1,000.00
    System.out.println("created charge: " + charge.getId());

} catch (IOException e) {


MIT license