The LemonWay API (called Directkit) has two implementations: DirectkitJson2 and DirectkitXml.
The DirectkitJson2 is recommended over the DirectkitXml because It is the simplest and the most network-efficient way.
This tutorial show how simple it is.
LemonWayService service = new LemonWayService("society", "123456");
Map<String, String> param = new HashMap<String, String>() {{
put("wallet", "9999");
}};
JSONObject response = service.callService("GetWalletDetails", param);See also: LemonWay API documentation / method GetWalletDetails
After downloading this project (git clone), run:
gradlew run
Out of the box it will call the demo environment. If you have your own test environment. You should fix the configuration in LemonWayService.java, put your own environment configuration.
The example is only the basic, you can also play with our API by calling other services. For example:
- Create a new wallet
- Create a payment link to credit a wallet
- Credit the wallet without 3D secure
- Credit the wallet with 3D secure
- Create a payment form to credit a wallet
- Register a Credit card to the wallet
- Register an IBAN to the wallet
- Transfer money from wallet to a bank account
- Transfer money from wallet to other wallet