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.
Activate it
- In the dashboard, open your merchant, go to Payments, and create a payment with the provider Transbank and the method PIN pad.
- In Connection Settings, fill in:
- On each store, add store settings:
- 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 fromservices.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 titleCard typeand the optionsCreditandDebit. Show those strings as they arrive. Closing the picker rejects the promise and the pinpad does not start. The adapter then callsui.messagewithPresent the card on the pinpadandkind: "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 likeisPixOnlyPayment. Do not special-case Transbank as Pix.
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:
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".
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:
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. OnPAID, 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 adapterreversalFor. 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