A library to manage users, transfer methods and payments through the Hyperwallet API
Hyperwallet's Java server SDK requires at minimum JDK (Java Development Kit) version 1.7 and above.
Maven
<dependency>
<groupId>com.hyperwallet</groupId>
<artifactId>sdk</artifactId>
<version>0.5.0</version>
</dependency>
Gradle
compile 'com.hyperwallet:sdk:0.5.0'
Documentation is available at http://hyperwallet.github.io/java-sdk.
To write an app using the SDK
-
Register for a sandbox account and get your username, password and program token at the Hyperwallet Program Portal.
-
Add dependency
com.hyperwallet:sdk:0.5.0
to yourpom.xml
(orbuild.gradle
). -
Create a instance of the Hyperwallet Client (with username, password and program token)
Hyperwallet client = new Hyperwallet("restapiuser@4917301618", "mySecurePassword!", "prg-645fc30d-83ed-476c-a412-32c82738a20e");
-
Start making API calls (e.g. create a user)
HyperwalletUser user = new HyperwalletUser(); user .clientUserId("test-client-id-1") .profileType(HyperwalletUser.UserProfileType.INDIVIDUAL) .firstName("Daffyd") .lastName("y Goliath") .email("testmail-1@hyperwallet.com") .addressLine1("123 Main Street") .city("Austin") .stateProvince("TX") .country("US") .postalCode("78701"); try { HyperwalletUser createdUser = client.createUser(user); } catch (HyperwalletException e) { // Add error handling here }
Run the tests using maven
:
$ mvn test