LightBox
Overview
The Lightbox approach uses an <iframe>
to embed the payment page as an overlay to your online shop.
When the Lightbox Mode is invoked, the merchants online shop is darkened out and the payment page appears as a floating element on top.
Integration
The simple integration uses a <script>
tag inside your payment form to render the purple Lightbox button. Upon completion of the Checkout process, Lightbox submits your form to your server, passing along a transaction_response and any elements your form contains.
You can find a demo on this link Demo Lightbox
Transaction response input contains JSON stringified transaction response received as payment processing result. Example:
When adding the following code to your page, make sure that the form submits to your own server--side code within the action attribute:
Digest is calculated using following formula:
digest = SHA512(key + order_number + amount + currency)
With the following example data
key:
qwert123
order_number:
abcdef
amount:
54321
currency:
EUR
the digest formula gives a result as follows:
You can check digest on this link Calculate Digest
Data Parameters
Buyer's profile
name | length | format | lightbox-key | additional info |
---|---|---|---|---|
| 3-30 | alphanumeric |
| buyer's full name |
| 3-100 | alphanumeric |
| buyer's address |
| 3-30 | alphanumeric |
| buyer's city |
| 3-9 | alphanumeric |
| buyer's zip |
| 2-3 | alphanumeric |
| buyer’s country in alpha2, alpha3 letter code or 3 digit ISO numeric code |
| 3-30 | alphanumeric |
| buyer's phone |
| 3-100 | alphanumeric |
| buyer's email |
Order details
name | length | format | lightbox-key | additional info |
---|---|---|---|---|
| 3-100 | alphanumeric |
| short description of order being processed |
| 1-40 | alphanumeric |
| unique identifier |
| 3-11 | integer |
| amount is in minor units, ie. 10.24 USD is sent as 1024 |
| predefined | alpha |
| possible values are USD, EUR, or BAM |
Processing data
name | length | format | lightbox-key | additional info |
---|---|---|---|---|
language | predefined | alpha |
| used for errors localization, possible values are en, es, ba or hr |
transaction_type | predefined | alpha |
| possible values are authorize, purchase, capture, refund, void |
authenticity_token | 40 | alphanumeric |
| auto generated value for merchant account, can be found under merchant settings |
digest | 40 | alphanumeric |
| SHA512 hash generated from concatenation of key, order_number, amount and currency as strings; key can be found under merchant settings |
number_of_installments | 1-2 | integer |
| range 2-12 |
moto | predefined | boolean |
| possible value is true or false; missing variable is equivalent to false |
Additional info
name | length | format | lightbox-key | additional info |
---|---|---|---|---|
tokenize_pan_offered | predefined | boolean |
| if true and merchant has secure vault active (tokenization enabled) then save card for future payments will be shown to customer. If customer decided to save the card and transaction is approved we’ll provide pan_token which you can store on your side. |
supported_payment_methods | predefined | comma separated payment methods |
| provide this value if customer decides to pay with previously saved card(s) or with new card. If this value is provided and valid (card not expired, token valid etc) then only cvv input will be shown on the payment form. All other information (masked pan, expiry date etc) will be pre filled. Multiple tokens can be sent (separated by comma). In that case, the user will have an option which payment method to use. |
tokenize_pan | predefined | boolean |
| tokenize pan without prompting the user |
tokenize_brands | predefined | comma separated list of card brands |
| provide this value if you want to limit card tokenization to card brand(s). Multiple brands can be sent (separated by comma). Refer to tokenize brands section below. |
custom_attributes | predefined | valid JSON string |
| provide this value if you want to customize form behaviour. Refer to the custom attributes section below for more details. |
Callback
You can set your callback URL under your merchant profile data if you want us to send a POST request with all the transaction parameters for each approved transaction. POST request is sent to your endpoint in JSON format. We expect HTTP 200 OK status response code to terminate the job, otherwise we’ll send the data periodically until we re-ceive 200. Here is a list of parameters included in callback request:
Migrating from data-whitelisted-pan-tokens
data-whitelisted-pan-tokens
Simply replace key data-whitelisted-pan-tokens
with a key data-supported-payment-methods
and you are good to go!
Last updated