# GET

#### `GET /payments/status` <a href="#get-payments-status" id="get-payments-status"></a>

```
const getPaymentStatus = () => {
  const timestamp = Math.round(Date.now() / 1000)
  const payload = `${timestamp}GET/payments/status{}`
  const decodedSecret = Buffer.from(apiSecret, 'base64')
  const hmac = crypto.createHmac('sha256', decodedSecret)
  const signedPayload = hmac.update(payload).digest('base64')

  // SET HEADERS
  const headers = {
    'X-NDAX-API-KEY': 'public_key',
    'X-NDAX-SIGNED': signedPayload,
    'X-NDAX-TIMESTAMP': timestamp,
    'X-NDAX-PASSPHRASE': 'passphrase'
  }
  const options = {
    headers,
    json: true
  }

  return request.get(`https://api.ndax.in/payments/status`, options)
}
```

> Sample response

```
{
  "message": [
    {
      "transaction_id": "0f68333e-2114-469d-b505-c850d776e061",
      "participant_code": "ALI123",
      "amount": "12.01",
      "status": "posted",
      "transfer_type": "credit",
      "bank_transfer_id": "0f68333e-2114-469d-b505-c850d776e061",
      "created_at": "1975-08-19T23:15:30.000Z",
      "updated_at": "1975-08-19T23:15:30.000Z"
    }
  ],
  "page": 1,
  "total_pages": 1,
  "page_size": 200,
  "count": 10
}
```

This is an endpoint that a Platform can use to get the current status of payment transactions.

Query parameters include:

* `start_date` (optional) as a unix timestamp.
* `end_date` (optional) as a unix timestamp.
* `participant` (optional) takes a participant\_code that the Platform has a relationship with.
* `transaction_id` (optional) query for a specific transaction\_id.
* `trade_id` (optional) query for payment associated with a specific trade\_id.
* `status` (optional) query for specific transaction status. Acceptable transaction statuses are - `submitted`, `pending`, `posted`, `failed`, and `reversed`.&#x20;
* `page` (optional) - for paginating through the list of accounts.
* `size` (optional) - for paginating through the list of accounts.

Response:

<table><thead><tr><th width="191.33333333333331">Parameter</th><th width="436">Description</th><th>Type</th></tr></thead><tbody><tr><td>transaction_id</td><td>The unique identifier generated by NDAX for the transaction.</td><td>string</td></tr><tr><td>trade_id</td><td>If the payment is associated with a trade a trade_id will be present here otherwise it will be Null.</td><td>string</td></tr><tr><td>participant_code</td><td>The Platform’s participant that the payment is associated with.</td><td>string</td></tr><tr><td>amount</td><td>The final amount of the ACH transaction.</td><td>string</td></tr><tr><td>status</td><td>The current status of the payment transaction. Click here for more details on payment transaction statuses.</td><td>string</td></tr><tr><td>transfer_type</td><td>Indicates if the payment is a credit or a debit.</td><td>string</td></tr><tr><td>bank_transfer_id</td><td>A unique identifier that can be used to trace the transaction.</td><td>string</td></tr><tr><td>created_at</td><td>Timestamp when the payment was created.</td><td>timestamp</td></tr><tr><td>updated_at</td><td>Timestamp when the payment status was last changed.</td><td>timestamp</td></tr></tbody></table>
