Skip to main content
Webpay Plus is the Transbank payment form for cards in Chile. Fire spark creates the transaction with your commerce keys, your channel opens the Webpay form, and Fire spark commits the payment when Webpay sends the customer back. The keys never reach the browser or the app. Web and mobile apps. Kiosks with a Hasar pinpad use Transbank pinpad instead. 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

  • A channel that already charges with @fire-spark/core (setPaymentAdapters, setPaymentOptions, payIntent).
  • setPaymentUI with challenge. Webpay opens as a payment challenge: a popup or new tab on the web, a WebView in an app. Transbank advises against an iframe.
  • A Webpay Plus commerce code. For integration, use 597055555532 with the public integration key.

Activate it

  1. In the dashboard, open your merchant, go to Payments, and create a payment with the provider Transbank and the method Card.
  2. In Connection Settings, fill in:
The sandbox environment calls webpay3gint.transbank.cl and production calls webpay3g.transbank.cl. In sandbox, use the commerce code 597055555532 and the key 579B532A7440BB0C9079DED94D31EA1615BACEB56610332264630D42D0A36B1C. Transbank sends the production key after you pass validation.

Use it in the SDK

The adapter takes no options. Implement challenge in setPaymentUI. The adapter calls it with method: "POST" and one parameter, token_ws. On the web, paymentChallengeDocument(challenge) from @fire-spark/payments builds the page that posts the form:
In a React Native app, load paymentChallengeDocument(challenge) in a WebView with source={{ html }} and resolve on the fire-spark:payment-challenge message from window.ReactNativeWebView. Charge the payment the customer picked:
payIntent({ payment }) places one real tender. To split Webpay with another method, call order.setTenders with an allocation and then payIntent(). See Use payments in the SDK. When the challenge resolves, the adapter asks Fire spark for the result. If the customer closed the window before Webpay sent them back, Fire spark commits the token anyway, so a payment that went through is not lost.

What the customer sees

The Webpay form, then your result screen. Transbank asks you to show your own receipt: order number, merchant, amount, authorization code, date, payment type, installments, and the last 4 digits. They are on result.details and result.metadata.payment.

Webhooks

None. Webpay sends the browser back to a Fire spark URL that is signed per attempt. Fire spark commits there and closes the payment.

Voids

Cancel or refund the order. Fire spark refunds a PAID payment with the commerce keys. Webpay decides the kind:
  • The full amount within 3 hours of the payment is a reversal.
  • After that, or a partial amount, is an annulment, up to 90 days. Partial annulment does not work on installments with interest.
A refund Transbank refuses (for example after 90 days) fails in the order ledger with the Webpay message, and you refund it by hand.

Common errors

Go live

  1. Pass the Transbank validation at validador.transbankdevelopers.cl with your production commerce code and your 130x59 logo.
  2. Put the production commerce code and the key Transbank sends you on the production payment.
  3. Make a $50 purchase in production.

Compatibility

Not included: deferred capture, Webpay Plus Mall, Oneclick, and USD.

AI agent prompt

Paste this into the agent that edits your web or app channel. It covers only Transbank Webpay Plus.
Integration prompt