× Docs Merchant checkout Log in

Quick guide

To get started with the API you have a couple options:

  1. You can choose to use one of the Mobie supported SDKs or
  2. Integrate the API manually in your choice of language.

To use one of the SDKs check for you language in the “references list” in the sidebar. If you instead want to use a language that does not have a Mobie supported SDK, a custom implementation should be trivial as the platform uses standard HTTP which is widely supported.

Using the API

The easiest way to get started with the API is to use cURL to make a login request:

curl https://api.mobiepay.io/3/auth/login/
  -X POST
  -H "Content-Type: application/json"
  -d '{"user": "joe@example.com",
       "company": "mobie_prod"
       "password": "joe1234"}'

Once you have your own user you can replace the placeholder data in the example JSON object and then fire off the above request. If successful, you should get a response like this:

{
    "status": "success"
    "data": {
        "token": "{token}",
        "user": {
            "id": "00000000-0000-0000-0000-000000000000",
            "first_name": "Joe",
            "last_name": "Soap",
            "email": "joe@example.com",
            "username": "",
            "id_number": null,
            "birth_date": null,
            "profile": null,
            "currency": null,
            "company": "mobie_prod",
            "language": "en",
            "nationality": "CA",
            "metadata": {},
            "mobile": "+00000000000",
            "timezone": null,
            "verified": false,
            "status": "pending",
            "kyc": {
                "updated": 1509539801040,
                "status": "pending"
            },
            "verification": {
                "email": true,
                "mobile": true
            },
            "groups": [
                {
                    "name": "test",
                    "label": "Test"
                }
            ],
            "permissions": [],
            "settings": {
                "allow_transactions": true,
                "allow_debit_transactions": true,
                "allow_credit_transactions": true
            }
            "created": 1464912953000,
            "updated": 1464912953000,
        }
    }
}

And there you have it, a successful login. The user was validated and authenticated on the platform and an authentication token returned.

For example, you may want to get a list of accounts associated to the user:

curl https://api.mobiepay.io/3/user/accounts/
  -X GET
  -H "Authorization: Token {token}"
  -H "Content-Type: application/json"

If you used the token you previously retrieved you should get a successful response containing a list of user accounts:

[
    {
        "name": "default",
        "reference": "0000000000",
        "primary": true,
        "currencies": [
            {
                "balance": 10000,
                "available_balance": 10000,
                "currency": {
                    "code": "XBT",
                    "description": "bitcoin",
                    "symbol": "฿",
                    "unit": "bitcoin",
                    "divisibility": 8
                },
                "limits": [],
                "fees": [],
                "settings": {
                    "allow_transactions": true,
                    "allow_debit_transactions": true,
                    "allow_credit_transactions": true
                },
                "active": true
            }
        ],
        "created": 1464858068745,
        "updated": 1464858068745
    }
]