Testing GET Transactions

GET Transactions Scenarios (Positive Flow)

Important to Consider

  • Ensure the List All Transactions permission is enabled on your API credentials.

  • There are no limits on date ranges.

    • Queries for long date ranges may time out. We recommend you use short date ranges.

  • The page size is currently limited to 500 or less.

  • Retrieve details using a specific yourConsumerReference.

  • Retrieve details using a specific yourPaymentReference.

  • Retrieve details of a single transaction using the receiptId.

    • Use the sandbox endpoint .../transactions/{receiptId}

  • You can query the following transaction types:

    • payments

    • preAuths

    • refunds

    • collections

    Use the sandbox endpoint .../transactions/{transactionType}

 

Return a list of transactions within a given time frame, a specific consumer, or a specific payment:

Suggested Test Scenario

Expected Outcome Tip

Get a list of transactions, sorted in time-ascending order.

200

Successful

Sort field.

Values:

  • time-descending

  • time-ascending

Default value: time-descending

Get a list of transactions, sorted in time-descending order.

200

Successful

Sort field.

Values:

  • time-descending

  • time-ascending

Default value: time-descending

Get a list of 20 transactions

200

Successful

pageSize field.

Values:

  • minimum: 1

  • maximum: 500

Default value: 10

Enter pageSize = 20

Get a list of transactions with a specific yourConsumerReference.

200

Successful

Unique reference to anonymously identify your customer.

Format:

  • Must be below 40 characters.

 

Enter a specific yourConsumerReference in the yourConsumerReference field.

Get a list of transactions with a specific yourPaymentReference.

200

Successful

Your unique reference for this payment.

Format:

  • Maximum length 50 characters.

 

Enter a specific yourPaymentReference in the yourPaymentReference field.

Specify a date range and yourConsumerReference where there are no transactions based on that criteria.

You will receive a successful response (displaying zero transactions).

 

Ensure the null return is properly displayed for the consumer, and handle how your app responds to this specific scenario.

200

Successful

{
    "resultCount": 0,
    "pageSize": 10,
    "offset": 0,
    "results": [],
    "sort": "time-descending"
}

 

Retrieve details of a single transaction using the receiptId:

Suggested Test Scenario

Expected Outcome Tip

Get the details of a transaction using the receiptId from a test:

  • payment

  • preAuth

  • checkCard

  • saveCard

200

Successful

Get the receiptId from the response of the initial:

Get the details of a transaction using the receiptId from a test:

  • collection

  • void

200

Successful

Get the receiptId from the response of the initial:

Return a list of transactions of a transactionType associated with the given query:

Suggested Test Scenario

Expected Outcome Tip
Get a list of transactions with transactionType = preauths,

200

Successful

Use the sandbox endpoint:

https://api-sandbox.judopay.com/transactions/preauths

Get a list of transactions with transactionType = refunds,

200

Successful

Use the sandbox endpoint:

https://api-sandbox.judopay.com/transactions/refunds

 

Request Parameters

Sandbox endpoint: https://api-sandbox.judopay.com/transactions

Sandbox endpoint: https://api-sandbox.judopay.com/transactions/{receiptId}

Sandbox endpoint: https://api-sandbox.judopay.com/transactions/{transactionType}

 

HTTP Method: GET

 

Body Parameters:

 

 

Request Example:

Get an Individual Transaction using the ReceiptID:

 

Request Example

Get a List of All Transactions within a specific time period:

 

Response

Response Example

Get an Individual Transaction using the ReceiptID:

 

Response Example

Get a List of All Transactions within a specific time period:

 

GET Transactions Scenarios (Negative Flow)

Field and formatting errors can occur for various reasons, it can be impossible to simulate all the negative scenarios in a sandbox environment.

Suggested Negative Test Scenario

Expected Error Code

Error Description

Attempt to retrieve a list of transactions where the List All Transactions permission is not enabled on your API credentials.

84
{
    "message": "Sorry, it looks like permissions are not enabled to perform this request. 
    Application permissions can be configured in the judo Dashboard.",
    "code": 84,
    "category": 1
}

 

Attempt to return the details of a single transaction using a receiptId that does not exist. 82
{
    "message": "Sorry, the transaction you've specified has not been found. 
      Please check your details and try again.",
    "code": 82,
    "category": 2
}

 

Attempt to return a list of 550 transactions.

20015 Sorry, but the page size is currently limited to 500 or less.

Where the codes remain fixed, the descriptions may change. You should not build any error handling logic based on these descriptions.

For a list of possible error codes, types and descriptions, see Error Codes and Descriptions

 

Related Topics