Skip to content

Instantly share code, notes, and snippets.

@Joe8Bit
Last active March 7, 2020 15:07
Show Gist options
  • Save Joe8Bit/cfcc83f702a154251acf7ba617c855b5 to your computer and use it in GitHub Desktop.
Save Joe8Bit/cfcc83f702a154251acf7ba617c855b5 to your computer and use it in GitHub Desktop.
Example store - Banked API request
const Banked = require('@banked/node')
// -- snip
const banked = new Banked({
api_key: process.env.BANKED_API_KEY,
secret_key: process.env.BANKED_API_SECRET
})
// -- snip
app.post('/checkout', async function (req, res) {
try {
const bankedResponse = await banked.payments.create(req.body)
res.send({
url: bankedResponse.data.url
})
} catch (e) {
console.error(e)
}
})
// -- snip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment