Developers
...
Developer Hub
Developer Tutorials

Adding the Payment iFrame to your web page Tutorial

Adding the Payment iFrame

This tutorial is for your client side.

This tutorial will cover how to import the Web SDK and add the Judopay payment iFrame to your web page.

This iFrame can render a payment form which can be used to securely capture a consumer’s card details. Ensure you have already watched the below tutorial:

Full Tutorial



We have created video chapters from the full tutorial, to help you easily re-watch different parts of the tutorial. We have included an overview and example code snippets for each section below:

When using the code snippets, ensure to replace any field values with your own values.



1. Intro




2. Importing and creating an instance of Judopay's Web SDK library

Importing the Web SDK and creating an instance of the library, which will later be used to call Web SDK functions.


Import and Create Instance



3. Rendering the iFrame onto the web page

Defining where the payment iFrame will render on your page.


Render the iFrame



4. Customising the iFrame

Customising the look and behaviour of the payment iFrame, using the iFrame configuration object.


Customise the iFrame



5. Adding the payment button

Adding the payment button to the web page and setting the ID to inherit behaviour.


Add the Payment Button



6. Displaying payment form errors

Displaying errors caused by the card form input, which can be shown within, or outside the payment iFrame (optional).


Display Payment Form Errors



7. Recap

Following the completion of this tutorial, you will have a customised Judopay payment iFrame rendered on your payment page, which can capture and validate card details.

You also have a payment button, which will be used in the next tutorial Handling a Transaction, to trigger the transaction.




Resources