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.
- Before you can process Apple Pay™ payments and preAuths with Judopay, you will need to Set up Apple Pay™ to get your Merchant IDs.
- To test Apple Pay™ payments and preAuths in sandbox, contact Support to configure your wallet payments credentials.
- 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.
- To test Google Pay™ payments and preAuths in sandbox, contact Support to configure your wallet payments credentials.
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.
- 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.
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:
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"
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 |
- 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.
- 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.
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 CardHolderName Table, 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:
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:
|
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:
|
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:
|
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:
|
For more information on API credentials and permissions, see Permissions.
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.
Body Parameters: paymentRequestApplePay:
Parameter | Description |
---|---|
pkPayment Object Required | |
cardAddress Object Optional | Card holder's address. Values:
If the billingAddress is provided, the postcode is required. |
judoId String Required | Unique ID supplied by Judopay. Specific to a merchant and/or location. Format:
|
yourPaymentReference String Required | Your unique reference for this payment. Format:
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 | Unique reference to anonymously identify your customer. Advisable to use GUIDs. Must be below 40 characters. |
currency String Optional | The currency of the transaction. Any ISO 4217 alphabetic currency code:
|
amount Number Required | The amount to process. Format:
For currencies using a different structure please contact Judopay for support. |
webPaymentReference String Optional | The unique reference of the Judopay payment session associated with this transaction. |
initialRecurringPayment String Optional | Indicates if this initial payment is part of a recurring payment. |
primaryAccountDetails Object Optional | This is Mandatory for merchants who have an MCC code of 6012 Primary Account Holder Details:
|
paymentRequestGooglePay
Parameter | Description |
---|---|
googlePayWallet Object Required
| Values:
|
cardAddress Object Optional | Card holder's address. Values:
If the billingAddress is provided, the postcode is required. |
judoId String Required | Unique ID supplied by Judopay. Specific to a merchant and/or location. Format:
|
yourPaymentReference String Required | Your unique reference for this payment. Format:
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 | Unique reference to anonymously identify your customer. Advisable to use GUIDs. Must be below 40 characters. |
currency String Optional | The currency of the transaction. Any ISO 4217 alphabetic currency code:
|
amount Number Required | The amount to process. Format:
For currencies using a different structure please contact Judopay for support. |
webPaymentReference String Optional | The unique reference of the Judopay payment session associated with this transaction. |
initialRecurringPayment Boolean Optional | Indicates if this initial payment is part of a recurring payment. |
primaryAccountDetails Object Optional | This is Mandatory for merchants who have an MCC code of 6012 Primary Account Holder Details:
|
deviceCategory String Optional | Device category data passed to the card gateways.
|
acceptHeaders String Optional | Passed to ACS for use in rendering challenge screens. |
userAgent String Optional | Passed to ACS for use in rendering challenge screens. |
cardHolderName String Optional | The card name of the consumer. |
emailAddress String Optional | Consumer’s valid email address. It is recommended but not required for 3D Secure 2 authentication. |
shippingAddress Object Optional | Card holder's shipping address. If the shippingAddress is provided, the postcode is required. |
mobileNumber String Optional | Consumer’s valid mobile number. Format:
|
phoneCountryCode String Optional | The country code of the consumer's phone. Format:
|
threeDSecure String Optional | challengeRequestIndicator Indicates the type of challenge request you wish to apply. Values:
scaExemption To apply for an exemption from SCA, for a customer initiated transaction. Values:
|
threeDSecureMpi Object Optional | Optional block to pass in 3DS2 authentication results performed outside of Judopay. |
- 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.
Decline scenarios for wallet payments cannot be tested in the sandbox environment.
- 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 processing error. |
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. |
For a list of possible error codes, types and descriptions, see Codes.
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: