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 |
|---|---|---|
| action |
|
Search for transactions by action. |
| amountTotal | Valid transaction amount | Search for transactions by a specific transaction amount. |
| billingFirstName | Max Length 16 | Billing first name. |
| billingIdentifier | Max Length 64 | Billing identifier. |
| billingLastName | Max Length 32 | Billing last name. |
| endDate | ISO 8601 datetime | Search for transactions up to a certain date and time. |
| invoiceNumber | Max Length 32 | Search for transactions by a specific invoiceNumber. |
| lastFour | 4 digits Integer | Last 4 digits of the Card or ACH. |
| metadata[externalId] |
Text, Valid ASCII Max Length 36 |
Limits results to records where metadata[externalId] exactly matches the specified value. |
| metadata[externalData] |
Text, Valid ASCII Max Length 36 |
Limits results to records where metadata[externalData] exactly matches the specified value. |
| purchaseOrderNumber | Max Length 32 | Search for transactions by a specific purchaseOrderNumber. |
| scheduleId | Valid Integer | List transactions by scheduleId from a recurring schedule. |
| service |
|
Search for transactions by service. |
| settlementId | Valid Integer | List transactions by settlementId. |
| startDate | ISO 8601 datetime | Search for transactions starting from a certain date and time. |
| status |
|
List transactions by posture status. |
| terminalId | Valid Integer | List transactions by terminalId. |
| transactionId | Valid Integer | Exact match for a single transaction. |
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. |
Note:
This query has a maximum limit of 10,000 results. If your query exceeds this limit, we recommend refining your search parameters by:
- Narrowing the time range using startDate and endDate
- Filtering by settlementId to retrieve transactions in smaller batches
This approach ensures you retrieve all necessary transactions while staying within query limits.
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&metadata%5BexternalId%5D=e1ad3185-6f93-458c-9df7-3d88edb4953e&metadata%5BexternalData%5D=RECONCILED" \
-u "YOUR_USER:YOUR_PASSWORD" \
-H "Accept: application/json" \
-H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY"Response
API version 2023-05-16 or above required to receive the surcharge object and fields in transaction response details. See how to use API versions here.
Click here for more information regarding surcharge.
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" : 10000,
"action" : "CHARGE",
"amountBase" : "1.11",
"amountTax" : "3.00",
"amountShipping" : "1.00",
"amountTip" : "2.00",
"amountSurcharge" : "0.21",
"amountTotal" : "7.32",
"surcharge" : {
"percentage" : 3.00,
"status" : "APPLIED"
},
"method" : "KEYED",
"service": "VIRTUAL_TERMINAL",
"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"
},
"metadata" : {
"externalId" : "e1ad3185-6f93-458c-9df7-3d88edb4953e",
"externalData" : "RECONCILED"
}
} ]
}
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"
} ]
}