MENU navbar-image

Introduction

API ClicPay v2 - M-Pesa, e-Mola, NetShop e autenticação

ClicPay API — v2

Visão geral

Esta documentação apresenta a API ClicPay v2, destinada à integração de soluções de pagamento (M-Pesa, e-Mola, Mkesh, NetShop), gestão de carteiras digitais e consulta de estados de transações.

Objetivo

Permitir que aplicações de terceiros criem e confirmem pagamentos, consultem o estado de transações, obtenham históricos e gerenciem carteiras de utilizadores de forma segura e auditável.

Autenticação

A API utiliza OAuth2 (Laravel Passport). Para testar endpoints protegidos na interface, insira um token Bearer através da opção Authorize. Sem um token válido, os pedidos autenticados irão retornar erros de autorização.

Testes e exemplos

Utilize a funcionalidade Try It Out para executar pedidos diretamente a partir da documentação. Os exemplos de código disponíveis no canto superior direito suportam Bash, JavaScript, PHP e Python.

Exemplos de pedidos e respostas

Sempre que possível, cada endpoint inclui exemplos de payloads de pedido e exemplos de resposta. Estes servem como referência, mas os valores reais podem variar conforme o ambiente (sandbox / produção).

Boas práticas de integração

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Para testar a API, insira seu token Bearer no campo "Authorize". Você pode obter um token através do endpoint de autenticação da API.

Transações M-Pesa

POST api/v2/wallets/{wallet_id}/c2b/mpesa

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/mpesa" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 1000,
    \"reference_description\": \"Pagamento de serviços\",
    \"internal_notes\": \"Pedido #9001\",
    \"splits\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/mpesa"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/mpesa';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 1000.0,
            'reference_description' => 'Pagamento de serviços',
            'internal_notes' => 'Pedido #9001',
            'splits' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/mpesa'
payload = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAYMPSESC2BABCDE12345",
    "status": "pending",
    "transaction_id": 789,
    "split_summary": {
        "direct": [],
        "collect": []
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "errors": {
        "splits.0.wallet_split_id": [
            "O split não pertence a esta carteira ou não é dynamic_load."
        ]
    }
}
 

Request      

POST api/v2/wallets/{wallet_id}/c2b/mpesa

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

wallet   integer     

ID da carteira M-Pesa. Example: 12

Body Parameters

msisdn   string     

MSISDN do pagador. Example: 841234567

amount   number     

Valor total a cobrar (1–150 000 MZN). Example: 1000

reference_description   string     

Descrição visível ao pagador (3–32 caracteres). Example: Pagamento de serviços

internal_notes   string  optional    

optional Notas internas (máx. 255 caracteres). Example: Pedido #9001

splits   string[]  optional    

optional Alocações dinâmicas para sub-carteiras do tipo dynamic_load desta carteira. Opcional — omitir mantém o comportamento normal.

wallet_split_id   integer     

ID do WalletSplit (deve ser dynamic_load e pertencer a esta carteira). Example: 42

value_type   string     

percentage ou amount. Example: percentage

value   number     

Percentagem (0–100) ou montante fixo em MZN. Example: 30

recipients   string[]  optional    

optional Com recipients → B2C Direct. Sem recipients → Wallet Collect. Percentagens devem somar 100.

identifier   string     

MSISDN do destinatário. Example: 841234567

percentage   number     

Percentagem (0.01–100). Example: 100

POST api/v2/wallets/{wallet_id}/c2b/mpesa/direct

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/mpesa/direct" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 1000,
    \"reference_description\": \"Pagamento de serviços\",
    \"internal_notes\": \"Pedido #9001\",
    \"splits\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/mpesa/direct"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/mpesa/direct';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 1000.0,
            'reference_description' => 'Pagamento de serviços',
            'internal_notes' => 'Pedido #9001',
            'splits' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/mpesa/direct'
payload = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAYMPSESC2BABCDE12345",
    "status": "pending",
    "transaction_id": 789,
    "split_summary": {
        "direct": [],
        "collect": []
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "errors": {
        "splits.0.value_type": [
            "O campo value_type deve ser percentage ou amount."
        ]
    }
}
 

Request      

