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 & feeltheme:'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
Generate Widget Link
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.