Developer Resources

API Reference

Complete API documentation for integrating WirePayments into your application.

Configuration

Base URL: https://wire-payments-web.vercel.app//api/v1

Authentication

Authorization: Bearer wp_live_your_api_key_here

API Endpoints

POST/v1/invoices

Create Invoice

Generate a new payment invoice with custom amount and metadata.

Parameters

amountPayment amount (e.g., 100.50)required
currencyCurrency code (default: WIRE)
descriptionInvoice description
redirect_urlPost-payment redirect URL
metadataCustom key-value pairs
expires_in_secondsTTL (default: 86400)

Response

{
  "id": "uuid",
  "amount": 100.5,
  "currency": "WIRE",
  "status": "pending",
  "checkout_url": "..."
}

Possible Outcomes

201Invoice created successfully
400Invalid amount (must be > 0)
401Unauthorized - invalid API key
429Rate limit exceeded
GET/v1/invoices/{id}

Get Invoice

Retrieve details of a specific invoice by ID.

Response

{
  "id": "uuid",
  "amount": 100.5,
  "currency": "WIRE",
  "status": "pending",
  "created_at": "2024-01-15T00:00:00Z"
}

Possible Outcomes

200Invoice found
404Invoice not found
GET/v1/invoices

List Invoices

List all invoices with pagination and filtering.

Parameters

limitResults per page (default: 20)
offsetPagination offset
statusFilter by status

Response

{
  "data": [],
  "pagination": {
    "total": 100,
    "limit": 20,
    "offset": 0
  }
}

Possible Outcomes

200Invoices retrieved
GET/v1/merchants/stats

Merchant Stats

Get aggregated statistics for your account.

Response

{
  "total_invoices": 150,
  "total_paid": 120,
  "total_revenue": "15000.00",
  "pending_payout": "2500.00"
}

Possible Outcomes

200Stats retrieved

Invoice Status Flow

pendingpaidexpired

pending

Awaiting payment

paid

Payment confirmed

expired

Time expired

Webhook Events

Webhooks are sent to your configured URL when payment events occur. Verify signatures using HMAC-SHA256.

payment.received

Fired when payment is first detected on-chain

{
  "event": "payment.received",
  "invoice_id": "uuid",
  "amount": "100.50",
  "transaction_hash": "0x..."
}
payment.confirmed

Fired when payment is confirmed (12 block confirmations)

{
  "event": "payment.confirmed",
  "invoice_id": "uuid",
  "amount": "100.50",
  "confirmations": 12
}

Error Codes

400

Bad Request - Invalid parameters

401

Unauthorized - Invalid API key

404

Not Found - Resource doesn't exist

429

Too Many Requests - Rate limit exceeded

500

Internal Server Error

Integration Example

User Flow
1.Create invoice via POST /v1/invoices
2.Redirect user to checkout_url
3.User completes payment with wallet
4.Receive payment.confirmed webhook
5.Verify signature, fulfill order