Skip to main content

/payments

Overview​

This endpoint retrieves points or credit transaction history for all members in the business. Unlike /member/payments, this endpoint does not require a specific member to be identified and returns transactions across all members.

When to Use This Endpoint​

Use this endpoint in the following cases:

  • To generate business-wide reports on points or credit transactions
  • To analyze loyalty program usage across all members
  • To audit or review all payment activities in the system
  • To export transaction data for business intelligence or accounting purposes

Key Considerations​

  • The budgetType parameter determines whether to retrieve points or credit history
  • Results can be filtered by date range using fromDate and toDate
  • Pagination is supported through limit and offset parameters
  • Default date range is not limited unless specified
  • Does not require a specific member to be identified
  • Returns transactions with member identification (membershipKey) included

Request Details​

Method & URL​

POST /payments

See API Servers for the base URL to use in place of {{server}}.

Headers​

HeaderTypeRequiredDescription
x-api-keystringYesAPI key for authentication
x-source-typestringYesOrigin of the request (e.g., POS, Web)
x-source-namestringYesName of the client or integration system
x-pos-idstringYesPOS terminal identifier
x-branch-idstringYesBranch or store location identifier

Request Body​

FieldTypeRequiredDefaultDescription
budgetTypestringYes—Type of budget: points or credit
limitintegerNo40Max number of records (1-100)
offsetintegerNo0Number of records to skip for pagination (≥0)
fromDatestringNo—Filter start date (ISO 8601 format)
toDatestringNo—Filter end date (ISO 8601 format)

Request Example​

curl --location --request POST 'https://{{server}}/v1/payments' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{api-key}}' \
--header 'x-source-type: POS' \
--header 'x-source-name: pos_terminal_01' \
--header 'x-pos-id: POS001' \
--header 'x-branch-id: BR001' \
--data-raw '{
"budgetType": "points",
"limit": 20,
"offset": 0,
"fromDate": "2024-01-01T00:00:00Z",
"toDate": "2024-12-31T23:59:59Z"
}'

Success Response​

{
"status": "success",
"transactions": [
{
"transactionId": "confirmation-uuid-or-db-id",
"createdAt": "2024-06-15T14:30:00.000Z",
"operation": "AddPoints",
"type": "Points",
"amount": 105,
"membershipKey": "abc123",
"cancelled": false
},
{
"transactionId": "conf-uuid-2",
"createdAt": "2024-06-10T12:15:00.000Z",
"operation": "RedeemPoints",
"type": "Points",
"amount": -50,
"membershipKey": "def456",
"cancelled": false,
"purchaseTransactionId": "pos-sale-1001"
}
]
}

Response Fields​

FieldTypeDescription
statusstringRequest status indicator
transactionsarrayArray of transaction objects
transactionIdstringOur code for this row (its confirmation), not the POS order id. Falls back to the row's database id
createdAtstringISO 8601 timestamp of the transaction
operationstringOperation type: AddPoints, RedeemPoints, AddCredits, RedeemCredits
typestringBudget type: Points or Credit
amountnumberTransaction amount (positive for add, negative for use). A RedeemPoints or RedeemCredits row with a positive amount is a partial refund: that part of an earlier payment went back to the member's balance
membershipKeystringThe member's membership key
cancelledbooleantrue when the row was later canceled
purchaseTransactionIdstringThe sale's purchase.transactionId sent with the V4 /payment that made this redemption. Returned only on redemptions whose payment request carried it; the key is omitted otherwise

Error Response Examples​

Missing Required Header​

{
"status": "error",
"error": {
"code": "101",
"message": "Missing X-Api-Key header"
}
}

Invalid Budget Type​

{
"status": "error",
"error": {
"code": "1001",
"message": "Invalid or missing budgetType. Must be 'points' or 'credit'"
}
}

Invalid Date Format​

{
"status": "error",
"error": {
"code": "1002",
"message": "Invalid fromDate format. Use ISO 8601 format"
}
}

Error Codes​

CodeDescription
101Missing X-Api-Key header
102Missing X-Source-Type header
103Missing X-Source-Name header
104Missing X-Pos-Id header
105Missing X-Branch-Id header
1001Invalid or missing budgetType
1002Invalid fromDate format
1003Invalid toDate format
1011Invalid limit (must be an integer between 1 and 100)
1012Invalid offset (must be an integer of 0 or more)
1010Internal server error
  • Generating business-wide loyalty transaction reports
  • Analyzing loyalty program performance and usage patterns
  • Auditing all points or credit transactions across the business
  • Exporting transaction data for accounting or business intelligence
  • Monitoring loyalty program health and member engagement