Testing your Integration
...
Testing Overview
Testing your Direct (API) Inte...

Testing GET Transactions

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}


Scenarios

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:

  • payments | preAuths | checkCard | saveCard test scenario.

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:

  • collections | voids test scenario.


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

Header Parameters:

Depending on how you integrate with Judopay, you can authenticate requests by:

  • /paymentsession, or
  • TokenSecretAuth
    • The token and secret pair

For more information, see Authentication Methods.




Body Parameters:

Configuration Property Descriptions

Parameter

Description

pageSize Integer

The number of records to display per page.

Default value: 10

offset Integer

The (zero-based) index in the sorted list of records from which the results set will start.

Default value: 0

sort String

Determines how the list is sorted. Values :

  • time-descending
  • time-ascending

Default value: time-descending

from String

Earliest date used to find transactions. Format:

  • DD/MM/YYYY

to String

Latest date used to find transactions. Format:

  • DD/MM/ YYYY

yourConsumerReference String

If specified, the list of transactions will match this yourConsumerReference.

yourPaymentReference String

If specified, the list of transactions will match this yourPaymentReference.

receiptId String Required

Judopay’s reference, that identifies the transaction.

Get the receiptId from the response of the initial request.

GET ReceiptID
Response Example (ReceiptID)
GET All Transactions
Response Example (All Transactions)



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.



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