Transactions API

Manage payments, transactions, and cash operations

13 endpoints

Base URL:https://api.nexapay.com/v1
MethodPathDescription
GET/transactionsList all transactions
GET/transactions/{transaction_id}Get transaction details
GET/transactions/recentGet recent transactions
GET/transactions/searchSearch transactions
POST/paymentsProcess payment
GET/payments/{payment_id}Get payment details
POST/payments/{payment_id}/refundRefund payment
GET/payments/methodsList payment methods
GET/cash/drawerGet cash drawer status
POST/cash/drawer/openOpen cash drawer
POST/cash/drawer/closeClose cash drawer
POST/cash/adjustmentRecord cash adjustment
GET/cash/historyGet cash transaction history

Detailed Examples

POST/payments

Request Body

{
  "order_id": "order_20240115001",
  "amount": 14.61,
  "method": "card",
  "card_details": {
    "type": "credit",
    "last_four": "4242",
    "brand": "visa"
  },
  "tip": 2.00,
  "register_id": "register_01"
}

Response

{
  "success": true,
  "data": {
    "id": "pay_abc123",
    "order_id": "order_20240115001",
    "amount": 14.61,
    "tip": 2.00,
    "total": 16.61,
    "method": "card",
    "status": "completed",
    "card_info": {
      "brand": "Visa",
      "last_four": "4242",
      "cardholder": "J. Smith"
    },
    "receipt_number": "RCP-2024-001234",
    "created_at": "2024-01-15T09:35:00Z"
  }
}