POST api/v2/wallets/{wallet_id}/c2b/mpesa/direct

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

wallet   integer     

ID da carteira M-Pesa. Example: 12

Body Parameters

msisdn   string     

MSISDN do pagador. Example: 841234567

amount   number     

Valor total a cobrar (1–150 000 MZN). Example: 1000

reference_description   string     

Descrição visível ao pagador (3–32 caracteres). Example: Pagamento de serviços

internal_notes   string  optional    

optional Notas internas (máx. 255 caracteres). Example: Pedido #9001

splits   string[]  optional    

optional Alocações dinâmicas para sub-carteiras do tipo dynamic_load desta carteira. Opcional — omitir mantém o comportamento normal.

wallet_split_id   integer     

ID do WalletSplit (deve ser dynamic_load e pertencer a esta carteira). Example: 42

value_type   string     

percentage ou amount. Example: percentage

value   number     

Percentagem (0–100) ou montante fixo em MZN. Example: 30

recipients   string[]  optional    

optional Com recipients → B2C Direct. Sem recipients → Wallet Collect. Percentagens devem somar 100.

identifier   string     

MSISDN do destinatário. Example: 841234567

percentage   number     

Percentagem (0.01–100). Example: 100

POST api/v2/wallets/{wallet_id}/b2c/mpesa

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/b2c/mpesa" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 500,
    \"reference_description\": \"Compra online\",
    \"internal_notes\": \"Pedido #12345\"
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/b2c/mpesa"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Compra online",
    "internal_notes": "Pedido #12345"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/b2c/mpesa';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 500.0,
            'reference_description' => 'Compra online',
            'internal_notes' => 'Pedido #12345',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/b2c/mpesa'
payload = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Compra online",
    "internal_notes": "Pedido #12345"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CP123456789",
    "status": "pending",
    "transaction_id": 124
}
 

Example response (400):


