Withdraw fiat
curl --request POST \
--url https://staging.api.mavapay.co/api/v1/withdraw \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"amount": "100000",
"currency": "NGN",
"beneficiary": {
"bankAccountNumber": "0123456789",
"bankAccountName": "JOHN DOE",
"bankCode": "000013",
"bankName": "GTBANK PLC"
}
}
'import requests
url = "https://staging.api.mavapay.co/api/v1/withdraw"
payload = {
"amount": "100000",
"currency": "NGN",
"beneficiary": {
"bankAccountNumber": "0123456789",
"bankAccountName": "JOHN DOE",
"bankCode": "000013",
"bankName": "GTBANK PLC"
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '100000',
currency: 'NGN',
beneficiary: {
bankAccountNumber: '0123456789',
bankAccountName: 'JOHN DOE',
bankCode: '000013',
bankName: 'GTBANK PLC'
}
})
};
fetch('https://staging.api.mavapay.co/api/v1/withdraw', 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/withdraw",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '100000',
'currency' => 'NGN',
'beneficiary' => [
'bankAccountNumber' => '0123456789',
'bankAccountName' => 'JOHN DOE',
'bankCode' => '000013',
'bankName' => 'GTBANK PLC'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.mavapay.co/api/v1/withdraw"
payload := strings.NewReader("{\n \"amount\": \"100000\",\n \"currency\": \"NGN\",\n \"beneficiary\": {\n \"bankAccountNumber\": \"0123456789\",\n \"bankAccountName\": \"JOHN DOE\",\n \"bankCode\": \"000013\",\n \"bankName\": \"GTBANK PLC\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.mavapay.co/api/v1/withdraw")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"100000\",\n \"currency\": \"NGN\",\n \"beneficiary\": {\n \"bankAccountNumber\": \"0123456789\",\n \"bankAccountName\": \"JOHN DOE\",\n \"bankCode\": \"000013\",\n \"bankName\": \"GTBANK PLC\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.mavapay.co/api/v1/withdraw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"100000\",\n \"currency\": \"NGN\",\n \"beneficiary\": {\n \"bankAccountNumber\": \"0123456789\",\n \"bankAccountName\": \"JOHN DOE\",\n \"bankCode\": \"000013\",\n \"bankName\": \"GTBANK PLC\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"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"
}Withdraw
Withdraw fiat
Withdraw funds to a bank account. The amount is specified in the lowest denomination of the currency (e.g., Kobo for NGN). You must first verify the bank account using the Name Enquiry endpoint before initiating a withdrawal.
POST
/
withdraw
Withdraw fiat
curl --request POST \
--url https://staging.api.mavapay.co/api/v1/withdraw \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"amount": "100000",
"currency": "NGN",
"beneficiary": {
"bankAccountNumber": "0123456789",
"bankAccountName": "JOHN DOE",
"bankCode": "000013",
"bankName": "GTBANK PLC"
}
}
'import requests
url = "https://staging.api.mavapay.co/api/v1/withdraw"
payload = {
"amount": "100000",
"currency": "NGN",
"beneficiary": {
"bankAccountNumber": "0123456789",
"bankAccountName": "JOHN DOE",
"bankCode": "000013",
"bankName": "GTBANK PLC"
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '100000',
currency: 'NGN',
beneficiary: {
bankAccountNumber: '0123456789',
bankAccountName: 'JOHN DOE',
bankCode: '000013',
bankName: 'GTBANK PLC'
}
})
};
fetch('https://staging.api.mavapay.co/api/v1/withdraw', 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/withdraw",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '100000',
'currency' => 'NGN',
'beneficiary' => [
'bankAccountNumber' => '0123456789',
'bankAccountName' => 'JOHN DOE',
'bankCode' => '000013',
'bankName' => 'GTBANK PLC'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.mavapay.co/api/v1/withdraw"
payload := strings.NewReader("{\n \"amount\": \"100000\",\n \"currency\": \"NGN\",\n \"beneficiary\": {\n \"bankAccountNumber\": \"0123456789\",\n \"bankAccountName\": \"JOHN DOE\",\n \"bankCode\": \"000013\",\n \"bankName\": \"GTBANK PLC\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.mavapay.co/api/v1/withdraw")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"100000\",\n \"currency\": \"NGN\",\n \"beneficiary\": {\n \"bankAccountNumber\": \"0123456789\",\n \"bankAccountName\": \"JOHN DOE\",\n \"bankCode\": \"000013\",\n \"bankName\": \"GTBANK PLC\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.mavapay.co/api/v1/withdraw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"100000\",\n \"currency\": \"NGN\",\n \"beneficiary\": {\n \"bankAccountNumber\": \"0123456789\",\n \"bankAccountName\": \"JOHN DOE\",\n \"bankCode\": \"000013\",\n \"bankName\": \"GTBANK PLC\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"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"
}Authorizations
ApiKeyAuthbearerAuth
Body
application/json
The amount to withdraw in the lowest denomination (e.g., Kobo for NGN). For example, 100000 = 1,000.00 NGN
Example:
"100000"
The currency to withdraw
Available options:
NGN The beneficiary bank account details. Use the exact values returned from the Name Enquiry endpoint.
Show child attributes
Show child attributes
⌘I
