Find file
Fetching contributors…
Cannot retrieve contributors at this time
81 lines (68 sloc) 2.03 KB
<!doctype html>
<html lang="en">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="./styles.css">
<title> SDK examples</title>
This example uses most features of the popup and attaches custom meta
data to the transaction.
For test purposes use the card number <code>4100 0000 0000 0000</code>
with any expiry date and CVC. Use <code>4200 0000 0000 0000</code> as
an invalid card number.
<button>Try it (pay)</button>
<li><a href="popup-minimal.html">Minimal popup example</a></li>
<li><a href="popup-donation.html">Donations popup example</a></li>
<a href="">SDK documentation on GitHub</a>
<script src=""></script>
var paylike = Paylike('e9f468a8-4b63-46a5-aaf3-0911312bae27');
document.querySelector('button').addEventListener('click', pay);
function pay(){
// locale: 'da', // pin popup to a locale
title: 'The Fashion Store',
description: '2x very modern jeans & 1x ultra fashionable belt to be delivered by Monday 4th.',
currency: 'EUR',
amount: 19995,
// saved on transaction for retrieval from dashboard or API
custom: {
// arrays are fine
products: [
// nested objects will do
{ SKU: 'VMJ', quantity: 2 },
{ SKU: 'UFB', quantity: 1 },
// data from fields will be merged with custom
fields: [
// elaborate custom field
name: 'email',
type: 'email',
placeholder: '',
required: true,
// simple custom field
}, function( err, res ){
if (err)
return console.log(err);
// location.href = '/thank-you';