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
ch_full_name
3-30
alphanumeric
data-ch-full-name
buyer's full name
ch_address
3-100
alphanumeric
data-ch-address
buyer's address
ch_city
3-30
alphanumeric
data-ch-city
buyer's city
ch_zip
3-9
alphanumeric
data-ch-zip
buyer's zip
ch_country
2-3
alphanumeric
data-ch-country
buyer’s country in alpha2, alpha3 letter code or 3 digit ISO numeric code
ch_phone
3-30
alphanumeric
data-ch-phone
buyer's phone
ch_email
3-100
alphanumeric
data-ch-email
buyer's email
Order details
order_info
3-100
alphanumeric
data-order-info
short description of order being processed
order_number
1-40
alphanumeric
data-order-number
unique identifier
amount
3-11
integer
data-amount
amount is in minor units, ie. 10.24 USD is sent as 1024
currency
predefined
alpha
data-currency
possible values are USD, EUR, or BAM
Processing data
language
predefined
alpha
data-language
used for errors localization, possible values are en, es, ba or hr
transaction_type
predefined
alpha
data-transaction-type
possible values are authorize, purchase, capture, refund, void
authenticity_token
40
alphanumeric
data-authenticity-token
auto generated value for merchant account, can be found under merchant settings
digest
40
alphanumeric
data-digest
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
data-number-of-installments
range 2-12
moto
predefined
boolean
data-moto
possible value is true or false; missing variable is equivalent to false
Additional info
tokenize_pan_offered
predefined
boolean
data-tokenize-pan-offered
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
data-supported-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
data-tokenize-pan
tokenize pan without prompting the user
tokenize_brands
predefined
comma separated list of card brands
data-tokenize-brands
custom_attributes
predefined
valid JSON string
data-custom-attributes
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