# Pending Order

This `GET` endpoint gets a pending order of a third party customer. The `publicKey` is passed in the header while only an `emailAddress` is passed as a param. See the example below;

## Get pending order

<mark style="color:blue;">`GET`</mark> `https://canary.xendbridge.com/api/PeerToPeerOrder/ThirdParty/PendingOrder?emailAddress=annadoe@gmail.com`

#### Query Parameters

| Name                                           | Type | Description         |
| ---------------------------------------------- | ---- | ------------------- |
| emailAddress<mark style="color:red;">\*</mark> |      | <johndoe@gmail.com> |

#### Headers

| Name                                        | Type | Description |
| ------------------------------------------- | ---- | ----------- |
| secretKey<mark style="color:red;">\*</mark> |      | {secretKey} |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "data": {
        "orderStatus": "ProcessingRequest",
        "orderResponse": {
            "orderReference": "XB_91ee6ac1b2204022b07b5c17bddc2a35",
            "receiveInCurrencyCode": "BUSD",
            "payInCurrencyCode": "NGN",
            "receivableAmount": 0.1234347,
            "payableAmount": 69,
            "providerName": "Nnadozie Ohaeri",
            "providerFirstName": "Nnadozie",
            "providerLastName": "Ohaeri",
            "providerEmail": "dozienna4@gmail.com",
            "initiatedAt": "2022-02-07T09:59:03.1476901",
            "orderExpiryDate": "2022-02-07T10:14:03.1476901",
            "initiatedAtTimestamp": 1644227943147,
            "orderExpiryTimestamp": 1644228843147,
            "fundedProviderAtTimeStamp": 1644230393293,
            "fundedCustomerAtTimeStamp": 1644230684456,
            "orderCompletedAtTimeStamp": null,
            "p2POrderStatus": "FundedUser",
            "disputeStatus": "NoDispute",
            "disputeReference": "",
            "orderType": "Buy",
            "providerContact": {
                "phoneNumber": "2348062069869",
                "whatsappNumber": "2348062069869"
            },
            "customerContact": {
                "email": "JOHNDOE@gmail.com",
                "name": "John Doe",
                "phoneNumber": "0706346XXXX"
            },
            "providerPaymentMethods": {
                "paymentMethod": "Bank",
                "paymentType": "Bank",
                "paymentData": [
                    {
                        "bankName": "Access",
                        "accountNumber": "0069888440",
                        "accountName": "Ohaeri Nnadozie",
                        "currency": "NGN"
                    }
                ],
                "orderPaymentMethod": {
                    "bankName": "Access",
                    "accountNumber": "0069888440",
                    "accountName": "Ohaeri Nnadozie",
                    "currency": "NGN"
                }
            },
            "consumerDepositMethod": {
                "paymentMethod": "Bank",
                "paymentType": 0,
                "paymentData": {
                    "bankName": "Access Bank",
                    "accountNumber": "0000187849",
                    "accountName": "Emmanuel Diala",
                    "currency": "NGN"
                }
            },
            "consumerReceiptMethod": {
                "paymentMethod": "Crypto",
                "paymentType": 0,
                "paymentData": {
                    "walletAddress": "QWEVDTWDGVT462E6EFYE9202Y239",
                    "network": "BEP20",
                    "currency": "BUSD"
                }
            },
            "providerTransactionMetadata": {
                "cryptoPaymentNetwork": "BEP20",
                "cryptoTransactionHash": "0xe1577054fcca2dee00081fdd30757aa3c9895da806e26620a62a65cdc2cca375",
                "transactionVerificationUrl": "https://testnet.bscscan.com/tx0xe1577054fcca2dee00081fdd30757aa3c9895da806e26620a62a65cdc2cca375"
            }
        }
    },
    "status": "OK",
    "message": ""
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Request Fields" %}

<table><thead><tr><th>Parameter</th><th width="150">Type</th><th>Definitions</th></tr></thead><tbody><tr><td>emailAddress</td><td>string</td><td><code>Required</code> This is the consumer's email address.</td></tr></tbody></table>
{% endtab %}

{% tab title="Response Fields" %}

