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). setPaymentUIwithchallenge. 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
597055555532with the public integration key.
Activate it
- In the dashboard, open your merchant, go to Payments, and create a payment with the provider Transbank and the method Card.
- 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
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:
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 onresult.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 aPAID 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.
Common errors
Go live
- Pass the Transbank validation at validador.transbankdevelopers.cl with your production commerce code and your 130x59 logo.
- Put the production commerce code and the key Transbank sends you on the production payment.
- 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