🎥 coinpayments-java - Java Wrapper for CoinPayments.net
Download the latest release JAR or grab via Maven:
<dependency>
<groupId>org.brunocvcunha.coinpayments</groupId>
<artifactId>coinpayments-java</artifactId>
<version>1.3</version>
</dependency>
or Gradle:
compile 'org.brunocvcunha.coinpayments:coinpayments-java:1.3'
CoinPayments api = CoinPayments.builder()
.publicKey("<publicKey>")
.privateKey("<privateKey>")
.client(HttpClients.createDefault()).build();
ResponseWrapper<BasicInfoResponse> accountInfo = api.sendRequest(new CoinPaymentsBasicAccountInfoRequest());
log.info("Account: " + accountInfo.getResult());
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
Snapshots of the development version are available in Sonatype's snapshots
repository.
coinpayments-java requires at minimum Java 8.