# Lost transaction information

## Lost transaction information

> Either \`order\_id\` or \`custom\_transaction\_id\` must be set.

```json
{"openapi":"3.0.3","info":{"title":"A-Pay","version":"1.0.0"},"tags":[{"name":"Lost transaction","description":"Lost transactions"}],"servers":[{"url":"https://<domain>"}],"security":[{"apikey":[]}],"components":{"securitySchemes":{"apikey":{"type":"apiKey","name":"apikey","in":"header"}}},"paths":{"/Remotes/lost-transaction-info":{"get":{"summary":"Lost transaction information","description":"Either `order_id` or `custom_transaction_id` must be set.","tags":["Lost transaction"],"parameters":[{"in":"query","name":"project_id","schema":{"type":"number"},"description":"Project ID in the A-Pay system","required":true},{"in":"query","name":"order_id","description":"Deposit ID in the A-Pay system","schema":{"type":"number","maxLength":16,"minLength":16,"pattern":"^[0-9a-f]+$"},"required":false},{"in":"query","name":"custom_transaction_id","description":"Transaction ID in the client's system","schema":{"type":"string","maxLength":200,"minLength":1},"required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"title":"Success","type":"object","properties":{"success":{"type":"boolean","description":"`true` if there are no errors"},"status":{"type":"string","enum":["Pending","Rejected","Done","Canceled","In Progress","Reopen"],"description":"Lost transaction status"},"order_id":{"description":"Lost transaction ID in the A-Pay system","maxLength":16,"minLength":16,"pattern":"^[0-9a-f]+$","title":"Order Id","type":"string"},"custom_transaction_id":{"description":"Transaction ID in the client's system","maxLength":200,"minLength":1,"title":"Custom Transaction Id","type":"string"},"description":{"type":"string","title":"Description","description":"Description of lost transaction"}},"required":["success","status","order_id","custom_transaction_id"]}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Validation error","properties":{"success":{"type":"boolean","description":"`false` if an error occurred"},"message":{"type":"string","description":"Description of error"},"code":{"type":"number","description":"Error code in the A-Pay system"},"target":{"type":"string","enum":["form_data","query"]},"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","description":"Description of error"},"location":{"type":"array","description":"Path to the field where the error occurred","items":{"type":"string"}}},"required":["message","location"]}}},"required":["success","message","code","target","errors"]},{"type":"object","title":"Invalid value","properties":{"success":{"type":"boolean","default":false},"code":{"type":"integer","default":400},"field":{"type":"string","default":"order_id","enum":["order_id","custom_transaction_id"],"description":"Field name"},"message":{"type":"string","default":"Invalid value: order id","enum":["Invalid value: order id","Invalid value: custom transaction id"],"description":"Invalid value"}},"required":["code","field","success","message"]}]}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"title":"Unathorized","type":"object","properties":{"code":{"type":"integer","default":401},"message":{"type":"string","default":"Unauthorized"},"success":{"type":"boolean","default":false}},"required":["code","error","success","message"]}}},"description":"Unauthorized"},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","title":"Transaction was not found","properties":{"success":{"type":"boolean","default":false},"code":{"type":"integer","default":404},"message":{"type":"string","description":"Transaction was not found"}},"required":["code","error","success","message"]}}}}}}}}}
```

## ⚠️ Error Handling Guide

The following section describes possible error responses for the `POST /Remotes/lost-transaction-info` endpoint and how you can resolve them by yourself.

<details>

<summary>400 Bad Request – Validation Errors</summary>

#### **When it happens:**

* Neither `order_id` nor `custom_transaction_id` was provided
* Provided values are in an incorrect format (e.g., invalid length or pattern)

#### **How to resolve it:**

When the API returns a **400 Bad Request**, it includes detailed information in the response body to help you identify what went wrong.

Make sure to inspect the following fields in the error response:

| Field               | Description                                                                |
| ------------------- | -------------------------------------------------------------------------- |
| `errors[].message`  | Describes the issue (e.g., "ensure this value has at least 16 characters") |
| `errors[].location` | Shows which parameter is invalid (e.g., `["order_id"]`)                    |

</details>

<details>

<summary>401 Unauthorized</summary>

#### **When it happens:**

* The `Authorization` header is missing or contains an invalid API key

#### **How to resolve it:**

* Set the header: `Authorization: Bearer YOUR_API_KEY`
* Make sure the key has access to the specified `project_id`

</details>

<details>

<summary>404 Not Found – Transaction Not Found</summary>

#### **When it happens:**

* The specified `order_id` or `custom_transaction_id` does not match any existing lost transaction issue

#### **How to resolve it:**

* Confirm that the transaction ID you’re querying has actually been submitted previously
* Contact our support team if you're sure the lost transaction issue was created
* Create a new lost transaction issue if none is found

</details>


---

# 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.a-pay.one/api-documentation/api-integration/lost-transaction/lost-transaction-information.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.
