Skip to content

AsterPay/plugin-payments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@asterpay/plugin-payments

AsterPay x ElizaOS

x402 Payment Infrastructure for ElizaOS Agents

npm version License: MIT ElizaOS ERC-8004

Demo · Documentation · Get API Key


🚀 Features

Feature Description
x402 Payments Send & receive payments using Coinbase's x402 protocol
EUR Off-Ramp Convert USDC to EUR via SEPA Instant (<30 min)
Agent Wallet Dedicated wallet infrastructure for AI agents
ERC-8004 Compatible with agent identity standard
MiCA Compliant European regulatory compliance built-in
GDPR Compliant Privacy-first design

📦 Installation

# Using npm
npm install @asterpay/plugin-payments

# Using bun
bun add @asterpay/plugin-payments

# Using pnpm
pnpm add @asterpay/plugin-payments

⚡ Quick Start

1. Get your API Key

Sign up at asterpay.io/dashboard to get your API key.

2. Configure your Agent

Add the plugin to your agent's character configuration:

{
  "name": "MyPaymentAgent",
  "plugins": ["@asterpay/plugin-payments"],
  "settings": {
    "secrets": {
      "ASTERPAY_API_KEY": "ap_your_api_key_here",
      "ASTERPAY_EUR_IBAN": "FI1234567890123456"
    }
  }
}

3. Start Using Payments

Your agent can now:

User: "Pay 50 USDC to 0x742d35Cc6634C0532925a3b844Bc9e7595f5e842"
Agent: ✅ Payment sent! Transaction: 0xabc...

User: "Create an invoice for 100 USDC"
Agent: 📄 Invoice created! x402://pay/inv_xyz...

User: "Convert 500 USDC to EUR"
Agent: 🇪🇺 Converting! €462.50 arriving via SEPA Instant...

🔧 Configuration

Setting Required Description
ASTERPAY_API_KEY Your AsterPay API key
ASTERPAY_WALLET_ADDRESS Wallet for receiving payments
ASTERPAY_EUR_IBAN IBAN for EUR off-ramp
ASTERPAY_AUTO_CONVERT Auto-convert to EUR (default: false)
ASTERPAY_CONVERT_THRESHOLD USDC threshold for auto-convert
ASTERPAY_ENVIRONMENT production or sandbox

📚 Actions

MAKE_PAYMENT

Send x402 payments to other agents or services.

// Triggers
"pay 50 USDC to 0x..."
"send 100 USDC to alice.eth"
"pay this x402 invoice: x402://..."

RECEIVE_PAYMENT

Generate x402 invoices to receive payments.

// Triggers
"create invoice for 25 USDC"
"bill 100 USDC for API access"
"charge 50 USDC"

CHECK_BALANCE

Query agent wallet balance.

// Triggers
"what's my balance"
"how much USDC do I have"
"check wallet"

CONVERT_TO_EUR

Convert USDC to EUR via SEPA Instant.

// Triggers
"convert 500 USDC to EUR"
"cash out to bank"
"off-ramp 1000 USDC"

🔌 Provider

The asterpay-wallet provider automatically adds wallet context to your agent:

## AsterPay Wallet Status

**Balance:** 1,250.00 USDC (€1,156.25 EUR equivalent)

**Capabilities:**
- Send x402 payments (MAKE_PAYMENT)
- Create payment invoices (RECEIVE_PAYMENT)
- Check balance (CHECK_BALANCE)
- Convert USDC to EUR via SEPA Instant (CONVERT_TO_EUR)

**Recent Transactions:**
- 📥 receive: 500 USDC (completed)
- 📤 send: 50 USDC (completed)

🧪 Testing

# Run component tests
bun test

# Run E2E tests with ElizaOS
elizaos test --type e2e

🌍 Why AsterPay?

vs Competitors AsterPay Others
EUR Off-Ramp ✅ SEPA Instant ❌ or slow
x402 Protocol ✅ Native ⚠️ Limited
Europe Focus ✅ EU-first ❌ US-first
MiCA Compliance ✅ Built-in ❌ Not ready
Agent Identity ✅ ERC-8004 ❌ None
Settlement ✅ <30 min ❌ Days

📄 License

MIT License - see LICENSE for details.

🔗 Links


Built with 💜 in Finland 🇫🇮

Part of the ERC-8004 Ecosystem

About

AsterPay x402 payment plugin for ElizaOS - EUR off-ramp, MiCA-compliant

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors