Tilopay.updateOptions()

SDK 2.1.1

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 partial update. Send only the fields you want to update; there is no need to resend everything.

No field is required in the call#

No parameter is required in updateOptions(). What matters is that, before closing the payment, the data the payment method needs (for example typeDni and dni for SINPE Móvil, or phoneYappy for Yappy) was sent in Init() or in updateOptions().

Signature#

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

Call#

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

Parameters#

webhookstring#

URL where Tilopay notifies the outcome of SINPE Móvil and Yappy payments.

You can update typeDni, dni, the billTo* fields (except billToEmail), the shipTo* fields, capture, redirect, subscription and phoneYappy.

typeDniinteger#

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

dnistring#

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

billToFirstNamestring#

Customer first name.

billToLastNamestring#

Customer last name.

billToAddressstring#

Customer address line 1.

billToAddress2string#

Customer address line 2.

billToCitystring#

City.

billToStatestring#

State or province.

billToZipPostCodestring#

Postal code.

billToCountrystring#

Country, ISO 3166-1 alpha-2.

billToTelephonestring#

Customer phone.

shipToFirstNamestring#

Shipping recipient first name.

shipToLastNamestring#

Shipping recipient last name.

shipToAddressstring#

Shipping address line 1.

shipToAddress2string#

Shipping address line 2.

shipToCitystring#

Shipping city.

shipToStatestring#

Shipping state or province.

shipToZipPostCodestring#

Shipping postal code.

shipToCountrystring#

Shipping country, ISO 3166-1 alpha-2.

shipToTelephonestring#

Shipping phone.

captureinteger#

0 authorizes; 1 authorizes and captures.

redirectstring (URL)#

URL where the final purchase response is expected.

subscriptioninteger#

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

phoneYappystring#

Yappy phone. Needed when the customer pays with Yappy.

billToEmail cannot be updated. 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-10-22

View as raw Markdown