Introduction
This documentation aims to provide all the information you need to work with the Mauzo APIs.
This documentation aims to provide all the information you need to work with the Mauzo APIs.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_API_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API KEY.
You also need to pass the bussiness id inthe headers as app_key
: app_key
Campaign
APIs to enable a merchant to manage Campaigns in a business.
Display a paginated listing of the campaigns in a merchants business.
requires authentication
Example request:
curl --request GET \
--get "app.mymauzo.com/notify/merchant/campaigns" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"business_id\": \"et\"
}"
const url = new URL(
"app.mymauzo.com/notify/merchant/campaigns"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"business_id": "et"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/notify/merchant/campaigns'
payload = {
"business_id": "et"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/notify/merchant/campaigns';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'business_id' => 'et',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Customer
APIs to enable a merchant to manage a customer.
Create a new customer.
requires authentication
Example request:
curl --request POST \
"app.mymauzo.com/mauzo/merchant/customers" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone_number\": \"quia\",
\"name\": \"in\",
\"email\": \"[email protected]\",
\"age\": \"voluptates\",
\"city\": \"dolor\",
\"occupation\": \"saepe\",
\"gender\": \"fugit\"
}"
const url = new URL(
"app.mymauzo.com/mauzo/merchant/customers"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone_number": "quia",
"name": "in",
"email": "[email protected]",
"age": "voluptates",
"city": "dolor",
"occupation": "saepe",
"gender": "fugit"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/mauzo/merchant/customers'
payload = {
"phone_number": "quia",
"name": "in",
"email": "[email protected]",
"age": "voluptates",
"city": "dolor",
"occupation": "saepe",
"gender": "fugit"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/mauzo/merchant/customers';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'phone_number' => 'quia',
'name' => 'in',
'email' => '[email protected]',
'age' => 'voluptates',
'city' => 'dolor',
'occupation' => 'saepe',
'gender' => 'fugit',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Email Messaging.
Merchant apis to send an email message or schedule an email campaign.
Send an Email Message.
requires authentication
Example request:
curl --request POST \
"app.mymauzo.com/notify/merchant/messaging/send-email" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"message\": \"consequatur\",
\"subject\": \"fugit\",
\"business_id\": \"dignissimos\"
}"
const url = new URL(
"app.mymauzo.com/notify/merchant/messaging/send-email"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"message": "consequatur",
"subject": "fugit",
"business_id": "dignissimos"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/notify/merchant/messaging/send-email'
payload = {
"message": "consequatur",
"subject": "fugit",
"business_id": "dignissimos"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/notify/merchant/messaging/send-email';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'message' => 'consequatur',
'subject' => 'fugit',
'business_id' => 'dignissimos',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
History
Merchant api to get history of the different communnications sent.
Display a paginated listing of the messages history.
requires authentication
Example request:
curl --request GET \
--get "app.mymauzo.com/notify/merchant/messages-history" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"business_id\": \"minus\"
}"
const url = new URL(
"app.mymauzo.com/notify/merchant/messages-history"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"business_id": "minus"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/notify/merchant/messages-history'
payload = {
"business_id": "minus"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/notify/merchant/messages-history';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'business_id' => 'minus',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display details for a single sent message.
requires authentication
Example request:
curl --request GET \
--get "app.mymauzo.com/notify/merchant/message-details/amet" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"app.mymauzo.com/notify/merchant/message-details/amet"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/notify/merchant/message-details/amet'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/notify/merchant/message-details/amet';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mauzo Customer
APIs to enable a merchant to manage a customer.
Returns a paginated list of customers for a merchant.
requires authentication
Example request:
curl --request GET \
--get "app.mymauzo.com/mauzo/merchant/customers" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"app.mymauzo.com/mauzo/merchant/customers"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/mauzo/merchant/customers'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/mauzo/merchant/customers';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Return customer details
requires authentication
Example request:
curl --request GET \
--get "app.mymauzo.com/mauzo/merchant/customers/d5f33266-85a2-4df3-ad7c-79d3b32a3e50" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"app.mymauzo.com/mauzo/merchant/customers/d5f33266-85a2-4df3-ad7c-79d3b32a3e50"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/mauzo/merchant/customers/d5f33266-85a2-4df3-ad7c-79d3b32a3e50'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/mauzo/merchant/customers/d5f33266-85a2-4df3-ad7c-79d3b32a3e50';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mauzo Mpesa payments Transactions.
Mpesa payments APIs .
Display a paginated listing of the businesses Transactions.If no business id is passed returns all txns for all merchant's businesses.
requires authentication
Example request:
curl --request GET \
--get "app.mymauzo.com/mauzo/merchant/transactions" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
const url = new URL(
"app.mymauzo.com/mauzo/merchant/transactions"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/mauzo/merchant/transactions'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/mauzo/merchant/transactions';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Initialize stk push request to given phone number.
requires authentication
Example request:
curl --request POST \
"app.mymauzo.com/mauzo/merchant/send-stk-payment-request" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone_number\": \"aliquid\",
\"amount\": \"modi\",
\"business_id\": \"debitis\"
}"
const url = new URL(
"app.mymauzo.com/mauzo/merchant/send-stk-payment-request"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone_number": "aliquid",
"amount": "modi",
"business_id": "debitis"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/mauzo/merchant/send-stk-payment-request'
payload = {
"phone_number": "aliquid",
"amount": "modi",
"business_id": "debitis"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/mauzo/merchant/send-stk-payment-request';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'phone_number' => 'aliquid',
'amount' => 'modi',
'business_id' => 'debitis',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mauzo payment links
APIs to enable a merchant to manage payment links.
Create a payment link.
requires authentication
Example request:
curl --request GET \
--get "app.mymauzo.com/mauzo/merchant/payment-links" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
const url = new URL(
"app.mymauzo.com/mauzo/merchant/payment-links"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/mauzo/merchant/payment-links'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/mauzo/merchant/payment-links';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a payment link.
requires authentication
Example request:
curl --request POST \
"app.mymauzo.com/mauzo/merchant/payment-links" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"suscipit\",
\"description\": \"exercitationem\",
\"business_id\": \"eaque\"
}"
const url = new URL(
"app.mymauzo.com/mauzo/merchant/payment-links"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "suscipit",
"description": "exercitationem",
"business_id": "eaque"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/mauzo/merchant/payment-links'
payload = {
"name": "suscipit",
"description": "exercitationem",
"business_id": "eaque"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/mauzo/merchant/payment-links';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'suscipit',
'description' => 'exercitationem',
'business_id' => 'eaque',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the payment link details
requires authentication
Example request:
curl --request GET \
--get "app.mymauzo.com/mauzo/merchant/payment-links/ipsa" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"app.mymauzo.com/mauzo/merchant/payment-links/ipsa"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/mauzo/merchant/payment-links/ipsa'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/mauzo/merchant/payment-links/ipsa';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SMS Messaging
Merchant apis to send an sms message or schedule an sms campaign.
Send an Sms Message.
requires authentication
Example request:
curl --request POST \
"app.mymauzo.com/notify/merchant/messaging/send-sms" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"message\": \"consequatur\",
\"business_id\": \"est\"
}"
const url = new URL(
"app.mymauzo.com/notify/merchant/messaging/send-sms"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"message": "consequatur",
"business_id": "est"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/notify/merchant/messaging/send-sms'
payload = {
"message": "consequatur",
"business_id": "est"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/notify/merchant/messaging/send-sms';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'message' => 'consequatur',
'business_id' => 'est',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Wallet
Merchant wallet API'S
GET notify/merchant/wallet-topup-details
requires authentication
Example request:
curl --request GET \
--get "app.mymauzo.com/notify/merchant/wallet-topup-details" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"app.mymauzo.com/notify/merchant/wallet-topup-details"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/notify/merchant/wallet-topup-details'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/notify/merchant/wallet-topup-details';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST notify/merchant/wallet-topup
requires authentication
Example request:
curl --request POST \
"app.mymauzo.com/notify/merchant/wallet-topup" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone_number\": \"enim\",
\"amount\": \"sunt\"
}"
const url = new URL(
"app.mymauzo.com/notify/merchant/wallet-topup"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone_number": "enim",
"amount": "sunt"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'app.mymauzo.com/notify/merchant/wallet-topup'
payload = {
"phone_number": "enim",
"amount": "sunt"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'app.mymauzo.com/notify/merchant/wallet-topup';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'phone_number' => 'enim',
'amount' => 'sunt',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.