Skip to content
CoinPayments.net Java Client
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main/java/org/brunocvcunha/coinpayments
.gitignore
.travis.yml
LICENSE
README.md
pom.xml

README.md

coinpayments-java

Apache License Build Status Maven Central Code Climate PRs Welcome

🎥 coinpayments-java - Java Wrapper for CoinPayments.net

Usage

Download the latest release JAR or grab via Maven:

<dependency>
  <groupId>org.brunocvcunha.coinpayments</groupId>
  <artifactId>coinpayments-java</artifactId>
  <version>1.2</version>
</dependency>

or Gradle:

compile 'org.brunocvcunha.coinpayments:coinpayments-java:1.2'

Supported Operations & Examples

Initialize

CoinPayments api = CoinPayments.builder()
        .publicKey("<publicKey>")
        .privateKey("<privateKey>")
        .client(HttpClients.createDefault()).build();

ResponseWrapper<BasicInfoResponse> accountInfo = api.sendRequest(new CoinPaymentsBasicAccountInfoRequest());
log.info("Account: " + accountInfo.getResult());

Create Transaction

ResponseWrapper<CreateTransactionResponse> txResponse = api.sendRequest(CoinPaymentsCreateTransactionRequest.builder().amount(10)
        .currencyPrice("USD")
        .currencyTransfer("LTC")
        .callbackUrl("<callback-url-if-wanted>")
        .custom("Order XYZ")
        .build());
log.info(txResponse.getResult().getTransactionId() + " - " + txResponse.getResult().getStatusUrl());

Do you like this project? Support it by donating

  • btc Bitcoin: 3EN9KCzKunc1PQppBXUSa8UCBoncMXii5C

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

coinpayments-java requires at minimum Java 8.

You can’t perform that action at this time.