Pay with Opay
POST {{ BASE_URL }}/v1/corporate/charge-opayBody Parameters
Property
Data Type
Description
Example
Required
import Axios from 'axios';
// set the api url
const API_URL = `${BASE_URL}/v1/corporate/charge-opay`;
// define request body
const data = {
amount: 400,
reference: "",
description: "payment for opay charge xid",
redirectUrl: "https://staging-app.terraswitching.com/verify",
customer: {
email: "[email protected]",
firstName: "Oluwatobi",
lastName: "Immanuel",
phoneNumber: "+2348137031202",
accountNo: "8036366334"
},
metadata: [
{
product: "zod",
productId: "12356890"
}
]
}
// 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