GET /transactions?{query-parameters}

The status query parameter is now supported when searching for transactions. This is particularly useful for finding ACH transaction rejects in an account.

For more information on processing ACH transactions and handling rejects, see our ACH Check Transactions tutorial.

Search for previously processed transactions based on supplied parameters

Search parameters

name format description
status
  • CAPTURE
  • DECLINED
  • HOLD
  • REJECT
  • VOID
List transactions by posture status. Useful for finding ACH reject transactions.
settlementId Valid Integer List transactions by settlementId. To list all unsettled transactions, set settlementId to 0.
terminalId Valid Integer List transactions by terminalId. Note: Not to be confused with smartTerminalId.
scheduleId Valid Integer List transactions by scheduleId from a recurring schedule.
invoiceNumber Max Length 64 Search for transactions by a specific invoiceNumber.
amountTotal Valid transaction amount Search for transactions by a specific transaction amount.
startDate ISO 8601 formatted datetime string with time zone included, either 'Z' or time offset. Examples:
2021-04-01T13:05:06Z
2021-04-01T13:05:06-05:00
Search for transactions starting from a certain date and time. Can be used independantly or in conjunction with endDate.
endDate ISO 8601 formatted datetime string with time zone included, either 'Z' or time offset. Examples:
2021-04-01T13:05:06Z
2021-04-01T13:05:06-05:00
Search for transactions up to a certain date and time. Can be used independantly or in conjunction with startDate.

Paging Parameters

name format description
limit Max 50 Limits the number of results per page.
See Pagination.
offset Max 2^31

The index at which to start returning results.
See Pagination.

Example Request

curl https://api.payjunction.com/transactions?settlementId=0&terminalId=9&limit=1&startDate=2021-02-12T21:45:01Z&endDate=2021-02-12T21:47:00Z \
  -u "login:password" \
  -H "Accept: application/json" \
  -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY"

Response

Successful Search Response

{
  "next" : "https://api.payjunction.com/transactions?settlementId=0&terminalId=9&amountTotal=5.00&offset=1&limit=1",
  "results" : [ {
    "transactionId" : 171927,
    "uri" : "https://api.payjunction.com/transactions/171927",
    "terminalId" : 51,
    "action" : "CHARGE",
    "amountBase" : "5.00",
    "amountTotal" : "5.00",
    "method" : "KEYED",
    "status" : "CAPTURE",
    "created" : "2021-02-12T21:46:01Z",
    "lastModified" : "2021-02-15T23:00:27Z",
    "response" : {
      "approved" : true,
      "code" : "00",
      "message" : "Approved",
      "processor" : {
        "authorized" : true,
        "approvalCode" : "PJ20AP"
      }
    },
    "settlement" : {
      "settled" : false
    },
    "vault" : {
      "type" : "CARD",
      "accountType" : "VISA",
      "lastFour" : "1111"
    },
    "billing" : {
      "email" : "jdoe@example.com"
    }
  } ]
}

Validation Error

The following query parameters will return validation errors if the values are unrecognized or formatted incorrectly:

  • amountTotal
  • startDate
  • endDate
  • status
{
  "errors" : [ {
    "message" : "This field is invalid.",
    "parameter" : "status",
    "type" : "invalid"
  } ]
}