Integration Guide for Payment Widget

You can read basic information about the payment widget here: Payment Widget.

Base URLs

You can use Payment Widget both for Invoices and Channels. Use the following URLs to generate links for an invoice or channel:

Type
URL

Invoice

https://sandbox-payment-widget.munzen.io/invoice?[params]

Channel

https://sandbox-payment-widget.munzen.io/channel?[params]

Params for Initialisation

You can set the following params for the Payment Widget to add custom information about customer, order, etc:

{
  customer_external_id: string;
  external_id: string;
  external_data: Record<string, string>;
  description: string;
  name: string;
	
  // Theme is a purely presentational parameter, not used in signature generation
  // It has 2 options, "dark" or "light" -
  // Choose what better suits your application look & feel
  theme: 'dark' | 'light';
};

Here is the only required param: customer_external_id. All other parameters are optional, you can ignore them if you want.

Here is an example of defined params:

When you build your params then you need to generate a signature.

Generate Signature

We need a signature to validate that you can use the widget to accept customer payments. Here is an example of signature generation:

JS Example Code

Let's generate query params for the Payment Widget URL:

You will receive a full URL to the Payment Widget. It will look like this:

Show Widget to the Customer

Now you have an URL for the payment widget. You can redirect the customer to this URL or open this URL inside an iframe.

Last updated