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

Testing Voids

testing voids voids cannot be performed on pre authorisations that have been collected (partial or full) card void scenarios (positive flow) important to consider ensure the preauth transactions permission is enabled on your api credentials ensure you have the correct receiptid for the original pre authorisation this is required for you to process the void voids cannot be performed on pre authorisations that have expired, or been collected (partial or full) to simulate voiding a testing card preauths docid\ gwwuvrkwonc5yvk6qhmmi suggested test scenario expected outcome tip process a void on the full preauth amount 200 successful ensure you have the correct receiptid for the original pre authorisation request parameters sandbox endpoint https //api sandbox judopay com/transactions/voids http method post header parameters 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 voided amount decimal required required the amount to void 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 void 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 void request example { "receiptid" "675014982672486400", "amount" 10 99, "currency" "gbp", "yourpaymentmetadata" { "internallocationref" "example", "internalid" 99 }, "yourpaymentreference" "aa648425 2230 4e4e 8a61 27f06df54542", } response example { "receiptid" "914571470754189312", "originalreceiptid" "914571434016280576", "yourpaymentreference" "e61b5555 31fe 41f3 843a 905a28c552f0", "type" "void", "createdat" "2022 11 28t17 40 31 4741+00 00", "result" "success", "message" "void successful", "judoid" 100502814, "merchantname" "shodan cybersource routing", "appearsonstatementas" "apl /shodancybersourcero", "originalamount" "5 00", "amountcollected" "0 00", "netamount" "5 00", "amount" "5 00", "currency" "gbp", "externalbankresponsecode" "", "carddetails" { "cardlastfour" "1111", "enddate" "1222", "cardtoken" "endper5kpglawedhdj3lzkj5zecqpr4s", "cardtype" 1, "cardscheme" "visa", "cardfunding" "credit", "cardcategory" "", "cardcountry" "us", "bank" "jpmorgan chase bank, n a " }, "consumer" { "yourconsumerreference" "cardswithmultipleconsumers2" } } card void 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 void a preauth that has already been voided 51 sorry, but it looks like the transaction you are trying to void has already been voided attempt to void a preauth that has already been collected 52 sorry, but it looks like the transaction you are trying to void has already been collected attempt to void an amount that is different to the preauth amount 53 sorry, but it looks like the void you are trying to process is for a different amount than the original preauth attempt to void an expired preauth 42 sorry, it looks like the preauth you are referencing has expired attempt to void using the receiptid for a payment instead of a preauth 68 sorry, but your void request is not valid please check your details and try again 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