API Integration Guide

USDC Transfers via API

Direct Transfer API

⚠️ Note: The transfer endpoint is protected by x402 payments. You'll need to make a payment to execute transfers.

Execute USDC transfers using EIP-712 signatures on Base blockchain networks.

# First request - will return 402 Payment Required
curl -X POST https://402ify.com/api/v1/transfer \
     -H "Content-Type: application/json" \
     -d '{
           "network": "base-sepolia",
           "signature": "0x1234567890abcdef...",
           "authorization": {
             "from": "0xYOUR_WALLET",
             "to": "0xRECIPIENT_WALLET",
             "value": "1000000",
             "validAfter": "0",
             "validBefore": "9999999999",
             "nonce": "0x1234567890abcdef..."
           }
         }'

# Response: HTTP 402 with x402 payment token
# Use x402-compatible client or add X-Payment header with payment proof

Transfer Features

  • No Gas Fees: Facilitated by x402 protocol

  • EIP-712 Signatures: Secure authorization without private key exposure

  • Multi-Network: Base Mainnet and Base Sepolia support

  • Programmatic Integration: REST API for automated workflows

Creating PayGates

API Endpoint for PayGate Creation

⚠️ Note: Free accounts have a limited number of PayGates. Additional PayGates require payment.

Create payment-protected proxy URLs programmatically:

PayGate Configuration Parameters

Parameter
Type
Description

targetUrl

string

The API endpoint to monetize

method

string

HTTP method (GET, POST, PUT, DELETE, PATCH)

price

string

Price in USD (e.g., "0.01")

network

string

Blockchain network: "base-sepolia" (testnet) or "base" (mainnet)

paymentAddress

string

Your wallet address for receiving payments

requireAuth

boolean

Require user authentication (default: false)

headerAuthMode

string

Authentication mode: "hmac" or "plaintext"

assumeValid

boolean

Skip blockchain verification for faster payments (default: false)

credits

number

API calls per payment (default: 1)

File PayGates

Create payment-protected file access:

PayGate Management API

List PayGates

Update PayGate

Delete PayGate

Accessing PayGates

Standard Payment Flow

  1. Initial Request - Returns 402 Payment Required:

  1. Payment Execution - Use x402-compatible client or manual payment

  2. Retry with Payment Proof:

Authentication-Required PayGates

For PayGates with requireAuth: true:

Dashboard Analytics

Get comprehensive statistics about your PayGates:

Returns metrics including:

  • Route performance (attempts, payments, conversions)

  • Earnings breakdown (test vs real transactions)

  • Credit utilization rates

  • Daily purchase trends

Last updated