Generate Account

Create a collection link to collect payment by initialization

POST {{ BASE_URL }}/v1/corporate/generate-account

Account type ofpermanentare currently disabled on our platform. You can conviniently make use of temporary virtual accounts to recieve bank transfer payments.

Body Parameters

Property
Data Type
Description
Example
Required

type

string

The type of the transaction to be initialized. This can either be permanent or temporary

"temporary"

Yes

amount

number

Amount required for the virtual account. This should be set if type is temporary

200.85

Only if type is temporary

reference

string

A unique reference to identify generated account. This should be set if type is temporary

"TXDF09876"

Only if type is temporary

expires

number

max number of minutes generated account should be available. Min is 20 mins, max is 45 mins. This should be set if type is temporary

25

Only if type is temporary

import Axios from 'axios';

// set the api url
const API_URL = `${BASE_URL}/v1/corporate/generate-account`;

// define request body
const data = {
  type: "temporary",
  amount: 100,
  reference: "TXDF098765432",
  expires: 25
}

// 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