JavaScript SDK

SDK v2

What it is#

The card fields live on your page. The V2 SDK takes over those inputs and sends the data from the browser straight to Tilopay: it never passes through your server.

Who it is for#

For teams that want to control the checkout design without card data touching their backend. You need a JavaScript frontend and a minimal backend to obtain the SDK token.

How to build it, in order#

  1. Credentials. There are no shared sandbox credentials: get yours through developer registration.
  2. SDK token. Your backend requests it with POST /api/v1/loginSdk. See authentication.
  3. Load the script. See installation.
  4. Add the inputs with the contract ids and the responseTilopay container. See form fields.
  5. Start the purchase with Tilopay.Init() and show the customer the payment methods it returns.
  6. Close the purchase with Tilopay.startPayment(). The SDK handles 3DS and renders the result on your redirect URL.

Before assuming you are in test mode#

Testing and production share one host: the mode is verified with the test field returned by Init(). See environments.

Compliance#

Card data does not pass through your server, but your page captures it: check the applicable scope with your compliance team.

Last verified: 2026-08-28 · Owner: equipo-integraciones

View as raw Markdown