Tilopay.startPayment()

SDK 2.1.1

Closes the purchase started with Tilopay.Init() (or the card save started with InitTokenize()).

Signature#

await Tilopay.startPayment()

It takes no parameters. It requires the data to be complete: payment method, card data and whatever the method needs, sent in Init() or in updateOptions().

3DS: the SDK handles it#

The SDK handles the whole 3D Secure flow. If the bank asks for it, the SDK shows it in the responseTilopay container:

<div id="responseTilopay"></div>

See form fields.

Where the result arrives#

On successful payment, the SDK redirects and the promise resolves with { "message": "" }, without payment data. On error it returns { "message": "<description>" }.

If everything goes well, the SDK redirects to the URL given in redirect. That redirect is received by the customer's browser, so before delivering the product confirm the result on your server.

If there is an error, the method returns the description:

{
  "message": "<error description>"
}

With SINPE Móvil, until the transfer arrives, startPayment() returns the pending-SINPE error. See getSinpeMovil().

Last verified: 2026-10-22

View as raw Markdown