# 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="<https://3730541649-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftelq9krTgSM8OvsHep7r%2Fuploads%2Fd8Yg6whvdc8VQRPNLqF6%2FStatus%20codes.pdf?alt=media&token=4dd362a3-e8f6-40ba-b49f-d6e0d81f2f8c>" %}

#### 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**](https://docs.nymcard.com/get-started/webhooks) section.
