Checkout Popup Integration
Integrate the Bridge Pay checkout popup into your website to allow customers to buy subscriptions directly without being redirected away.
Step 1: Add the Script Tag
Section titled “Step 1: Add the Script Tag”Add the following script block to your website before the closing </body> tag:
<script src="https://app.bridgepay.store/popup/index.js" defer></script>HTML Integration
Section titled “HTML Integration”Open your website HTML file (such as index.html) and paste the script tag immediately before the closing </body> tag.
WordPress Integration
Section titled “WordPress Integration”You can add the script into WordPress without modifying theme files by using a plugin like WPCode (Insert Headers and Footers):
- In WordPress Admin Dashboard, navigate to Plugins > Add New and search for WPCode.
- Install and activate the plugin.
- Open Code Snippets > Header & Footer.
- Paste the script tag into the Footer box.
- Click Save Changes.
Step 2: Tag Your Buy Buttons
Section titled “Step 2: Tag Your Buy Buttons”Link your website buttons or payment links to specific IPTV plans using the bpid (Buy Plan ID) attribute.
Adding the Plan ID
Section titled “Adding the Plan ID”- Copy your Plan ID from your dashboard under the registered domain plans.
- Add the
bpid="YOUR_PLAN_ID"attribute to any HTML element (button, anchor link, or container):
<button bpid="YOUR_PLAN_ID">Buy Plan</button>How the Popup Operates
Section titled “How the Popup Operates”When the script is loaded:
- It listens for click events on any DOM element carrying a
bpidattribute. - It prevents the default click behavior.
- It queries the Bridge Pay API for plan specifications, pricing, and available payment methods.
- It displays an overlay modal window directly on your page.
- The buyer completes the transaction without navigating away from your store.