GET Status

GET /payments/history

const getPaymentHistory = () => {
  const timestamp = Math.round(Date.now() / 1000)
  const participantCode = 'ALI123'
  const payload = `${timestamp}GET/payments/history?participant=${participantCode}&page=1&size=20{}`
  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/history?participant=ALI123&page=1&size=20`, options)
}

Sample response

{
  "message": [
    {
      "transaction_id": "0f68333e-2114-469d-b505-c850d776e061",
      "participant_code": "ALI123",
      "external_account_id": "0f68333e-2114-469d-b505-c850d776e063",
      "amount": "12.01",
      "bank_fee": "12.01",
      "ach_network": "ach",
      "transfer_type": "credit",
      "status_history": [
        {
          "status": "posted",
          "timestamp": "1975-08-19T23:15:30.000Z"
        }
      ],
      "trade_id": "0f34533e-2114-469d-b505-c850d776e061",
      "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": 20,
  "count": 10
}

Platforms can use this endpoint to get extended details about payment transactions which includes the full status change history.

Query parameters include:

  • participant (optional) takes a participant_code that the Platform has a relationship with.

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

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

  • transfer_type (optional) accepts the following values: credit or debit

Response:

ParameterDescriptionType

transaction_id

The unique identifier generated by NDAX for the transaction.

string

trade_id

Is returned if the payment is associated with a trade otherwise will be Null.

string

participant_code

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

string

external_account_id

The external account that is associated with the payment.

string

amount

The final amount of the ACH transaction.

string

bank_fee

The fee amount that the Platform is wanting to charge the participant for the payment.

string

ach_network

The network that the payment is being transmitted.

string

status_history

The list of status objects, showing the history of status changes.

  • Status - the current status of the payment transaction. More details on payment transaction statuses available in documentation here.

  • Timestamp - the timestamp that the status change occurred.

array

transfer_type

Indicates if the payment is a credit or a debit.

string

bank_transfer_id

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

string

created_at

The timestamp when the payment was created.

timestamp

updated_at

The timestamp when the payment status was last changed.

timestamp

Payments Transaction Status

StatusDescription

submitted

Payment transaction request has been successfully received by NDAX.

pending

The payment has been created and is awaiting confirmation by the appropriate payment network that it has settled. Depending on the payment network the transaction can sit in a pending status for different periods of time.

posted

The payment has been successfully sent to the receiving bank account.

failed

The sending of the payment failed. This status would only occur after the transaction goes to a pending status.

reversed

The payment was returned which can happen for different reasons such as inaccurate receiving bank details or the transaction was deemed unauthorized. This would only follow a transaction that has gone to a posted status.

Last updated