# Validate Transaction

<mark style="color:green;">`POST`</mark> https\:/paymenthive.net/api/transaction/validate&#x20;

**Headers**

| Name          | Value               |
| ------------- | ------------------- |
| Content-Type  | `application/json`  |
| Authorization | `Bearer SECRET_KEY` |

**Body**

<table><thead><tr><th width="165">Name</th><th width="94">Type</th><th>Description</th></tr></thead><tbody><tr><td>api_key*</td><td>string</td><td>API key</td></tr><tr><td>reference*</td><td>string</td><td>transaction reference</td></tr><tr><td>orderid*</td><td>string</td><td>transaction order id</td></tr></tbody></table>

**Response**

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

```json
{
  "data" : {
    "trxDetails" : {
        "status" : "approved",
        "trxRef" : "Ref-98938383838383332",
        "orderid" : "PH-83838373838383933",
        "amount" : "5.00",
        "currency" : "USD",
        "transDate" : "2023-10-10 09:10:22"
    },
    "custDetails" : {
        "fullName" : "Alan Smith",
        "email" : "alansmith@gmail.com",
        "phone" : "9938383838",
    },
    "cardDetails" : {
        "cardType" : "MASTERCARD",
        "cardNumber" : "5432**********9889",
        "expiryDate" : "01/29"
    }
  }    
  "message": "success",
  "status": "success"
 }
```

{% endtab %}

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

```json
{
    "status" : "failed",
    "message" : "Bad Request"
}
```

{% endtab %}

{% tab title="401: Unauthorized" %}

```json
{
    "status" : "failed",
    "message" : "Invalid Secret key"
}
```

{% endtab %}
{% endtabs %}
