Documentation

Welcome to Uhmi! Here you’ll find everything you need to install Uhmi on your website or web app. We’ve tried to make this documentation user-friendly and example-filled, but if you have any questions, please don’t hesitate to contact our dev team at dev@uhmi.io.

How it works

Step 1: Create a payment with the Uhmi API

The first step is to use the Uhmi API server-side to create the payment with payment details, such as the price, title etc. This payment can represent content, a donation or a subscription.

When successfully created a payment, Uhmi returns a unique payment ID. You’ll need this payment ID anytime you want to present that payment to your customers and thus needs to be stored in, for example, your database.

Step 2: Use Widget.js to present the payment

Now that you have a payment ID, you can setup the widget client-side using Widget.js to present the payment to your customers.

Step 3: Verify payment

After your customer completed the payment, the widget submits a transaction ID to your server. This is done asynchronously using AJAX, i.e. without reloading the page. Use this transaction ID to verify the payment server-side using the Uhmi API.

Final step

Great, your customer has paid! Now it’s time to act accordingly. You can say thank-you using the widget’s messages method or display the content.

Questions?

Send us an email. We’re happy to help with your code or any other questions you might have!

Contribute.

Send us an email. We’re always looking to improve our code and documentation!