Integrate Aura Payments into any platform. Handles escrows, multi-party payment splits, webhooks, and USDC settlement on Arc, Base, and Polygon. Use when building checkout flows, marketplace payments, or creator economy applications.
Build AI-powered payment flows with escrows, splits, and USDC settlement.
npm install @aura-payments/sdk
import { AuraClient } from '@aura-payments/sdk'
const aura = new AuraClient({ apiKey: process.env.AURA_API_KEY! })
// Create an escrow with payment splits
const escrow = await aura.escrows.create({
orderId: 'order-123',
buyerOwnerId: 'buyer-456',
amount: '99.99',
chain: 'ARC',
splits: [
{ ownerType: 'seller', ownerId: 'seller-789', role: 'seller', percentage: 70 },
{ ownerType: 'platform', ownerId: 'platform-1', role: 'platform', percentage: 20 },
{ ownerType: 'creator', ownerId: 'creator-012', role: 'creator', percentage: 10 },
],
})
// Buyer sends USDC to: escrow.escrowWallet.address
For complete Next.js example, see assets/nextjs-example.
initiated → deployed → funded → locked → released
↓ ↓
refunded disputed → refunded/released
For complete API documentation, see references/api_reference.md.
| Method | Description |
|---|---|
escrows.create() | Create escrow with payment splits |
escrows.get() | Get escrow by ID |
escrows.release() | Release funds to recipients |
escrows.dispute() | Open dispute on escrow |
escrows.refund() | Refund funds to buyer |
wallets.getOrCreate() | Get or create user wallet |
wallets.getBalance() | Check wallet balance |
import { AuraClient } from '@aura-payments/sdk'
const result = AuraClient.webhooks.validateSignature({
payload: rawBody,
signature: req.headers.get('x-aura-signature')!,
secret: process.env.AURA_WEBHOOK_SECRET!,
})
if (result.valid) {
switch (result.event!.type) {
case 'escrow.funded': // Payment received
case 'escrow.released': // Funds distributed
case 'escrow.disputed': // Dispute opened
case 'escrow.refunded': // Refund processed
}
}
import {
AuraValidationError, // 400 - Bad request
AuraAuthenticationError, // 401 - Invalid API key
AuraNotFoundError, // 404 - Resource not found
AuraRateLimitError, // 429 - Too many requests
} from '@aura-payments/sdk'
AURA_API_KEY=your_api_key
AURA_API_URL=https://api.tryaura.xyz
AURA_WEBHOOK_SECRET=your_webhook_secret
PLATFORM_OWNER_ID=your_platform_id
| Chain | ID | Use Case |
|---|---|---|
| Arc | ARC | Primary settlement |
| Base | BASE | Ethereum L2 |
| Polygon | MATIC | Low-cost transactions |
| Ethereum | ETH | Mainnet settlement |
| Arbitrum | ARB | DeFi integrations |