POST {{baseurl}}/transactions/bank-transfer
- Staging
- Production
https://gw.stg.girostack.com/v1
https://gw.prod.girostack.com/v1
Headers
Pass your account’s secret key as the value.
Body Params
Value should be the publicId of the user’s wallet
Destination account number
Destination bank code
Value should be in kobo. Minimum transfer is 100 naira
Value should be NGN
curl --location --request POST '{{API_BASE_URL}}/transactions/bank-transfer' \
--header 'x-giro-key: {{SECRET_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"source": "vba-19aeceea-1bd6-4e85-89fa-2ca0b1c57d61",
"accountNumber": "0018730826",
"bankCode": "058",
"amount": 30000,
"currency": "NGN",
"narration": "giro bank transfer"
}'
const fetch = require("node-fetch");
const url = "{{API_BASE_URL}}/transactions/bank-transfer";
const headers = {
"x-giro-key": "{{SECRET_KEY}}",
"Content-Type": "application/json",
};
const body = JSON.stringify({
source: "vba-19aeceea-1bd6-4e85-89fa-2ca0b1c57d61",
accountNumber: "0018730826",
bankCode: "058",
amount: 30000,
currency: "NGN",
narration: "giro bank transfer",
});
fetch(url, {
method: "POST",
headers: headers,
body: body,
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{API_BASE_URL}}/transactions/bank-transfer',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'x-giro-key: {{SECRET_KEY}}',
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS => json_encode(array(
'source': 'vba-19aeceea-1bd6-4e85-89fa-2ca0b1c57d61',
'accountNumber': '0018730826',
'bankCode': '058',
'amount': 30000,
'currency': 'NGN',
'narration': 'giro bank transfer'
))
));
$response = curl_exec($curl);
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if (curl_errno($curl)) {
echo 'Error: ' . curl_error($curl);
} else {
echo "Response Code: $httpcode\n";
echo $response;
}
curl_close($curl);
?>
{
"meta": {
"statusCode": 200,
"success": true,
"message": "successful"
},
"data": {
"_id": "66e2a48a7648f2b0f28e86742",
"publicId": "trx-8d4332e00-fc44-4bfe-95a9-348a2r39d5888",
"auth": "65b12bbf512f9932b67f53d7",
"account": "65b12bbf36e38c6bfbe35f95",
"deletedAt": null,
"tags": [],
"currency": "NGN",
"entry": "debit",
"destination": "bka-849sd4a45-c04c-4226-825a-12dff9c3fg40a9",
"live": true,
"destinationType": "BankAccount",
"destinationData": {
"id": 4353,
"publicId": "bka-849sd4a45-c04c-4226-825a-12dff9c3fg40a9",
"bankName": "Opay",
"bankCode": "999992",
"accountName": "Jane Doe",
"accountNumber": "7086576668",
"processor": "source",
"clientIds": {},
"nameEnquiryRef": "555558136afb46a6b6sde45a4653a4b3c3re384ccfb5a90131037"
},
"source": "vba-19aeceea-1bd6-4e85-89fa-2ca0b1c57d61",
"sourceType": "VirtualAccount",
"sourceData": {
"id": 113,
"publicId": "vba-19aeceea-1bd6-4e85-89fa-2ca0b1c57d61",
"bankName": "Source MFB",
"bankCode": "090641",
"accountName": "Giro Expenses",
"accountNumber": "6153332037",
"currency": "NGN",
"reference": null,
"processor": "source"
},
"amount": 2000000,
"balance": 5000000,
"clientTransaction": {
"fee": 2500,
"actualAmount": 2002500
},
"fee": 2500,
"feeReference": "fee-73887083e-c99b-42ee-85ec-4577998336454",
"actualAmount": 2002500,
"narration": "Expenses",
"reference": "TRF-7107555149278192088783030331355765593680-17261292800944",
"debitReference": null,
"tRef": "GIR-6291285234044666400580911355723887500713-1726129289945",
"linkRef": "TRFLNK-3205567866441776185720553998786846299624-1726129289944",
"status": "pending",
"processor": "source",
"meta": {
"isThirdParty": true,
"rate": {
"rateId": 1,
"rate": 1,
"sourceCurrency": "NGN",
"destinationCurrency": "NGN",
"convertedAmount": 2000000
},
"credit": {
"sourceType": "VirtualAccount",
"sourceData": {
"id": 113,
"publicId": "vba-19aeceea-1bd6-4e85-89fa-2ca0b1c57d61",
"bankName": "Source MFB",
"bankCode": "090641",
"accountName": "Giro Expenses",
"accountNumber": "6153332037",
"currency": "NGN",
"reference": null,
"processor": "source"
},
"source": "vba-00b8fe5c-aeff-45f5-a338-6b082d35714b",
"destination": "bka-849sd4a45-c04c-4226-825a-12dff9c3fg40a9",
"destinationType": "BankAccount",
"destinationData": {
"id": 4353,
"publicId": "bka-849sd4a45-c04c-4226-825a-12dff9c3fg40a9",
"bankName": "Opay",
"bankCode": "999992",
"accountName": "Jane Doe",
"accountNumber": "7086576668",
"processor": "source",
"clientIds": {}
},
"amount": 2000000,
"currency": "NGN",
"actualAmount": 2002500,
"fee": 2500,
"narration": "Expenses",
"balance": 5000000
}
},
"currencyPair": "NGN/NGN",
"batchId": null,
"updatedAt": "2024-09-12T08:25:00.610Z",
"createdAt": "2024-09-12T08:21:29.945Z",
"metadata": {}
}
}
{
"meta": {
"statusCode": 400,
"error": {
"statusCode": 400,
"message": "Bad request / Validation error",
"messages": {
"bankCode": {
"isNotEmpty": "bankCode should not be empty",
"isString": "bankCode must be a string"
}
}
}
}
}
{
"meta": {
"statusCode": 404,
"error": {
"statusCode": 404,
"message": "Source not found"
}
}
}
{
"meta": {
"statusCode": 403,
"error": {
"statusCode": 403,
"message": "Insufficient fund"
}
}
}