Requests and Responses

Lemonway's API Server, Directkit can be accessed through either a SOAP Webservice (XML) or a JSON-based Webservice (JSON). The following document describes the general format of requests and responses for the Directkit:

Requests and responses are encoded in UTF-8.

Request and responses (SOAP XML or JSON) depend on the Directkit URL of your specified API:

Any technology that supports HTTP (such as PHP, Python, NodeJS, Ruby, Golang, etc.) can communicate with our Directkit API.

The directkitjson2 integration is often simpler and more network-efficient, so we recommend using it over directkitxml.

For Legacy Partners

  • If your current Direckit URL is https://.../directkit/service.asmx You are using the legacy instance of Directkit. You should migrate to the directkitxml which is mostly the same (or even better the directkitjson2)

  • If your current Direckit URL is https://.../directkitjson/service.asmx You are using the legacy instance of Directkit. You should migrate to the directkitjson2 which is mostly the same.

Each response is returned as a string:

XML

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
 <soap12:Body>

<MethodName xmlns="Service_mb">

<wlPass>string</wlPass>
<wlLogin>string</wlLogin>
<language> string </language>
<version> string </version>
<walletIp> string </walletIp>
<walletUa>string </walletUa>
... 

</MethodName>

</soap12:Body>
</soap12:Envelope>

<?xml version="1.0" encoding="utf-8"?>
<SomeResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="Service_mb_xml">
    <E>...</E> <!-- available only in case of error -->
    <Key>{Value}</Key>
</SomeResult>

JSON

{

    "p":{   
        "wlPass":"string",
        "wlLogin":"string",
        "language":" string ",
        "version":" string ",
        "walletIp":" string ",
        "walletUa":"string"
        ...
    }

}
{
    "d": {
        "__type": "WonderLib.SomeResult"
        "E": {..} /* available only in case of error */
        "Key": {value} /* result */
    } 

}

MethodName: name of the method in this API, i.e. "RegisterWallet"

All requests should contain:

ItemDescriptionMandatoryFormatExample
wlLoginYour loginYes[1: 50] charPizza87
wlPassYour access key is given after the creation of your site, you can change it in the Lemonway Dashboard.Yes[1: 50] charaizohdeh78
languageResponse languageYes[2 : 3] charfr: French (by default)
versionUsed by legacy clients in the old system which might crash if the DirectKit returns newer fields. We recommend putting a big version number in the request for eg "10.0" to always get the newest fields from the response of the latest DirectKit version.Yes[4] char1.0 (by default)
walletIpThe IP address of the final clientYeschar91.222.226.32
Please send the IP address of your client (the payer), not your server, to help us fight against fraud and reduce your Customer Care calls when we have a claim from a user. If you don't have it. Please use one of the IP public of the server which makes the call or at least an IP public that belongs to you (For eg IP of your website)
walletUaUser-agent of the final clientNocharMozilla/5.0 (Windows NT 6.1; WOW64) 
Please send the User-agent of the end-user browser. If you don't have it, you can put something which will help you identify the caller or the motivation of the call.

JSON2 Request Response example

You can call DirectkitJson with PostMan on a whitelisted machine