GoCoin Java Library
Latest commit 3de10a0 Jun 17, 2014 Aaron LaBella point all references to production



A Java client library for the GoCoin API.
Current Version:
1.0.0-SNAPSHOT Download .jar
Maven Docs


Turning on DEBUG or VERBOSE will help debug any issues:

GoCoin.DEBUG = true;
GoCoin.VERBOSE = true;


  //get a scope or set of scopes, ie: Scope.getAllScopes()
  String scope = Scope.getScope(

  //get an authorization url
  URL auth_url  = GoCoin.getAuthURL(
    clientId,     //client/appplication id
    redirectId,   //redirect uri
    scope,        //scope
    "optional"    //state

  //get a new oauth token
  Token token = GoCoin.getAuthToken(
    code,         //code
    clientId,     //client/appplication id
    clientSecret, //client secret
    redirectUri   //redirect uri

  //call a service method, ie: get the invoice by id
  Invoice i = GoCoin.getInvoiceService().getInvoice(t,invoiceId);

Services and Methods


static ExchangeRates getExchangeRates()
static URL getAuthURL(String clientId, String redirectUri, String scope, String state)
static Token getAuthToken(String code, String clientId, String clientSecret, String redirectUri)
static Token getAuthToken(AuthCode authcode)
static AccountService getAccountService()
static DepositAddressService getDepositAddressService()
static InvoiceService getInvoiceService()
static MerchantService getMerchantService()
static MerchantUserService getMerchantUserService()
static UserService getUserService()
static Calendar parseTimestamp(String s)
static String formatTimestamp(Calendar c)


boolean confirmUser(Token t, User u, Map parameters)
User createUser(Token t, User u, Map parameters)
boolean deleteUser(Token t, User u, Map parameters)
User getResourceOwner(Token t)
User getUser(Token t, String userId)
Collection getUserApplications(Token t, User u)
Collection listUsers(Token t, Map parameters)
boolean requestConfirmationEmail(Token t, User u)
boolean resetPassword(Token t, User u)
boolean resetPasswordWithToken(Token t, User u, Map parameters)
boolean updatePassword(Token t, User u, Map parameters)
User updateUser(Token t, User u, Map parameters)


Merchant addMerchant(Token t, Merchant m) NOTE: admin only
boolean deleteMerchant(Token t, Merchant m) NOTE: admin only
Merchant getMerchant(Token t, String merchantId)
Collection getMerchants(Token t) NOTE: admin only
Merchant updateMerchant(Token t, Merchant m)


boolean addMerchantUser(Token t, String merchantId, User u)
boolean deleteMerchantUser(Token t, String merchantId, User u)
Collection getMerchantUsers(Token t, String merchantId)


Collection getAccounts(Token t, String merchantId)


boolean generateDepositAddress(Token t, String accountId)


Invoice createInvoice(Token t, String merchantId, Invoice i)
Invoice getInvoice(Token t, String invoiceId)
InvoiceSearchResult searchInvoices(Token t, SearchCriteria criteria)


Copyright 2013 GoCoin Pte. Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.