LayerPay Documentation

Everything you need to integrate crypto payments into your store

Overview

LayerPay is a non-custodial crypto payment gateway for e-commerce platforms. It allows your customers to pay with ETH or USDC on Ethereum and Layer 2 networks, with payments going directly to your wallet.

💡 New to LayerPay? Start with the installation guide for your platform: WooCommerce, PrestaShop, or Magento.

Configuration Settings

After installation, configure the following settings in your platform's admin panel:

Setting Description Default
Enable LayerPay Turn the payment method on/off On
Merchant Wallet Address Your Ethereum address (0x...) to receive payments Required
Network Mode Test (testnets) or Live (mainnets) Test
Price Margin Buffer percentage for price volatility (0-10%) 2%
Price Cache Duration How long to cache ETH prices (seconds) 60s
Debug Mode Enable logging for troubleshooting Off

Supported Networks

LayerPay supports payments on the following networks:

Live Networks (Production)

Network Chain ID Contract Address
Ethereum 1 0x84f679497947f9186258Af929De2e760677D5949
Base 8453 0x84f679497947f9186258Af929De2e760677D5949
Optimism 10 0x84f679497947f9186258Af929De2e760677D5949
Arbitrum 42161 0x84f679497947f9186258Af929De2e760677D5949

Test Networks (Development)

Network Chain ID Faucet
Sepolia 11155111 sepoliafaucet.com
Base Sepolia 84532 Coinbase Faucet
OP Sepolia 11155420 Optimism Faucet
Arbitrum Sepolia 421614 Arbitrum Faucet

Testing Payments

Before going live, test the payment flow with testnet tokens:

  1. Set Network Mode to "Test" in plugin settings
  2. Get testnet ETH from a faucet (links above)
  3. Create a test order in your store
  4. Complete payment using testnet tokens
  5. Verify the order status updates correctly
  6. Switch to "Live" mode when ready for production
⚠️ Always test thoroughly before enabling Live mode. Testnet transactions use fake tokens with no real value.

Smart Contract Reference

LayerPay uses a verified smart contract deployed on all supported networks. The contract handles payment splitting (99% merchant, 1% platform fee) and emits events for verification.

Payment Events

// ETH Payment Event
event ETHPayment(
  address indexed payer,
  address indexed merchant,
  uint256 amount,
  uint256 merchantAmount,
  bytes32 orderRef
);

// USDC Payment Event
event TokenPayment(
  address indexed payer,
  address indexed merchant,
  address token,
  uint256 amount,
  uint256 merchantAmount,
  bytes32 orderRef
);

Event Topics (for verification)

ETHPayment: 0x4aa351061f13d3dff9e0f6cab4811de6a51a2f94e424b21ce31914f1e99c17bc
TokenPayment: 0x0a7e11d6b5194b35bf3d4e463e2cb08dd9681b79fe6d4a1ff9725977a7da38d7

Troubleshooting

Payment not appearing at checkout

  • Verify the plugin is enabled in settings
  • Check that merchant wallet address is configured
  • Ensure store currency is EUR or USD
  • Check for JavaScript errors in browser console

Order not marked as paid

  • Enable Debug Mode and check logs
  • Verify transaction on block explorer
  • Ensure the payment went to the correct contract
  • Check that merchant address in settings matches the event logs

Wallet won't connect

  • Try a different browser
  • Ensure MetaMask or wallet extension is installed
  • Check if popup blocker is preventing wallet popup
  • Try WalletConnect if MetaMask isn't working

Price conversion issues

  • Check server can reach external APIs (CoinGecko, ExchangeRate)
  • Verify PHP cURL extension is installed
  • Check for firewall blocking outbound requests
📧 Still stuck? Contact us at contact@l2pay.app