Payment Gateway Integration—The Easy Path | XRP for E-commerce | XRP Academy - XRP Academy
3 free lessons remaining this month

Free preview access resets monthly

Upgrade for Unlimited
Skip to main content
beginner50 min

Payment Gateway Integration—The Easy Path

Learning Objectives

Compare major crypto payment gateways supporting XRP

Evaluate fee structures including processing fees, conversion spreads, and withdrawal costs

Choose the right integration method for your platform (plugin, hosted checkout, or API)

Implement instant fiat conversion to eliminate volatility risk

Set up a test integration using a sandbox environment

  • Full control over payment flow
  • No processing fees (only XRPL network fees)
  • Custom UX and branding
  • Requires: Development resources, security expertise, ongoing maintenance
  • Fast deployment (hours to days, not weeks)
  • Volatility protection via instant conversion
  • Compliance and fraud prevention handled
  • Trade-off: Processing fees (0.5-1%+)

For most e-commerce businesses, payment gateways are the right choice. The cost savings from going direct rarely justify the development and operational overhead—especially when you're testing whether customers will actually use crypto payments.

  • Very high volume (processing fees become significant)
  • Specific requirements gateways don't support
  • Crypto-native business that wants to hold XRP
  • Technical team already familiar with XRPL

Gateway XRP Support Cryptos Supported Founded Headquarters
NOWPayments ✅ Full 300+ 2019 Amsterdam
CoinGate ✅ Full 70+ 2014 Lithuania
BitPay ✅ Full 16 2011 Atlanta
CoinPayments ✅ Full 100+ 2013 Cayman Islands
Coinbase Commerce ❌ No XRP 10 2018 San Francisco

Note on Coinbase Commerce: Despite Coinbase exchange supporting XRP trading, Coinbase Commerce does not support XRP payments. If XRP is a priority, look elsewhere.

  • **Strengths:** Widest crypto support (300+), non-custodial option, low fees (0.5%), fast setup
  • **Weaknesses:** Newer company, less enterprise track record
  • **Best for:** Businesses wanting maximum crypto flexibility with quick deployment
  • **Notable:** Ranked #1 in Forbes 2025 Crypto Payment Gateways
  • **Strengths:** Strong EU compliance, Lightning Network support, established reputation
  • **Weaknesses:** Higher fees (1%), mandatory KYC for merchants
  • **Best for:** EU-focused businesses, those needing strong regulatory compliance
  • **Notable:** Publishes detailed crypto payment research reports
  • **Strengths:** Oldest and most established, enterprise-grade, strong compliance
  • **Weaknesses:** Limited crypto support (16), higher fees (1%), slower onboarding
  • **Best for:** Large enterprises, regulated industries, US-focused businesses
  • **Notable:** Processed $5+ billion in transactions since 2011
  • **Strengths:** Low fees (0.5%), multi-coin wallet, mobile POS
  • **Weaknesses:** Interface can be overwhelming, custodial only
  • **Best for:** Businesses needing comprehensive crypto treasury management
  • **Notable:** Trusted by NordVPN, BitGild, and other established brands

When evaluating gateways for XRP payments:

Factor Questions to Ask
XRP support depth Direct XRP or converted from other crypto? Native XRPL or wrapped?
Destination tag handling Automatic generation? Customer-facing display?
Settlement options Can settle in XRP, or only fiat? RLUSD support?
Conversion timing Instant at time of payment, or batch conversion?
XRPL transaction visibility Can you see the actual XRPL transaction hash?

Most gateways support XRP as one of many options. They handle the XRPL interaction, destination tags, and payment monitoring—you just receive confirmation when payment completes.


Payment gateway fees typically include multiple components:

  • Percentage of transaction amount

  • Range: 0.5% to 1%+

  • Applied to every payment received

  • Hidden fee in exchange rate

  • Range: 0.5% to 2%

  • Only applies if converting to fiat or other crypto

  • Passed through from blockchain

  • XRP: ~$0.0002 (negligible)

  • Bitcoin: $1-10+ (significant)

  • Fee to transfer funds to your bank or wallet

  • Varies by method and currency

  • Bank transfers: Often free or $0.25-$5

  • Crypto withdrawal: Network fees + possible fixed fee

  • Some enterprise plans have subscription fees

  • Most basic plans are free

Gateway Processing Fee Fiat Conversion Crypto Withdrawal Bank Withdrawal
NOWPayments 0.5% Included Network fees Via partners
CoinGate 1% Included Network fees Free (EUR)
BitPay 1% Included 1% Free
CoinPayments 0.5% 0.5% additional Network fees Varies

Scenario: $1,000 in XRP payments, settled to USD bank account

