Introduction¶
About milliPay¶
The milliPay JavaScript client API enables you to offer users a payment experience as convenient as with iTunes / Google Play in-app purchases. It is optimised for selling articles, video, music or other virtual goods in a browser (web / mobile / in-app). The milliPay API is simple: You can protect content with a paywall in five minutes. We have sensible defaults for sign up, top up and other user management related workflows. Nonetheless, if you have distinct preferences, the payment workflow can be completely customised to suit your needs.
Minimal usage example¶
Sign up for a free merchant trial account, and use the default settings for a jump start:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <div id="article-123" style="display:none;">
[... your content here ...]
</div>
<button id="readon-123" >read for EUR 0.15</button>
<script>
// defines the 'title', 'price', 'currency' as a JSON Web Token
var payinstruction123 = "eyJ0exxxxJ9.eyJwYXlxxxx30.nTriTxxxxl5C2n";
// the pay process instance for this product item
var product123 = new millipay.Product(payinstruction123);
// attach the pay process to the pay button
product123.registerStartPaymentClick("#readon-123");
// let the article appear and remove the pay button
product123.onAccessAuthorization
.show("#article-123")
.hide("#readon-123");
</script>
|
That’s it, you are ready to start selling an item for EUR 0.15.
About the Documentation¶
Read the Integration Overview to learn about the core workflows and high level concepts. The Examples outline with a short summary and JavaScript code snippets typically implemented payment workflows. Most of the time this is already enough to jump start, and the deep dive into the JavaScript API is not necessary.
You will have to look once at how we expect the Pay Instruction Data, and whicg CSS & JS Includes are necessary.