Create Subaccount
POST {{ BASE_URL }}/v1/corporate/subaccountBody Parameters
Property
Data Type
Description
Example
Required
import Axios from 'axios';
// set the api url
const API_URL = `${BASE_URL}/v1/corporate/subaccount`;
// define request body
const data = {
name: "Corporate NATS",
description: "Corporate NATS subaccount for Terraswitch",
accountNo: "0125318431",
bankCode: "035",
email: "[email protected]",
phoneCode: "+234",
phoneNumber: "08137031202",
split: {
type: "percentage",
value: 10.05
}
}
// make request using axios
Axios({
method: "POST",
url: `${API_URL}`,
headers: {
lg: 'en',
ch: 'web'
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
data: data
}).then((resp) => {
console.log(resp)
}).catch((err) => {
console.log(err)
})Last updated