LuxtakLuxtak
  • Introduction
  • Payin API
    • Environments
    • All-In-One Checkout
      • Checkout Page (General)
      • Checkout Page (E-com)
    • Direct integration
      • Brazil
        • Pix
      • Mexico
        • Cash
        • CoDi
        • SPEI
      • Colombia
        • Wallet
        • PSE
      • Chile
        • Bank Transfer
        • Wallet
      • Peru
        • Bank Transfer
        • Cash
      • Ecuador
        • Bank Transfer
        • Cash
      • Russia
        • CreditCard
        • SBP
        • SberPay
        • TPay
        • Vault
      • Global
        • Crypto
        • Binance
    • Notification
      • Security
    • Recurring Payment
      • Support Target and Currency
    • Tokenization
    • Payin Detail
    • Refund
    • Data
      • Payment Method
      • Data for test (Sandbox)
      • Payin Status
      • Icon of methods
      • Country Code
    • API Code
  • Payout API
    • Environments
    • Security
    • Submit a payout
      • Brazil
        • Pix
      • Russia
        • SBP
      • Global
        • Crypto
    • Notification
    • Account Balance
    • Payout Status
    • Payout Bank List
    • Payout List
    • Payout Detail
    • Payment Method
    • Data for test
    • API Code

luxtak JavaScript

By integrating our JS library, it is a safer and more convenient way to use our services

Add the luxtak.js file to your website

Tips

It is not recommended to cache this js locally

<script src="https://res.luxtak.com/lib/js/luxtak.js"></script>
<script>
  luxtak.setPublishableKey('${app_id}','${public_key}','sandbox | prod')
</script>

Create luxtak-specific form components

Ensure that the following fields exist in the existing form, and add the data-checkout attribute according to the format.

ParameterRequiredDescription
luxtakCardNumberyescard number
luxtakSecurityCodeyessecurity code
luxtakCardExpirationYearyesexpiration year (4 digits)
luxtakCardExpirationMonthyesexpiration month (2 digits)
luxtakCardholderNameyesholder name
luxtakDocTypenoholder id type
luxtakDocNumbernoholder id number
<ul>
  <li>
      <label for="cardNumber">Credit card number:</label>
      <input type="text" data-checkout="luxtakCardNumber" />
  </li>
  <li>
      <label for="securityCode">Security code:</label>
      <input type="text" data-checkout="luxtakSecurityCode" />
  </li>
  <li>
      <label for="cardExpirationYear">Expiration year:</label>
      <input type="text" data-checkout="luxtakCardExpirationYear" />
  </li>
  <li>
      <label for="cardExpirationMonth">Expiration month:</label>
      <input type="text" data-checkout="luxtakCardExpirationMonth" />
  </li>
  <li>
      <label for="cardholderName">Card holder name:</label>
      <input type="text" data-checkout="luxtakCardholderName" />
  </li>
  <li>
      <label for="docType">Document type:</label>
      <select data-checkout="luxtakDocType">
      </select>
  </li>
  <li>
      <label for="docNumber">Document number:</label>
      <input type="text" data-checkout="luxtakDocNumber" />
  </li>
</ul>

And add the following two components to the original form.

<!-- token -->
<input name="token" id="luxtakToken" type="hidden">
<!-- fingerprint -->
<input name="fingerprint" id="luxtakFingerprint" type="hidden">

Monitor form submission events

Call before the original website submission event: luxtak.createToken function, pass in the form element and update the above two hidden fields.

var $form = document.querySelector('#pay')
luxtak.createToken($form, responseHandler)

Bring the above two parameters and place an order

Tips

The example code can be obtained from here (right click -> save as)