Skip to content
This repository was archived by the owner on Oct 22, 2026. It is now read-only.
bvolpatoPublic archive

About

⚡ OpenNode.co Java Client

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opennode-java

Apache License Build Status Maven Central Coverage Status

⚡ OpenNode.co Java Client.

Download

Download the latest JAR or grab via Maven:

<dependency>
  <groupId>org.brunocvcunha.opennode-java</groupId>
  <artifactId>opennode-java</artifactId>
  <version>1.3</version>
</dependency>

or Gradle:

compile 'org.brunocvcunha.opennode-java:opennode-java:1.3'

Snapshots of the development version are available in Sonatype's snapshots repository.

Supported Operations & Examples

Create the Client

        OpenNodeService service = OpenNodeServiceFactory.buildClient("{api_token}");

Create a Charge

        OpenNodeCreateCharge createCharge = OpenNodeCreateCharge.builder()
                .orderId("ABCDEF-100")
                .description("OpenNode Java Client")
                .amount(1)
                .currency(OpenNodeCurrency.USD) // default is satoshis
                .build();
        
        OpenNodeCharge createdCharge = service.createCharge(createCharge).execute().body().getData();
        System.out.println("Created charge with ID: " + createdCharge.getId() + ". Invoice: " + createdCharge.getLightningInvoice().getPayreq());

Get a Charge by ID

    OpenNodeCharge charge = service.getCharge("{charge_id"}).execute().body().getData();
    System.out.println(charge.getDescription() + " - " + charge.getAmount() + " - " + charge.getStatus());

List Charges

    OpenNodeResponse<List<OpenNodeCharge>> charges = service.listCharges().execute().body();
    for (OpenNodeCharge charge : charges.getData()) {
        System.out.println(charge.getDescription() + " - " + charge.getAmount() + " - " + charge.getStatus());
    }

Want to tip a few satoshis? tippin.me/@bruflow

opennode-java requires at minimum Java 8.

Building from source requires JDK 21 or newer and Maven 3.6.3 or newer for the updated build plugins. mvn clean verify compiles against the Java 8 API and produces Java 8 bytecode. Its SDK compatibility tests use synthetic HTTP responses without contacting OpenNode or requiring an API token.

About

⚡ OpenNode.co Java Client

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages