iFrame

The iFrame integration allows you to display a Payrexx tool within your website. All you need to do is copy the code snippets onto your website.

Google Pay will only work with the attribute allow="payment *"!

Integration

Examples

<iframe
    src="https://{INSTANCE_NAME}.payrexx.com/pay?tid={PAYMENT_TEMPLATE_ID}"
    width="530"
    height="700"
    allow="payment *">
</iframe> 
  • INSTANCE_NAME - Name of the payment instance

  • PAYMENT_TEMPLATE_ID - Page ID of a payment Page: Pages Tool

More integrations with Tools

Advanced

An embedded Payrexx-iFrame sends messages to the page. These messages can be caught and processed. The following example shows how the messages can be caught.

There are four types of messages:

  • height: Used to dynamically set the height of the iFrame so that there is no need to scroll inside the iFrame. You should not set the param appview if you want a dynamic height!

  • top: If you have the dynamic height functionality implemented, you probably need to implement the scroll functionality to have the page scrolled if necessary. (e.g. on "Add to cart" button or on "Go to checkout").

  • transaction: For all the transaction data, like the status, you can receive the transaction object.

  • closeModal: Handle the iFrame close event. The value contains the redirect URL which you can use to lead the customer from the page with the iFrame to the according page. The iFrame is not allowed to make redirections on your site, therefore you need execute this redirection yourself.

Here you go with a full code example:

Last updated