# Notify Transaction

By utilizing the Notify Transaction API, the client can submit the transaction status of a previously requested transaction. Tutelar will only consider the transaction closed upon successful payment, which triggers the notify transaction process.

**POST** `https://secctrl.tutelar.io/api/v1/fraud-detector/transaction/notify`

## Body

**Content type:** `application/json`

| Field           | Type   | Required | Description                                                                                                                                                    | Example                          | Possible values                   |
| --------------- | ------ | -------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------- |
| `orderId`       | string |      Yes | A unique identifier for the order associated with the transaction. It helps in tracking and referencing the specific order within the system.                  | `ORD_10726`                      |                                   |
| `status`        | string |      Yes | Indicates the completion status of the transaction. For a successful transaction, send the value `"success"`. For all other cases, send the value `"failure"`. | `success`                        | `success`, `failure`, `cancelled` |
| `transactionId` | string |      Yes | A unique identifier for the transaction within the system. It is used to track and reference the specific transaction details.                                 | `trans_61761`                    |                                   |
| `statusReason`  | string |       No | It can be used to provide additional context for the transaction status..                                                                                      | `Payment completed successfully` |                                   |

## Responses

### 200

Transaction status updated successfully

**Content type:** `application/json`

| Field     | Type    | Required | Example                                   |
| --------- | ------- | -------: | ----------------------------------------- |
| `success` | boolean |       No | `true`                                    |
| `message` | string  |       No | `Transaction status updated successfully` |
| `data`    | object  |       No |                                           |

#### Example response

```json
{
  "success": true,
  "message": "Transaction status updated successfully",
  "data": {
    "orderId": "ORD_10726",
    "requestedDateTime": "2023-09-11T11:35:01.403Z",
    "responseDateTime": "2023-09-11T11:35:01.498Z",
    "processedTime": 95
  }
}
```

### 400

If an invalid status is provided.

**Content type:** `application/json`

#### Example request

```http
POST /api/v1/fraud-detector/transaction/notify HTTP/1.1
Host: secctrl.tutelar.io
Content-Type: application/json
Accept: */*
Content-Length: 120

{
  "orderId": "ORD_10726",
  "status": "success",
  "transactionId": "trans_61761",
  "statusReason": "Payment completed successfully"
}
```


---

# 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.v2.tutelar.io/fraud-detection-monitoring/notify-transaction.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.
