Transactions
Query and manage your transaction history. Transactions represent completed or attempted onramp sessions.
GET
/v1/transactions
Retrieve a paginated list of transactions for your account.
Query Parameters
pageintegerPage number for pagination. Default: 1
limitintegerResults per page (max 100). Default: 20
statusstringFilter by status: pending, processing, completed, failed
fromstringStart date filter (ISO 8601 format)
tostringEnd date filter (ISO 8601 format)
wallet_addressstringFilter by destination wallet address
crypto_currencystringFilter by cryptocurrency (ETH, USDC, etc.)
Example Request
bash
-green-400">curl "https://api.web3pay.io/v1/transactions?page=1&limit=20&status=completed" \
-H "X-API-Key: wp3_live_sk_your_api_key"Response
json
{
"success": true,
"data": {
"transactions": [
{
"id": "tx_abc123",
"session_id": "onramp_sess_xyz789",
"status": "completed",
"wallet_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f5fB",
"crypto_currency": "ETH",
"crypto_amount": "0.0412",
"fiat_currency": "USD",
"fiat_amount": 10000,
"network": "ethereum",
"tx_hash": "0x1234567890abcdef...",
"platform_fee": 150,
"metadata": {
"order_id": "ord_12345"
},
"created_at": "2024-01-15T12:00:00Z",
"completed_at": "2024-01-15T12:08:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 156,
"pages": 8
}
}
}GET
/v1/transactions/:id
Retrieve details for a specific transaction by ID.
Path Parameters
idstringrequiredThe transaction ID (e.g., tx_abc123)
Example Request
bash
-green-400">curl https://api.web3pay.io/v1/transactions/tx_abc123 \
-H "X-API-Key: wp3_live_sk_your_api_key"Response
json
{
"success": true,
"data": {
"id": "tx_abc123",
"session_id": "onramp_sess_xyz789",
"status": "completed",
"wallet_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f5fB",
"crypto_currency": "ETH",
"crypto_amount": "0.0412",
"fiat_currency": "USD",
"fiat_amount": 10000,
"network": "ethereum",
"tx_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"fees": {
"platform_fee": 150,
"network_fee": 250,
"processing_fee": 290
},
"exchange_rate": 2427.18,
"metadata": {
"order_id": "ord_12345",
"user_id": "usr_67890"
},
"customer_email": "user@example.com",
"created_at": "2024-01-15T12:00:00Z",
"completed_at": "2024-01-15T12:08:00Z"
}
}The Transaction Object
A complete reference of all fields on the transaction object.
idstringUnique transaction identifier
session_idstringAssociated onramp session ID
statusstringCurrent status: pending, processing, completed, failed
wallet_addressstringDestination wallet for crypto delivery
crypto_currencystringCryptocurrency symbol (ETH, USDC, etc.)
crypto_amountstringAmount of crypto delivered (as string for precision)
fiat_currencystringFiat currency code (USD, EUR, GBP)
fiat_amountintegerFiat amount in smallest unit (cents)
networkstringBlockchain network (ethereum, polygon, base)
tx_hashstringOn-chain transaction hash (when completed)
feesobjectFee breakdown object
exchange_ratenumberExchange rate at time of transaction
metadataobjectCustom metadata attached to session
customer_emailstringCustomer email if provided
created_atstringISO 8601 creation timestamp
completed_atstringISO 8601 completion timestamp (if completed)
SDK Examples
javascript
400">import { Web3Pay } 400">from 400">039;@web3pay/sdk039;;
400">const client = 400">new Web3Pay({
apiKey: 400">039;wp3_live_sk_your_api_key039;
});
500">// List transactions with filters
400">const result = 400">await client.getTransactions({
page: 1,
limit: 20,
status: 400">039;completed039;
});
console.log(result.transactions);
console.log(result.pagination);
500">// Get single transaction
400">const tx = 400">await client.getTransaction(400">039;tx_abc123039;);
console.log(tx.status, tx.tx_hash);Filtering Examples
Filter by date range
bash
-green-400">curl "https://api.web3pay.io/v1/transactions?from=2024-01-01&to=2024-01-31" \
-H "X-API-Key: wp3_live_sk_your_api_key"Filter by wallet and currency
bash
-green-400">curl "https://api.web3pay.io/v1/transactions?wallet_address=0x742d35...&crypto_currency=ETH" \
-H "X-API-Key: wp3_live_sk_your_api_key"Get failed transactions
bash
-green-400">curl "https://api.web3pay.io/v1/transactions?status=failed&limit=50" \
-H "X-API-Key: wp3_live_sk_your_api_key"