Tilopay.updateOptions()

SDK v2

Updates values already sent in Tilopay.Init() that changed during checkout — typically when the customer edits their data, or when they select SINPE Móvil or Yappy and information that did not apply before must be added.

It is a patch. Send only the fields you want to update; there is no need to resend everything.

What "required" means here#

In the list below, "required" means the field must have been sent either in Init() or in updateOptions(). If it was never sent in either, the payment cannot proceed. It does not mean you must resend it on every call.

Signature#

await Tilopay.updateOptions({ /* only the fields that change */ })

Call#

const update = await Tilopay.updateOptions({
  typeDni: 1,
  dni: "0707770777",
  billToFirstName: "Ana",
  billToLastName: "Rojas",
});

Parameters#

typeDniinteger#

Customer identification type. Required for SINPE Móvil. See identification types.

dnistring#

Customer identification number. Required for SINPE Móvil. Accepted with and without hyphens.

billToFirstNamestringrequerido#

Customer first name.

billToLastNamestringrequerido#

Customer last name.

billToAddressstringrequerido#

Customer address line 1.

billToAddress2string#

Customer address line 2. Optional.

billToCitystring#

Customer city. Recommended.

billToStatestring#

State or province. Recommended.

billToZipPostCodestring#

Postal code. Recommended.

billToCountrystring#

Country, ISO 3166-1 alpha-2. Recommended.

billToTelephonestring#

Customer phone. Recommended.

captureintegerrequerido#

0 authorizes; 1 authorizes and captures.

redirectstring (URL)requerido#

URL where the final purchase response is expected.

subscriptionintegerrequerido#

1 if the customer wants to save their card in Tilopay; 0 if not.

phoneYappystring#

Yappy phone. Required when the customer pays with Yappy.

billToEmail cannot be updated after saved cards are obtained. Once Init() returned the customer's cards, the email cannot be changed through this method.

Identification types#

Applies to the typeDni parameter, both here and in Tilopay.Init(). In the masks, # is a numeric character and & is alphanumeric. Lengths do not count hyphens.

CodeTypeFormatLength
1Cédula de identidad0#-####-####10
2Cédula jurídica3-###-######10
3Gobierno central2-###-######10
4Institución autónoma4-###-######10
5Extranjero no residente9&&&&&&&&&&&&&&&&&&&20
6DIMEX1###########12
7DIDI5###########12

Response#

{
  "message": "Success"
}
messagestring#

Success when the update succeeded; the error description otherwise.

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

View as raw Markdown