JavaScript SDK
SDK v2What 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#
- Credentials. There are no shared sandbox credentials: get yours through developer registration.
- SDK token. Your backend requests it with
POST /api/v1/loginSdk. See authentication. - Load the script. See installation.
- Add the inputs with the contract ids and the
responseTilopaycontainer. See form fields. - Start the purchase with
Tilopay.Init()and show the customer the payment methods it returns. - Close the purchase with
Tilopay.startPayment(). The SDK handles 3DS and renders the result on yourredirectURL.
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