The Tuna JavaScript library allow you to build a secure payment form, tokenize sensitive custumer card's information and accept payments rigth on your website or using your backend.
Building tuna libraries
npm install
yarn bundle
Building only tuna-api.js
yarn bundleTunaAPI
Run tests
yarn test
Run in debug mode
yarn debug
To use tuna.js to build your checkout form add
<script src="https://js.tuna.uy/tuna.js"></script>
To use tuna.js API only
<script src="https://js.tuna.uy/tuna-api.js"></script>
We strongly encourage the use of tuna.js via these links provided by us istead of a local copy of the file
<html>
<head>
<script src="https://js.tuna.uy/tuna.js"></script>
</head>
<body>
<span id="defaultFormRoot"></span>
<script>
let tuna = Tuna('61205-xxxx-2305');
tuna.useDefaultForm("#defaultFormRoot",
{
checkoutCallback: response => console.log(response),
});
</script>
</body>
</html>
To more details, access the entire documentation at this link