# Pay For Order

This `POST` endpoint confirms a buy or sell order for a third-party customer indicating a successful transfer of funds. Only the `secretkey` is passed in the header while the request to be made would contain only an `emailAddress` and `orderReference`.

If successful returns a "Payment made successfully" `200`message.

## Pay for order

<mark style="color:green;">`POST`</mark> `https://canary.xendbridge.com/api/PeerToPeerOrder/ThirdParty/Order/Confirm`

#### Headers

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

#### Request Body

| Name                                              | Type   | Description                                                        |
| ------------------------------------------------- | ------ | ------------------------------------------------------------------ |
| emailAddress<mark style="color:red;">\*</mark>    | String | <johndoe@gmail.com>                                                |
| orderReference<mark style="color:red;">\*</mark>  | String | XB\_0877e5692ee946f491bafab275d3d522                               |
| transactionHash<mark style="color:red;">\*</mark> | String | 0xcfa4a293e6fd903329e9c035f4f17dafbd0dbd9b76b613be5cd2ba7b7a4baaa7 |

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

```javascript
{
    "data": true,
    "status": "OK",
    "message": "Payment Updated Successfully"
}
```

{% endtab %}
{% endtabs %}

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

<table><thead><tr><th width="165.66666666666666">Parameters</th><th width="150">Type</th><th>Definitions</th></tr></thead><tbody><tr><td>emailAddress</td><td>string</td><td><code>Required</code> The email address of the third party client.</td></tr><tr><td>orderReference</td><td>string</td><td><code>Required</code> The order reference of an order made.</td></tr><tr><td>transactionHash</td><td>string</td><td><code>Required</code> The unique hash of a transaction on the blockchain network</td></tr></tbody></table>
{% endtab %}

{% tab title="Response Fields" %}

<table><thead><tr><th width="176.66666666666666">Parameters</th><th width="150">Type</th><th>Definitions</th></tr></thead><tbody><tr><td>data</td><td>bool</td><td>This can either be true or false.</td></tr><tr><td>status</td><td>string</td><td>This returns a status message of the request.</td></tr><tr><td>message</td><td>string</td><td>This returns either <code>Payment updated successfully</code> if success, or <code>Failed to update payment status. Please try again later</code> if failed.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
