Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="flex">
  <img src="" alt="Arcopay">
  <h1>PSD2 - Payment</h1>
    <li>Si usted utiliza sus credenciales para acceder con cualquier servicio que no sea <strong>Sandbox</strong> se realizará una conexión real con su banco.</li>
    <li>Para realizar pruebas por favor utilice el servicio de <strong>Sandbox</strong>:</li>
      <li>User: user1</li>
      <li>Pass: 1234 o 123456</li>
      <li>2FA: 1234 o 123456</li>
    <li>Puede comprobar la respuesta (datos mock no reales) que recibirá en su callback:</li>
      <li><a href="" target="_blank">Pago</a></li>
    <li>Para empezar a integrar el widget en su entorno debe:</li>
      <li>Ponerse en contacto con el servicio técnico de Arcopay a través de <a href="" target="_blank">este enlace.</a></li>
      <li>Indicando la url desde la que realizará la integración.</li>
      <li>Indicando la url de callback donde se quiere recibir la respuesta del widget.</li>
    <li>Para que el flujo funcione por completo su callback deberá responder con una determinada estructura que puede revisar en:</li>
      <li><a href="" target="_blank">Postman</a></li>

<h1 id='frameResponse'></h1>

<div id='arcopayContainer'></div>

  let parameters = {
    // ID de cliente
    "id": "CodePenTest-00",
    // Acción del widget
    "action": "payment",
    // Configuración del widget
    "countryCode": "ALL",
    "banksShown": "ALL",
    "defaultBank": "",
    "autoStart": 0,
    "defaultLanguage": "EN",
    "showSandbox": 1,
    "showSplashScreen": 0,
    "showCheckTerms": 1,
    "URLredirectAfterOK": "",
    "URLredirectAfterKO": "",
    // Parámetros PAYMENT
    "paymentType": "normal",
    "amount": 0.1,
    "currency": "eur",
    "sourceIBAN": "",
    "sourceCreditorName": "Nombre Creditor Origen Test",
    "destinationIBAN": "",
    "destinationCreditorName": "Code Pen Creditor Destino Test",
    "paymentDescription": "Code Pen Test",
    // Parámetros PAYMENT PERIODIC
    "firstQuotaDay": "",
    "frequency": "",
    "numberOfQuotas": ""

  function receiveFromFrame(ev) {
    if ( != '' && != undefined && != undefined) {
      let codigo =;
      let mensaje =;
      let widgetContainer = document.getElementById('arcopayContainer');
      switch (codigo) {
        case 9999: // Cambio en el tamaño del widget
 = mensaje + 'px';
          window.scrollTo(0, 0);
            "action": "changeIframeHeight"
          }, '*');
        case 99999999: // Cambio en el tamaño del widget
          document.getElementById('frameResponse').innerHTML = `Evento recibido: ${codigo} - ${mensaje}`;
  window.addEventListener("message", receiveFromFrame, false);

<script src=""></script>


                body {
  font-family: sans-serif;

img {
  height: 2rem;
  margin: 1rem 1rem 0.5rem 1rem;

ul {
  line-height: 2rem;
  margin-top: 0;
  margin-botom: 2rem;

#frameResponse {
  text-align: center;
  font-weight: 400;
  font-size: 1rem;

.flex {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;