Authentication


Introduction

In order to be able to use our API, you will need to authenticate each time you would like to using it.


Prerequisites

In order to use our API, you will need to :

1. Create an account

Visite our website and create an account.

2. Get api's key

After logging in, from your dashboard, you will able to get your PUBLIC_KEY. (Test Key : 48|e38u499dLrh94cPipLkranYXjHdUjWGsbEb9o2ud)


How to authenticate?

You have to add a Authorization header on each api call.

Please consider the examples below.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "{$ANY_API_URL}");
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`${ANY_API_URL}`, {
    headers: {
        "Accept": "application/json",
        "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
    }
})
.then((result) => {
    let response = result.data;

    console.log(response);
}).catch((error) => {
    console.log(error);
});
import requests

def example():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.get(ANY_API_URL, headers=headers)
    return json.loads(response.content)

Accounts


Introduction

 


Create account

POST Copy

Creating a new account.

Parameters

Name Type Description
rib numeric Required The Account RIB. Must be unique, numeric and have 20 chars length.
title string Required The Title of the receiver account.
firstname string Required The First Name of the receiver account.
lastname string Required The Last Name of the receiver account.
address string Required The Physical address of the receiver account.
default boolean Set the new created account as the default account.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Account created successfully.",
    "id"     : 1
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The created account ID.

Media Type: application/json