Gateway Processing Conversion Withdrawal Total Cost
NOWPayments $5.00 Included ~$2.50 ~$7.50 (0.75%)
CoinGate $10.00 Included Free $10.00 (1.0%)
BitPay $10.00 Included Free $10.00 (1.0%)
CoinPayments $5.00 $5.00 ~$2.50 ~$12.50 (1.25%)

Scenario: $1,000 in XRP payments, kept as XRP

Gateway Processing Conversion Withdrawal Total Cost
NOWPayments $5.00 N/A ~$0.01 ~$5.01 (0.5%)
CoinGate $10.00 N/A ~$0.01 ~$10.01 (1.0%)
BitPay $10.00 N/A 1% = $10 ~$20.00 (2.0%)
CoinPayments $5.00 N/A ~$0.01 ~$5.01 (0.5%)
Key Concept

Key insight

If you want to keep funds in crypto, avoid gateways with high crypto withdrawal fees. If you're converting to fiat, the processing fee matters most.

Payment Method Effective Rate Notes
Credit cards (standard) 2.5-3.5% Includes interchange, assessment, processor
Credit cards (international) 3.5-5.0% Additional cross-border fees
XRP via gateway (to fiat) 0.5-1.25% Processing + conversion
XRP via gateway (keep crypto) 0.5-1.0% Processing only
XRP direct integration ~0.002% Network fees only

Even with gateway fees, XRP payments are 50-70% cheaper than credit cards. The question is whether that savings justifies the customer friction.


Method Complexity Customization Time to Deploy
E-commerce plugins Low Limited 15-30 minutes
Hosted checkout Low-Medium Moderate 1-2 hours
Payment buttons Low Limited 15 minutes
API integration High Full Days to weeks

What they are: Pre-built extensions for popular e-commerce platforms that add crypto checkout with minimal configuration.

Supported platforms:

Platform NOWPayments CoinGate BitPay CoinPayments
WooCommerce
Shopify
Magento
PrestaShop
OpenCart
WHMCS
Wix

Plugin installation (typical WooCommerce flow):

  1. Download plugin from gateway or WordPress plugin directory
  2. Upload and activate in WordPress admin
  3. Enter API key from gateway dashboard
  4. Configure settings (currencies, conversion, etc.)
  5. Test with sandbox mode
  6. Go live
  • Fastest deployment

  • No development required

  • Automatic order status updates

  • Tested and maintained by gateway

  • Limited customization

  • Dependent on plugin updates

  • May not support all gateway features

What it is: Customer is redirected to gateway's payment page, then returned after payment.

Flow:

Your Checkout → Redirect to Gateway → Customer Pays → Redirect Back → Order Confirmed

Implementation (simplified):

// 1. Create payment on your server
const payment = await fetch('https://api.nowpayments.io/v1/invoice',  {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    price_amount: 99.99,
    price_currency: 'usd',
    pay_currency: 'xrp',
    order_id: 'ORDER-12345',
    order_description: 'Premium Widget',
    success_url: 'https://yourstore.com/success', 
    cancel_url: 'https://yourstore.com/cancel' 
  })
});

// 2. Redirect customer to payment URL
const { invoice_url } = await payment.json();
window.location.href = invoice_url;

// 3. Handle webhook when payment completes
app.post('/webhooks/nowpayments', (req, res) => {
  const { order_id, payment_status } = req.body;
  if (payment_status === 'confirmed') {
    fulfillOrder(order_id);
  }
  res.status(200).send('OK');
});
  • Gateway handles payment UI

  • PCI compliance simplified

  • Mobile-optimized by gateway

  • Supports multiple cryptocurrencies

  • Customer leaves your site

  • Less brand control

  • Additional redirect step

What they are: Embeddable components that display payment options without full checkout redirect.

  • Donation buttons
  • One-click purchases
  • Tip jars
  • Simple product pages

Example (NOWPayments button):

<!-- Simple payment button -->
<script src="https://nowpayments.io/widget/button.js"></script>
<button 
  class="nowpayments-button"
  data-price="25.00"
  data-currency="usd"
  data-crypto="xrp"
  data-order-id="DONATE-001"
  data-success-url="https://yoursite.com/thanks"
>
  Donate $25 in XRP
</button>
  • Minimal code required
  • Stays on your page (modal)
  • Good for simple transactions
  • Limited to simple use cases
  • Less control over flow
  • May not integrate with cart systems

What it is: Direct API calls to gateway for complete control over payment flow.

  • Custom checkout experience required
  • Complex order flows
  • Multi-step payments
  • Subscription/recurring billing
  • White-label solutions

API integration components:

Component Purpose
Create payment Generate payment request with amount and currency
Get payment status Check if payment is complete
Webhooks Receive real-time payment notifications
Get exchange rate Display accurate crypto amount
List payments Retrieve payment history

Example API flow (CoinGate):

