> ## Documentation Index
> Fetch the complete documentation index at: https://docs.commercecash.my/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Payment Status

> Retrieves the current status of a payment transaction by its system Transaction ID.

`GET /api/payments/{transactionId}/status`

Returns the current status and full details of a payment transaction using the system-generated `transactionId`.

<Tip>
  If you only have your own reference number, use [Get Payment Status by Reference](/api-reference/payments/get-status-by-reference) instead.
</Tip>

***

## Path Parameters

<ParamField path="transactionId" type="string" required>
  The unique transaction ID returned by the [Initiate Payment](/api-reference/payments/initiate) response.

  **Example:** `TXN-20240616143022-A7F9E2`
</ParamField>

***

## Response

### 200 — Success

<ResponseField name="data" type="object">
  <Expandable title="PaymentStatusResponse">
    <ResponseField name="transactionId" type="string">
      System-generated unique transaction ID.
    </ResponseField>

    <ResponseField name="referenceNo" type="string">
      Merchant reference number.
    </ResponseField>

    <ResponseField name="status" type="string">
      Current payment status.

      **Common values:** `PENDING`, `INITIATED`, `CONFIRMED`, `SUCCESSFUL`, `FAILED`
    </ResponseField>

    <ResponseField name="amount" type="number (decimal)">
      Payment amount as a decimal value (e.g., `150.00`).
    </ResponseField>

    <ResponseField name="productCode" type="string">
      Product code associated with the transaction.
    </ResponseField>

    <ResponseField name="createdAt" type="string (ISO 8601)">
      UTC timestamp of transaction creation.
    </ResponseField>

    <ResponseField name="lastModifiedAt" type="string (ISO 8601) | null">
      UTC timestamp of the most recent status update.
    </ResponseField>

    <ResponseField name="providerReference" type="string | null">
      Transaction reference from the downstream payment provider, if available.
    </ResponseField>

    <ResponseField name="message" type="string | null">
      Additional status detail or error description.
    </ResponseField>

    <ResponseField name="extraProperties" type="string | null">
      Additional status data, serialised as a JSON string.
    </ResponseField>
  </Expandable>
</ResponseField>

### 400 — Bad Request

`transactionId` is missing or empty in the request path.

### 404 — Not Found

No transaction exists for the given `transactionId`.

### 500 — Internal Server Error

***

## Examples

<CodeGroup>
  ```bash Request theme={null}
  GET /api/payments/TXN-20240616143022-A7F9E2/status
  ```

  ```json 200 Response theme={null}
  {
    "isSuccess": true,
    "errorCode": null,
    "message": null,
    "data": {
      "transactionId": "TXN-20240616143022-A7F9E2",
      "referenceNo": "MER-20240616-001",
      "status": "SUCCESSFUL",
      "amount": 150,
      "productCode": "TNB",
      "createdAt": "2024-06-16T14:30:22Z",
      "lastModifiedAt": "2024-06-16T14:35:10Z",
      "providerReference": "TNB-TXN-987654321",
      "message": null,
      "extraProperties": null
    }
  }
  ```

  ```json 400 Response theme={null}
  {
    "isSuccess": false,
    "errorCode": "INVALID_TRANSACTION_ID",
    "message": "Transaction ID is required",
    "data": null
  }
  ```

  ```json 404 Response theme={null}
  {
    "isSuccess": false,
    "errorCode": "TRANSACTION_NOT_FOUND",
    "message": "No transaction was found for the provided Transaction ID.",
    "data": null
  }
  ```

  ```json 500 Response theme={null}
  {
    "isSuccess": false,
    "errorCode": "INTERNAL_ERROR",
    "message": "An unexpected error occurred. Please try again.",
    "data": null
  }
  ```
</CodeGroup>
