List payments and refunds
Returns the store's payments and refunds, newest first.
What to send: the store you want to look at. You can optionally narrow the results by terminal, status, type (sale or refund), or a date range, and page through large result sets using the page size and starting position.
What you get back: a list where each entry shows the amount, whether it was a sale or a refund, its current status, and — where relevant — the reason behind that status (for example, why a payment was declined or cancelled). The response also tells you how many results match in total so you can page through them.
Required Scopes (one of the following):
- payment_requests (returned via the register API: POST /poslink/v1/epos/register)
- default_access (deprecated, will be removed in the future; included for backward compatibility with existing integrations)
Request
- Base URLhttps://api.teya.com
- AuthOAuth 2Authorization codehttps://id.teya.com/oauth/v2/oauth-authorizeToken URLhttps://id.teya.com/oauth/v2/oauth-token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
The ID of the store to retrieve requests associated with
The ID of the terminal to retrieve requests associated with
The current status of the request. Must be a valid enum value. If omitted, the returned list will include all statuses
Filter by transaction type. Accepts SALE or REFUND.
The start date using the ISO 8601 format
The end date using the ISO 8601 format
The maximum number of results to be returned
The (zero-based) offset of the first record in the collection to return
Sort the result set in ascending (ASC) or descending (DESC) order based on the date the payment request is created
Response
List of payments and refunds successfully retrieved
Example response
{
"payment_requests": [
{
"payment_request_id": "dfc4fc52-8293-45b6-9f3e-b3b0f8f88188",
"requested_amount": {
"currency": "GBP",
"amount": 10,
"tip": 0
},
"status": "NEW",
"transaction_type": "SALE",
"created_at": "2022-06-15T16:24:12Z",
"updated_at": "2022-06-15T16:26:12Z",
"source_reference_id": "423897410",
"merchant_reference": "423897410",
"terminal_id": "70dc65ba-1c13-492a-82a0-15821e5f63ba",
"store_id": "f04fe1ce-e7bd-4c5b-b873-b156643c0bc3"
}
],
"pagination": {
"offset": 0,
"limit": 10,
"total_pages": 1,
"total_count": 1
}
}Changes
No recorded changes to this operation across all 1 revision of this API.