Testing your Integration
...
Testing your Web Payments Inte...
Testing Web Payments - Card Payments
testing web payments card payments with judopay’s web payments solution, the 3d secure 2 flows are handled on your behalf for example, you will not see the conditional device details check step, as this occurs in the background it is useful to have an understanding of the full 3ds 2 payment flow, including the conditional steps, to verify how it relates to the user journey in your app for more information, see how 3d secure works docid\ k7fnzbol73ssctbct4nxm when processing live transactions, in order to minimise declines we recommend setting the challengerequestindicator to challangeasmandate for more information on the different authentication flows, see exemptions to sca docid\ saseq4ppwbnsjt if 0kx for checkcard requests, a challenge flow will always be forced, regardless of the challengerequestindicator flag setting the web payments card payment journey consists of the following steps select payment method enter billing information (optional) enter card details review and confirm (optional) you can customise whether to display the billing information and the review & confirm screens to the consumer during their payment journey card payment scenarios (positive flow) important to consider ensure the create web payment and retrieve web payment permissions are enabled on your api credentials ensure judopay has enabled 3d secure 2 on your sandbox tokens if 3d secure 2 is not enabled on your tokens, the test transaction will be successful, however it will not have followed the 3d secure 2 verification process contact customer support mailto\ help\@judopay com to set this up ensure judopay has enabled the enforce avs checks on your sandbox tokens this will validate the billing address is registered to that card ensure you have set up the successurl and cancelurl landing pages in the judopay portal you can also contact customer support mailto\ help\@judopay com to set this up if these are not set up a default landing page will be presented to the consumer the merchant will not have visibility of the transaction details and will need to create a get transaction query, or webhooks docid\ mqjiizxmcro1cpvauawud in order to be notified of the event you can determine which screens are displayed to the consumer during the payment flow set the hidebillinginfo and hidereviewinfo flags accordingly suggested test scenario process a web payments card payment / preauth / checkcard request with the billing information screen displayed to the consumer tip tip set the hidebillinginfo flag when creating the payment session create a web payment session where hidebillinginfo = false default setting = true the consumer is directed to the billing information screen during the payment flow expected outcome suggested test scenario process a web payments card payment / preauth / checkcard request with the review & confirm screen displayed to the consumer tip tip set the hidereviewinfo flag when creating the payment session the review & confirm screen will be hidden create a web payment session where hidereviewinfo = false default setting = true the consumer is directed to the review & confirm screen during the payment flow expected outcome suggested test scenario process a web payments card payment / preauth / checkcard request with the billing information screen hidden to the consumer tip tip set the hidebillinginfo flag when creating the payment session create a web payment session where hidebillinginfo = true default setting = true the consumer is directed to the pay with card screen, as the billing information screen is hidden during the payment flow expected outcome suggested test scenario process a successful web payments card payment and re direct to your successurl landing page tip tip ensure you have set up the successurl landing page in the judopay portal if this is not set up a default landing page will be presented to the consumer when re directing the post call to the successurl, the payload will also contain the receiptid cardtoken reference yourconsumerreference yourpaymentreference store the cardtoken for future transactions use the receiptid to get information on the transaction expected outcome suggested test scenario process a successful web payments card preauth and re direct to your successurl landing page tip tip ensure you have set up the successurl landing page in the judopay portal if this is not set up a default landing page will be presented to the consumer the send and download receipt buttons will be hidden as it is a preauth request expected outcome suggested test scenario process a successful web payments checkcard validation request and re direct to your successurl landing page tip tip ensure you have set up the successurl landing page in the judopay portal if this is not set up a default landing page will be presented to the consumer the checkcard request is similar to the payments and preauths request, just remove the amount field expected outcome suggested test scenario set an expiry date for the payment session tip tip the paymentsession will expire in 30 minutes , unless an expirydate is set in the /paymentsession request body update the expirydate field in the request body to set an expiry date in the future default = 30 minutes you can then store the session to use at a later date expected outcome "expirydate" "2023 11 05t16 28 32 8596+00 00", suggested test scenario cancel an open payment session tip tip update the status of an open payment session to cancelled, preventing it from being used in the future use the endpoint put /paymentsession/{reference}/cancel the reference returned in response to the creation of the payment session expected outcome }, "status" "cancelled", "transactiontype" "payment", }, suggested test scenario check the status of a payment session tip tip use the endpoint get /webpayments/{reference} the reference returned in response to the creation of the payment session possible status values open success expired cancelled you can determine the number of open attempts that are remaining for that payment session from the response the paymentsession can be used for up to three transaction attempts for the same transaction a payment session can be used again to re submit a failed transaction attempt once a transaction attempt is successful, the paymentsession can no longer be used even if there are any remaining attempts available the paymentsession will expire in 30 minutes , unless an expirydate is set in the /paymentsession request body expected outcome example 1 status open "status" "open", "transactiontype" "payment", "yourconsumerreference" "ab60f4e1 42a4 42e9 b2c5 6f1eb295f979", "yourpaymentmetadata" { "examplefield1" "value1", "examplefield2" "value2" }, "yourpaymentreference" "66c7c4ee 0888 48b3 9ac3 b6a63113f9cb", "webpaymentoperation" 0, "isjudoaccept" false, "isthreedsecuretwo" true, "noofauthattempts" 0, "mobilenumber" "7777777777", "phonecountrycode" "44", "emailaddress" "contact\@judopay com", "shortreference" "qoeewo" example 2 status expired "status" "expired", "transactiontype" "payment", "yourconsumerreference" "b4f34320 f3d5 4464 82df 335195f8d59d", "yourpaymentmetadata" { "examplefield1" "value1", "examplefield2" "value2" }, "yourpaymentreference" "4a04b9a2 fdbf 4ab2 b42d 5ff3a9016e1a", "webpaymentoperation" 0, "isjudoaccept" false, "isthreedsecuretwo" true, "noofauthattempts" 0, "mobilenumber" "7777777777", "phonecountrycode" "44", "emailaddress" "contact\@judopay com", "shortreference" "l8xek6" example 3 status success when you see status = success, the receiptid will also be in the response use the receiptid to get information on the transaction "status" "success", "transactiontype" "payment", "yourconsumerreference" "f5553f35 8826 49ff 894d 4522b52c9784", "yourpaymentmetadata" { "examplefield1" "value1", "examplefield2" "value2" }, "yourpaymentreference" "30ba117e 415d 4445 9114 8dc4d23846c7", "webpaymentoperation" 0, "isjudoaccept" false, "isthreedsecuretwo" true, "noofauthattempts" 1, "receipt" { "receiptid" "966323098188161024", }, example 4 status cancelled { "reference" "5qcaaaqaaaapaaaacaaaabtggvhbrf9bhtn7nqn1e0j4hvvmi y27dgpjwbmtls3gj xdg", "status" "cancelled" } for more information on api credentials and permissions, see introduction docid\ s 8hoamytkgy13t0p657 card data to simulate a successful web payments request, use the test cards docid obafnuc1umhk vihhs5d request parameters sandbox endpoint https //api sandbox judopay com/webpayments/preauths for the full schema details and descriptions, see transaction api /webpayments/preauths sandbox endpoint https //api sandbox judopay com/webpayments/checkcard for the full schema details and descriptions, see transaction api /webpayments/checkcard sandbox endpoint https //api sandbox judopay com/webpayments/payments for the full schema details and descriptions, see transaction api/webpayments/payments 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 false false 265,403false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type body parameters web payments configuration property descriptions true false 226false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type web payments request example { "judoid" "yourjudoid", "yourconsumerreference" "yourconsumerreference", "yourpaymentreference" "yourpaymentreference", "yourpaymentmetadata" { "internallocationref" "example", "internalid" 99, "hidebackbutton" true }, "currency" "gbp", "amount" 12 99, "cardaddress" { "address1" "cardholder house", "address2" "1 cardholder street", "town" "cardholder town", "postcode" "ab1 2cd", "countrycode" 826, "state" "fl", "cardholdername" "john doe" }, "expirydate" "2021 02 05t16 28 32 8596+00 00", "ispaybylink" false, "isjudoaccept" false, "successurl" "https //my site com/success", "cancelurl" "https //my site com/cancel", "emailaddress" "test user\@judopay com", "mobilenumber" "7999999999", "phonecountrycode" "44", "threedsecure" { "challengerequestindicator" "challengeasmandate" }, "hidebillinginfo" true, "hidereviewinfo" true, "primaryaccountdetails" { "name" "doe", "accountnumber" "12345678", "dateofbirth" "1980 01 31", "postcode" "ab1 2cd" } } response example //store the reference returned in your backend server { "paybylinkurl" "https //pay sandbox judopay com/abc123", "posturl" "https //pay sandbox judopay com/v2", "reference" "5qcaaaqaaaapaaaacaaaabtggvhbrf9bhtn7nqn1e0j4hvvmi y27dgpjwbmtls3gj xdg" } card payment 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 process an unsuccessful web payments card payment / preauth and re direct to your cancelurl landing page use the following cardnumber 4221690000004963 cv2 452 expirydate 12/24 expected error code and description ensure you have set up the cancelurl landing page in the judopay portal if this is not set up a default landing page will be presented to the consumer the cardtoken value = null suggested negative test scenario process an unsuccessful web payments card checkcard validation request and re direct to your cancelurl landing page use the following cardnumber 4221690000004963 cv2 452 expirydate 12/24 expected error code and description ensure you have set up the cancelurl landing page in the judopay portal if this is not set up a default landing page will be presented to the consumer suggested negative test scenario attempt to perform a web payments card payment preauth request using an expired payment session expected error code and description 667003 webpayment reference is invalid suggested negative test scenario attempt to perform a web payments card payment preauth checkcard request using an invalid card number expected error code and description 196 unable to process transaction as the card number is invalid please try again with a different card suggested negative test scenario attempt to perform a web payments card payment preauth checkcard request using an invalid billing address 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 default setting = disabled expected error code and description 158 sorry, but your card authentication has failed suggested negative test scenario attempt to perform a web payments card payment preauth checkcard request using an expiry date that is in the past expected error code and description 155 sorry, but the web payment expiry date must be in the future suggested negative test scenario attempt to perform a checkcard request decline using the following cardnumber 4221690000004963 cv2 452 expirydate 12/24 expected error code and description 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