Payment Gateway Integration

Connect your preferred payment gateways with InvoiceDoodle

Available Payment Gateways

💳

Stripe

Process credit card payments and bank transfers globally

  • Credit card processing
  • ACH transfers
  • SEPA payments
  • Automatic reconciliation
  • Dispute management
View Integration Guide →
🌐

PayPal

Enable PayPal payments and express checkout options

  • PayPal payments
  • Express checkout
  • Subscription billing
  • International payments
  • Buyer protection
View Integration Guide →
🦊

MetaMask

Accept cryptocurrency payments through MetaMask wallet

  • ETH payments
  • ERC-20 tokens
  • Smart contract integration
  • Web3 authentication
  • Transaction verification
View Integration Guide →
🔗

WalletConnect

Universal wallet connection protocol for crypto payments

  • Multi-wallet support
  • Mobile wallet integration
  • QR code connection
  • Chain-agnostic
  • Secure signing
View Integration Guide →

Integration Steps

1. API Key Configuration

Set up your payment gateway API keys in the InvoiceDoodle dashboard


// Example configuration in your .env file
STRIPE_PUBLIC_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
PAYPAL_CLIENT_ID=client_id_...
PAYPAL_SECRET=client_secret_...
      

2. Gateway Selection

Choose and enable payment gateways for your invoices


// Example API call to enable payment gateways
const response = await fetch('/api/payment-settings', {
  method: 'POST',
  body: JSON.stringify({
    enabled_gateways: ['stripe', 'metamask'],
    default_gateway: 'stripe'
  })
});
      

3. Webhook Configuration

Set up webhooks to receive real-time payment notifications


// Example webhook endpoint
app.post('/api/webhooks/payment', async (req, res) => {
  const event = req.body;
  
  switch (event.type) {
    case 'payment.succeeded':
      await updateInvoiceStatus(event.data.invoiceId, 'paid');
      break;
    case 'payment.failed':
      await handleFailedPayment(event.data.invoiceId);
      break;
  }
  
  res.status(200).send('Webhook received');
});
      

Testing and Verification

Before going live with your payment integration, thoroughly test the setup using test credentials and sandbox environments provided by each payment gateway.

  • Use test API keys and sandbox environments
  • Verify webhook notifications
  • Test error handling and edge cases
  • Validate payment flow end-to-end

Need Help?

Our support team is available 24/7 to help with your integration questions.