Testing your Integration
...
Testing Overview
Testing your Wallet Payment In...
Testing Digital Wallet Payments - via API
testing digital wallet payments via api testing card payments for your digital wallet payments via direct api integration decline scenarios for wallet payments cannot be tested in the sandbox environment the payment or preauth request can be sent with wallet details from apple pay™ or google pay™ the payment token provided by the apple pay session the payment token generated by the google pay api apple pay™ prerequisites before you can process apple pay™ payments and preauths with judopay, you will need to ios docid 09p1cru0cbxjkzea 0zpi to get your merchant ids contact support to configure your wallet payments credentials google pay™ prerequisites before you can process google pay™ payments and preauths with judopay, you will need to create a google pay payments profile to get your merchant ids contact support to configure your wallet payments credentials wallet payment scenarios (positive flow) the digital wallet payment flow provides consumers with an extra layer of security, encrypting and decrypting the card details sent in the payload by replacing the consumer's card details with a device token, or dynamic security code what is the difference between dpan and fpan? device primary account number ( dpan ) a device token is sent in the payload, instead of the card number sca compliant funding primary account number ( fpan ) the card number is sent in the payload requires 3d secure 2 authentication to become sca compliant judopay's transaction api triggers the 3d secure 2 flow , to validate the transaction important to consider for apple pay™and google pay™(dpan) we recommend generating a unique apple pay™ and google pay™ payload for each test, to mimic the production environment where payloads can only be used once we do not recommend making merchant initiated transactions using card tokens that were generated by apple pay™ or google pay™ dpan you may experience a lower transaction success ratio apple pay™ ( dpan ) mobile and web integrations sca compliant for a successful end to end wallet payment testing journey, it is recommended to perform wallet test scenarios in a production environment use live cards to process test payments and preauths ensure you have set up your apple pay™ certificate see, web sdk docid 40dwe6lbub7vdkza1qydc google pay™ ( dpan ) mobile integration sca compliant for a successful end to end wallet payment testing journey, it is recommended to perform wallet test scenarios in a production environment use live cards to process test payments and preauths the payload is the same when using google pay™ dpan, or fpan when sending the judoid in the payload to your google pay account, the field is displayed as gatewaymerchantid in the tokenization object for example, the value used in gatewaymerchantid is the same value as your judoid " judoid" " 100781350 " "gatewaymerchantid" " 100781350 " apple pay™ and google pay™ (dpan) scenarios suggested test scenario expected outcome process an apple pay™ wallet payment 200 successful process an apple pay™ wallet preauth 200 successful process a google pay™ wallet payment 200 successful process a google pay™ wallet preauth 200 successful important to consider for google pay™ (fpan) web integration requires 3d secure 2 authentication to become sca compliant judopay's transaction api triggers the 3d secure 2 flow , to validate the transaction for more details on the 3d secure 2 flow, see how 3d secure works docid\ k7fnzbol73ssctbct4nxm to add your test card suite to your digital wallet to process test payments and preauths, register your google pay wallet details for the cards in your test card suite are hard coded into the test wallet, therefore some negative scenarios cannot be simulated, due to limitations to google pay™s test environment for example you cannot simulate an incorrect cv2, or insufficient funds you will only receive a success response no charge will be made on the test cards the payload is the same when using google pay™ fpan, or dpan when sending the judoid in the payload to your google pay account, the field is displayed as gatewaymerchantid in the tokenization object " judoid" " 100781350 " "gatewaymerchantid" " 100781350 " we recommend generating a unique google pay™ payload for each test, to mimic the production environment where payloads can only be used once google pay™ (fpan) scenarios judopay's transaction api triggers the 3d secure 2 flow , to validate the transaction when sending the fpan for each 3d secure 2 scenario, different calls are made from the front end to the back end using a specific cardholdername as specified in the testing 3d secure 2 authentication docid\ bdcgiyqdm3mle ubxp1yr , will correspond to an expected transaction result 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 testing 3d secure 2 authentication docid\ bdcgiyqdm3mle ubxp1yr testing 3d secure 2 authentication docid\ bdcgiyqdm3mle ubxp1yr suggested test scenario expected outcome tip process a google pay™ wallet payment, prompting the frictionless flow var googlepayconfiguration = { transactionmode 'payment', scaexemption null, challengerequestindicator 'nochallenge' } as the cardholdername is hard coded in your test card suite, you will not be able to use this field to determine the 3d secure 2 flow you will need to set the challengerequestindicator , to determine the frictionless flow type of challenge request no preference no challenge process a google pay™ wallet payment, prompting the non frictionless flow var googlepayconfiguration = { transactionmode 'payment', scaexemption null, challengerequestindicator 'challengeasmandate' } as the cardholdername is hard coded in your test card suite, you will not be able to use this field to determine the 3d secure 2 flow you will need to set the challengerequestindicator , to determine the non frictionless flow type of challenge request challenge preferred challenge as mandate process a google pay™ wallet preauth, prompting the frictionless flow var googlepayconfiguration = { transactionmode 'preauth', scaexemption null, challengerequestindicator 'nochallenge' } as the cardholdername is hard coded in your test card suite, you will not be able to use this field to determine the 3d secure 2 flow you will need to set the challengerequestindicator , to determine the frictionless flow type of challenge request no preference no challenge process a google pay™ wallet preauth, prompting the non frictionless flow var googlepayconfiguration = { transactionmode 'preauth', scaexemption null, challengerequestindicator 'challengeasmandate' } as the cardholdername is hard coded in your test card suite, you will not be able to use this field to determine the 3d secure 2 flow you will need to set the challengerequestindicator , to determine the non frictionless flow type of challenge request challenge preferred challenge as mandate for more information on api credentials and permissions, see introduction docid\ s 8hoamytkgy13t0p657 request parameters the payment or preauth request can be sent with wallet details from apple pay™ or google pay™ sandbox endpoint https //api sandbox judopay com/transactions/payments sandbox endpoint https //api sandbox judopay com/transactions/preauths http method post header parameters for more information, see authentication methods docid\ ylkw5coh5nqnfq3j wjk2 api version 6 23 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 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 paymentrequestapplepay parameter description pkpayment object required required value token (required) for information on how to generate your token, see apple pay payment token cardaddress object optional optional card holder's address values address1 address2 (optional) town state (only required if country is usa/canada) country postcode if the billingaddress is provided, the postcode is required 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 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 yourconsumerreference string required required unique reference to anonymously identify your customer advisable to use guids must be below 40 characters currency string optional optional the currency of the transaction any iso 4217 alphabetic currency code gbp usd eur amount number required required the amount to process format two decimal places for currencies using a different structure please contact judopay for support webpaymentreference string optional optional the unique reference of the judopay payment session associated with this transaction initialrecurringpayment string optional optional indicates if this initial payment is part of a recurring payment 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 paymentrequestgooglepay parameter description googlepaywallet object required required values token (required) string json serialized payment token generated by google pay api for information on how to generate your token, see google pay payment token cardnetwork (optional) string value example visa the payment card network returned by google pay api value should match one of the allowedcardnetworks in https //developers google com/pay/api/web/reference/request objects#cardparameters carddetails (optional) the details about the card returned by google pay api this value is commonly the last four digits of the selected payment account number cardaddress object optional optional card holder's address values address1 address2 (optional) town state (only required if country is usa/canada) country postcode if the billingaddress is provided, the postcode is required 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 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 yourconsumerreference string required required unique reference to anonymously identify your customer advisable to use guids must be below 40 characters currency string optional optional the currency of the transaction any iso 4217 alphabetic currency code gbp usd eur amount number required required the amount to process format two decimal places for currencies using a different structure please contact judopay for support webpaymentreference string optional optional the unique reference of the judopay payment session associated with this transaction initialrecurringpayment boolean optional optional indicates if this initial payment is part of a recurring payment 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 devicecategory string optional optional device category data passed to the card gateways mobile desktop acceptheaders string optional optional passed to acs for use in rendering challenge screens useragent string optional optional passed to acs for use in rendering challenge screens cardholdername string optional optional the card name of the consumer emailaddress string optional optional consumer’s valid email address it is recommended but not required for 3d secure 2 authentication shippingaddress object optional optional card holder's shipping address if the shippingaddress is provided, the postcode is required mobilenumber string optional optional consumer’s valid mobile number format maximum length 15 characters only numbers allowed do not include special characters or spaces 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 threedsecure string optional optional challengerequestindicator 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 to apply for an exemption from sca, for a customer initiated transaction values lowvalue transactions up to €45 do not require sca, up to a maximum of five consecutive transactions, or a cumulative limit of €100 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, provided a robust risk analysis is performed threedsecurempi object optional optional optional block to pass in 3ds2 authentication results performed outside of judopay apple pay™ and google pay™ request example apple pay for information on how to generate your token, see apple pay payment token google pay the payload is the same when using google pay™ dpan, or fpan for information on how to generate your token, see google pay payment token apple pay request example { "pkpayment" { "token" { "paymentnetwork" "visa", "paymentdata" { "data" "xxx", "signature" "xxx", "header" { "publickeyhash" "xxx", "ephemeralpublickey" "xxx", "transactionid" "xxx" }, "version" "ec v1" }, "paymentinstrumentname" "visa 1234" } }, "judoid" 100100100, "yourconsumerreference" "2b45fd3f cee5 4e7e 874f 28051db65408", "yourpaymentreference" "6482c678 cad3 4efd b081 aeae7a89a134", "amount" 1 01, "currency" "gbp", "yourpaymentmetadata" { "internallocationref" "example", "internalid" 99 } } google pay request example { "googlepaywallet" { "cardnetwork" "visa", "carddetails" "1234", "token" "{\\"signature\\" \\"xxx\\",\\"protocolversion\\" \\"ecv1\\",\\"signedmessage\\" \\"{\\\\\\"encryptedmessage\\\\\\" \\\\\\"xxx\\\\\\",\\\\\\"ephemeralpublickey\\\\\\" \\\\\\"xxx\\\\\\",\\\\\\"tag\\\\\\" \\\\\\"xxx\\\\\\"}\\"}" }, "judoid" 100100100, "yourconsumerreference" "2b45fd3f cee5 4e7e 874f 28051db65408", "yourpaymentreference" "6482c678 cad3 4efd b081 aeae7a89a134", "amount" 1 01, "currency" "gbp", "yourpaymentmetadata" { "internallocationref" "example", "internalid" 99 } } response example { "receiptid" "914568453493526528", "yourpaymentreference" "34a73594 f3b2 414c a5c9 58679530b418", "type" "payment", "result" "success", "judoid" 100502814, "originalamount" "5 00", "netamount" "5 00", "amount" "5 00", "currency" "gbp", "carddetails" { "cardlastfour" "1111", "enddate" "1222", "cardtoken" "sof xfmzmenor sj9mtrcvrxhw", "cardtype" 1, "cardscheme" "visa", "cardfunding" "credit", "cardcategory" "", "cardcountry" "us", "bank" "jpmorgan chase bank, n a " }, "cardaddress" { "address1" "cardholder house", "address2" "1 cardholder street", "town" "cardholder town", "postcode" "ab1 2cd", "countrycode" 826 }, "consumer" { "yourconsumerreference" "2b45fd3f cee5 4e7e 874f 28051db65408", }, } wallet payment scenarios (negative flow) decline scenarios for wallet payments cannot be tested in the 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 limited test coverage is possible in the sandbox environment the suggested negative test scenarios refer to model and processing error codes and information on why the transaction request failed judopay's validation checks, which are similar to card payment scenarios suggested negative test scenario expected error code error description attempt to perform a wallet payment / preauth request with the incorrect currency entered for the specified transaction default currency = gbp 72 sorry, we're currently unable to route this transaction please check your account details and try again if this issue persists, please contact customer services this is a codes and descriptions docid zrsihomuew xnrq4pbtj attempt to perform a wallet payment / preauth request with the incorrect environment (live or sandbox) for your api token and api secret and configuration 7 sorry, we were unable to authorize this request please check your details and permissions before trying 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 next steps using the response information from a successful wallet payment test transaction, you can test the following scenarios directly call the transaction api to make a testing collections docid\ yvjgzt2gxwbdxm3m0wemu testing refunds docid\ mebkvlfmxdp3kolys0uda testing voids docid\ dmbakskjll551suxqipum