Skip to main content
Transbank Hasar H2H runs the pinpad on Fire spark kiosks in Chile. One dashboard payment is one checkout button. The kiosk writes a properties file and the Hasar JAR talks to the pinpad over serial. Your kiosk draws the waiting message the adapter sends. Android kiosk only. POS, web, and iOS do not use this package. This is not POS Integrado and not the PAX IM30 self-service terminal. Follow the sections below to wire it by hand. To hand the same work to an agent, copy the prompt in AI agent prompt.

Requirements

  • An Android kiosk that already charges with @fire-spark/core (setPaymentAdapters, setPaymentOptions, payIntent).
  • A development build. Expo Go does not load the native module.
  • The Hasar binaries, kept outside git. The pinpad is on /dev/ttyACM0.
  • The kiosk can write Download/SDKChile.
Do not commit the four JARs or libjSerialComm.so. The kiosk app points the config plugin at a binariesDir on the build machine.

Activate it

  1. In the dashboard, open your merchant, go to Payments, and create a payment with the provider Transbank and the method PIN pad.
  2. In Connection Settings, fill in:
  1. On each store, add store settings:
  1. On each kiosk, open the device and the Payments tab. Values live in settings_overrides.payment_settings, keyed by payment id. See Configure a device.
A payment that is missing a store or device field never reaches the kiosk, so its button stays off the checkout.

Checkout button

Each Transbank payment is one button. The kiosk template already renders one card per payment from services.payments.list (CheckoutPaymentMethodCard). You do not add a button component. paymentInstructionKind treats a PIN_PAD payment as a card, unless that payment is Pix only. Transbank modalities are CREDIT and DEBIT, so the template shows the card illustration. The label is payment.name.
  • Both modalities on one payment: the customer picks one before the pinpad starts. The adapter asks through ui.select, with the title Card type and the options Credit and Debit. Show those strings as they arrive. Closing the picker rejects the promise and the pinpad does not start. The adapter then calls ui.message with Present the card on the pinpad and kind: "waiting".
  • One modality: there is no picker. The charge goes straight to the waiting message.
  • Credit and debit as their own buttons: create a second payment with a single modality, for example modalities: ["DEBIT"]. It sits next to the first. Both show the card illustration. There is no Transbank helper like isPixOnlyPayment. Do not special-case Transbank as Pix.
The packages are not part of the public template. Add them in the merchant kiosk app. useCheckoutPayments hides only the Fire spark staff datáfono (firespark and PIN_PAD). A Transbank payment stays on the list.

Binaries

Add both packages to the merchant kiosk app. Pin them to the same version as @fire-spark/payments. Do not add them to the public kiosk template.
binariesDir is absolute, or relative to the app. It has to look like this:
The plugin copies the JARs into android/app/libs and the .so files into jniLibs. Prebuild fails with [transbank] missing ... when a file is absent.

Use it in the SDK

Register the adapter once per order. transbankPinPadPayments() takes no keys. Each charge reads the context that PaymentSession builds from getKioskConfig.
kioskConfig is what getKioskConfig returns. Device values arrive on overrides.payment_settings. There are no secrets. When both modalities are enabled, the adapter calls ui.select with the title Card type and the options Credit and Debit. Then it calls ui.message with Present the card on the pinpad and kind: "waiting".
Cancel on screen aborts the payIntent signal. That only works before the native call starts. A sale already on the pinpad is not aborted. Charge the payment the customer picked:
An approved sale comes back PENDING with metadata.confirm_after_inject. The core confirms it after the order is injected. Do not confirm before that. The adapter window is 180 seconds. Leave runtime.timeout_ms unset to keep it. A shorter value on the payment replaces it. Currency has to be CLP. Any other currency returns INVALID_REQUEST and does not call the pinpad.

What the customer sees

The card-type choice, when both modalities are on, then the waiting message. On PAID, print metadata.receipt.customer and metadata.receipt.merchant. Both are the VOUCHER text. Do not URL-decode it.

Webhooks

None.

Voids

The core picks the reversal with the adapter reversalFor. A sale still PENDING (the order was not injected) is reversed with procesaReversa(). The core does this on its own. A PAID sale is undone with a refund (devolucion) and then a confirm (confirmacion()). order.cancel() runs it on an order that is not delivered. order.refund() runs it on a delivered order.

Common errors

Compatibility

AI agent prompt

Paste this into the agent that edits the kiosk app. It covers only Transbank Hasar H2H. The sections above are the same work, written for a person.
Integration prompt