Update a subaccount
curl --request PUT \
--url https://api.flutterwave.com/v3/subaccounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"business_name": "Example Business",
"business_email": "business@gmail.com",
"account_bank": "044",
"account_number": "0690000034",
"split_type": "flat",
"split_value": "200"
}
'import requests
url = "https://api.flutterwave.com/v3/subaccounts/{id}"
payload = {
"business_name": "Example Business",
"business_email": "business@gmail.com",
"account_bank": "044",
"account_number": "0690000034",
"split_type": "flat",
"split_value": "200"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
business_name: 'Example Business',
business_email: 'business@gmail.com',
account_bank: '044',
account_number: '0690000034',
split_type: 'flat',
split_value: '200'
})
};
fetch('https://api.flutterwave.com/v3/subaccounts/{id}', 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.flutterwave.com/v3/subaccounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'business_name' => 'Example Business',
'business_email' => 'business@gmail.com',
'account_bank' => '044',
'account_number' => '0690000034',
'split_type' => 'flat',
'split_value' => '200'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.flutterwave.com/v3/subaccounts/{id}"
payload := strings.NewReader("{\n \"business_name\": \"Example Business\",\n \"business_email\": \"business@gmail.com\",\n \"account_bank\": \"044\",\n \"account_number\": \"0690000034\",\n \"split_type\": \"flat\",\n \"split_value\": \"200\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.flutterwave.com/v3/subaccounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"business_name\": \"Example Business\",\n \"business_email\": \"business@gmail.com\",\n \"account_bank\": \"044\",\n \"account_number\": \"0690000034\",\n \"split_type\": \"flat\",\n \"split_value\": \"200\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flutterwave.com/v3/subaccounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business_name\": \"Example Business\",\n \"business_email\": \"business@gmail.com\",\n \"account_bank\": \"044\",\n \"account_number\": \"0690000034\",\n \"split_type\": \"flat\",\n \"split_value\": \"200\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Subaccount edited",
"data": {
"id": 2165,
"account_number": "0690000040",
"account_bank": "044",
"business_name": "Mad O!",
"full_name": "Alexis Rogers",
"created_at": "2020-01-17T16:28:26.000Z",
"meta": [
{
"meta_name": "MarketplaceID",
"meta_value": "ggs-920900"
}
],
"account_id": 88497,
"split_ratio": 1,
"split_type": "flat",
"split_value": "200",
"subaccount_id": "RS_884E7E4BD793ADA77F491CF4AD3DE19E",
"bank_name": "ACCESS BANK NIGERIA",
"country": "NG"
}
}{
"status": "error",
"message": "Merchant not found",
"data": null
}Collection Subaccounts
Update a subaccount
Update a collection subaccount details
PUT
/
subaccounts
/
{id}
Update a subaccount
curl --request PUT \
--url https://api.flutterwave.com/v3/subaccounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"business_name": "Example Business",
"business_email": "business@gmail.com",
"account_bank": "044",
"account_number": "0690000034",
"split_type": "flat",
"split_value": "200"
}
'import requests
url = "https://api.flutterwave.com/v3/subaccounts/{id}"
payload = {
"business_name": "Example Business",
"business_email": "business@gmail.com",
"account_bank": "044",
"account_number": "0690000034",
"split_type": "flat",
"split_value": "200"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
business_name: 'Example Business',
business_email: 'business@gmail.com',
account_bank: '044',
account_number: '0690000034',
split_type: 'flat',
split_value: '200'
})
};
fetch('https://api.flutterwave.com/v3/subaccounts/{id}', 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.flutterwave.com/v3/subaccounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'business_name' => 'Example Business',
'business_email' => 'business@gmail.com',
'account_bank' => '044',
'account_number' => '0690000034',
'split_type' => 'flat',
'split_value' => '200'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.flutterwave.com/v3/subaccounts/{id}"
payload := strings.NewReader("{\n \"business_name\": \"Example Business\",\n \"business_email\": \"business@gmail.com\",\n \"account_bank\": \"044\",\n \"account_number\": \"0690000034\",\n \"split_type\": \"flat\",\n \"split_value\": \"200\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.flutterwave.com/v3/subaccounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"business_name\": \"Example Business\",\n \"business_email\": \"business@gmail.com\",\n \"account_bank\": \"044\",\n \"account_number\": \"0690000034\",\n \"split_type\": \"flat\",\n \"split_value\": \"200\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flutterwave.com/v3/subaccounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business_name\": \"Example Business\",\n \"business_email\": \"business@gmail.com\",\n \"account_bank\": \"044\",\n \"account_number\": \"0690000034\",\n \"split_type\": \"flat\",\n \"split_value\": \"200\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Subaccount edited",
"data": {
"id": 2165,
"account_number": "0690000040",
"account_bank": "044",
"business_name": "Mad O!",
"full_name": "Alexis Rogers",
"created_at": "2020-01-17T16:28:26.000Z",
"meta": [
{
"meta_name": "MarketplaceID",
"meta_value": "ggs-920900"
}
],
"account_id": 88497,
"split_ratio": 1,
"split_type": "flat",
"split_value": "200",
"subaccount_id": "RS_884E7E4BD793ADA77F491CF4AD3DE19E",
"bank_name": "ACCESS BANK NIGERIA",
"country": "NG"
}
}{
"status": "error",
"message": "Merchant not found",
"data": null
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
OK
Show child attributes
Show child attributes
Example:
{
"id": 2165,
"account_number": "0690000040",
"account_bank": "044",
"business_name": "Mad O!",
"full_name": "Alexis Rogers",
"created_at": "2020-01-17T16:28:26.000Z",
"meta": [
{
"meta_name": "MarketplaceID",
"meta_value": "ggs-920900"
}
],
"account_id": 88497,
"split_ratio": 1,
"split_type": "flat",
"split_value": "200",
"subaccount_id": "RS_884E7E4BD793ADA77F491CF4AD3DE19E",
"bank_name": "ACCESS BANK NIGERIA",
"country": "NG"
}
Was this page helpful?
⌘I