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 docid\ ylkw5coh5nqnfq3j wjk2 api version 6 22 for the latest version of the judopay transaction api, see transaction api reference docid\ bcxnm5keok nlnrztafut content type application/json accept application/json 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 required judopay’s reference, that identifies the transaction get the receiptid from the response of the initial request get receiptid https //api sandbox judopay com/transactions/968893796475637760 response example (receiptid) { "receiptid" "968893796475637760", "yourpaymentreference" "payment111", "type" "payment", "createdat" "2023 04 27t16 18 02 3780+01 00", "result" "success", "message" "authcode 033670", "judoid" 100042597, "merchantname" "shodan", "appearsonstatementas" "shodan", "netamount" "5 00", "amount" "5 00", "currency" "gbp", "acquirertransactionid" "75516047204453281723", "externalbankresponsecode" "", "authcode" "033670", "postcodecheckresult" "unknown", "acquirer" "barclays", "carddetails" { "cardlastfour" "3436", "enddate" "1224", "cardtoken" "sof u cnj8d3tsmz70eecez 2g", "cardtype" 11, "cardscheme" "visa", "cardfunding" "debit", "cardcategory" "", "cardcountry" "fr", "bank" "credit industriel et commercial", "cardholdername" "emma waters" }, "billingaddress" {}, "consumer" { "yourconsumerreference" "alayna crona\@example net" }, "yourpaymentmetadata" {}, "threedsecure" { "attempted" false }, "risks" { "postcodecheck" "unknown", "cv2check" "passed", "merchantsuggestion" "allow" } } get all transactions https //api sandbox judopay com/transactions?from=01/01/2021\&to=01/01/2023\&pagesize=50 response example (all transactions) { "resultcount" 1060479, "pagesize" 10, "offset" 0, "results" \[ { "receiptid" "965609160727236608", "yourpaymentreference" "5fb14ac3 ddff 49b4 ad20 4ad1ac473b01", "type" "preauth", "createdat" "2023 04 18t14 46 06 0231+01 00", "result" "success", "message" "authcode 5", "judoid" 100502614, "merchantname" "shodan", "appearsonstatementas" "shodan", "amountcollected" "0 00", "netamount" "5 00", "amount" "5 00", "currency" "gbp", "postcodecheckresult" "unknown", "carddetails" { "cardlastfour" "1111", "enddate" "1224", "cardtype" 1, }, "consumer" { "yourconsumerreference" "consumer" }, "yourpaymentmetadata" {} }, { "receiptid" "965577423548743680", "yourpaymentreference" "98b46ad3 4ced 4b4a 93cf 7e81f82a8fc1", "type" "payment", "createdat" "2023 04 18t12 39 57 0387+01 00", "result" "success", "message" "authcode 961022", "judoid" 100042297, "merchantname" "shodan", "appearsonstatementas" "shodan", "netamount" "1 01", "amount" "1 01", "currency" "gbp", "postcodecheckresult" "unknown", "carddetails" { "cardlastfour" "3436", "enddate" "1225", "cardtype" 11, }, "consumer" { "yourconsumerreference" "consumer" }, "yourpaymentmetadata" { "internallocationref" "example", "internalid" 99 } }, { "receiptid" "965576965044207616", "yourpaymentreference" "d48503dc 9619 4413 a39c 4e99478ba96c", "type" "payment", "createdat" "2023 04 18t12 38 07 7234+01 00", "result" "success", "message" "authcode 217509", "judoid" 100042197, "merchantname" "shodan", "appearsonstatementas" "shodan", "netamount" "1 01", "amount" "1 01", "currency" "gbp", "postcodecheckresult" "unknown", "carddetails" { "cardlastfour" "3436", "enddate" "1225", "cardtype" 11, }, "consumer" { "yourconsumerreference" "consumer" }, "yourpaymentmetadata" { "internallocationref" "example", "internalid" 99 } }, } ], "sort" "time descending" } 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 codes and descriptions docid zrsihomuew xnrq4pbtj