# Transaction Status

Transaction status is an API link to get the status of previous transaction. all payment status are in here.

{% hint style="info" %} <mark style="color:blue;">Please ensure that the correct ID is provided to prevent any errors in the API response.</mark>
{% endhint %}

## Authentication

LeanX uses **Auth Token** to authenticate in each request's header.

{% hint style="info" %}
**Auth Token** can be retrieved in your portal dashboard under **API** page.
{% endhint %}

**Request Header**

{% code overflow="wrap" %}

```json
{
    "auth-token": "LP-0D7C06DE-MM|7394e58e-edee-4c42-9ca5-bcbc449f1b9f|2141df4a3cb633d5ce8683bb0c55067e5caebfbe07390dde277dc455bcc95c91723a81b5e565c7c02d68fb84e396722563016bf99e576a4b8cdbe4423fbf226b"
}
```

{% endcode %}

## Getting transaction status

HTTP Method: <mark style="color:yellow;">POST</mark>

```
https://api.leanx.dev/api/v1/merchant/manual-checking-transaction
```

#### Request Query

```json
?invoice_no=BP-AD5112621A-LNP
```

#### Attributes

<table><thead><tr><th width="281.3333333333333">Property</th><th width="103">Type</th><th>Description</th></tr></thead><tbody><tr><td>invoice_no</td><td>string</td><td>Transaction <strong>invoice number</strong> that you want to get the status</td></tr></tbody></table>

#### Response

```json
{
  "response_code": 2000,
  "description": "SUCCESS",
  "app_version": "/api/v1",
  "talk_to_server_before": "2024-03-29T15:59:17.597177",
  "data": {
    "transaction_details": {
      "invoice_no": "BP-AD5112621A-LNP",
      "fpx_invoice_no": "FPX17116902144iiAlu58",
      "amount": "15.00",
      "invoice_status": "SUCCESS",
      "providerTypeReference": "FPX",
      "bank_provider": "Maybank2U",
      "category_code": "WEBPAY",
      "amount_with_fee": 15.80,
      "fee": 0.80,
      "fee_by_customer": false
    },
    "customer_details": {
      "name": "Ahmad Fuad",
      "phone_number": "0123249478",
      "email": "ahmadfuadzamri@gmail.com"
    }
  },
  "breakdown_errors": "",
  "token": ""
}
```
