Transactions API
Manage payments, transactions, and cash operations
13 endpoints
Base URL:
https://api.nexapay.com/v1| Method | Path | Description |
|---|---|---|
| GET | /transactions | List all transactions |
| GET | /transactions/{transaction_id} | Get transaction details |
| GET | /transactions/recent | Get recent transactions |
| GET | /transactions/search | Search transactions |
| POST | /payments | Process payment |
| GET | /payments/{payment_id} | Get payment details |
| POST | /payments/{payment_id}/refund | Refund payment |
| GET | /payments/methods | List payment methods |
| GET | /cash/drawer | Get cash drawer status |
| POST | /cash/drawer/open | Open cash drawer |
| POST | /cash/drawer/close | Close cash drawer |
| POST | /cash/adjustment | Record cash adjustment |
| GET | /cash/history | Get cash transaction history |
Detailed Examples
POST
/paymentsRequest 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"
}
}