Testing your Integration
...
Testing Overview
Testing your Direct (API) Inte...
Testing CheckCard
testing checkcard 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 checkcard scenarios (positive flow) checkcard conducts a zero amount pre authorisation on the consumer's account important to consider zero auth means it does not hold any funds on the customer’s account checkcard tests involve verification of the card cardnumber cardexpirydate cv2 the account is not blocked or blacklisted exists tokenises the card number into an encrypted string a successful checkcard request verifies the card with the issuer and can be authenticated using 3d secure 2, providing you with the confidence the card is valid to make future payments suggested test scenario expected outcome tip process a card payment this will check the card is valid 200 successful the checkcard response provides the cardtoken yourconsumerreference ensure you use the correct cardtoken and yourconsumerreference to make future payments, otherwise they may fail process a card preauth this will check the card is valid 200 successful the checkcard response provides the cardtoken yourconsumerreference ensure you use the correct cardtoken and yourconsumerreference to make future payments, otherwise they may fail process a checkcard request using the different card schemes you will be implementing on your app 200 successful ensure you have the correct card schemes enabled on your app process a checkcard request with the billing address information (cardaddress block) included in the request this will validate the billing address is registered to that card 200 successful ensure the cardaddress block has the correct fields address1 address2 town postcode required countrycode see country codes docid\ xze369mfk5uvosanzm8uo for the list of valid iso 3166 1 format country codes example cardaddress block "cardaddress" { "address1" "cardholder house", "address2" "1 cardholder street", "town" "cardholder town", "postcode" "ab1 2cd", "countrycode" 826, "state" "fl", }, to validate the card is registered to the correct post code, ensure the following permission on your sandbox api credentials is enabled enforce avs checks the default setting = disabled for more information on api credentials and permissions, see introduction docid\ s 8hoamytkgy13t0p657 test card data to simulate a successful checkcard request use the test cards docid obafnuc1umhk vihhs5d check card request parameters sandbox endpoint https //api sandbox judopay com/transactions/checkcard http method post 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 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 authorization method paymentsessionauthtoken for payment session authentication in the api token header supply the token used to authenticate the call to generate a payment session the payment session header value must also be supplied authorization method paymentsessionauthreference for payment session authentication in the payment session header supply the reference returned in the create payment session response the api token header value must also be supplied body parameters configuration property descriptions parameter description judoid string required required unique id supplied by judopay specific to a merchant and/or location format 100100100 maximum length 9 characters do not include spaces or dashes amount decimal required required the amount to process format two decimal places for currencies using a different structure please contact judopay for support currency string required required the currency of the transaction any iso 4217 alphabetic currency code gbp usd eur phonecountrycode string optional optional the country code of the consumer's phone format maximum length 3 characters only numbers allowed do not include special characters or spaces challengerequestindicator string optional optional indicates the type of challenge request you wish to apply values nopreference nochallenge no challenge required challengepreferred a challenge is preferred for this transaction challengeasmandate must challenge this transaction scaexemption string optional optional to apply for an exemption from sca, for a customer initiated transaction values securecorporate request exemption for payments made using a corporate card trustedbeneficiary provides the cardholder the option to add the merchant to their trusted list transactionriskanalysis allows for certain remote transactions to be exempt from sca including low value transactions, provided a robust risk analysis is performed yourconsumerreference string required required unique reference to anonymously identify your customer advisable to use guids must be below 40 characters yourpaymentreference string required required your unique reference for this payment format maximum length 50 characters this value should be unique in order to protect your customers against duplicate transactions with a server side integration, if a payment reference is not supplied, the transaction will not be processed billingaddress object optional optional card holder's billing address if the billingaddress is provided, the postcode is required emailaddress string optional optional consumer’s valid email address it is recommended but not required for 3d secure 2 authentication mobilenumber string optional optional consumer’s valid mobile number format maximum length 15 characters only numbers allowed do not include special characters or spaces primaryaccountdetails object optional optional this is mandatory for merchants who have an mcc code of 6012 primary account holder details name this is the surname accountnumber dateofbirth format yyyy mm dd postcode initialrecurringpayment boolean optional optional indicates if this initial payment is part of a recurring payment check card request example { "cardnumber" 4111111111111111, "cv2" 123, "expirydate" "01/25", "cardaddress" { "address1" "cardholder house", "address2" "1 cardholder street", "town" "cardholder town", "postcode" "ab1 2cd", "countrycode" 826 }, "judoid" 100100100, "yourconsumerreference" "2b45fd3f cee5 4e7e 874f 28051db65408", "yourpaymentreference" "6482c678 cad3 4efd b081 aeae7a89a134", "cardholdername" "john doe", "mobilenumber" 7999999999, "phonecountrycode" 44, "emailaddress" "test user\@judopay com", "shippingaddress" { "isbillingaddress" true }, "threedsecure" { "authenticationsource" "browser", "methodnotificationurl" "https //api sandbox judopay com/order/3ds/methodnotification", "challengenotificationurl" "https //api sandbox judopay com/order/3ds/challengenotification", "methodcompletion" false } } response example { "receiptid" "915607863668412416", "yourpaymentreference" "cd6fcd20 9c0a 436c 9ec8 2caee5324e6a", "type" "checkcard", "createdat" "2022 12 01t14 18 46 5375+00 00", "result" "success", "message" "authcode 0", "judoid" 100502814, "merchantname" "shodan cybersource routing", "appearsonstatementas" "apl /shodancybersourcero", "originalamount" "0 00", "netamount" "0 00", "amount" "0 00", "currency" "gbp", "externalbankresponsecode" "0", "authcode" "0", "paymentnetworktransactionid" "123456789012345", "carddetails" { "cardlastfour" "1111", "enddate" "1222", "cardtoken" "oalxtkjeig9mjttenupfngnzog62ryt9", "cardtype" 1, "cardscheme" "visa", "cardfunding" "credit", "cardcategory" "", "cardcountry" "us", "bank" "jpmorgan chase bank, n a " }, "billingaddress" { "postcode" "tr14 8pa" }, "consumer" { "yourconsumerreference" "cv2 test" }, "device" { "identifier" "bd9b254a156847e9a73f54929c465701" }, "threedsecure" { "attempted" false }, "risks" { "postcodecheck" "unknown", "cv2check" "passed", "merchantsuggestion" "allow" } } checkcard 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 perform a checkcard using an invalid card expiry date 161 sorry, but the card expiry date must be in the future attempt to perform a checkcard using an invalid card number 196 unable to process transaction as the card number is invalid please try again with a different card simulate a decline using the following test card details attempt to perform a checkcard decline using the following cardnumber 4221690000004963 cv2 452 expirydate 12/24 declined card declined 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