> For the complete documentation index, see [llms.txt](https://docs.fuspay.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fuspay.finance/collection/fetch-order.md).

# Fetch Order

### Fetch order

### This endpoint is used to fetch an order to verify its status

<mark style="color:blue;">`GET`</mark> `https://prod-order-exchanger-api.fuspay.finance/api/v1/no-auth/PartnerP2P/FetchOrder?partner_order_id=xx&partner_id=xx/`

**Order Status**&#x20;

Pending = newly created orders that has not been fulfilled in 45 mins&#x20;

Completed = Order that has been fulfilled and a callback has been returned in 45 mins&#x20;

Mismatched = this is when a user pays above or below the amount on the order.&#x20;

Expired = Order that payment was made but callback wasnt returned in 45 mins&#x20;

Abandoned = an order that a user hasnt paid into in over 45 mins&#x20;

Claimed = in cases of mismatched and expired merchants can decide to claim the money paid&#x20;

#### Query Parameters

| Name                                                 | Type   | Description                   |
| ---------------------------------------------------- | ------ | ----------------------------- |
| partner\_order\_id<mark style="color:red;">\*</mark> | String | the id of the order generated |
| partner\_id                                          | String | the Id of the partner         |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | partners public key |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json    |

{% tabs %}
{% tab title="200: OK successful response" %}

```
{
  "status": "success",
  "id":"",
  "partner_id":"",
  "order_notify_url":"",
  "exchanger_user_id":"",
  "intrapay_merchant_id":""
  "messsage": "",
  "data": {
        "payment": {
            "status": "PENDING | PAID | REFUND"

            },
        "virtual_account": {
        "amount": "",
        "account_name": "",
        "bank_name": "",
        "account_number": ""
      },
     "order_details": {
     "status": "PENDING | COMPLETED | EXPIRED | CANCELED",
     "partner_order_id": "",
     "intrapay_order_reference": ""
     }

 }

}
```

{% endtab %}

{% tab title="400: Bad Request failed response" %}

```
{
  "status": "fail",
  "messsage": ""
}
```

{% endtab %}
{% endtabs %}

#### Example Request- Code&#x20;

{% tabs %}
{% tab title="Node" %}

```javascript
const fetch = require('node-fetch');

fetch("https://exchanger-api.fuspay.finance/api/v1/no-auth/PartnerP2P/FetchOrder?partner_order_id=xxxxx", {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer pk_partner_xxxx",
    "cookie": "connect.sid=s%253AoNBPv4ez8npeuKVKlS9KwX_1Dshiamlf.n8opjPuoF3XsU%252Be0VTLMUe6xzeAXmpCfQrpW9KW1KDs"
  }
})
  .then(response => console.log(response))
  .catch(err => console.error(er
```

{% endtab %}
{% endtabs %}


---

# 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.fuspay.finance/collection/fetch-order.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.
