Coin Tunnel
Search…
⌃K

Send the First request

post
https://www.coin-tunnel.ml/api
/v1/create
Send it!
Below is an example that you can use to access our api (Node JS) Do not try accessing our api through the client's browser! This will show the user your API key!
TransactionExample.js
const fetch = require('node-fetch');
let data = {
buyerId:"Get this value from buyer",
callback: "callback url (See the next part)",
usd: 20,
expiry: 180000,
note: {
"item":"computer",
"id":"123456"
}
}
let headers = {
'Content-Type': 'application/json',
'Authorization': 'API key'
}
fetch('https://coin-Tunnel.joshuazou.repl.co/api/v1/create', {
method: 'POST',
body: JSON.stringify(data),
headers: headers
}).then(res => res.json())
.then(json => {
console.log(json);
// display a message to buyer that says "Check your emails or something like that"
});
Please note that every time a buyer buys something, their buyer id changes. This is to prevent merchants from spamming buyers with payment requests.