# Transaction endpoints scenarios

You can use Transactions APIs for performing operations on individual transactions. In particular, Transactions APIs enables you to:

* Retrieve a list of transactions initiated from a specific card by a specific cardholder at a specific merchants etc..
* Get a specific transaction record using transaction ID
* Filter or retrieve a sorted list of transactions related to a specific user, performed at a specific time, specific transaction type or amount etc.

### **Search for transactions**

nCore platform stores all transactions, which were fulfilled earlier. You can search the transactions based on the filter parameters enabled at nCore platform.

**Transaction search use cases**

1. If you are preparing some financial statistics specific to merchants, you can call the /transactions:search endpoint to filter all transactions related to a specific merchant identified by the merchant\_name parameter.
2. If you are developing some customer relationship management system, you may have requests to get the list of  transactions, conducted by a specific card. In this case, you can call the /transactions:search endpoint and use the card id query parameter to get transactions for the specific card.
3. If you are developing a mobile application, users may have a possibility to review their transaction history. In this case, you can call the /transactions:search endpoint and use the user\_id query parameter to get transactions conducted by a specific user.

Send a **POST** request to **/transactions:search** endpoint as shown below to retrieve maximum ten transactions initiated with a specific card which are sorted by a transaction amount in ascending order.&#x20;

<details>

<summary><a href="https://nymcard.com/docs/api#tag/Transactions/operation/searchNymcardTransactions">POST /transactions:search</a></summary>

**`{`**\
`    `**`"sort_by": "transaction_amount",`**\
`    `**`"order_by": "asc",`**\
`    `**`"limit": 10,`**\
`    `**`"filters": [`**\
`    `**`{`**\
`        `**`"field": "card_id",`**\
`        `**`"operator": "any_of",`**\
`        `**`"values": [`**\
`            `**`"z7a3a3f0-63b2-4619-a8d5-a3542188f5a6"`**\
`            `**`]`**\
`        `**`}`**\
`    `**`]`**\
\&#xNAN;**`}`**

</details>

### **Retrieve a specific transaction**

\
This API call will display to you the full details of any transaction by sending a **GET** request to **/transactions/{id}** endpoint, where id is the transaction ID.

> [**GET /transactions/{id}**](https://nymcard.com/docs/api#tag/Transactions/operation/getTransactionById)

#### Transaction status codes

Below you can find a file with the list of transaction status codes, which can occur:

{% file src="/files/UZaNWFjc7Hv64DATXsAX" %}

#### Webhooks

You can receive information about transactions as they occur by configuring webhooks. Webhooks give a possibility to receive real-time notifications about API events, such as card status change, transactions etc.. Learn more about webhooks in the [**Webhooks**](/get-started/webhooks.md) section.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nymcard.com/get-started/transactions/transaction-endpoints-scenarios.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
