# 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: 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.securepay.my/api/transactions/search.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.
