Pay4Pixels Digital Currency Iframe Generator

Basic Settings
Advanced Settings

Generate an embeddable iframe to sell digital currency on your website. Customize the appearance and behavior to match your site.

Enable List View (Two-column compact layout)
Auto-resize iframe based on content

Preview


        

API Integration Guide

To complete the integration, you'll need to handle callbacks from the iframe when a user makes a purchase. This ensures that coins are properly applied to the user's account.

Callback Example

// Handle callbacks from the iframe window.addEventListener('message', function(event) { // Check origin for security if (event.origin !== 'https://br.pay4pixels.com') return; // Handle API endpoint requests if (event.data.type === 'getApiEndpoint' && event.data.callbackId) { // Process payment and apply coins to user's account applyCoinsToUserAccount(event.data) .then(result => { // Send success callback to iframe document.querySelector('iframe').contentWindow.postMessage({ type: 'coinApplicationCallback', callbackId: event.data.callbackId, success: true, message: 'Coins added to your account', transactionId: result.transactionId, coinBalance: result.newBalance }, 'https://br.pay4pixels.com'); }) .catch(error => { // Send error callback to iframe document.querySelector('iframe').contentWindow.postMessage({ type: 'coinApplicationCallback', callbackId: event.data.callbackId, success: false, error: error.message }, 'https://br.pay4pixels.com'); }); } });

Integration Steps

  1. Generate the iframe code with your settings.
  2. Copy the generated code and paste it on your website where you want the shop to appear.
  3. Implement the callback handling to process payments and apply coins to user accounts.
  4. Test the integration to ensure everything works correctly.
  5. For advanced customization or assistance, contact our support team.