GET

GET /payments/status

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.

  • page (optional) - for paginating through the list of accounts.

  • size (optional) - for paginating through the list of accounts.

Response:

ParameterDescriptionType

transaction_id

The unique identifier generated by NDAX for the transaction.

string

trade_id

If the payment is associated with a trade a trade_id will be present here otherwise it will be Null.

string

participant_code

The Platform’s participant that the payment is associated with.

string

amount

The final amount of the ACH transaction.

string

status

The current status of the payment transaction. Click here for more details on payment transaction statuses.

string

transfer_type

Indicates if the payment is a credit or a debit.

string

bank_transfer_id

A unique identifier that can be used to trace the transaction.

string

created_at

Timestamp when the payment was created.

timestamp

updated_at

Timestamp when the payment status was last changed.

timestamp

Last updated