Managing Transactions
Learn how to view, search, filter, and manage your payment transactions through the API and merchant dashboard.
Viewing Transactions
You can view all your transactions through the API or the merchant dashboard. Transactions include both payments and refunds.
// Fetch recent transactions
const response = await fetch('https://api.altafinex.com/v1/transactions?limit=20&offset=0', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_SECRET_KEY',
'Content-Type': 'application/json',
},
});
const data = await response.json();
// data.transactions contains array of transactions
data.transactions.forEach(transaction => {
console.log(`${transaction.payment_id}: ${transaction.status} - ${transaction.amount}`);
});Filtering & Searching
Use query parameters to filter transactions by status, type, date range, and more.
By Status
GET /v1/transactions?status=succeededBy Date Range
// Filter transactions by status and date range
const params = new URLSearchParams({
status: 'succeeded',
start_date: '2024-01-01T00:00:00Z',
end_date: '2024-01-31T23:59:59Z',
limit: '50',
});
const response = await fetch(
`https://api.altafinex.com/v1/transactions?${params}`,
{
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_SECRET_KEY',
},
}
);By Type
GET /v1/transactions?type=paymentTransaction Statuses
pendingPayment is being processed. Wait for webhook notification or poll for status.
succeededPayment completed successfully. Funds will be settled to your account.
failedPayment was declined or failed. Check the error message for details.
refundedPayment has been refunded (fully or partially).
Using the Dashboard
Search Transactions
Search by payment ID, customer email, or order ID
Advanced Filtering
Filter by date range, status, amount, payment method, and more
Export Data
Download transaction reports as CSV or Excel files
Transaction Details
View detailed information for each transaction including card details (masked)
Best Practices
- •Use Webhooks: Don't poll for transaction status. Set up webhooks to receive real-time notifications.
- •Store Transaction IDs: Keep a record of payment IDs in your database for easy lookup and reconciliation.
- •Regular Reconciliation: Periodically reconcile your transactions with your accounting system.
- •Monitor Failed Payments: Track failed payments to identify patterns and improve your checkout flow.