# Check Orders

You can make a "check-orders" request to check the payment status of multiple orders.

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

```
curl --location -g --request POST '{{BASE_URL}}/check-orders' \
--header 'Authorization: Bearer {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_ids": ["1","2"]
}'
```

{% endtab %}

{% tab title="JavaScript" %}

```
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer {{API_KEY}}");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "order_ids": [
    "1",
    "2"
  ]
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("{{BASE_URL}}/check-orders", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="Node.js" %}

```
var request = require('request');
var options = {
  'method': 'POST',
  'url': '{{BASE_URL}}/check-orders',
  'headers': {
    'Authorization': 'Bearer {{API_KEY}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "order_ids": [
      "1",
      "2"
    ]
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

{% endtab %}

{% tab title="PHP" %}

```
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => '%7B%7BBASE_URL%7D%7D/check-orders',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "order_ids": ["1","2"]
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer {{API_KEY}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="Python" %}

```
import requests
import json

url = "{{BASE_URL}}/check-orders"

payload = json.dumps({
  "order_ids": [
    "1",
    "2"
  ]
})
headers = {
  'Authorization': 'Bearer {{API_KEY}}',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}
{% endtabs %}

## Check Order

<mark style="color:green;">`POST`</mark> `https://merchant.fcfpay.com/api/v1/check-order`

#### Query Parameters

| Name                                         | Type  | Description                     |
| -------------------------------------------- | ----- | ------------------------------- |
| order\_ids<mark style="color:red;">\*</mark> | array | The Order IDs you want to check |

{% tabs %}
{% tab title="200: OK Call successfull, payment deposited" %}

```javascript
{
    "success": true,
    "data": {
        "1": {
            "deposited": false,
            "order_id": "1",
            "user_id": "1",
            "txid": "",
            "unique_id": "",
            "confirm_blocks": "",
            "status": "waiting",
            "fiat_amount": null,
            "fiat_currency": "USD",
            "amount": "",
            "currency": "",
            "fees": "",
            "decimal": "",
            "fee_decimal": ""
        },
        "162": {
            "deposited": true,
            "order_id": "162",
            "user_id": "",
            "txid": "0xfc896c0536f39bc7c0fe5e5c73231c3afa4805680427fca2fe24292f74f30a70",
            "unique_id": "0xfc896c0536f39bc7c0fe5e5c73231c3afa4805680427fca2fe24292f74f30a70_0",
            "confirm_blocks": 24,
            "status": "deposited",
            "fiat_amount": "10.77",
            "fiat_currency": "USD",
            "amount": "27548000000000000",
            "currency": "BSC",
            "fees": "210000000000000",
            "decimal": 18,
            "fee_decimal": 18
        }
    },
    "message": "Successfully fetched."
}
```

{% endtab %}
{% endtabs %}


---

# 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://api-docs.fcfpay.com/reference/api-requests-v1-deprecated/check-orders.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.
