The widget integration method allows you to integrate card payments from within your shop. In this case, no redirection to the payment gateway is required.
The widget supports eCom 3DSecure payments, OneClick payments, and recurring payments.
To use this method, you need to embed the appropriate JavaScript script.
Production environment:
https://paywall.imoje.pl/js/widget.min.js
Test environment:
https://sandbox.paywall.imoje.pl/js/widget.min.js
Parameters
| Parameter | Required parameter | Description |
|---|---|---|
data-merchant-id |
YES |
Merchant ID |
data-service-id |
YES |
Shop ID |
data-amount |
YES |
transaction amount given in pence |
data-currency |
YES |
currency |
data-order-id |
YES |
Order ID, acceptable characters: A-Za-z0-9#_-./ and the space character (0x20) and characters from the UNICODE range 00C0 - 02C0 (including Polish diacritical marks) |
data-customer-id |
YES |
Payer ID, acceptable characters: A-Za-z0-9_- |
data-customer-first-name |
YES |
name of the person placing the order, acceptable characters: A-Za-z0-9-,. and space character (0x20) and characters from the UNICODE range 00C0 - 02C0 (including Polish diacritical marks), 0400 - 04FF (Cyrillic) |
data-customer-last-name |
YES |
name of the person placing the order, acceptable characters: A-Za-z0-9-,. and space character (0x20) and characters from the UNICODE range 00C0 - 02C0 (including Polish diacritical marks), 0400 - 04FF (Cyrillic) |
data-customer-email |
YES |
e-mail address in a format compliant with RFC 5322 and RFC 6531 standards |
data-signature |
YES |
calculated signature |
data-customer-phone |
NO |
telephone number of the person placing the order, acceptable characters: -+0-9 and space. The parameter value may contain up to 20 characters. |
data-order-description |
NO |
transaction title, permitted characters: A-Za-z0-9#&_-,.\/ and space character (0x20) and characters from the UNICODE range 00C0 - 02C0 (including Polish diacritical marks) |
data-url-success |
NO |
The URL to which the user will be redirected after a successful transaction. The address must comply with the RFC 3986 standard and contain a host. The domain name cannot be absolute (FQDN). |
data-url-failure |
NO |
URL address to which the user will be redirected after an incorrect transaction. The address must comply with the RFC 3986 standard and contain a host. The domain name cannot be absolute (FQDN). |
data-url-return |
NO |
The general URL to which the user will be redirected after completing the transaction. The address must comply with the RFC 3986 standard and contain a host. The domain name cannot be absolute (FQDN). |
data-url-cancel |
NO |
The URL to which the user will be redirected after pressing the Cancel button. The address must comply with the RFC 3986 standard and contain a host. The domain name cannot be absolute (FQDN). |
data-widget-type |
NO |
payment type designation Acceptable values: oneclick, recurring, ecom3ds |
data-valid-to |
NO |
expiry date of the payment link as a timestamp in seconds; if not provided, the link is always valid |
data-invoice |
NO |
encoded invoice data, necessary when using the ING Księgowość service. The data should be encoded in accordance with the instructions described here. |
data-multipayout |
NO |
data specifying the payment recipient for multipayout functions, where: * ban - bank account number * amount - transaction amount specified in pence * label - recipient name (max. 35 characters), permitted characters: A-Za-z0-9-,. and space character (0x20) and characters from the UNICODE range 00C0 - 02C0 (including Polish diacritical marks) * title - transfer title (max 105 characters), acceptable characters: A-Za-z0-9#&_-,.\/ and space character (0x20) and characters from the UNICODE range 00C0 - 02C0 (including Polish diacritical marks), optional parameter. Its presence causes the transaction to be separated in the recipient's account. Specifying a parameter for one element requires it to be provided for the others. |
The example structure of the data-multipayout parameter should look as follows:
data-multipayout=[{"ban":"39109024028943913168514519","label":"Test1","amount":100},{"ban":"72105000028166973380325415","label":"Test2","amount":100}]
Configuration parameters - should not be included when calculating the signature
| Parameter | Required parameter | Description |
|---|---|---|
data-locale |
NO |
Two-letter language code. Acceptable values: pl, en, cs, de, es, fr, it, lt, ru, sk, sl, uk, nl, hu, ro, bg, sv. Default is pl; if an unknown value is passed, en will be displayed. |
data-inline |
NO |
If set to true, it is possible for the iframe to be embedded in an element with the identifier imoje-widget__wrapper (an element with this identifier must exist). If this parameter is not present or is set to false, the iframe will be displayed full screen. |
data-element-id |
NO |
indication of the identifier of the element that is to be interactive with the widget; the default value is false |
data-element-event |
NO |
specifies which event should initiate interaction with the widget; the default is click |
Example
<script
src="https://paywall.imoje.pl/js/widget.min.js"
id="imoje-widget__script"
data-merchant-id="6yt3gjtm9p1odfgx8491"
data-service-id="63f574ed-d90d-4abe-9cs1-39117584a7b"
data-amount="200"
data-currency="PLN"
data-order-id="123"
data-customer-id="123"
data-customer-first-name="John"
data-customer-last-name="Doe"
data-customer-email="johndoe@domain.com"
data-signature="5d8b909fd777f1e2a4bbf9af8a9dca248c4fe9b14ae70610d051e29358cb62b1;sha256">
</script>
where:
src- URL address for thewidget.min.jsscriptid- Script ID. Must always have the valueimoje-widget__script.
The above parameters src and id should not be taken into account when calculating the signature.
Calculating the signature
The names of the parameters for calculating the signature should be replaced as shown in the example:
- parameter
data-order-idtoorderId.
The signature should be calculated in the same way as described in the section Authorisation.