Get all orders
curl --request GET \
--url https://staging.api.mavapay.co/api/v1/order/all \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.api.mavapay.co/api/v1/order/all"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://staging.api.mavapay.co/api/v1/order/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.mavapay.co/api/v1/order/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.mavapay.co/api/v1/order/all"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.api.mavapay.co/api/v1/order/all")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.mavapay.co/api/v1/order/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": [
{
"orderId": "99854-2345",
"quoteId": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"isValid": true,
"amount": "1000.00",
"createdAt": "2021-07-01T12:00:00Z",
"updatedAt": "2021-07-01T12:00:00Z",
"quotes": [
{
"id": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"exchangeRate": 103830225.71866913,
"usdToTargetCurrencyRate": 1500.65,
"transactionFeesInSourceCurrency": 13.23,
"transactionFeesInTargetCurrency": "3750.00",
"amountInSourceCurrency": 1499,
"amountInTargetCurrency": "50000.00",
"paymentMethod": "LIGHTNING",
"expiry": "2021-07-01T12:00:00Z",
"isValid": true,
"invoice": "lntbs36020n1pnehfzcpp5zc8g9tfpwnmaevh62ak2vu6zjqyt5cpph3gjm4zfyqz9srjjdsaqdz5296k7ar98gsy6ctkvys9qcteyqmnyenr8yunswfdvyer2v3dx33kxe3dvymnsefdv5mnjcm9x5mrydm9vccqcqzpuxqzfvsp5utd7hdfmjp7vw3lc6hal8psqruwcnu89hxfukyzugxh40jhv8xcq9qxpqysgq2lry5dgzu2g04s74tpvctwe37rkprs3k579jw6yt7ncrsg62p29yalw8gf5fawfvpydqv4jjve0nsysfhsxa35dtwug9e6gzxkq0h5gp636wc3",
"hash": "189727ef2e0f35921af7858b96e27cbad960b0ec2bb2a4ab73b6a231f9ce8727",
"customerReference": "order-1234567890",
"totalAmountInSourceCurrency": 1499,
"customerInternalFee": 0,
"createdAt": "2021-07-01T12:00:00Z",
"updatedAt": "2021-07-01T12:00:00Z",
"bankName": "WEMA BANK",
"ngnBankAccountNumber": "7824655568",
"ngnAccountName": "Mava Digital Solutions Limited",
"ngnBankCode": "000027",
"orderId": "43477-4306",
"estimatedRoutingFee": 0
}
],
"transactions": [
{
"id": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"walletId": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"ref": "99eeff854ffd345fffs67890",
"hash": "189727ef2e0f35921af7858b96e27cbad960b0ec2bb2a4ab73b6a231f9ce8727",
"amount": 1000,
"fees": 0,
"autopayout": true,
"createdAt": "2021-07-01T12:00:00Z",
"updatedAt": "2021-07-01T12:00:00Z",
"metadata": {
"id": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"orderId": "99854-2345",
"bankCode": "090267",
"bankAccountName": "Satoshi Nakamoto",
"bankAccountNumber": "0123456789",
"customerInternalFee": 0,
"createdAt": "2021-07-01T12:00:00Z",
"updatedAt": "2021-07-01T12:00:00Z"
}
}
]
}
]
}{
"message": "<string>",
"status": "error"
}Order
Get all orders
Returns all orders
GET
/
order
/
all
Get all orders
curl --request GET \
--url https://staging.api.mavapay.co/api/v1/order/all \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.api.mavapay.co/api/v1/order/all"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://staging.api.mavapay.co/api/v1/order/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.mavapay.co/api/v1/order/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.mavapay.co/api/v1/order/all"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.api.mavapay.co/api/v1/order/all")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.mavapay.co/api/v1/order/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": [
{
"orderId": "99854-2345",
"quoteId": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"isValid": true,
"amount": "1000.00",
"createdAt": "2021-07-01T12:00:00Z",
"updatedAt": "2021-07-01T12:00:00Z",
"quotes": [
{
"id": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"exchangeRate": 103830225.71866913,
"usdToTargetCurrencyRate": 1500.65,
"transactionFeesInSourceCurrency": 13.23,
"transactionFeesInTargetCurrency": "3750.00",
"amountInSourceCurrency": 1499,
"amountInTargetCurrency": "50000.00",
"paymentMethod": "LIGHTNING",
"expiry": "2021-07-01T12:00:00Z",
"isValid": true,
"invoice": "lntbs36020n1pnehfzcpp5zc8g9tfpwnmaevh62ak2vu6zjqyt5cpph3gjm4zfyqz9srjjdsaqdz5296k7ar98gsy6ctkvys9qcteyqmnyenr8yunswfdvyer2v3dx33kxe3dvymnsefdv5mnjcm9x5mrydm9vccqcqzpuxqzfvsp5utd7hdfmjp7vw3lc6hal8psqruwcnu89hxfukyzugxh40jhv8xcq9qxpqysgq2lry5dgzu2g04s74tpvctwe37rkprs3k579jw6yt7ncrsg62p29yalw8gf5fawfvpydqv4jjve0nsysfhsxa35dtwug9e6gzxkq0h5gp636wc3",
"hash": "189727ef2e0f35921af7858b96e27cbad960b0ec2bb2a4ab73b6a231f9ce8727",
"customerReference": "order-1234567890",
"totalAmountInSourceCurrency": 1499,
"customerInternalFee": 0,
"createdAt": "2021-07-01T12:00:00Z",
"updatedAt": "2021-07-01T12:00:00Z",
"bankName": "WEMA BANK",
"ngnBankAccountNumber": "7824655568",
"ngnAccountName": "Mava Digital Solutions Limited",
"ngnBankCode": "000027",
"orderId": "43477-4306",
"estimatedRoutingFee": 0
}
],
"transactions": [
{
"id": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"walletId": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"ref": "99eeff854ffd345fffs67890",
"hash": "189727ef2e0f35921af7858b96e27cbad960b0ec2bb2a4ab73b6a231f9ce8727",
"amount": 1000,
"fees": 0,
"autopayout": true,
"createdAt": "2021-07-01T12:00:00Z",
"updatedAt": "2021-07-01T12:00:00Z",
"metadata": {
"id": "d1614a76-9c7f-4111-98a7-43199f307e5b",
"orderId": "99854-2345",
"bankCode": "090267",
"bankAccountName": "Satoshi Nakamoto",
"bankAccountNumber": "0123456789",
"customerInternalFee": 0,
"createdAt": "2021-07-01T12:00:00Z",
"updatedAt": "2021-07-01T12:00:00Z"
}
}
]
}
]
}{
"message": "<string>",
"status": "error"
}⌘I