<table><thead><tr><th width="150">Parameters</th><th width="150">Type</th><th>Definitions</th></tr></thead><tbody><tr><td>orderStatus</td><td>enum</td><td>This the current status of an order when being placed. It can either be <code>ProcessingRequest</code> or <code>Available</code>.</td></tr><tr><td>orderResponse</td><td>object</td><td>This holds the <code>orderReference</code> objects and properties.</td></tr><tr><td>orderReference</td><td>string</td><td>This the reference to a particular order.</td></tr><tr><td>recieveInCurrencyCode</td><td>enum</td><td>This is the currency code to receive the currency in.</td></tr><tr><td>payInCurrencyCode</td><td>enum</td><td>This is the currency code to pay with.</td></tr><tr><td>receivableAmount</td><td>decimal</td><td>This the receivable amount of the currency.</td></tr><tr><td>payableAmount</td><td>decimal</td><td>This is the payable amount of the currency.</td></tr><tr><td>providerName</td><td>string</td><td>This the provider's name.</td></tr><tr><td>providerFirstName</td><td>string</td><td>This is the provider's first name.</td></tr><tr><td>providerLastName</td><td>string</td><td>This is the provider's last name.</td></tr><tr><td>providerEmail</td><td>string</td><td>This is the provider's email address.</td></tr><tr><td>initiatedAt</td><td>DateTime</td><td>The date time the order was made.</td></tr><tr><td>orderExpiryDate</td><td>DateTime</td><td>The expiry date time of the order.</td></tr><tr><td>initiatedAtTimestamp</td><td>long</td><td>The time in milliseconds an order was made</td></tr><tr><td>orderExpiryTimestamp</td><td>long</td><td>The time in milliseconds of when thee order will expire.</td></tr><tr><td>fundedProviderAtTimeStamp</td><td>long</td><td>The time of when a customer indicates payment for an order in milliseconds.</td></tr><tr><td>fundedCustomerAtTimeStamp</td><td>long</td><td>The time of when a provider indicates payment of order to the customer in milliseconds</td></tr><tr><td>orderCompletedAtTimeStamp</td><td>long</td><td>The time in milliseconds an order was completed.</td></tr><tr><td>p2POrderStatus</td><td>enum</td><td>The status of the order at the curent time. It could be <code>Submitted</code>, <code>Cancelled</code>, <code>Acknowledged</code>, <code>FundedProvider</code>, <code>FundReceivedFromUser</code>, <code>FundedUser</code>, <code>Completed</code>, <code>OrderTimedOut</code></td></tr><tr><td>disputeStatus</td><td>enum</td><td>The status of the dispute on an order. It could either be <code>NoDispute</code>, <code>DisputeRaisedByCustomer</code>, <code>DisputeRaisedByProvider</code>, <code>DisputeRaisedByBothParties</code>, <code>DisputeResolved</code>or <code>CouldNotBeResolved</code>.</td></tr><tr><td>disputeReference</td><td>string</td><td><code>Required</code> This is the reference value of a dispute on an order.</td></tr><tr><td>orderType</td><td>enum</td><td>This is the status of the order, whether it's a <code>Buy</code> or <code>Sell</code>.</td></tr><tr><td>providerContact</td><td>object</td><td>This is holds properties of a provider's contact information.</td></tr><tr><td>phoneNumber</td><td>string</td><td>The phone number of either the provider or customer.</td></tr><tr><td>whatsappNumber</td><td>string</td><td>The whatsapp number of either the provider or customer.</td></tr><tr><td>customerContact</td><td>object</td><td>This holds the properties of the contact information.</td></tr><tr><td>email</td><td>string</td><td>This is an email address of the customer.</td></tr><tr><td>name</td><td>string</td><td>This is the name of the customer.</td></tr><tr><td>phoneNumber</td><td>string</td><td>The phone number of the customer</td></tr><tr><td>providerPaymentMethods</td><td>object</td><td>This holds the properties of the payment methods of the provider.</td></tr><tr><td>paymentMethod</td><td>enum</td><td>This is the method of payment. It could be <code>Bank</code> or <code>Crypto</code></td></tr><tr><td>paymentType</td><td>enum</td><td>This is the type of payment. It could be <code>Bank</code>, <code>Crypto</code>, <code>UserName</code>or <code>MobileMoney</code>.</td></tr><tr><td>paymentData</td><td>object</td><td>This holds the properties of the payment method.</td></tr><tr><td>bankName</td><td>string</td><td>The bank name of the the provider or customer.</td></tr><tr><td>accountNumber</td><td>string</td><td>The bank account number of the provider or customer.</td></tr><tr><td>accountName</td><td>string</td><td>The bank account name of the provider or customer.</td></tr><tr><td>currency</td><td>enum</td><td>The currency in which the order was made. It could be <code>BUSD</code> or <code>NGN</code>.</td></tr><tr><td>orderPaymentMethod</td><td>object</td><td>This holds properties of the payment method in which the order is to be made to.</td></tr><tr><td>consumerDepositMethod</td><td>object</td><td>This holds the properties of the consumer deposit details.</td></tr><tr><td>consumerrReceiptMethod</td><td>object</td><td>This holds the properties of the consumer receiving method details.</td></tr><tr><td>walletAddress</td><td>string</td><td>This is the crypto wallet address of the consumer.</td></tr><tr><td>network</td><td>enum</td><td>This is the network currently supported in the system which the wallet address is based on.</td></tr><tr><td>providerTransactionMetadata</td><td>o</td><td>This holds the properties of the transaction metadata of an order.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Get Pending Order By Reference