{
    "errors": {
        "msisdn": [
            "Número de telefone inválido"
        ],
        "amount": [
            "Valor deve ser entre 1 e 50000"
        ]
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (403):


{
    "message": "Acesso negado à carteira"
}
 

Request      

POST api/v2/wallets/{wallet_id}/b2c/mpesa

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

Body Parameters

msisdn   string     

Número de telefone Example: 841234567

amount   number     

Valor da transação (1-50000) Example: 500

reference_description   string     

Descrição da referência (3-32 caracteres) Example: Compra online

internal_notes   string  optional    

optional Notas internas (máx 255 caracteres) Example: Pedido #12345

Response

Response Fields

clicpay_reference   string     

Referência única da transação

status   string     

Status atual (pending/successful/failed)

transaction_id   integer     

ID interno da transação

Transações eMola

POST api/v2/wallets/{wallet_id}/c2b/emola

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/emola" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 1000,
    \"reference_description\": \"Pagamento de serviços\",
    \"internal_notes\": \"Pedido #9001\",
    \"splits\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/emola"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/emola';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 1000.0,
            'reference_description' => 'Pagamento de serviços',
            'internal_notes' => 'Pedido #9001',
            'splits' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/emola'
payload = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAYEMOLAC2BABCDE12345",
    "status": "pending",
    "transaction_id": 789,
    "provider_reference": null,
    "provider_response_code": "0",
    "split_summary": {
        "direct": [
            {
                "wallet_split_id": 42,
                "mode": "b2c_direct",
                "allocated": 300,
                "recipients": [
                    {
                        "msisdn": "841234567",
                        "amount": 300
                    }
                ]
            }
        ],
        "collect": [
            {
                "wallet_split_id": 43,
                "mode": "wallet_collect",
                "allocated": 200
            }
        ]
    }
}
 

Example response (400):


{
    "message": "Erro do provedor",
    "clicpay_reference": "CPAY...",
    "status": "failed"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (403):


{
    "message": "Sem acesso à carteira ou carteira inactiva."
}
 

Example response (422):


{
    "errors": {
        "splits.0.wallet_split_id": [
            "O split não pertence a esta carteira ou não é dynamic_load."
        ]
    }
}
 

Request      

POST api/v2/wallets/{wallet_id}/c2b/emola

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

wallet   integer     

ID da carteira eMola. Example: 12

Body Parameters

msisdn   string     

MSISDN do pagador. Example: 841234567

amount   number     

Valor total a cobrar (1–150 000 MZN). Example: 1000

reference_description   string     

Descrição visível ao pagador (3–32 caracteres). Example: Pagamento de serviços

internal_notes   string  optional    

optional Notas internas (máx. 255 caracteres). Example: Pedido #9001

splits   string[]  optional    

optional Alocações dinâmicas para sub-carteiras do tipo dynamic_load desta carteira. Opcional — omitir mantém o comportamento normal.

wallet_split_id   integer     

ID do WalletSplit (deve ser dynamic_load e pertencer a esta carteira). Example: 42

value_type   string     

percentage aplica % sobre o amount total; amount é um valor fixo em MZN. Example: percentage

value   number     

Percentagem (0–100) ou montante fixo em MZN. Automaticamente reduzido se o split tiver limite (max_amount). Example: 30

recipients   string[]  optional    

optional Presente → modo B2C Direct: o valor alocado é disbursado imediatamente. Ausente → modo Wallet Collect: acumula saldo. Percentagens devem somar 100.

identifier   string     

MSISDN do destinatário. Example: 841234567

percentage   number     

Percentagem do valor alocado a este destinatário (0.01–100). Example: 100

Response

Response Fields

clicpay_reference   string     

Referência única da transação ClicPay.

status   string     

Estado actual: pending | successful | failed.

split_summary   object     

Presente quando splits[] foi enviado. direct lista B2C imediatos; collect lista acumulações. Splits ignorados (inactivos, limite atingido) não aparecem.

POST api/v2/wallets/{wallet_id}/c2b/emola/direct

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/emola/direct" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 1000,
    \"reference_description\": \"Pagamento de serviços\",
    \"internal_notes\": \"Pedido #9001\",
    \"splits\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/emola/direct"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/emola/direct';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 1000.0,
            'reference_description' => 'Pagamento de serviços',
            'internal_notes' => 'Pedido #9001',
            'splits' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/emola/direct'
payload = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAYEMOLAC2BABCDE12345",
    "status": "pending",
    "transaction_id": 789,
    "split_summary": {
        "direct": [],
        "collect": []
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "errors": {
        "splits.0.value_type": [
            "O campo value_type deve ser percentage ou amount."
        ]
    }
}
 

Request      

POST api/v2/wallets/{wallet_id}/c2b/emola/direct

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

wallet   integer     

ID da carteira eMola. Example: 12

Body Parameters

msisdn   string     

MSISDN do pagador. Example: 841234567

amount   number     

Valor total a cobrar (1–150 000 MZN). Example: 1000

reference_description   string     

Descrição visível ao pagador (3–32 caracteres). Example: Pagamento de serviços

internal_notes   string  optional    

optional Notas internas (máx. 255 caracteres). Example: Pedido #9001

splits   string[]  optional    

optional Alocações dinâmicas para sub-carteiras do tipo dynamic_load desta carteira. Opcional — omitir mantém o comportamento normal.

wallet_split_id   integer     

ID do WalletSplit (deve ser dynamic_load e pertencer a esta carteira). Example: 42

value_type   string     

percentage ou amount. Example: percentage

value   number     

Percentagem (0–100) ou montante fixo em MZN. Example: 30

recipients   string[]  optional    

optional Com recipients → B2C Direct. Sem recipients → Wallet Collect. Percentagens devem somar 100.

identifier   string     

MSISDN do destinatário. Example: 841234567

percentage   number     

Percentagem (0.01–100). Example: 100

POST api/v2/wallets/{wallet_id}/b2c/emola

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/b2c/emola" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 1000,
    \"reference_description\": \"Pagamento de serviços\",
    \"internal_notes\": \"Pagamento mensal\"
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/b2c/emola"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pagamento mensal"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/b2c/emola';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 1000.0,
            'reference_description' => 'Pagamento de serviços',
            'internal_notes' => 'Pagamento mensal',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/b2c/emola'
payload = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pagamento mensal"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CP123456789",
    "status": "pending",
    "transaction_id": 123
}
 

Example response (400):


{
    "errors": {
        "msisdn": [
            "Número de telefone inválido"
        ],
        "amount": [
            "Valor deve ser entre 1 e 50000"
        ]
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (403):


{
    "message": "Acesso negado à carteira"
}
 

Request      

POST api/v2/wallets/{wallet_id}/b2c/emola

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

Body Parameters

msisdn   string     

Número de telefone Example: 841234567

amount   number     

Valor da transação (1-50000) Example: 1000

reference_description   string     

Descrição da referência (3-32 caracteres) Example: Pagamento de serviços

internal_notes   string  optional    

optional Notas internas (máx 255 caracteres) Example: Pagamento mensal

Response

Response Fields

clicpay_reference   string     

Referência única da transação

status   string     

Status atual (pending/successful/failed)

transaction_id   integer     

ID interno da transação

Transações Mkesh

POST api/v2/wallets/{wallet_id}/c2b/mkesh

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/mkesh" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 1000,
    \"reference_description\": \"Pagamento de serviços\",
    \"internal_notes\": \"Pedido #9001\",
    \"splits\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/mkesh"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/mkesh';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 1000.0,
            'reference_description' => 'Pagamento de serviços',
            'internal_notes' => 'Pedido #9001',
            'splits' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/mkesh'
payload = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAYKMESHC2BABCDE12345",
    "status": "pending",
    "transaction_id": 789,
    "split_summary": {
        "direct": [],
        "collect": []
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "errors": {
        "splits.0.wallet_split_id": [
            "O split não pertence a esta carteira ou não é dynamic_load."
        ]
    }
}
 

Request      

POST api/v2/wallets/{wallet_id}/c2b/mkesh

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

wallet   integer     

ID da carteira Mkesh. Example: 12

Body Parameters

msisdn   string     

MSISDN do pagador. Example: 841234567

amount   number     

Valor total a cobrar (1–150 000 MZN). Example: 1000

reference_description   string     

Descrição visível ao pagador (3–32 caracteres). Example: Pagamento de serviços

internal_notes   string  optional    

optional Notas internas (máx. 255 caracteres). Example: Pedido #9001

splits   string[]  optional    

optional Alocações dinâmicas para sub-carteiras do tipo dynamic_load desta carteira. Opcional — omitir mantém o comportamento normal.

wallet_split_id   integer     

ID do WalletSplit (deve ser dynamic_load e pertencer a esta carteira). Example: 42

value_type   string     

percentage ou amount. Example: percentage

value   number     

Percentagem (0–100) ou montante fixo em MZN. Example: 30

recipients   string[]  optional    

optional Com recipients → B2C Direct. Sem recipients → Wallet Collect. Percentagens devem somar 100.

identifier   string     

MSISDN do destinatário. Example: 841234567

percentage   number     

Percentagem (0.01–100). Example: 100

POST api/v2/wallets/{wallet_id}/c2b/mkesh/direct

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/mkesh/direct" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 1000,
    \"reference_description\": \"Pagamento de serviços\",
    \"internal_notes\": \"Pedido #9001\",
    \"splits\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/c2b/mkesh/direct"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/mkesh/direct';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 1000.0,
            'reference_description' => 'Pagamento de serviços',
            'internal_notes' => 'Pedido #9001',
            'splits' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/c2b/mkesh/direct'
payload = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAYKMESHC2BABCDE12345",
    "status": "pending",
    "transaction_id": 789,
    "split_summary": {
        "direct": [],
        "collect": []
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "errors": {
        "splits.0.value_type": [
            "O campo value_type deve ser percentage ou amount."
        ]
    }
}
 

Request      

POST api/v2/wallets/{wallet_id}/c2b/mkesh/direct

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

wallet   integer     

ID da carteira Mkesh. Example: 12

Body Parameters

msisdn   string     

MSISDN do pagador. Example: 841234567

amount   number     

Valor total a cobrar (1–150 000 MZN). Example: 1000

reference_description   string     

Descrição visível ao pagador (3–32 caracteres). Example: Pagamento de serviços

internal_notes   string  optional    

optional Notas internas (máx. 255 caracteres). Example: Pedido #9001

splits   string[]  optional    

optional Alocações dinâmicas para sub-carteiras do tipo dynamic_load desta carteira. Opcional — omitir mantém o comportamento normal.

wallet_split_id   integer     

ID do WalletSplit (deve ser dynamic_load e pertencer a esta carteira). Example: 42

value_type   string     

percentage ou amount. Example: percentage

value   number     

Percentagem (0–100) ou montante fixo em MZN. Example: 30

recipients   string[]  optional    

optional Com recipients → B2C Direct. Sem recipients → Wallet Collect. Percentagens devem somar 100.

identifier   string     

MSISDN do destinatário. Example: 841234567

percentage   number     

Percentagem (0.01–100). Example: 100

POST api/v2/wallets/{wallet_id}/b2c/mkesh

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/b2c/mkesh" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 500,
    \"reference_description\": \"Compra online\",
    \"internal_notes\": \"Pedido #12345\"
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/b2c/mkesh"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Compra online",
    "internal_notes": "Pedido #12345"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/b2c/mkesh';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 500.0,
            'reference_description' => 'Compra online',
            'internal_notes' => 'Pedido #12345',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/b2c/mkesh'
payload = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Compra online",
    "internal_notes": "Pedido #12345"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CP123456789",
    "status": "pending",
    "transaction_id": 124
}
 

Example response (400):


{
    "errors": {
        "msisdn": [
            "Número de telefone inválido"
        ],
        "amount": [
            "Valor deve ser entre 1 e 50000"
        ]
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (403):


{
    "message": "Acesso negado à carteira"
}
 

Request      

POST api/v2/wallets/{wallet_id}/b2c/mkesh

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

Body Parameters

msisdn   string     

Número de telefone Example: 841234567

amount   number     

Valor da transação (1-50000) Example: 500

reference_description   string     

Descrição da referência (3-32 caracteres) Example: Compra online

internal_notes   string  optional    

optional Notas internas (máx 255 caracteres) Example: Pedido #12345

Response

Response Fields

clicpay_reference   string     

Referência única da transação

status   string     

Status atual (pending/successful/failed)

transaction_id   integer     

ID interno da transação

Transações NetShop

POST api/v2/wallets/{wallet_id}/card-payment

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/card-payment" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 1500,
    \"reference_description\": \"Pagamento de fatura\",
    \"first_name\": \"João\",
    \"last_name\": \"Silva\",
    \"email\": \"QYvHk@example.com\",
    \"phone\": \"84 123 4567\",
    \"callback_url\": \"https:\\/\\/example.com\\/callback\"
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/card-payment"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "amount": 1500,
    "reference_description": "Pagamento de fatura",
    "first_name": "João",
    "last_name": "Silva",
    "email": "QYvHk@example.com",
    "phone": "84 123 4567",
    "callback_url": "https:\/\/example.com\/callback"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/card-payment';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'amount' => 1500.0,
            'reference_description' => 'Pagamento de fatura',
            'first_name' => 'João',
            'last_name' => 'Silva',
            'email' => 'QYvHk@example.com',
            'phone' => '84 123 4567',
            'callback_url' => 'https://example.com/callback',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/card-payment'
payload = {
    "amount": 1500,
    "reference_description": "Pagamento de fatura",
    "first_name": "João",
    "last_name": "Silva",
    "email": "QYvHk@example.com",
    "phone": "84 123 4567",
    "callback_url": "https:\/\/example.com\/callback"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):


{
    "message": "Sessão criada.",
    "clicpay_reference": "123456789",
    "status": "pending",
    "provider_reference": "123456789",
    "provider_response_code": "200",
    "provider_status_text": "Pending",
    "initiated_at": "2023-01-01T00:00:00Z",
    "completed_at": null,
    "transaction_id": 123,
    "checkout_url": "https://netshop.example.com/checkout/abc123",
    "session_id": "abc123",
    "success_indicator": "indicator123"
}
 

Example response (400):


{
    "message": "Erro ao criar a sessão.",
    "clicpay_reference": "123456789",
    "status": "failed",
    "transaction_id": 123,
    "provider_response_code": "400"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (403):


{
    "message": "Acesso negado à carteira"
}
 

Example response (422):


{
    "errors": {
        "amount": [
            "O campo valor é obrigatório."
        ],
        "reference_description": [
            "O campo descrição da referência é obrigatório."
        ]
    }
}
 

Request      

POST api/v2/wallets/{wallet_id}/card-payment

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

wallet   integer     

ID da carteira NetShop Example: 1234

Body Parameters

amount   number     

Valor do pagamento Example: 1500

reference_description   string     

Descrição da referência (máx 100 caracteres) Example: Pagamento de fatura

first_name   string  optional    

optional Primeiro nome do pagador Example: João

last_name   string  optional    

optional Último nome do pagador Example: Silva

email   string  optional    

optional Email do pagador Example: QYvHk@example.com

phone   string  optional    

optional Telefone do pagador Example: 84 123 4567

callback_url   url  optional    

optional URL de retorno Example: https://example.com/callback

Response

Response Fields

clicpay_reference   string     

Referência única da transação

status   string     

Status atual (pending/successful/failed)

provider_reference   string     

Referência do provedor de pagamento

provider_response_code   string     

Código de resposta do provedor

provider_status_text   string     

Descrição do status do provedor

message   string     

Mensagem descritiva do status

initiated_at   string     

Data e hora de início da transação (ISO 8601)

completed_at   string     

Data e hora de conclusão da transação (ISO 8601)

transaction_id   integer     

ID interno da transação

checkout_url   string     

URL do checkout NetShop

session_id   string     

ID da sessão NetShop

success_indicator   string     

Indicador de sucesso da sessão NetShop

Estado de Transações

GET api/v2/transactions/{clicpay_reference}/status

requires authentication

Example request:
curl --request GET \
    --get "https://clicpay.co.mz/api/v2/transactions/CP123456789/status" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://clicpay.co.mz/api/v2/transactions/CP123456789/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/transactions/CP123456789/status';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/transactions/CP123456789/status'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "clicpay_reference": "CP123456789",
    "status": "successful",
    "amount": 1000,
    "message": "Transação concluída com sucesso"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "message": "Transação não encontrada"
}
 

Request      

GET api/v2/transactions/{clicpay_reference}/status

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

clicpay_reference   string     

Referência ClicPay da transação. Example: CP123456789

Response

Response Fields

clicpay_reference   string     

Referência da transação

status   string     

Status atual (pending/successful/failed/cancelled)

amount   number     

Valor da transação

message   string     

Mensagem descritiva do status

Carteiras

GET api/v2/me/wallets

requires authentication

Example request:
curl --request GET \
    --get "https://clicpay.co.mz/api/v2/me/wallets?payment_method_id=1&is_active=1&environment=production&include=paymentMethod&sort_by=created_at&sort_order=desc&per_page=20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://clicpay.co.mz/api/v2/me/wallets"
);

const params = {
    "payment_method_id": "1",
    "is_active": "1",
    "environment": "production",
    "include": "paymentMethod",
    "sort_by": "created_at",
    "sort_order": "desc",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/me/wallets';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'payment_method_id' => '1',
            'is_active' => '1',
            'environment' => 'production',
            'include' => 'paymentMethod',
            'sort_by' => 'created_at',
            'sort_order' => 'desc',
            'per_page' => '20',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/me/wallets'
params = {
  'payment_method_id': '1',
  'is_active': '1',
  'environment': 'production',
  'include': 'paymentMethod',
  'sort_by': 'created_at',
  'sort_order': 'desc',
  'per_page': '20',
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Minha Carteira",
            "balance": 1000,
            "payment_method": {
                "id": 1,
                "name": "eMola",
                "slug": "emola"
            }
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "per_page": 20,
        "to": 1,
        "total": 1
    }
}
 

Request      

GET api/v2/me/wallets

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

payment_method_id   integer  optional    

optional Filtrar por método de pagamento Example: 1

is_active   boolean  optional    

optional Filtrar por status ativo Example: true

environment   string  optional    

optional Filtrar por ambiente (sandbox/production) Example: production

include   string  optional    

optional Incluir relacionamentos (ex: paymentMethod) Example: paymentMethod

sort_by   string  optional    

optional Ordenar por campo (id, name, balance, created_at) Example: created_at

sort_order   string  optional    

optional Ordem da ordenação (asc, desc) Example: desc

per_page   integer  optional    

optional Itens por página (padrão: 10) Example: 20

Response

Response Fields

data   string[]     

Lista de carteiras

id   integer     

ID da carteira

name   string     

Nome da carteira

balance   number     

Saldo disponível

payment_method   object     

Método de pagamento associado

Autenticação

Obter utilizador autenticado

requires authentication

Example request:
curl --request GET \
    --get "https://clicpay.co.mz/api/user" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://clicpay.co.mz/api/user"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/user';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/user'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/user

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Obter token de acesso

requires authentication

Example request:
curl --request GET \
    --get "https://clicpay.co.mz/api/me/token" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://clicpay.co.mz/api/me/token"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/me/token';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/me/token'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/me/token

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Transações M-Pesa — B2C via Split

POST api/v2/wallets/{wallet_id}/splits/{walletSplit_id}/b2c/mpesa

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/mpesa" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 500,
    \"reference_description\": \"Pagamento parceiro\",
    \"internal_notes\": \"Split B2C mensal\"
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/mpesa"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Pagamento parceiro",
    "internal_notes": "Split B2C mensal"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/mpesa';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 500.0,
            'reference_description' => 'Pagamento parceiro',
            'internal_notes' => 'Split B2C mensal',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/mpesa'
payload = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Pagamento parceiro",
    "internal_notes": "Split B2C mensal"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAYMPESAB2CABCDE12345",
    "status": "pending",
    "transaction_id": 790,
    "wallet_split_id": 7
}
 

Example response (403):


{
    "message": "Este split não tem permissão para realizar transações B2C."
}
 

Example response (422):


{
    "message": "Saldo insuficiente no split."
}
 

Request      

POST api/v2/wallets/{wallet_id}/splits/{walletSplit_id}/b2c/mpesa

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

walletSplit_id   integer     

The ID of the walletSplit. Example: 100000

wallet   integer     

ID da carteira M-Pesa mãe. Example: 123456

walletSplit   integer     

ID do WalletSplit. Example: 7

Body Parameters

msisdn   string     

Número do destinatário. Example: 841234567

amount   number     

Valor a enviar (1–50000 MZN). Example: 500

reference_description   string     

Descrição (3–32 caracteres). Example: Pagamento parceiro

internal_notes   string  optional    

optional Notas internas (máx 255). Example: Split B2C mensal

Transações Mkesh — B2C via Split

POST api/v2/wallets/{wallet_id}/splits/{walletSplit_id}/b2c/mkesh

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/mkesh" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 500,
    \"reference_description\": \"Pagamento parceiro\",
    \"internal_notes\": \"Split B2C mensal\"
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/mkesh"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Pagamento parceiro",
    "internal_notes": "Split B2C mensal"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/mkesh';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 500.0,
            'reference_description' => 'Pagamento parceiro',
            'internal_notes' => 'Split B2C mensal',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/mkesh'
payload = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Pagamento parceiro",
    "internal_notes": "Split B2C mensal"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAYMKESHB2CABCDE12345",
    "status": "pending",
    "transaction_id": 791,
    "wallet_split_id": 7
}
 

Example response (403):


{
    "message": "Este split não tem permissão para realizar transações B2C."
}
 

Example response (422):


{
    "message": "Saldo insuficiente no split."
}
 

Request      

POST api/v2/wallets/{wallet_id}/splits/{walletSplit_id}/b2c/mkesh

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

walletSplit_id   integer     

The ID of the walletSplit. Example: 100000

wallet   integer     

ID da carteira Mkesh mãe. Example: 123456

walletSplit   integer     

ID do WalletSplit. Example: 7

Body Parameters

msisdn   string     

Número do destinatário. Example: 841234567

amount   number     

Valor a enviar (1–50000 MZN). Example: 500

reference_description   string     

Descrição (3–32 caracteres). Example: Pagamento parceiro

internal_notes   string  optional    

optional Notas internas (máx 255). Example: Split B2C mensal

Transações eMola — B2C via Split

POST api/v2/wallets/{wallet_id}/splits/{walletSplit_id}/b2c/emola

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/emola" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 500,
    \"reference_description\": \"Pagamento parceiro\",
    \"internal_notes\": \"Split B2C mensal\"
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/emola"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Pagamento parceiro",
    "internal_notes": "Split B2C mensal"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/emola';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 500.0,
            'reference_description' => 'Pagamento parceiro',
            'internal_notes' => 'Split B2C mensal',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/splits/100000/b2c/emola'
payload = {
    "msisdn": "841234567",
    "amount": 500,
    "reference_description": "Pagamento parceiro",
    "internal_notes": "Split B2C mensal"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAYEMOLAB2CABCDE12345",
    "status": "pending",
    "transaction_id": 789,
    "wallet_split_id": 7
}
 

Example response (403):


{
    "message": "Este split não tem permissão para realizar transações B2C."
}
 

Example response (422):


{
    "message": "Saldo insuficiente no split.",
    "needed": 530,
    "available": 200,
    "missing": 330,
    "wallet_split_id": 7
}
 

Request      

POST api/v2/wallets/{wallet_id}/splits/{walletSplit_id}/b2c/emola

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

walletSplit_id   integer     

The ID of the walletSplit. Example: 100000

wallet   integer     

ID da carteira eMola mãe. Example: 123456

walletSplit   integer     

ID do WalletSplit. Example: 7

Body Parameters

msisdn   string     

Número do destinatário. Example: 841234567

amount   number     

Valor a enviar (1–50000 MZN). Example: 500

reference_description   string     

Descrição (3–32 caracteres). Example: Pagamento parceiro

internal_notes   string  optional    

optional Notas internas (máx 255). Example: Split B2C mensal

Transações — Split Collect

POST api/v2/wallets/{wallet_id}/split/collect

requires authentication

Example request:
curl --request POST \
    "https://clicpay.co.mz/api/v2/wallets/107219/split/collect" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"msisdn\": \"841234567\",
    \"amount\": 1000,
    \"reference_description\": \"Pagamento de serviços\",
    \"internal_notes\": \"Pedido #9001\",
    \"splits\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://clicpay.co.mz/api/v2/wallets/107219/split/collect"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://clicpay.co.mz/api/v2/wallets/107219/split/collect';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'msisdn' => '841234567',
            'amount' => 1000.0,
            'reference_description' => 'Pagamento de serviços',
            'internal_notes' => 'Pedido #9001',
            'splits' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://clicpay.co.mz/api/v2/wallets/107219/split/collect'
payload = {
    "msisdn": "841234567",
    "amount": 1000,
    "reference_description": "Pagamento de serviços",
    "internal_notes": "Pedido #9001",
    "splits": [
        "architecto"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Transação iniciada com sucesso",
    "clicpay_reference": "CPAY...",
    "status": "pending",
    "transaction_id": 789,
    "split_summary": {
        "direct": [],
        "collect": []
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "errors": {
        "splits.0.wallet_split_id": [
            "O split não pertence a esta carteira ou não é dynamic_load."
        ]
    }
}
 

Request      

POST api/v2/wallets/{wallet_id}/split/collect

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 107219

wallet   integer     

ID da carteira mãe. Example: 12

Body Parameters

msisdn   string     

MSISDN do pagador. Example: 841234567

amount   number     

Valor total a cobrar (1–150 000 MZN). Example: 1000

reference_description   string     

Descrição visível ao pagador (3–32 caracteres). Example: Pagamento de serviços

internal_notes   string  optional    

optional Notas internas (máx. 255 caracteres). Example: Pedido #9001

splits   string[]  optional    

optional Alocações dinâmicas adicionais para sub-carteiras do tipo dynamic_load. Combinam com os splits estáticos da carteira — os splits estáticos processam primeiro, os dinâmicos processam com o que sobrar.

wallet_split_id   integer     

ID do WalletSplit dynamic_load. Example: 42

value_type   string     

percentage ou amount. Example: percentage

value   number     

Percentagem (0–100) ou montante fixo em MZN. Example: 30

recipients   string[]  optional    

optional Com recipients → B2C Direct. Sem recipients → Wallet Collect. Percentagens devem somar 100.

identifier   string     

MSISDN do destinatário. Example: 841234567

percentage   number     

Percentagem (0.01–100). Example: 100