// Create order
const order = await coingate.createOrder({
  order_id: 'ORDER-12345',
  price_amount: 99.99,
  price_currency: 'USD',
  receive_currency: 'USD', // Convert to USD
  callback_url: 'https://yoursite.com/webhooks/coingate', 
  success_url: 'https://yoursite.com/success', 
  cancel_url: 'https://yoursite.com/cancel' 
});

// Response includes payment address and amount
console.log(order.pay_address);  // XRP address
console.log(order.pay_amount);   // Amount in XRP
console.log(order.destination_tag); // Required tag

// Webhook handler
app.post('/webhooks/coingate', (req, res) => {
  const { id, status, order_id, pay_amount, receive_amount } = req.body;

// Verify webhook signature
  if (!verifySignature(req)) {
    return res.status(401).send('Invalid signature');
  }

if (status === 'paid') {
    // Payment confirmed
    markOrderPaid(order_id, {
      cryptoAmount: pay_amount,
      fiatAmount: receive_amount,
      gatewayId: id
    });
  }

res.status(200).send('OK');
});
  • Full control over UX

  • Custom business logic

  • Can build white-label solutions

  • Access to all gateway features

  • Requires development resources

  • Must handle error cases

  • Ongoing maintenance needed

  • Security responsibility


  1. Customer sees price: $100 = 40 XRP (at $2.50/XRP)
  2. Customer takes 5 minutes to complete payment
  3. XRP price drops to $2.40
  4. Customer sends 40 XRP
  5. You receive: 40 × $2.40 = $96
  6. You've lost $4 (4% of sale)

Multiply by thousands of transactions, and volatility becomes a serious business risk.

  • Gateway locks exchange rate at payment creation
  • Customer pays in XRP
  • Gateway immediately converts to fiat
  • You receive guaranteed USD amount
  • Rate guaranteed for 15-30 minutes
  • Customer must pay within window
  • If window expires, new rate calculated

Example (NOWPayments instant conversion):

const payment = await createPayment({
  price_amount: 100.00,
  price_currency: 'USD',
  pay_currency: 'XRP',
  // This ensures you receive USD, not XRP
  is_fixed_rate: true,
  is_fee_paid_by_user: false
});

// Gateway returns locked rate
console.log(payment.pay_amount);      // 40.123 XRP
console.log(payment.price_amount);    // 100.00 USD
console.log(payment.expiration_time); // 15 minutes
Option Volatility Risk Pros Cons
Instant to fiat None Stable value, easy accounting Lose any XRP upside
Daily batch conversion Low-Medium Slightly better rates Some overnight exposure
Keep as crypto High Full XRP exposure Price can drop significantly
Partial conversion Medium Balance stability and upside More complex accounting

Recommendation for most e-commerce: Instant conversion to fiat. The business model is selling products, not speculating on crypto prices.

  • Revenue recorded in fiat
  • No crypto asset on books
  • Standard accounting treatment
  • Simpler tax reporting
  • Must track cost basis
  • Mark-to-market or realized gains
  • Each sale is a taxable event when converted
  • More complex record-keeping

Consult with a crypto-savvy accountant before deciding on settlement strategy.


Decision framework:

START
  │
  ├─ Need 300+ cryptos? → NOWPayments
  │
  ├─ EU-based, need compliance? → CoinGate
  │
  ├─ Enterprise, high volume? → BitPay
  │
  ├─ Want crypto treasury management? → CoinPayments
  │
  └─ Just testing/learning? → NOWPayments (easiest setup)

Typical onboarding flow:

  1. Create account (email, password)
  2. Verify email
  3. Complete KYC (some gateways, some tiers)
  4. Generate API keys
  5. Configure webhooks
  6. Test in sandbox
  7. Go live

KYC requirements by gateway:

Gateway Personal KYC Business KYC When Required
NOWPayments Optional For fiat settlements High volumes
CoinGate Required Required All merchants
BitPay Required Required All merchants
CoinPayments Optional Optional High volumes

All major gateways provide test environments:

Gateway Sandbox/Testnet Test Currencies
NOWPayments Sandbox mode Test BTC, ETH, XRP
CoinGate Sandbox environment Testnet currencies
BitPay Test mode Test invoices
CoinPayments Test API Simulated payments

Testing checklist:

  • Create test payment
  • Display payment details to customer
  • Complete test payment (if real testnet)
  • Receive webhook notification
  • Update order status
  • Handle underpayment scenario
  • Handle overpayment scenario
  • Handle payment timeout
  • Test refund flow (if available)

Before accepting real payments:

  • Switch from sandbox to production API keys
  • Update webhook URLs to production endpoints
  • Configure production settlement (bank account or crypto wallet)
  • Set up monitoring/alerting for payment failures
  • Document refund process
  • Train customer support on crypto payment questions
  • Update terms of service for crypto payments
  • Consider geographic restrictions (some countries prohibited)

