Login

Transfers API

Home Solutions Transfers API

Automate your outgoing transfers using the transfers API


Your API key

The first thing you need to use the transfer API is an API key. This key is unique and strictly personal, anyone in possession of your key will be able to make transfers with your account.
Warning: Never share your API key even if someone asks you to!




Entry point

All requests to the API should be sent to the URL below. All parameters must be passed in POST. However you can pass the parameters in GET if you wish by adding the GET parameter "mode".

URL
Parameters
  • api_key — Your API key
  • to — The recipient's account number or email address
  • amount — The amount of the transaction in Lucks (minimum 0.01)
  • message — The description of the transaction (optional, maximum 256 bytes)
  • mode — Set to "get" to use GET parameters instead of POST (optional, all POST parameters will be ignored)


Return value

A JSON containing the "code" and "data" fields:
  • code — The return code of the operation (see below)
  • data — Response data (if relevant)

List of return codes
  • 0 — Everything went well
  • 2 — Cannot find the user associated with this key
  • 5 — A parameter is missing
  • 13 — API key is invalid
  • 17 — The recipient of the transfer does not exist
  • 18 — The message is too long
  • 19 — The amount is invalid
  • 20 — The recipient does not accept transfers
  • 21 — Insufficient funds
  • 22 — Cannot find the account linked to this API key
  • 23 — Error in the final phase of the transaction

Response data
If the transfer was successful, the "data" field contains an object representing the transaction carried out:
{
    "id": The unique identifier (16 bytes),
    "amount": The amount,
    "formatted_amount": The amount formatted in your language,
    "transaction_time": The transaction time (UNIX timestamp),
    "message": Description (maximum 256 bytes),
    "type": Always "out" because the transaction is outgoing,
    "from": {
        "account": Issuer account number,
        "account_raw": Issuer's raw account number (without the first part and the dashes),
        "name": Issuer name,
        "certified": Is the issuer certified
    },
    "to":{
        "account": Recipient's account number,
        "account_raw": Recipient's raw account number (without the first part and the dashes),
        "name": Recipient's name,
        "certified": Is the recipient certified
    }
}


Example

Below is an example of a GET request to the API and a possible return JSON:

URL
Response data
{
    "code": 0,
    "data": {
        "id": "0123456789ABCDEF",
        "amount": 42.42,
        "formatted_amount": "42,42",
        "transaction_time": 1612278103,
        "message": "Hello world!",
        "type": "out",
        "from": {
            "account": "LKS0-1234-5678-9123-4567",
            "account_raw": "1234567891234567",
            "name": "My account",
            "certified": false
        },
        "to": {
            "account": "LKS9-8765-4321-0987-6543",
            "account_raw": "8765432109876543",
            "name": "Another account",
            "certified": true
        }
    }
}