Skip to main content
POST
/
v2
/
transfers
/
wallet
Perform wallet transfer from the parent account
curl --request POST \
  --url https://api.nomba.com/v2/transfers/wallet \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'accountId: <accountid>' \
  --data '
{
  "amount": 3500,
  "receiverAccountId": "890022ce-bae0-45c1-9b9d-ee7872e6ca27",
  "merchantTxRef": "UNQ_123abGGhh5546",
  "narration": "Testing Payment"
}
'
import requests

url = "https://api.nomba.com/v2/transfers/wallet"

payload = {
"amount": 3500,
"receiverAccountId": "890022ce-bae0-45c1-9b9d-ee7872e6ca27",
"merchantTxRef": "UNQ_123abGGhh5546",
"narration": "Testing Payment"
}
headers = {
"accountId": "<accountid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
accountId: '<accountid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 3500,
receiverAccountId: '890022ce-bae0-45c1-9b9d-ee7872e6ca27',
merchantTxRef: 'UNQ_123abGGhh5546',
narration: 'Testing Payment'
})
};

fetch('https://api.nomba.com/v2/transfers/wallet', 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://api.nomba.com/v2/transfers/wallet",
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' => 3500,
'receiverAccountId' => '890022ce-bae0-45c1-9b9d-ee7872e6ca27',
'merchantTxRef' => 'UNQ_123abGGhh5546',
'narration' => 'Testing Payment'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"accountId: <accountid>"
],
]);

$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://api.nomba.com/v2/transfers/wallet"

payload := strings.NewReader("{\n \"amount\": 3500,\n \"receiverAccountId\": \"890022ce-bae0-45c1-9b9d-ee7872e6ca27\",\n \"merchantTxRef\": \"UNQ_123abGGhh5546\",\n \"narration\": \"Testing Payment\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("accountId", "<accountid>")
req.Header.Add("Authorization", "Bearer <token>")
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://api.nomba.com/v2/transfers/wallet")
.header("accountId", "<accountid>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 3500,\n \"receiverAccountId\": \"890022ce-bae0-45c1-9b9d-ee7872e6ca27\",\n \"merchantTxRef\": \"UNQ_123abGGhh5546\",\n \"narration\": \"Testing Payment\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.nomba.com/v2/transfers/wallet")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["accountId"] = '<accountid>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 3500,\n \"receiverAccountId\": \"890022ce-bae0-45c1-9b9d-ee7872e6ca27\",\n \"merchantTxRef\": \"UNQ_123abGGhh5546\",\n \"narration\": \"Testing Payment\"\n}"

response = http.request(request)
puts response.read_body
{
  "code": "00",
  "description": "Success",
  "data": {
    "amount": 5502,
    "meta": {
      "merchantTxRef": "3JVW2xJCjj443oannREBuTaXDdji",
      "api_client_id": "6a7bed88-7c93-4a1c-a445-f88edbca6489",
      "api_account_id": "01a10aeb-d989-460a-bbde-9842f2b4320f",
      "rrn": "230908151711"
    },
    "fee": 50,
    "timeCreated": "2023-09-08T14:17:13.634Z",
    "id": "API-P2P-C24AD-a6443bf0-011c-4bc2-b739-4a2e33e2a27b",
    "type": "p2p",
    "status": "SUCCESS"
  }
}
{
"code": "201",
"description": "PROCESSING",
"message": "Unable to process response, please rely on web hook",
"status": false,
"data": {
"status": "PENDING_BILLING"
}
}
{
"code": "400",
"description": "Request failed."
}
{
"code": "401",
"description": "Unauthorized"
}
{
"code": "403",
"description": "Forbidden"
}
{
"code": "404",
"description": "Record not found"
}
{
"code": "429",
"description": "Too many requests"
}
{
"code": "500",
"description": "Server error"
}

Authorizations

Authorization
string
header
required

Nomba authenticates API calls with OAuth2 HTTP bearer tokens. There are two methods of authentication; Client-Credentials method and PKCE (Proof Key for Code Exchange) method. In each of the methods, You will get an ACCESS_TOKEN. You need to use an "Authorization" HTTP header to provide your ACCESS_TOKEN. For example: Authorization: {ACCESS_TOKEN}.

Headers

accountId
string<uuid>
required

The parent accountId of the business.

Example:

"890022ce-bae0-45c1-9b9d-ee7872e6ca27"

Body

application/json

The request payload required to perform a wallet transfer.

A structure representing an object required to post a wallet transfer.

amount
number<double>
required

The amount to be transferred.

Example:

3500

receiverAccountId
string<uuid>
required

The receiver's accountId.

Example:

"890022ce-bae0-45c1-9b9d-ee7872e6ca27"

merchantTxRef
string
required

Unique reference used to track a transaction from an external process.

This is an idempotency key and must be unique per transaction.

Example:

"UNQ_123abGGhh5546"

narration
string

The payment narration

Example:

"Testing Payment"

Response

OK - your request was successful.

code
string
required

Response Code

Example:

"00"

description
string
required

Response description

Example:

"Success"

data
object
required

Transfer data