Create Payment Link
POST {{ BASE_URL }}/v1/corporate/paymentBody 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: "Donation Request",
feature: "product",
type: "fixed",
amount: 1000,
redirectUrl: "",
message: "Thank you for your payment",
slug: "donation-request",
description: "Request link for church donation",
splits: ["SUB6789", "8GH37"]
}
// 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