This `GET` endpoint gets a pending order of a third party customer. The `publicKey` is passed in the header while the `orderReference` is passed as a param. See the example below;

## Get pending order by reference

<mark style="color:blue;">`GET`</mark> `https://canary.xendbridge.com/api/PeerToPeerOrder/ThirdParty/Order/Reference`

#### Query Parameters

| Name                                             | Type   | Description                          |
| ------------------------------------------------ | ------ | ------------------------------------ |
| orderReference<mark style="color:red;">\*</mark> | string | XB\_e1315fb1c9fd419998046ab96062361c |

#### Headers

| Name                                        | Type | Description |
| ------------------------------------------- | ---- | ----------- |
| secretKey<mark style="color:red;">\*</mark> |      | {secretKey} |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
  "data": {
    "appId": "a490997c-a816-40b1-0d4c-08d9667359ad",
    "appName": "Xend Finance",
    "clientContact": {
      "phoneNumber": "07064366723",
      "name": "johnfoe",
      "emailAddress": "johnfoe@gmail.com"
    },
    "orderDetail": {
      "orderReference": "XB_e1315fb1c9fd419998046ab96062361c",
      "thirdPartyAppName": "Xend Finance",
      "disputeReference": null,
      "orderType": "Buy",
      "orderStatus": "Acknowledged",
      "disputeStatus": "NoDispute",
      "receiveInCurrencyCode": "USDC",
      "payInCurrencyCode": "NGN",
      "receiveInCurrencyNetwork": "BEP20",
      "payInCurrencyNetwork": "LOCAL",
      "receivableAmount": 0.11904762,
      "receivableAmountWithoutMarkup": 0.11904762,
      "payableAmount": 50,
      "rate": 420,
      "initiatedAt": "2022-08-24T14:49:51.0699807",
      "orderExpiryDate": "2022-08-24T14:54:51.0699807",
      "initiatedAtTimestamp": 1661352591069,
      "orderExpiryTimestamp": 1661352891069,
      "fundedProviderAtTimeStamp": null,
      "fundedCustomerAtTimeStamp": null,
      "estimatedOrderCompletionTimestamp": null,
      "orderCompletedAtTimeStamp": null,
      "markupDetail": null
    },
    "providerContact": {
      "phoneNumber": "2348181186644",
      "whatsappNumber": "",
      "name": "John Doe",
      "emailAddress": "owolabidamilola98@gmail.com",
      "providerReference": "DFDFE062107A43E88B602DA14607A8A3"
    },
    "clientPaymentMethod": "Bank",
    "liquidityProviderPaymentOption": {
      "paymentMethod": "Bank",
      "paymentType": 0,
      "paymentData": [
        {
          "bankName": "Access",
          "accountNumber": "0709876786",
          "accountName": "John Doe",
          "address": null,
          "swiftCode": null,
          "iban": null,
          "sortCode": null,
          "currency": "NGN",
          "network": "LOCAL"
        }
      ],
      "orderPaymentMethod": {
        "bankName": "Access",
        "accountNumber": "0709876786",
        "accountName": "John Doe",
        "address": null,
        "swiftCode": null,
        "iban": null,
        "sortCode": null,
        "currency": "NGN",
        "network": "LOCAL"
      }
    },
    "clientDepositPaymentOption": {
      "paymentMethod": "Bank",
      "paymentType": 0,
      "paymentData": {
        "bankName": "Access Bank",
        "accountNumber": "0000187849",
        "accountName": "Emmanuel Diala",
        "address": null,
        "swiftCode": null,
        "iban": null,
        "sortCode": null,
        "currency": "NGN",
        "network": "LOCAL"
      }
    },
    "clientReceiptPaymentOption": {
      "paymentMethod": "Crypto",
      "paymentType": 0,
      "paymentData": {
        "walletAddress": "0x30b7D85f7CF498D556a9448243a7994bc4660790",
        "network": "BEP20",
        "currency": "USDC"
      }
    },
    "liquidityProviderTransactionMetadata": null,
    "customerTransactionMetadata": null
  },
  "status": "OK",
  "message": ""
}
```

{% 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://doc.xendbridge.com/api-method-calls/third-party-order-operations/pending-order.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.
