Skip to main content
Accept payments using the MPP (Machine Payments Protocol) SDK on SKALE. MPP enables gasless transactions, encrypted amounts, and confidential token transfers—making it ideal for agentic and privacy-focused applications.

Prerequisites

  • Node.js, Bun, or pnpm installed
  • A SKALE Chain endpoint (SKALE Base or SKALE Base Sepolia)
  • Understanding of MPP protocol
  • USDC.e or eUSDC tokens for testing

Overview

The MPP SDK provides multiple payment strategies:
  • Standard transfers – Simple token transfers on SKALE Base
  • Gasless payments – Users pay without holding gas tokens (EIP-3009/EIP-2612)
  • Encrypted amounts – Hide transaction amounts using threshold encryption
  • Confidential tokens – Native privacy with eUSDC on chains with Programmable Privacy

Environment Setup

Create a .env file:

Basic Payment Example

Step 1: Install Dependencies

Step 2: Create Payment Method

Step 3: Process Payment


Encrypted Payments

Hide transaction amounts onchain using threshold encryption:

Gasless + Encrypted Payments

Combine both features for maximum UX and privacy:

Confidential Token Payments

Use native confidential tokens (eUSDC) on SKALE Base Sepolia for full privacy:

Server-Side Integration

For backend payment processing:

Webhook Integration

Handle payment confirmations:

Payment Verification

Verify payments onchain:

Testing

Test payments on testnet before mainnet:

Error Handling

Common errors and solutions:

Best Practices

Choose the right strategy:
  • Standard: Fastest, lowest overhead
  • Gasless: Best UX for new users
  • Encrypted: Privacy for sensitive amounts
  • Confidential: Maximum privacy (chains with Programmable Privacy only)
Security considerations:
  • Never expose private keys in client-side code
  • Use server-side MPPx for production payment processing
  • Validate all payment amounts before processing
  • Implement idempotency for payment webhooks

Resources