← Learn hub

How to convert agent stablecoin payments to EUR — step by step

Updated 3 May 2026 · 7 minute read · By Petteri Lehtola, Co-founder
Short answer Sign up, complete KYB, return HTTP 402 from your endpoint pointing to AsterPay as the facilitator with your IBAN as the EUR settlement target. The agent pays USDC, AsterPay swaps to EUR via a licensed CASP partner, and SEPA Instant delivers EUR to your bank account in under 15 seconds. You never hold USDC. Total cost typically 80-130 bps.

Six steps from zero to EUR-in-bank

1

Sign up and complete KYB

Create a merchant account at app.asterpay.io/signup. Sumsub KYB takes 30 minutes for a typical EU-incorporated entity. You provide entity name, registration number, beneficial owners and the IBAN where EUR settlements should land.

2

Get an API key

From the dashboard generate an API key. Store as ASTERPAY_API_KEY in your backend environment. Never expose it to a frontend or an agent prompt.

3

Add x402 to your endpoint

One line of middleware. AsterPay ships drop-in middleware for Express, Fastify, FastAPI and Next.js. Example for Express:

import { asterpay } from '@asterpay/x402-express';

app.get('/api/forecast',
  asterpay({ priceEur: 0.05, settlementIban: process.env.MY_IBAN }),
  (req, res) => res.json({ forecast: '...' })
);
4

Agent pays

The agent receives the 402, signs an EIP-3009 transferWithAuthorization for USDC on its preferred chain (Base, Polygon, Arbitrum, Optimism, Ethereum or Solana), and resends the request with the X-PAYMENT header. Any x402-aware agent SDK does this automatically — x402-fetch, the AsterPay MCP server, the Coinbase x402 client. No agent-side configuration needed.

5

AsterPay settles

AsterPay verifies the payment proof, runs KYA trust scoring on the agent wallet, executes the on-chain settlement, swaps USDC to EUR through a licensed European payment partner (auto-routed by amount, currency and partner availability), and pushes EUR to your IBAN via SEPA Instant. End-to-end under 15 seconds in normal conditions. Specific partner identities are disclosed to onboarded customers under partnership-only disclosure terms.

6

Reconcile in EUR

Each settlement returns a Payment-Receipt header with the on-chain tx hash, the SEPA reference, the EUR amount net of fees, and the FX rate at moment of swap. Feed it into your accounting software for clean EUR-denominated journal entries. No FX drift, no double bookkeeping, no monthly stablecoin reconciliation spreadsheet.

What the merchant never has to do

What this looks like over a month of agent traffic

Sample EU SaaS with 3,000 agent calls per day at EUR 0.05 each: roughly EUR 4,500 monthly settlement. With AsterPay all 4,500 EUR lands in the merchant's IBAN as 90,000 individual SEPA Instant credits aggregated into a single daily payout (configurable). Total fees at 100 bps all-in: EUR 45/month. Compare to Stripe card processing at the same volume: EUR 4,500 × 1.4% + 25c per transaction = EUR 63 + EUR 22.50 = EUR 85.50/month, plus the chargeback risk that does not exist for x402 payments.

What happens if you serve agents from outside the EU

The same flow works for SEPA-area merchants (36 countries including the UK, Norway, Switzerland and Liechtenstein). For US merchants, USD via ACH is on the roadmap; for UK merchants, GBP via Faster Payments is on the roadmap. Outside SEPA, AsterPay can still settle USDC to USDC at your wallet address — you skip the EUR conversion but keep the KYA trust filter, the multi-chain ingress and the dual x402+MPP support.