> For the complete documentation index, see [llms.txt](https://doc.payatom.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.payatom.in/api-integration/v1/payout-status-check-api-order-id.md).

# Payout Status check API (Order Id)

### <mark style="color:orange;">Get Payout Transaction Status</mark>

This API endpoint allows you to check the status of a specific payout transaction. It authenticates requests using a partner ID (pid) and a securely hashed signature.

**URL**:  <mark style="color:blue;">`{baseurl}/payout/api/order_status_polling.php`</mark>(The exact URL will depend on your server configuration)

**Method**: <mark style="color:green;">`POST`</mark>

**Content-Type:** `application/json`

### <mark style="color:purple;">Request Body</mark>

The request must be a JSON object containing the following parameters:

<table><thead><tr><th width="122.23828125">Parameter</th><th width="114.359375">Type</th><th width="110.640625">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>pid</code></td><td>String</td><td>Yes</td><td>Your unique Partner ID</td></tr><tr><td><code>order_id</code></td><td>String</td><td>Yes</td><td>The unique order ID for the transaction you want to query</td></tr><tr><td><code>post_hash</code></td><td>String</td><td>Yes</td><td>A security hash to authenticate the request. See Hash Generation below.</td></tr></tbody></table>

### <mark style="color:purple;">Example Request Body</mark>

```json
{
    "pid": "YOUR_PID_123",
    "order_id": "ORD-54321-ABC",
    "post_hash": "BASE64_ENCODED_HASH_STRING"
}
```

### <mark style="color:purple;">Hash Generation (Request)</mark>

To create the post\_hash for the request, you must follow these steps:

1. **Concatenate values**: Create a single string by concatenating the order\_id, your pid, and your secret\_key.
2. **Create an MD5 hash**: Calculate the MD5 hash of the concatenated string.
3. **Encrypt the hash**: Encrypt the resulting MD5 hash using the AES-256-CBC algorithm with your secret\_key as the password.
4. **Base64 Encode**: Encode the binary output of the encryption using Base64 to get the final post\_hash string.

### <mark style="color:purple;">Response</mark>

The API will respond with a JSON object. The structure depends on whether the request was successful.

### <mark style="color:green;">Success Response</mark>

If the request is valid and the transaction is found, the API returns a JSON object with the transaction details.

<table><thead><tr><th width="215.95703125">Parameter</th><th width="100.8671875">Type</th><th>Description</th></tr></thead><tbody><tr><td>requested_amount</td><td>string</td><td>The amount originally requested for the payout.</td></tr><tr><td>processed_amount</td><td>string</td><td>The final amount that was processed.</td></tr><tr><td>order_id</td><td>string</td><td>The unique order ID of the transaction.</td></tr><tr><td>status</td><td>string</td><td>The current status of the transaction (e.g., 'SUCCESS', 'PENDING', 'FAILED').</td></tr><tr><td>time</td><td>string</td><td>The time the transaction was last acted upon.</td></tr><tr><td>ref_code</td><td>string</td><td>An internal reference code or hash value.</td></tr><tr><td>post_hash</td><td>string</td><td>A new security hash for verifying the response. See Hash Verification below.</td></tr><tr><td>request_time</td><td>string</td><td>Timestamp of when the payout was initiated (d-m-Y H:i:s).</td></tr><tr><td>action_time</td><td>string</td><td>Timestamp of when the transaction status was last updated (d-m-Y H:i:s).</td></tr><tr><td>payment_type</td><td>string</td><td>The method of payment (e.g., 'UPI', 'IMPS').</td></tr><tr><td>upi_vpa</td><td>string</td><td>The UPI VPA, if applicable.</td></tr><tr><td>account_no</td><td>string</td><td>The beneficiary account number, if applicable.</td></tr><tr><td>account_holder</td><td>string</td><td>The name of the beneficiary account holder, if applicable.</td></tr><tr><td>ifsc</td><td>string</td><td>The IFSC code of the beneficiary bank, if applicable.</td></tr><tr><td>bank_name</td><td>string</td><td>The name of the beneficiary bank.</td></tr><tr><td>bank_address</td><td>string</td><td>The address of the beneficiary bank.</td></tr><tr><td>transaction_info</td><td>Array</td><td>An array of objects, each representing a status change in the transaction's lifecycle.</td></tr><tr><td>bank_reference</td><td>string</td><td>The UTR or bank reference number for the transaction.</td></tr></tbody></table>

### <mark style="color:green;">Example Success Response</mark>

```json
{
    "requested_amount": "100.00",
    "processed_amount": "100.00",
    "order_id": "ORD-54321-ABC",
    "status": "SUCCESS",
    "time": "18:30:05",
    "ref_code": "some_hash_value",
    "post_hash": "NEW_BASE64_ENCODED_HASH_FOR_RESPONSE",
    "request_time": "15-07-2025 18:29:00",
    "action_time": "15-07-2025 18:30:05",
    "payment_type": "UPI",
    "upi_vpa": "receiver@okbank",
    "account_no": null,
    "account_holder": null,
    "ifsc": null,
    "bank_name": null,
    "bank_address": null,
    "transaction_info": [
    {    
        "date": "2025-07-15 18:29:00",
        "status": "PENDING",
        "ref_number": null,
        "message": "Transaction initiated"
    },
    {
        "date": "2025-07-15 18:30:05",
        "status": "SUCCESS",
        "ref_number": "521234567890",
        "message": "Transaction completed successfully"
    }
],
    "bank_reference": "521234567890"
}
```

### <mark style="color:red;">Error Response</mark>

If an error occurs, the API returns a JSON object with a single error key.

<table><thead><tr><th width="237.83203125">Error Message</th><th>Reason</th></tr></thead><tbody><tr><td>no valid data format recieved</td><td>The request body is missing one or more required fields: pid, order_id, post_hash.</td></tr><tr><td>Invalid PID</td><td>The provided pid does not exist or is not active.</td></tr><tr><td>Invalid Hash</td><td>The provided post_hash is incorrect. The server could not authenticate the request.</td></tr><tr><td>order id does not exist</td><td>The order_id could not be found for the given pid.</td></tr></tbody></table>

### Example Error Response

```json
{
    "error": "Invalid Hash"
}
```

### <mark style="color:purple;">Hash Verification (Response)</mark>

To ensure the integrity of the response, you should verify the post\_hash returned in the success response.

1. **Concatenate values**: Create a single string by concatenating the order\_id, amount\_processed, status, and your

   secret\_key from the response data.
2. **Create an MD5 hash**: Calculate the MD5 hash of this new concatenated string.
3. **Base64 Decode**: Decode the post\_hash string received in the response.
4. **Decrypt the hash**: Decrypt the Base64 decoded data using the AES-256-CBC algorithm with your secret\_key.
5. **Compare**: Compare the decrypted hash from the response with your locally generated MD5 hash. If they match, the response is

   authentic.
