Skip to main content

Transactions API

List Transactions

page
number
default:"1"
Page number
perPage
number
default:"20"
Results per page (max 100)
Search by ID, name, email, or description
status
string
Filter by status: APPROVED, SETTLED, DECLINED, REFUNDED, ERROR
dateFrom
string
Start date (ISO 8601)
dateTo
string
End date (ISO 8601)
merchantId
string
Filter by merchant
sort
string
default:"processedAt"
Sort field
order
string
default:"desc"
Sort order: asc or desc
GET /api/transactions?page=1&perPage=20&status=SETTLED&dateFrom=2026-01-01

Response

{
  "transactions": [
    {
      "id": "clx...",
      "nmiTransactionId": "11848339551",
      "type": "SALE",
      "status": "SETTLED",
      "amount": "187.50",
      "currency": "USD",
      "customerName": "John Doe",
      "customerEmail": "john@example.com",
      "cardType": "visa",
      "cardLast4": "5449",
      "description": "Consulting Services",
      "processedAt": "2026-03-20T21:38:00Z",
      "settledAt": "2026-03-21T01:21:00Z"
    }
  ],
  "total": 7956,
  "page": 1,
  "perPage": 20,
  "totalPages": 398
}

Get Transaction

GET /api/transactions/:id
Returns full transaction detail including metadata, BIN data, decline information, and linked customer/subscription.

Refund Transaction

POST /api/payments/refund
{
  "transactionId": "clx...",
  "amount": 50.00,
  "reason": "Customer request"
}
Processes a refund through the NMI gateway. Partial refunds are supported.

Sync Transactions

POST /api/nmi/sync
{
  "nmiAccountId": "clx...",
  "type": "incremental"
}
Triggers a sync job for the specified NMI account. Returns the job ID for tracking.