Payment gateways work. Thousands of merchants successfully accept XRP and other cryptocurrencies through these services. The technology is mature.

Instant conversion eliminates volatility. Merchants can receive guaranteed fiat amounts regardless of crypto price movements.

Integration is genuinely easy. Plugin installations take minutes; API integrations take hours to days, not weeks.

Fees are lower than credit cards. Even with 1% gateway fees, total cost is typically 50-70% less than card processing.

⚠️ Long-term gateway viability. Some smaller gateways may not survive market downturns. Stick with established providers.

⚠️ Regulatory changes. Crypto payment regulations are evolving. Gateways may face new requirements that affect merchants.

⚠️ Customer adoption. Accepting crypto is easy; getting customers to use it is hard. Don't expect high crypto volume initially.

Payment gateways are the right choice for most e-commerce businesses exploring XRP payments. They handle complexity, provide volatility protection, and enable fast deployment. The 0.5-1% fees are reasonable given the value provided—and still cheaper than card processing. Start with a gateway, measure actual crypto payment volume, then consider direct integration only if volume justifies the development investment.


Assignment: Set up XRP payment acceptance using a payment gateway in a test/sandbox environment.

Requirements:

Part 1: Gateway Selection (Document your choice)

  • XRP support features
  • Fee structure (calculate for $1,000/month scenario)
  • Integration options for your platform
  • Settlement options
  • Geographic restrictions

Provide a 1-page justification for your gateway choice.

Part 2: Account Setup

  • Complete registration process
  • Document any KYC requirements encountered
  • Generate API keys
  • Configure webhook endpoint

Part 3: Test Integration

  • Option A: Install plugin on WooCommerce/Shopify test store

  • Option B: Create hosted checkout integration with code

  • Option C: Implement API integration for custom checkout

  • Step-by-step setup process (with screenshots)

  • Configuration settings chosen

  • Any issues encountered and solutions

Part 4: Test Transactions

  • Successful payment flow
  • Payment confirmation received
  • Order status updated
  • Webhook handling (show logs)

Part 5: Production Readiness Assessment

  • What additional configuration is needed?

  • What monitoring should be in place?

  • What customer support documentation is needed?

  • What accounting/tax considerations apply?

  • Gateway comparison quality (20%)

  • Integration implementation (30%)

  • Testing documentation (25%)

  • Production readiness analysis (25%)

Time investment: 4-5 hours
Deliverable format: Documentation with screenshots + code (if applicable)


Knowledge Check

Question 1 of 1

Before going live with crypto payments, which of the following should be tested in sandbox mode?

  • WooCommerce Crypto Payments: Gateway-specific plugin documentation
  • Shopify Crypto Integration: Shopify Help Center + gateway docs

For Next Lesson:
Lesson 8 covers Direct XRPL Integration—building custom payment handling without gateways. This is for developers who need full control or want to eliminate processing fees entirely.


End of Lesson 7

Total words: ~5,200
Estimated completion time: 50 minutes reading + 4-5 hours for deliverable


What This Lesson Accomplishes:

  1. Provides practical path forward. Most students won't build custom integrations. Gateways let them start accepting XRP quickly.

  2. Enables informed gateway selection. Students understand the tradeoffs between providers and can choose appropriately.

  3. Demystifies fees. Breaking down fee components helps students calculate true costs and compare to card processing.

  4. Covers integration spectrum. From 15-minute plugin install to multi-day API integration, students see their options.

  5. Addresses volatility. Instant conversion is the practical solution for most businesses; students understand why.

Lesson 7 → Lesson 8 Transition:

Lesson 8 is for students who need or want direct XRPL integration. The gateway lesson establishes what gateways handle, so students understand what they're taking on when building custom solutions.

  • For student exercises: NOWPayments (easiest sandbox, no mandatory KYC for testing)
  • For EU businesses: CoinGate
  • For enterprises: BitPay
  • For crypto treasury: CoinPayments

Note on Gateway Longevity:
The crypto payment gateway market is competitive. Some providers may merge, pivot, or shut down. Encourage students to choose established providers and design integrations that can be migrated if needed.

Key Takeaways

1

Gateways vs. direct integration:

For most businesses, gateways are the right choice. Build direct only if you have very high volume or specific requirements.

2

Choose based on your needs:

NOWPayments for flexibility, CoinGate for EU compliance, BitPay for enterprise, CoinPayments for crypto treasury.

3

Understand total costs:

Processing fees (0.5-1%) plus conversion spreads plus withdrawal fees. Still cheaper than cards.

4

Use instant conversion:

Unless you specifically want to hold crypto, convert to fiat immediately to eliminate volatility risk.

5

Start with plugins:

If your platform has a plugin available, start there. Move to API integration only if you need more control. ---