Display in an iFrame

Display the emerchantpay Web Payment Form (WPF) in an inline frame (iFrame) webpage within a webpage.

Display the emerchantpay Web Payment Form (WPF) in an iFrame on your checkout page for a more uniform checkout experience for your customers.


Follow the steps to create an endpoint from your server and authenticate with the emerchantpay payment gateway as outlined in Integrate your WPF.

You will receive a Success or Error response to your Create method request. A Success response will contain a redirect_url that contains a unique URL address of the payment session for you to redirect your customer to.

Example of a Create session response:
  <?xml version=”1.0″ encoding=”UTF-8″?>
    <technical_message>Transaction successful!</technical_message>
    <message>Transaction successful!</message>

Displaying the WPF redirect in an iFrame

Redirect your customer to the unique URL address of the payment session that you received in the redirect_url parameter of your WPF Create method response. Your customer sees your WPF hosted on the emerchantpay servers displayed in an iframe on your checkout page.

Sample checkout page with an custom redirect in the <iframe> element:
 <!DOCTYPE html>
<title>Checkout</title> // Title of your checkout page

<ul name=”Navigation Menu”> // Navigation menu of your online store
  <li><a href=”index.html”>Home</a></li>
  <li><a href=”products.html”>Products</a></li>
  <li><a href=”checkout.html”>Checkout</a></li>
  <li><a href=”about.html”>About</a></li>

<h1>Order confirmation</h1> // Optionally display additional checkout information

<h2>You have ordered:</h2>
<p>3 concert tickets</p>

<iframe src=’https://[<redirect_url> from response]’></iframe> // Unique redirect URL from the Create request response


Payment methods incompatible with iFrame

Some payment methods and all shopping carts are incompatible with iFrame. The following payment methods cannot be displayed in an iFrame, and must be processed using a full-page redirect to the WPF URL:

  • Argencard
  • Aura
  • Baloto
  • Boleto
  • Cabal
  • Cencosud
  • Efecty
  • Elo
  • iDeal
  • Multibanco
  • Naranja
  • Nativa
  • OXXO
  • Pago Facil
  • PayU
  • Pix
  • RapiPago
  • Redpagos
  • Tarjeta Shopping

After you display the WPF in an iFrame or as a full-page redirect, show a success page and follow the integration steps to complete your integration.