{
    "message": "The rib field is required.",
    "errors": {
        "rib": [
            "The rib field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/accounts");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'title'     => "Lorem Ipsum",
    'firstname' => "Lorem",
    'lastname'  => "Ipsum",
    'address'   => "Lorem Ipsum Address",
    'rib'       => "12345678912345678900",
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post("https://devapi.slick-pay.com/api/v2/users/accounts", {
        "rib": "12345678912345678900"
        "title": "Lorem Ipsum",
        "lastname": "Lorem",
        "firstname": "Ipsum",
        "address": "Lorem Ipsum Address",
    }, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def create():
    data = {
        "title" : "Lorem Ipsum",
        "lastname": "Lorem",
        "firstname": "Ipsum",
        "address": "Lorem Ipsum Address",
        "rib": "12345678912345678900"
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/accounts", headers=headers, json=data)

    return json.loads(response.content)

Account details

GET Copy

Get account details.

Parameters

Name Type Description
id numeric Required The account ID.

Response

Media Type: application/json

{
    "success": 1,
    "data"   : {...}
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
data object The related account details.

Media Type: application/json

{
    "success": 0,
    "message": "Account not found.",
    "errors": [
        "Account not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/accounts/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/accounts/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def find():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer ".  YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/accounts/" . id, headers=headers)
    return json.loads(response.content)

Accounts list

GET Copy

Load all accounts list.

Parameters

Name Type Description
offset numeric The offset used for the pagination, if not specified, or 0, the rows will not be paginated.
page numeric Set the current page for the paginated rows.

Response

Media Type: application/json

{
    "data"       : [{...}],
    "meta"       : {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "per_page": 10,
        "to": 2,
        "total": 2,
    }
}
Name Type Description
data array Paginated rows.
meta object Contain pagination meta data, such as : current_page, total, per_page...

Media Type: application/json

{
    "message": "The page must be an integer.",
    "errors": {
        "page": [
            "The page must be an integer."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt_array($cURL, array(
    CURLOPT_URL            => "https://devapi.slick-pay.com/api/v2/users/accounts?offset=5&page=2",
    CURLOPT_SSL_VERIFYHOST => false,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 3,
    CURLOPT_TIMEOUT        => 20,
    CURLOPT_HTTPHEADER     => array(
        "Accept: application/json",
        "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
    ),
));

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/accounts?offset=5&page=2`, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def get():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/accounts?offset=5&page=2", headers=headers)

    return json.loads(response.content)

Update account

PUT/PATCH Copy

Update any existing account.

Parameters

Name Type Description
id numeric Required The account ID.
rib numeric The Account RIB. Must be unique, numeric and have 20 chars length.
title string The Title of the receiver account.
firstname string The First Name of the receiver account.
lastname string The Last Name of the receiver account.
address string The Physical address of the receiver account.
default boolean Set the new created account as the default account.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Account updated successfully.",
    "id"     : 1
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The updated account ID.

Media Type: application/json

{
    "message": "The rib field is required.",
    "errors": {
        "rib": [
            "The rib field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Account not found.",
    "errors": [
        "Account not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/accounts/{$id}");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'default' => 1
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post(`https://devapi.slick-pay.com/api/v2/users/accounts/${id}`, {
        "default": 1
    }, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def update():
    data = {
        "default": 1
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/accounts/" . id, headers=headers, json=data)

    return json.loads(response.content)

Delete account

DELETE Copy

Remove any created account.

Parameters

Name Type Description
id numeric Required The account ID.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Account deleted successfully."
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Will contain the main success message.

Media Type: application/json

{
    "success": 0,
    "message": "Account cannot be deleted.",
    "errors": [
        "Account cannot be deleted."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Account not found.",
    "errors": [
        "Account not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/accounts/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.delete(`https://devapi.slick-pay.com/api/v2/users/accounts/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def delete():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.delete("https://devapi.slick-pay.com/api/v2/users/accounts/" . id, headers=headers)
    return json.loads(response.content)

Contacts


Introduction

 


Create contact

POST Copy

Creating a new contact.

Parameters

Name Type Description
rib numeric Required The Contact RIB. Must be unique, numeric and have 20 chars length.
title string The Title of the contact. If empty, contact full name will be taken.
firstname string Required The First Name of the contact.
lastname string Required The Last Name of the contact.
phone string The Phone of the contact. Will be required if email field is empty.
email string The Email of the contact. Will be required if phone field is empty.
address string Required The Physical address of the contact.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Contact created successfully.",
    "id"     : 1
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The created contact ID.

Media Type: application/json

{
    "message": "The rib field is required.",
    "errors": {
        "rib": [
            "The rib field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/contacts");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'title'     => "Lorem Ipsum",
    'firstname' => "Lorem",
    'lastname'  => "Ipsum",
    'email'     => "lorem@ipsum.com",
    'address'   => "Lorem Ipsum Address",
    'rib'       => "12345678912345678900",
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post("https://devapi.slick-pay.com/api/v2/users/contacts", {
        "title" : "Lorem Ipsum",
        "lastname": "Lorem",
        "firstname": "Ipsum",
        "email": "lorem@ipsum.com",
        "address": "Lorem Ipsum Address",
        "rib": "12345678912345678900"
    }, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def create():
    data = {
        "title" : "Lorem Ipsum",
        "lastname": "Lorem",
        "firstname": "Ipsum",
        "email": "lorem@ipsum.com",
        "address": "Lorem Ipsum Address",
        "rib": "12345678912345678900"
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/contacts", headers=headers, json=data)

    return json.loads(response.content)

Contact details

GET Copy

Get contact details.

Parameters

Name Type Description
id numeric Required The contact ID.

Response

Media Type: application/json

{
    "success": 1,
    "data"   : {...}
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
data object The related contact details.

Media Type: application/json

{
    "success": 0,
    "message": "Contact not found.",
    "errors": [
        "Contact not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/contacts/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/contacts/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def find():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer ".  YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/contacts/" . id, headers=headers)
    return json.loads(response.content)

Contacts list

GET Copy

Load all contacts list.

Parameters

Name Type Description
offset numeric The offset used for the pagination, if not specified, or 0, the rows will not be paginated.
page numeric Set the current page for the paginated rows.

Response

Media Type: application/json

{
    "data"       : [{...}],
    "meta"       : {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "per_page": 10,
        "to": 2,
        "total": 2,
    }
}
Name Type Description
data array Paginated rows.
meta object Contain pagination meta data, such as : current_page, total, per_page...

Media Type: application/json

{
    "message": "The page must be an integer.",
    "errors": {
        "page": [
            "The page must be an integer."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt_array($cURL, array(
    CURLOPT_URL            => "https://devapi.slick-pay.com/api/v2/users/contacts?offset=5&page=2",
    CURLOPT_SSL_VERIFYHOST => false,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 3,
    CURLOPT_TIMEOUT        => 20,
    CURLOPT_HTTPHEADER     => array(
        "Accept: application/json",
        "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
    ),
));

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/contacts?offset=5&page=2`, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def get():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/contacts?offset=5&page=2", headers=headers)

    return json.loads(response.content)

Update contact

PUT/PATCH Copy

Update any existing contact.

Parameters

Name Type Description
id numeric Required The contact ID.
rib numeric Required The Contact RIB. Must be unique, numeric and have 20 chars length.
title string Required The Title of the contact.
firstname string Required The First Name of the contact.
lastname string Required The Last Name of the contact.
phone string The Phone of the contact.
email string The Email of the contact.
address string Required The Physical address of the contact.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Contact updated successfully.",
    "id"     : 1
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The updated contact ID.

Media Type: application/json

{
    "message": "The rib field is required.",
    "errors": {
        "rib": [
            "The rib field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Contact not found.",
    "errors": [
        "Contact not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/contacts/{$id}");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'title' => "New contact title"
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post(`https://devapi.slick-pay.com/api/v2/users/contacts/${id}`, {
        "title": "New contact title"
    }, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def update():
    data = {
        "title": "New contact title"
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/contacts/" . id, headers=headers, json=data)

    return json.loads(response.content)

Delete contact

DELETE Copy

Remove any created contact.

Parameters

Name Type Description
id numeric Required The account ID.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Contact deleted successfully."
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Will contain the main success message.

Media Type: application/json

{
    "success": 0,
    "message": "Contact cannot be deleted.",
    "errors": [
        "Contact cannot be deleted."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Contact not found.",
    "errors": [
        "Contact not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/contacts/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.delete(`https://devapi.slick-pay.com/api/v2/users/contacts/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def delete():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.delete("https://devapi.slick-pay.com/api/v2/users/contacts/" . id, headers=headers)
    return json.loads(response.content)

Transfer API


Introduction

 


Calculate commission

POST Copy

Calculate transfer commission.

Parameters
Name Type Description
amount numeric Required The amount to transfer, must be superior than 100.
Response

Media Type: application/json

{
    "success"   : 1,
    "amount"    : 1040,
    "commission": 40
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
amount numeric The total amount after commission calculated.
commission numeric The commission calculated for the submitted amount.

Media Type: application/json

{
    "message": "The amount field is required.",
    "errors": {
        "amount": [
            "The amount field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.
Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/transfers/commission");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'amount' => 1000,
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post("https://devapi.slick-pay.com/api/v2/users/transfers/commission", {
        "amount": 1000,
    }, {
    headers: {
        "Accept": "application/json",
        "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
    }
})
.then((result) => {
    let response = result.data;

    console.log(response);
}).catch((error) => {
    console.log(error);
});
import requests
import json

def commission():
    data = {
        "amount": 1000,
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/transfers/commission", headers=headers, json=data)
    return json.loads(response.content)

Create transfer

POST Copy

Creating a new transfer.

Parameters

Name Type Description
amount numeric Required The amount to transfer, must be superior than 100.
url string The Callback URL after the payment process done.
account string The account UUID, if not specified, it will take the default defined account, if there is no default account defined, it will take the first created account, otherwise this field will be required.
contact string The contact UUID.
If no contact is specified, the user account owner will receive the transfer, otherwise, the contact will receive it.
The fields: rib, firstname, lastname, phone or email and address will be prohibited when contact field is specified.
rib numeric The contact RIB.
firstname string The contact firstname.
lastname string The contact lastname.
phone string The contact phone number.
email string The contact email.
address string The contact address.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Transfer created successfully.",
    "id"     : 1,
    "url"    : "https://devapi.slick-pay.com/api/v2/users/transfers/satim/payment/191612HE2P1T"
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The created transfer ID.
url string The URL to redirect your client to, to complete the payment process.

Media Type: application/json

{
    "message": "The amount field is required.",
    "errors": {
        "amount": [
            "The amount field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/transfers");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    "amount"  => 1000,
    "contact" => "37990d08-fc51-4c32-ad40-1552d13c00d1",
    "url"     => "https://my-website.com/thank-you-page",
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post("https://devapi.slick-pay.com/api/v2/users/transfers", {
        "amount": 1000,
        "contact": "37990d08-fc51-4c32-ad40-1552d13c00d1",
        "url": "https://my-website.com/thank-you-page",
    }, {
        headers: {
            "Accept": 'application/json',
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def create():
    data = {
        "amount": 1000,
        "contact": "37990d08-fc51-4c32-ad40-1552d13c00d1",
        "url": "https://my-website.com/thank-you-page",
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/transfers", headers=headers, json=data)

    return json.loads(response.content)

Transfer details

GET Copy

Get transfer details.

Parameters

Name Type Description
id numeric Required The transfer ID.

Response

Media Type: application/json

{
    "success": 1,
    "completed": 0,
    "data": {...}
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
completed numeric Indicate if transfer is completed or not, 0 for false and 1 for true.
data object The related transfer details.

Media Type: application/json

{
    "success": 0,
    "message": "Transfer not found.",
    "errors": [
        "Transfer not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/transfers/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/transfers/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def find():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer ".  YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/transfers/" . id, headers=headers)
    return json.loads(response.content)

Transfers list

GET Copy

Load all transfer history.

Parameters

Name Type Description
offset numeric The offset used for the pagination, if not specified, or 0, the rows will not be paginated.
page numeric Set the current page for the paginated rows.

Response

Media Type: application/json

{
    "data"       : [{...}],
    "meta"       : {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "per_page": 10,
        "to": 2,
        "total": 2,
    }
}
Name Type Description
data array Paginated rows.
meta object Contain pagination meta data, such as : current_page, total, per_page...

Media Type: application/json

{
    "message": "The page must be an integer.",
    "errors": {
        "page": [
            "The page must be an integer."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt_array($cURL, array(
    CURLOPT_URL            => "https://devapi.slick-pay.com/api/v2/users/transfers?offset=5&page=2",
    CURLOPT_SSL_VERIFYHOST => false,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 3,
    CURLOPT_TIMEOUT        => 20,
    CURLOPT_HTTPHEADER     => array(
        "Accept: application/json",
        "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
    ),
));

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/transfers?offset=5&page=2`, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def get():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/transfers?offset=5&page=2", headers=headers)

    return json.loads(response.content)

Update transfer

PUT/PATCH Copy

Update any pending transfer.

Parameters

Name Type Description
id numeric Required The transfer ID.
amount numeric The amount to transfer, must be superior than 100.
url string The Callback URL after the payment process done.
account string The user account UUID.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Transfer updated successfully.",
    "id"     : 1,
    "url"    : "https://dev.transfer.slick-pay.com/api/v2/satim/payment/602003AZ2JE5"
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The updated transfer ID.
url string The URL to redirect your client to, to complete the payment process.

Media Type: application/json

{
    "message": "The amount field is required.",
    "errors": {
        "amount": [
            "The amount field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Transfer not found.",
    "errors": [
        "Transfer not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/transfers/{$id}");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    "amount"  => 1000,
    "contact" => "37990d08-fc51-4c32-ad40-1552d13c00d1",
    "url"     => "https://my-website.com/thank-you-page",
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post(`https://devapi.slick-pay.com/api/v2/users/transfers/${id}`, {
        "amount": 1000,
        "contact": "37990d08-fc51-4c32-ad40-1552d13c00d1",
        "url": "https://my-website.com/thank-you-page",
    }, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def update():
    data = {
        "amount": 1000,
        "contact": "37990d08-fc51-4c32-ad40-1552d13c00d1",
        "url": "https://my-website.com/thank-you-page",
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/transfers/" . id, headers=headers, json=data)

    return json.loads(response.content)

Delete transfer

DELETE Copy

Remove any pending transfer.

Parameters

Name Type Description
id numeric Required The transfer ID.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Transfer deleted successfully."
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Will contain the main success message.

Media Type: application/json

{
    "success": 0,
    "message": "Transfer cannot be deleted.",
    "errors": [
        "Transfer cannot be deleted."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Transfer not found.",
    "errors": [
        "Transfer not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/transfers/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.delete(`https://devapi.slick-pay.com/api/v2/users/transfers/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def delete():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.delete("https://devapi.slick-pay.com/api/v2/users/transfers/" . id, headers=headers)
    return json.loads(response.content)

Payment aggregator


Introduction

 


Calculate commission

POST Copy

Calculate aggregation commission.

Parameters
Name Type Description
type string Required The transfer type used to divide amount upon contact receivers, can be 'percentage' or 'amount'.
total numeric Required The amount to transfer, must be superior than 100.
contacts array Required The contact receivers that will get parts from the total amount.
contacts.*.uuid string Required The contact UUID that will receive the amount.
contacts.*.amount numeric Required The dedicated amount to each contact. It calculated based on the 'type' field value ('percentage' or 'amount').
Response

Media Type: application/json

{
    "success": 1,
    "amount": 10000,
    "commission": 200,
    "total": 10200,
    "contacts": [
        {
            "uuid": "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
            "amount": 5000,
            "commission": 100
        },
        {
            "uuid": "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
            "amount": 5000,
            "commission": 100
        }
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
amount numeric The total amount before commission calculated.
commission numeric The commission calculated upon the total contact receivers.
total numeric The total amount after commission calculated.
contacts array The contact receivers that will get parts from the total amount.
contacts.*.amount numeric The amount dedicated to each contact. It calculated based on the 'type' field value ('percentage' or 'amount').
contacts.*.uuid string The contact UUID that will receive the amount.
contacts.*.commission numeric The commission calculated upon the contact receiver amount.

Media Type: application/json

{
    "message": "The type field is required.",
    "errors": {
        "type": [
            "The type field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.
Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/aggregations/commission");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'type'     => 'percentage',
    'amount'   => 10000,
    'contacts' => [
        [
            "uuid"   => "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
            'amount' => 50,
        ],
        [
            "uuid"   => "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
            'amount' => 50,
        ],
    ],
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post("https://devapi.slick-pay.com/api/v2/users/aggregations/commission", {
        "type": "percentage",
        "total": 10000,
        "contacts": [
            {
                "uuid": "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
                "amount": 50
            },
            {
                "uuid": "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
                "amount": 50
            }
        ]
    }, {
    headers: {
        "Accept": "application/json",
        "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
    }
})
.then((result) => {
    let response = result.data;

    console.log(response);
}).catch((error) => {
    console.log(error);
});
import requests
import json

def commission():
    data = {
        "type": "percentage",
        "total": 10000,
        "contacts": [
            {
                "uuid": "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
                "amount": 50
            },
            {
                "uuid": "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
                "amount": 50
            }
        ]
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/aggregations/commission", headers=headers, json=data)
    return json.loads(response.content)

Create aggregation

POST Copy

Creating a new aggregation.

Parameters

Name Type Description
type string Required The transfer type used to divide amount upon contact receivers, can be 'percentage' or 'amount'.
total numeric Required The amount to transfer, must be superior than 100.
contacts array Required The contact receivers that will get parts from the total amount.
contacts.*.uuid string Required The contact UUID that will receive the amount.
contacts.*.amount numeric Required The dedicated amount to each contact. It calculated based on the 'type' field value ('percentage' or 'amount').

Response

Media Type: application/json

{
    "success": 1,
    "message": "Aggregation created successfully.",
    "id"     : 1,
    "url"    : "https://dev.aggregation.slick-pay.com/api/v2/satim/payment/191612HE2P1T"
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The created aggregation ID.
url string The URL to redirect your client to, to complete the payment process.

Media Type: application/json

{
    "message": "The type field is required.",
    "errors": {
        "type": [
            "The type field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/aggregations");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'url'      => "https://my-website.com/thank-you-page",
    'type'     => 'percentage',
    'amount'   => 10000,
    'contacts' => [
        [
            "uuid" => "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
            'amount' => 50,
        ],
        [
            "uuid" => "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
            'amount' => 50,
        ],
    ],
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post("https://devapi.slick-pay.com/api/v2/users/aggregations", {
        "url": "https://my-website.com/thank-you-page",
        "type": "percentage",
        "total": 10000,
        "contacts": [
            {
                "uuid": "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
                "amount": 50
            },
            {
                "uuid": "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
                "amount": 50
            }
        ]
    }, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def create():
    data = {
        "url": "https://my-website.com/thank-you-page",
        "type": "percentage",
        "total": 10000,
        "contacts": [
            {
                "uuid": "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
                "amount": 50
            },
            {
                "uuid": "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
                "amount": 50
            }
        ]
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/aggregations", headers=headers, json=data)

    return json.loads(response.content)

Aggregation details

GET Copy

Get aggregation details.

Parameters

Name Type Description
id numeric Required The aggregation ID.

Response

Media Type: application/json

{
    "success": 1,
    "completed": 0,
    "data": {...}
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
completed numeric Indicate if aggregation transfer is completed or not, 0 for false and 1 for true.
data object The related aggregation details.

Media Type: application/json

{
    "success": 0,
    "message": "Aggregation not found.",
    "errors": [
        "Aggregation not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/aggregations/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/aggregations/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def find():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer ".  YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/aggregations/" . id, headers=headers)
    return json.loads(response.content)

Aggregations list

GET Copy

Load all aggregation history.

Parameters

Name Type Description
offset numeric The offset used for the pagination, if not specified, or 0, the rows will not be paginated.
page numeric Set the current page for the paginated rows.

Response

Media Type: application/json

{
    "data"       : [{...}],
    "meta"       : {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "per_page": 10,
        "to": 2,
        "total": 2,
    }
}
Name Type Description
data array Paginated rows.
meta object Contain pagination meta data, such as : current_page, total, per_page...

Media Type: application/json

{
    "message": "The page must be an integer.",
    "errors": {
        "page": [
            "The page must be an integer."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt_array($cURL, array(
    CURLOPT_URL            => "https://devapi.slick-pay.com/api/v2/users/aggregations?offset=5&page=2",
    CURLOPT_SSL_VERIFYHOST => false,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 3,
    CURLOPT_TIMEOUT        => 20,
    CURLOPT_HTTPHEADER     => array(
        "Accept: application/json",
        "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
    ),
));

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/aggregations?offset=5&page=2`, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def get():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/aggregations?offset=5&page=2", headers=headers)

    return json.loads(response.content)

Update aggregation

PUT/PATCH Copy

Update any pending aggregation.

Parameters

Name Type Description
id numeric Required The aggregation ID.
type string The transfer type used to divide amount upon contact receivers, can be 'percentage' or 'amount'. Required with 'total' field.
total numeric The amount to transfer, must be superior than 100. Required with 'contacts' field.
contacts array The contact receivers that will get parts from the total amount. Required with 'total' field.
contacts.*.uuid string Required The contact UUID that will receive the amount.
contacts.*.amount numeric Required The dedicated amount to each contact. It calculated based on the 'type' field value ('percentage' or 'amount').

Response

Media Type: application/json

{
    "success": 1,
    "message": "Aggregation updated successfully.",
    "id"     : 1,
    "url"    : "https://dev.aggregation.slick-pay.com/api/v2/satim/payment/602003AZ2JE5"
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The updated aggregation ID.
url string The URL to redirect your client to, to complete the payment process.

Media Type: application/json

{
    "message": "The type field is required.",
    "errors": {
        "type": [
            "The type field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Aggregation not found.",
    "errors": [
        "Aggregation not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/aggregations/{$id}");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'url'      => "https://my-website.com/thank-you-page",
    'type'     => 'percentage',
    'amount'   => 20000,
    'contacts' => [
        [
            "uuid" => "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
            'amount' => 50,
        ],
        [
            "uuid" => "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
            'amount' => 50,
        ],
    ],
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post(`https://devapi.slick-pay.com/api/v2/users/aggregations/${id}`, {
        "url": "https://my-website.com/thank-you-page",
        "type": "percentage",
        "total": 20000,
        "contacts": [
            {
                "uuid": "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
                "amount": 50
            },
            {
                "uuid": "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
                "amount": 50
            }
        ]
    }, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def update():
    data = {
        "url": "https://my-website.com/thank-you-page",
        "type": "percentage",
        "total": 20000,
        "contacts": [
            {
                "uuid": "864efcd3-9fef-4da5-67ec-bc28fd7e719b",
                "amount": 50
            },
            {
                "uuid": "f23bde3f-aac9-4dfc-7e06-5bf02e7f5967",
                "amount": 50
            }
        ]
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/aggregations/" . id, headers=headers, json=data)

    return json.loads(response.content)

Delete aggregation

DELETE Copy

Remove any pending aggregation.

Parameters

Name Type Description
id numeric Required The aggregation ID.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Aggregation deleted successfully."
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Will contain the main success message.

Media Type: application/json

{
    "success": 0,
    "message": "Aggregation cannot be deleted.",
    "errors": [
        "Aggregation cannot be deleted."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Aggregation not found.",
    "errors": [
        "Aggregation not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/aggregations/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.delete(`https://devapi.slick-pay.com/api/v2/users/aggregations/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def delete():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.delete("https://devapi.slick-pay.com/api/v2/users/aggregations/" . id, headers=headers)
    return json.loads(response.content)

Invoice transfer


Introduction

 


Calculate commission

POST Copy

Calculate invoice transfer commission.

Parameters
Name Type Description
amount numeric Required The amount to transfer, must be superior than 100.
Response

Media Type: application/json

{
    "success"   : 1,
    "amount"    : 1040,
    "commission": 40
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
amount numeric The total amount after commission calculated.
commission numeric The commission calculated for the submitted amount.

Media Type: application/json

{
    "message": "The amount field is required.",
    "errors": {
        "amount": [
            "The amount field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.
Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/invoices/commission");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'amount' => 1000,
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post("https://devapi.slick-pay.com/api/v2/users/invoices/commission", {
        "amount": 1000,
    }, {
    headers: {
        "Accept": "application/json",
        "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
    }
})
.then((result) => {
    let response = result.data;

    console.log(response);
}).catch((error) => {
    console.log(error);
});
import requests
import json

def commission():
    data = {
        "amount": 1000,
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/invoices/commission", headers=headers, json=data)
    return json.loads(response.content)

Create invoice

POST Copy

Creating a new invoice transfer.

Parameters

Name Type Description
amount numeric Required The amount to transfer, must be superior than 100.
url string The Callback URL after the payment process done.
account string The account UUID, if not specified, it will take the default defined account, if there is no default account defined, it will take the first created account, otherwise this field will be required.
contact string The contact UUID.
If no contact specified, the fields: firstname, lastname, phone or email and address will be required.
firstname string The contact firstname.
lastname string The contact lastname.
phone string The contact phone number.
email string The contact email.
address string The contact address.
items array Required List invoice items.
items.*.name string Required The invoice item name.
items.*.price numeric Required The invoice item price.
items.*.quantity numeric Required The invoice item quantity.
note string The invoice note.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Invoice created successfully.",
    "id"     : 1,
    "url"    : "https://devapi.slick-pay.com/api/v2/users/invoices/satim/payment/191612HE2P1T"
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The created invoice transfer ID.
url string The URL to redirect your client to, to complete the payment process.

Media Type: application/json

{
    "message": "The amount field is required.",
    "errors": {
        "amount": [
            "The amount field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/invoices");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'amount' => 10000,
    "contact"=> "37990d08-fc51-4c32-ad40-1552d13c00d1",
    'url'    => "https://my-website.com/thank-you-page",
    'items'  => [
        [
            'name'     => "Seller product",
            'price'    => 5000,
            'quantity' => 2,
        ]
    ],
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post("https://devapi.slick-pay.com/api/v2/users/invoices", {
        "amount": 10000,
        "contact": "37990d08-fc51-4c32-ad40-1552d13c00d1",
        "url": "https://my-website.com/thank-you-page",
        "items": [
            {
                "name": "Seller product",
                "price": 5000,
                "quantity": 2
            }
        ]
    }, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def create():
    data = {
        "amount": 10000,
        "contact": "37990d08-fc51-4c32-ad40-1552d13c00d1",
        "url": "https://my-website.com/thank-you-page",
        "items": [
            {
                "name": "Seller product",
                "price": 5000,
                "quantity": 2
            }
        ]
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/invoices", headers=headers, json=data)

    return json.loads(response.content)

Invoice details

GET Copy

Get invoice transfer details.

Parameters

Name Type Description
id numeric Required The invoice transfer ID.

Response

Media Type: application/json

{
    "success": 1,
    "completed": 0,
    "data": {...}
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
completed numeric Indicate if invoice transfer is completed or not, 0 for false and 1 for true.
data object The related invoice transfer details.

Media Type: application/json

{
    "success": 0,
    "message": "Invoice not found.",
    "errors": [
        "Invoice not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/invoices/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/invoices/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def find():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer ".  YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/invoices/" . id, headers=headers)
    return json.loads(response.content)

Invoices list

GET Copy

Load all invoices history.

Parameters

Name Type Description
offset numeric The offset used for the pagination, if not specified, or 0, the rows will not be paginated.
page numeric Set the current page for the paginated rows.

Response

Media Type: application/json

{
    "data"       : [{...}],
    "meta"       : {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "per_page": 10,
        "to": 2,
        "total": 2,
    }
}
Name Type Description
data array Paginated rows.
meta object Contain pagination meta data, such as : current_page, total, per_page...

Media Type: application/json

{
    "message": "The page must be an integer.",
    "errors": {
        "page": [
            "The page must be an integer."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt_array($cURL, array(
    CURLOPT_URL            => "https://devapi.slick-pay.com/api/v2/users/invoices?offset=5&page=2",
    CURLOPT_SSL_VERIFYHOST => false,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 3,
    CURLOPT_TIMEOUT        => 20,
    CURLOPT_HTTPHEADER     => array(
        "Accept: application/json",
        "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
    ),
));

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.get(`https://devapi.slick-pay.com/api/v2/users/invoices?offset=5&page=2`, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def get():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.get("https://devapi.slick-pay.com/api/v2/users/invoices?offset=5&page=2", headers=headers)

    return json.loads(response.content)

Update invoice

PUT/PATCH Copy

Update any pending invoice.

Parameters

Name Type Description
id numeric Required The invoice ID.
amount numeric The amount to transfer, must be superior than 100.
url string The Callback URL after the payment process done.
uuid string The contact UUID.
items array List invoice items.
items.*.name string Required The invoice item name.
items.*.price numeric Required The invoice item price.
items.*.quantity numeric Required The invoice item quantity.
note string The invoice note.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Invoice updated successfully.",
    "id"     : 1,
    "url"    : "https://dev.transfer.slick-pay.com/api/v2/satim/payment/602003AZ2JE5"
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the success message response.
id numeric The updated invoice ID.
url string The URL to redirect your client to, to complete the payment process.

Media Type: application/json

{
    "message": "The amount field is required.",
    "errors": {
        "amount": [
            "The amount field is required."
        ]
    }
}
Name Type Description
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Invoice not found.",
    "errors": [
        "Invoice not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/invoices/{$id}");
curl_setopt($cURL, CURLOPT_POSTFIELDS, [
    'amount' => 1000,
    "contact"=> "37990d08-fc51-4c32-ad40-1552d13c00d1",
    'url'    => "https://my-website.com/thank-you-page",
]);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.post(`https://devapi.slick-pay.com/api/v2/users/invoices/${id}`, {
        "amount": 1000,
        "contact": "37990d08-fc51-4c32-ad40-1552d13c00d1",
        "url": "https://my-website.com/thank-you-page",
    }, {
        headers: {
            "Accept": "application/json",
            "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests
import json

def update():
    data = {
        "amount": 1000,
        "contact": "37990d08-fc51-4c32-ad40-1552d13c00d1",
        "url": "https://my-website.com/thank-you-page",
    }
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.post("https://devapi.slick-pay.com/api/v2/users/invoices/" . id, headers=headers, json=data)

    return json.loads(response.content)

Delete invoice

DELETE Copy

Remove any pending invoice.

Parameters

Name Type Description
id numeric Required The invoice ID.

Response

Media Type: application/json

{
    "success": 1,
    "message": "Invoice deleted successfully."
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Will contain the main success message.

Media Type: application/json

{
    "success": 0,
    "message": "Invoice cannot be deleted.",
    "errors": [
        "Invoice cannot be deleted."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Media Type: application/json

{
    "success": 0,
    "message": "Invoice not found.",
    "errors": [
        "Invoice not found."
    ]
}
Name Type Description
success numeric The HTTP Response status, 0 for false and 1 for true.
message string Contain the main error message.
errors array Contain all error messages.

Examples

Please consider the examples below how to interact with our API.

<?php
$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, "https://devapi.slick-pay.com/api/v2/users/invoices/{$id}");
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($cURL, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
    "Accept: application/json",
    "Authorization: Bearer {$YOUR_PUBLIC_KEY}",
));
curl_setopt($cURL, CURLOPT_TIMEOUT, 20);

$response = curl_exec($cURL);

curl_close($cURL);

var_dump(json_decode($response, true));
?>
const axios = require("axios");

axios.delete(`https://devapi.slick-pay.com/api/v2/users/invoices/${id}`, {
        headers: {
            {
                "Accept": "application/json",
                "Authorization": `Bearer ${YOUR_PUBLIC_KEY}`
            }
        }
    })
    .then((result) => {
        let response = result.data;

        console.log(response);
    }).catch((error) => {
        console.log(error);
    });
import requests

def delete():
    headers = {
        "Accept": "application/json",
        "Authorization": "Bearer " . YOUR_PUBLIC_KEY,
    }

    response = requests.delete("https://devapi.slick-pay.com/api/v2/users/invoices/" . id, headers=headers)
    return json.loads(response.content)