JavaScript
const url = "https://staging.branta.pro/v1/payments";
const apiToken = "your token here";
const payload = {
"payment": {
"payment": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"ttl": "86400"
}
}
const options = {
method: "POST",
headers: {
"API_KEY": apiToken,
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
};
fetch(url, options)
.then(response => {
console.log("Response Status Code:", response.status);
})
.catch(error => {
console.error("An error occurred:", error);
});Last updated