Testing your Integration
...
Testing Overview
Testing your Direct (API) Inte...
Testing Collections
testing collections these scenarios do not include 3d secure 2 authentication testing see testing 3d secure 2 authentication docid\ bdcgiyqdm3mle ubxp1yr for 3d secure 2 authentication testing for your app card collections scenarios (positive flow) collect funds previously reserved using the testing card preauths docid\ gwwuvrkwonc5yvk6qhmmi request important to consider ensure you have the correct receiptid for the original pre authorisation this is required for you to process the collection the expiry time of the reserved pre authorised funds differs across acquirers if not collected, the reserved funds are released and the collection request will be declined to request the funds, attempt a /transactions/payments request instead you can collect partial amounts or multiple partial amounts, as long as they do not exceed the amount of the original pre authorisation ensure the currency in the collection request matches the currency from the original pre authorisation to simulate collecting a testing card preauths docid\ gwwuvrkwonc5yvk6qhmmi suggested test scenario expected outcome tip process a collection on the full preauth amount 200 successful ensure you have the correct receiptid for the original pre authorisation process a partial collection on the preauth amount 200 successful ensure you have the correct receiptid for the original pre authorisation process multiple partial collections on the preauth amount 200 successful ensure you have the correct receiptid for the original pre authorisation ensure the total multiple partial collections, do not exceed the amount of the original pre authorisation request parameters sandbox endpoint https //api sandbox judopay com/transactions/collections http method post 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 authorization method tokensecretauth in the authorization header supply basic { authstring } example basic txpfdpdrszwmsgk4djhxetpjbts4yjq5otdkzmo7ctk1yte0oweymdg1mmy3ywyyzweyztcwymqyzgy3o replace { authstring } with base64 encoding of api token api token (username) colon colon api secret (password) example mzpdkqk1mgi8v3ky mzpdkqk1mgi8v3ky y158n4732dfc7595a149a20381f7af2ea2e70gr6df794b8rnwc019cc5f799kk3 body parameters configuration property descriptions parameter description receiptid string required required judopay's reference for the pre authorisation that is to be collected amount decimal required required the amount to collect must not exceed the amount of the original pre authorisation format two decimal places for currencies using a different structure please contact judopay for support currency string required required if specified, the currency must match the original pre authorisation if not specified, the currency of the original pre authorisation will be used any iso 4217 alphabetic currency code gbp usd eur yourpaymentreference string required required your unique reference for this collection format maximum length 50 characters this is not the yourpaymentreference of the original pre authorisation yourpaymentmetadata string optional optional key value map for additional metadata associated with this transaction will be stored but not processed or passed to gateways do not include sensitive information like card numbers collection request example { "receiptid" "675014982672486400", "amount" 10 99, "currency" "gbp", "yourpaymentmetadata" { "internallocationref" "example", "internalid" 99 }, "yourpaymentreference" "aa648425 2230 4e4e 8a61 27f06df54542", } response example { "receiptid" "937657990037798912", "originalreceiptid" "937657941614559232", "yourpaymentreference" "aa648425 2230 4e4e 8a61 27f06df54542", "type" "collection", "createdat" "2023 01 31t10 38 05 6451+00 00", "result" "success", "message" "authcode ", "judoid" 100042597, "merchantname" "shodan ai routing", "appearsonstatementas" "apl /shodanairouting ", "originalamount" "10 99", "netamount" "10 99", "amount" "10 99", "currency" "gbp", "acquirertransactionid" "64012420784005660136", "externalbankresponsecode" "", "authcode" "574623", "carddetails" { "cardlastfour" "3436", "enddate" "1225", "cardtoken" "sof km2rtbuvrp2nwvrbwsvjoq", "cardtype" 11, "cardscheme" "visa", "cardfunding" "debit", "cardcategory" "", "cardcountry" "fr", "bank" "credit industreil et commercial" }, "consumer" { "yourconsumerreference" "collection test" }, "threedsecure" { "attempted" false } } card collections scenarios (negative flow) declines can occur for various reasons, it can be impossible to simulate all the negative flows in a sandbox environment important to consider how your app handles negative flows your customer's experience should a negative flow occur logic to communicate error messages customise how your app responds how to maintain application consistency follow our suggested guidelines to simulate negative scenarios, to test your app’s error handling suggested negative test scenario expected error code error description attempt to collect a preauth that has already been collected 65 sorry, but the collection request you've specified is not valid please check your details and try again attempt to collect an amount that is greater than the preauth amount 46 sorry, but the amount you're trying to collect is greater than the pre auth attempt to collect an expired preauth 42 sorry, it looks like the preauth you are referencing has expired attempt to collect using the receiptid for a payment instead of a preauth 43 sorry, it looks like you're trying to make a collection on an invalid transaction type collections can only be performed on preauths attempt to collect a preauth that has already been voided 45 sorry, this transaction has been voided you cannot perform a collection on a voided transaction 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