> For the complete documentation index, see [llms.txt](https://docs.securepay.my/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.securepay.my/api/transactions/search.md).

# Search

## Endpoint URL

| Environment | URL                                                       | Method |
| ----------- | --------------------------------------------------------- | ------ |
| Sandbox     | <https://sandbox.securepay.my/api/v1/transactions/search> | GET    |
| Production  | <https://securepay.my/api/v1/transactions/search>         | GET    |

## Credentials

|                                 |                                      |
| ------------------------------- | ------------------------------------ |
| uid (Merchant API UID)          | 2aaa1633-e63f-4371-9b85-91d936aa56a1 |
| token (Merchant API Auth Token) | ZyUfF8EmyabcMWPcaocX                 |

{% hint style="info" %}
SecurePay supports multiple credentials. Merchant can use any credentials set in order to request search commands using API.&#x20;
{% endhint %}

## Parameters

Merchant can search with the below elements:\
\- FPX Reference Number\
\- Order Number (seller)\
\- Exchange Number (Generated by SecurePay)

| Parameter         | Description                                                        |
| ----------------- | ------------------------------------------------------------------ |
| search\_reference | <p>fpx\_ref\_number</p><p>order\_number</p><p>exchange\_number</p> |
| reference\_number | Reference number from search elements (search\_reference)          |

## Example

```
curl -u 4a73a364-6548-4e17-9130-c6e9bffa3081:GFVnVXHzGEyfzzPk23er "https://sandbox.securepay.my/api/v1/transactions/search?search_reference=order_number&reference_number=1208" | json_pp

[
   {
      "buyer_email" : "me@ppp.com",
      "buyer_name" : "Michael Bay",
      "buyer_phone" : "01261112121",
      "client_ip" : "103.145.216.156",
      "created_at" : "2021-08-10T16:11:28.524+08:00",
      "created_at_unixtime" : "1628583088",
      "currency" : "MYR",
      "fpx_bank" : "CIMB BANK",
      "fpx_debit_auth_code" : "76",
      "fpx_model" : "B2C",
      "fpx_name" : "",
      "fpx_status" : false,
      "fpx_status_message" : "Transaction Not Found",
      "fpx_transaction_id" : "2108101554520476",
      "fpx_transaction_time" : "20210810155452",
      "interface_name" : "Default",
      "interface_uid" : "4a73a364-6548-4e17-9130-c6e9bffa3081",
      "merchant_co_number" : "1273013-P",
      "merchant_name" : "SP SDN BHD",
      "merchant_reference_number" : "OBDEM1628582057",
      "order_number" : "1208",
      "payment_id" : 7893,
      "payment_method" : null,
      "payment_mode" : "merchant",
      "payment_stage" : "payment_unsuccessful",
      "payment_status" : false,
      "receipt_url" : null,
      "retry_url" : "https://sandbox.securepay.my/api/v1/retry/OBDEM1628582057?uid=ef12813a45cb7fb9852e",
      "source" : "FPX",
      "status_url" : "https://sandbox.securepay.my/api/v1/status/OBDEM1628582057?uid=ef12813a45cb7fb9852e",
      "transaction_amount" : "55.89",
      "transaction_amount_received" : "0.00",
      "transaction_fee" : "0.00",
      "uid" : "ef12813a45cb7fb9852e"
   }
]

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.securepay.my/api/transactions/search.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
