Google Pay™ Integration#
Seamless payment processing with Google’s trusted platform
Merchant policy requirements: Merchants must adhere to the Google Pay and Wallet APIs Acceptable Use Policy and accept the terms defined in the Google Pay API Terms of Service .
Google Pay Web developer documentation: This guide covers the Lesaka-specific parts of a Google Pay integration. For Google’s complete guidance on integrating Google Pay into a website, see the Google Pay Web developer documentation .
Quick Navigation#
- Overview
- Gateway Flow
- Merchant Flow
- Setup Steps
- Visa Liability Shift
- Authentication Methods & 3D Secure
- Billing Address Requirements
- Supported Networks, Currencies & Settlement
- Security
- Implementation
Integration Overview#
Choose from two powerful integration methods to implement Google Pay with Lesaka’s payment gateway:
Gateway Decryption Flow — Recommended#
The merchant acquires the token, then sends the encrypted payload received from Google to Lesaka for decryption and processing.
Benefits:
- Faster Implementation
- Enhanced Security
- Reduced Compliance
Merchant Decryption Flow — Advanced#
The merchant acquires and decrypts the token received from Google, then sends the decrypted details to Lesaka for processing.
Benefits:
- Full Control
- Custom Validation
- Direct Processing
Method 1: Gateway Decryption Flow#
Recommended
Process Flow#
sequenceDiagram
participant C as Customer
participant GP as Google Pay
participant M as Merchant
participant AG as Lesaka Gateway
participant CN as Card Network
C->>GP: Initiate Payment
GP->>GP: Generate Encrypted Token
GP->>M: Return Encrypted Token
M->>AG: Send Encrypted Token
AG->>AG: Decrypt Token
AG->>CN: Process Payment
CN->>AG: Payment Response
AG->>M: Transaction Result
M->>C: Payment Confirmation
Step-by-Step#
- Customer Initiates Payment — Customer selects Google Pay as payment method.
- Token Generation — Google Pay returns encrypted payment token to merchant.
- Token Forwarding — Merchant forwards encrypted token directly to Lesaka.
- Processing & Response — Lesaka decrypts token, processes payment, and returns result.
Google Pay Configuration#
Configure your Google Pay payment request with the correct tokenization specification and merchant information for Gateway Decryption Flow.
Tokenization Specification (Required):
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'adumoonline',
gatewayMerchantId: 'YOUR_LESAKA_APPLICATION_UID'
}
}
Merchant Information#
Required
merchantInfo: {
merchantId: 'YOUR_GOOGLE_PAY_MERCHANT_ID', // Example: BXF2DN4T236LPQ6RE
merchantName: 'YOUR_BUSINESS_NAME'
}
Configuration Values Reference#
| Parameter | Value | Where to Find |
|---|---|---|
gateway | adumoonline | Fixed value for Lesaka integration |
gatewayMerchantId | YOUR_LESAKA_APPLICATION_UID | Provided by Lesaka |
merchantId | YOUR_GOOGLE_PAY_MERCHANT_ID | Google Pay Console → Settings → Merchant Profile |
merchantName | YOUR_BUSINESS_NAME | Google Pay Console → Settings → Merchant Profile |
Complete Google Pay Request Example#
const paymentDataRequest = {
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [{
type: 'CARD',
parameters: {
allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
allowedCardNetworks: ['MASTERCARD', 'VISA'],
billingAddressRequired: true,
billingAddressParameters: {
format: 'MIN',
phoneNumberRequired: true
}
},
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'adumoonline',
gatewayMerchantId: '23ADADC0-DA2D-4DAC-A128-4845A5D71293' // Replace with Production Lesaka ApplicationUID when going live
}
}
}],
merchantInfo: {
merchantId: 'BXF2DN4T236LPQ6RE', // Replace with your own Google Merchant ID when going live
merchantName: 'Example Merchant Trading Name'
},
emailRequired: true,
transactionInfo: {
totalPriceStatus: 'FINAL',
totalPriceLabel: 'Total',
totalPrice: '100.00',
currencyCode: 'ZAR',
countryCode: 'ZA',
checkoutOption: 'DEFAULT'
}
};
Setup Steps#
1. Register with Google Pay#
Complete merchant registration in the Google Pay Business Console .
2. Obtain Merchant ID#
Copy your Google Pay Merchant ID from
Console → Settings → Merchant Profile
Open Google Pay Console
3. Configure Environment#
Set up your environment variables with the merchant details.
See the Google Pay Configuration section
for detailed instructions.
4. Test Integration#
Use Lesaka’s staging environment before going live. Download the Postman Collection for testing examples.
Additional Resources#
- Google Pay Web Developer Documentation
- Google Pay API Reference
- Integration Tutorial
- Google Pay Web Integration Checklist
- Brand Guidelines
- Publish Your Integration
API Endpoint#
POST /products/payments/v1/card/google-pay/initiate
Example Payload with Encrypted Token#
{
"applicationUid": "23ADADC0-DA2D-4DAC-A128-4845A5D71293",
"merchantUid": "9BA5008C-08EE-4286-A349-54AF91A621B0",
"value": 100.00,
"merchantReference": "GP-REF-123456",
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0...",
"paymentDataResponse": {
"apiVersion": 2,
"apiVersionMinor": 0,
"email": "john.doe@example.com",
"paymentMethodData": {
"description": "Visa •••• 1111",
"type": "CARD",
"info": {
"cardNetwork": "VISA",
"cardDetails": "1111",
"cardFundingSource": "CREDIT",
"billingAddress": {
"name": "John Doe",
"countryCode": "ZA",
"postalCode": "8001",
"phoneNumber": "+27821234567"
}
},
"tokenizationData": {
"type": "PAYMENT_GATEWAY",
"token": "eyJlbmNyeXB0ZWRNZXNzYWdlIjoiQUVTL0dDTS8yNTYvSElUQUcvOTYvSVYvMTI4L1BBRERJTkcvUEtDUzFQQURESU5HIiwiZXBoZW1lcmFsUHVibGljS2V5IjoiQk..."
}
}
}
}
Advantages#
- Lesaka manages token decryption and payment processing
- Reduced PCI DSS scope and cryptographic key-management responsibility
- Simpler implementation and faster time to market
- No merchant-side Google Pay token decryption infrastructure required
Considerations#
- Encrypted Google Pay tokens must be forwarded to Lesaka without modification
- Token decryption and processing depend on Lesaka’s gateway availability and configuration
- Merchants have less control over token validation and decryption
- Merchants must configure and manage Visa liability protection in their own Google Pay & Wallet Console
Method 2: Merchant Decryption Flow#
Process Flow#
sequenceDiagram
participant C as Customer
participant GP as Google Pay
participant M as Merchant
participant AG as Lesaka Gateway
participant CN as Card Network
C->>GP: Initiate Payment
GP->>GP: Generate Encrypted Token
GP->>M: Return Encrypted Token
M->>M: Decrypt Token (Extract Card Details)
M->>AG: Send Decrypted Card Data
AG->>CN: Process Payment
CN->>AG: Payment Response
AG->>M: Transaction Result
M->>C: Payment Confirmation
Step-by-Step#
Customer Initiates Payment Customer selects Google Pay as payment method.
Token Generation Google Pay returns encrypted payment token to the merchant.
Token Decryption Merchant verifies and decrypts the ECv2 token. Google recommends the Java Tink
paymentmethodtokenlibrary; other languages must implement Google’s documented ECv2 protocol.Processing & Response Merchant sends decrypted card details to Lesaka for processing.
Google Pay DIRECT Configuration#
Important: To use the Merchant Decryption Flow, configure Google Pay with
tokenizationSpecification.type: 'DIRECT'instead of'PAYMENT_GATEWAY'.
Tokenization Specification#
tokenizationSpecification: {
type: 'DIRECT',
parameters: {
protocolVersion: 'ECv2',
publicKey: 'YOUR_PUBLIC_KEY_HERE'
}
}
Requirements#
DIRECT integration eligibility: DIRECT integration is available only to PCI DSS-compliant merchants handling their own payment credentials. Third-party PSPs and platforms may not use DIRECT to decrypt credentials on behalf of merchants; they must use an approved gateway or hosted-checkout integration.
| Requirement | Description |
|---|---|
| PCI DSS Compliance | Required for handling decrypted card data |
| Public/Private Key Pair | Needed for token decryption and certificate management |
| Cryptographic Protocols | ECv2 signature verification and token decryption; Google recommends the Java Tink paymentmethodtoken library |
| Key Rotation Management | Regular updates and management of encryption keys |
For full details on
protocolVersionandpublicKeysetup, refer to:
Google Pay DIRECT Integration Reference
Configuration Values Reference#
| Parameter | Value | Where to Find |
|---|---|---|
type | DIRECT | Fixed value for Merchant Decryption |
protocolVersion | ECv2 | Google Pay encryption protocol version |
publicKey | YOUR_PUBLIC_KEY_HERE | Generated by your key management system |
merchantId | YOUR_GOOGLE_PAY_MERCHANT_ID | Google Pay Console → Settings → Merchant Profile |
merchantName | YOUR_BUSINESS_NAME | Google Pay Console → Settings → Merchant Profile |
Complete Google Pay Request Example#
const paymentDataRequest = {
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [{
type: 'CARD',
parameters: {
allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
allowedCardNetworks: ['MASTERCARD', 'VISA'],
billingAddressRequired: true,
billingAddressParameters: {
format: 'MIN',
phoneNumberRequired: true
}
},
tokenizationSpecification: {
type: 'DIRECT',
parameters: {
protocolVersion: 'ECv2',
publicKey: 'YOUR_PUBLIC_KEY_HERE' // Replace with your actual public key
}
}
}],
merchantInfo: {
merchantId: 'BXF2DN4T236LPQ6RE', // Replace with your Google Merchant ID
merchantName: 'Example Merchant Trading Name'
},
emailRequired: true,
transactionInfo: {
totalPriceStatus: 'FINAL',
totalPriceLabel: 'Total',
totalPrice: '100.00',
currencyCode: 'ZAR',
countryCode: 'ZA',
checkoutOption: 'DEFAULT'
}
};
Setup Steps#
Register with Google Pay Create a merchant account at the Google Pay Business Console and configure for DIRECT integration.
Generate Key Pair Create a public/private key pair for token decryption and register the public key with Google Pay.
Implement Decryption Implement ECv2 signature verification and token decryption. For Java, use Google’s recommended Tink
paymentmethodtokenlibrary; for other languages, follow Google’s ECv2 cryptography specification. Refer to the Configuration section .Test Integration Test with decrypted card data using Lesaka’s staging environment. Download the Postman Collection for testing examples.
Additional Resources#
- Google Pay Web Developer Documentation
- Google Pay DIRECT API Reference
- Payment Data Cryptography
- Brand Guidelines
- Publish Your Integration
API Endpoint#
POST /products/payments/v1/card/initiate
Example Payload with Decrypted Token#
{
"applicationUid": "23ADADC0-DA2D-4DAC-A128-4845A5D71293",
"merchantUid": "9BA5008C-08EE-4286-A349-54AF91A621B0",
"value": 100.00,
"merchantReference": "GP-REF-123456",
"cardNumber": "4111111111111111",
"expiryMonth": 12,
"expiryYear": 2025,
"cardHolderFullName": "John Doe",
"cardHolderEmailAddress": "john.doe@example.com",
"description": "Google Pay Payment",
"saveCardDetails": true,
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0...",
"tokenDetails": {
"tokenProvider": "GOOGLE_PAY",
"networkToken": true,
"cryptogram": "AAIBBYNoEwAAACcKhAJkdQAAAAA=",
"eci": "05",
"originalPanBin": "411111",
"originalPanLast4": "1111"
}
}
This example is for a
CRYPTOGRAM_3DScredential. For aPAN_ONLYcredential omittokenDetailsentirely — see Authentication Methods & 3D Secure .
Advantages#
- Full control over token decryption
- Ability to validate tokens before sending to gateway
- Reduced dependency on external gateways
- Allows for custom token validation logic
Considerations#
- Complex key and certificate management
- Requires ECv2 signature verification and token decryption; Google’s recommended Tink implementation is Java-only
- Merchant must handle sensitive card data
- PCI DSS compliance required
Visa Liability Shift#
Visa liability protection applies to both integration flows. Merchants using either the Gateway Decryption Flow or the Merchant Decryption Flow (DIRECT) are responsible for configuring and managing it in their own Google Pay & Wallet Console.
Google Pay supports liability shift for qualified Mastercard and Visa Android device-token transactions that use CRYPTOGRAM_3DS, subject to card-network rules. Qualified Mastercard device-token transactions receive liability shift automatically. For eligible Visa integrations, merchants using either flow must enable Fraud Liability Protection for Visa Device Tokens in their own Console where applicable.
Enable Visa Liability Shift#
- Sign in to the Google Pay & Wallet Console .
- Open the Google Pay API tab.
- Open the Settings tab.
- Enable Fraud Liability Protection for Visa Device Tokens.
Feature settings are available for approved Android or Web integrations. European merchants are automatically covered by a Visa exception for eligible transactions made with cards issued by European issuers.
Integration Requirements#
- Send the actual, non-zero transaction amount in
transactionInfo.totalPriceand the correct authorization currency intransactionInfo.currencyCode. - Merchants using either flow must manage Visa liability protection in their own Google Pay & Wallet Console.
- For the Gateway Decryption Flow, forward the encrypted Google Pay token to Lesaka Online without modification. Lesaka Online decrypts the token for processing.
- For the Merchant Decryption Flow, pass the
eciIndicatorfrom the decrypted Google Pay payload to Lesaka Online without altering it. - For a Merchant Decryption Flow (
DIRECT) integration, liability-shift status is available through theeciIndicatorin the decrypted payment data. - Google Pay web transactions that use the optional
OFFERcallback intent do not qualify for Visa liability shift.
For eligibility details, exclusions, and current network requirements, see Google’s Shift liability to issuer guide.
Authentication Methods & 3D Secure#
Google Pay returns one of two authentication methods in the decrypted payment credential. The method returned depends on the customer’s device and how the card was added to Google Pay — the merchant cannot choose which one is returned, only which ones are accepted via allowedAuthMethods.
| Auth Method | What Google returns | Built-in authentication | Liability shift |
|---|---|---|---|
CRYPTOGRAM_3DS | A device-specific network token (DPAN), a one-time cryptogram and an eciIndicator | Yes — the cryptogram is generated by the card network at the time of payment | Available for qualified Visa and Mastercard transactions (see Visa Liability Shift ) |
PAN_ONLY | The customer’s actual card number (FPAN) and expiry, as stored in their Google Account. No cryptogram and no eciIndicator | No — the credential is equivalent to a card-not-present keyed transaction | No liability shift unless the merchant performs 3D Secure authentication |
Key point: A
PAN_ONLYcredential is not authenticated by Google. It carries the same fraud and chargeback exposure as a customer typing their card number into a form. To obtain issuer authentication (and, where applicable, liability shift) forPAN_ONLYtransactions, the transaction must go through Lesaka’s standard 3D Secure flow.
Enabling 3D Secure for PAN_ONLY credentials#
3D Secure for PAN_ONLY is controlled by the applicationUid you send to Lesaka, in exactly the same way as for a normal card transaction. There is no Google Pay-specific flag on the request and no separate merchant setting:
- Use a 3D Secure-enabled ApplicationUID and Lesaka will perform the 3DS lookup on every
PAN_ONLYcredential. Where the issuer participates, the initiate response returnsthreeDSecureAuthRequired: truetogether with theacsUrl,acsPayloadandacsMDneeded to redirect the cardholder to their bank. - Use a non-3D Secure ApplicationUID and
PAN_ONLYcredentials are authorised without issuer authentication.
For the staging environment, the 3D Secure-enabled test ApplicationUID is 23ADADC0-DA2D-4DAC-A128-4845A5D71293 and the non-3D Secure one is 904A34AF-0CE9-42B1-9C98-B69E6329D154 (see Test Account Details
). For production, request a 3D Secure-enabled ApplicationUID from Lesaka support if your account does not already have one.
CRYPTOGRAM_3DS credentials are not sent through 3D Secure regardless of ApplicationUID. The presence of a cryptogram tells Lesaka that the card network has already authenticated the transaction: the cryptogram is passed to the acquirer as the CAVV, and the eciIndicator supplied by Google is passed through unaltered. If Google omits eciIndicator, Lesaka defaults it to 02 for Mastercard and 05 for all other networks.
Applications configured for external (merchant-managed) 3D Secure cannot use
/card/google-pay/initiate, because the Google Pay initiate request has no way to carry an external 3DS result. Use an application configured for Lesaka-managed 3D Secure, or use the Merchant Decryption Flow with/card/initiate.
How the flow differs by integration method#
Gateway Decryption Flow (PAYMENT_GATEWAY)
- Forward the encrypted token to
POST /products/payments/v1/card/google-pay/initiateusing a 3D Secure-enabledapplicationUid. - Lesaka decrypts the token and inspects
authMethod.CRYPTOGRAM_3DS→ the response returnsthreeDSecureAuthRequired: falseand you proceed straight to Authorise .PAN_ONLY→ Lesaka performs the 3DS lookup. If the issuer participates, the response returnsthreeDSecureAuthRequired: trueplusacsUrl,acsPayloadandacsMD.
- When
threeDSecureAuthRequiredistrue, POST the cardholder to theacsUrland complete the challenge exactly as described in the 3D Secure section of the Enterprise guide, then call Authenticate and Authorise .
The /card/google-pay/initiate response has the same structure as the standard /card/initiate response — see Response Handling
below.
Merchant Decryption Flow (DIRECT)
- Decrypt the token and read
paymentMethodDetails.authMethod. PAN_ONLY→ send the decryptedpan,expirationMonthandexpirationYeartoPOST /products/payments/v1/card/initiateascardNumber,expiryMonthandexpiryYear, using a 3D Secure-enabledapplicationUid. Do not include atokenDetailsobject — there is no cryptogram for aPAN_ONLYcredential, and supplying an empty or fabricatedcryptogram/eciwould cause Lesaka to skip 3D Secure. Lesaka treats the transaction as a standard card-not-present initiate and returnsthreeDSecureAuthRequiredas described above.CRYPTOGRAM_3DS→ send the decryptedpan, expiry, and atokenDetailsobject as shown in the Example Payload with Decrypted Token . No 3DS challenge is performed.tokenDetailsfieldValue Required tokenProvider"GOOGLE_PAY"Yes networkTokentrueYes cryptogrampaymentMethodDetails.cryptogramfrom the decrypted token (base64)Yes ecipaymentMethodDetails.eciIndicatorfrom the decrypted token, unaltered. If absent, use02for Mastercard,05otherwiseYes originalPanBinFirst 6 digits of the decrypted panOptional originalPanLast4Last 4 digits of the decrypted panOptional
Restricting to CRYPTOGRAM_3DS only#
If you do not want to accept unauthenticated credentials at all, remove PAN_ONLY from allowedAuthMethods:
allowedAuthMethods: ['CRYPTOGRAM_3DS']
Be aware that this prevents customers on desktop browsers and on devices without a tokenised card from paying with Google Pay, which typically reduces conversion. Google’s guidance is to accept both methods and apply 3D Secure to PAN_ONLY where required.
Billing Address Requirements#
Request the cardholder’s billing address from Google Pay on every transaction. Lesaka uses it to populate the cardholder name and contact number on the transaction record, and merchants should retain it as supporting evidence in chargeback disputes and for their own fraud screening.
Address Verification (AVS): Lesaka does not perform AVS on Google Pay transactions in either flow. The billing address is not matched against the issuer’s records, and no AVS result is returned in any response. Do not rely on Lesaka for address-based verification of Google Pay payments.
Request the address from Google Pay#
Set billingAddressRequired: true on the CARD payment method in both integration flows. MIN format is sufficient for Lesaka; use FULL if your own fraud rules or fulfilment need street-level data.
parameters: {
allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
allowedCardNetworks: ['MASTERCARD', 'VISA'],
billingAddressRequired: true,
billingAddressParameters: {
format: 'MIN', // 'MIN' (minimum) or 'FULL'
phoneNumberRequired: true
}
}
format | Fields returned by Google | Use when |
|---|---|---|
MIN | name, postalCode, countryCode, phoneNumber (if requested) | Default — sufficient for Lesaka |
FULL | All MIN fields plus address1, address2, address3, locality, administrativeArea, sortingCode | You run your own address-based fraud screening or need a full address for fulfilment |
Setting emailRequired: true at the top level of the request is also recommended so that the cardholder email is available for receipts and dispute evidence.
Forward the address to Lesaka#
Gateway Decryption Flow — forward the complete paymentDataResponse to /card/google-pay/initiate unmodified (see the Example Payload with Encrypted Token
). Lesaka reads the following from it:
| Google Pay field | Used by Lesaka as |
|---|---|
paymentMethodData.info.billingAddress.name | Cardholder full name (defaults to Not Provided if absent) |
paymentMethodData.info.billingAddress.phoneNumber | Cardholder contact number (defaults to Not Provided if absent) |
email (top-level in paymentDataResponse) | Cardholder email address |
billingAddress.postalCode, countryCode, address1–address3, locality, administrativeArea, sortingCode, and shippingAddress | Accepted but not read. Retain on the merchant side. |
The Gateway flow initiate request itself only uses applicationUid, merchantUid, value, merchantReference, ipAddress, userAgent, the optional multiCurrency object, and paymentDataResponse. Any other top-level fields (including billingDetails, cardHolderEmailAddress and saveCardDetails) are ignored on this endpoint — the card is always tokenised (saveCardDetails is forced to true) and the response therefore returns a cardToken and profileUid.
Merchant Decryption Flow — the billing address is not inside the encrypted token; it is in the clear-text paymentMethodData.info.billingAddress of the Google response. Map it onto the Initiate Transaction
call. The /card/initiate request accepts the flat cardholder fields as well as an optional structured billingDetails object:
| Google Pay field | Lesaka /card/initiate field |
|---|---|
billingAddress.name | cardHolderFullName |
email (top-level) | cardHolderEmailAddress |
billingAddress.phoneNumber | cardholderContactNumber |
billingAddress.address1 / address2 / address3 | billingDetails.address.address1 / address2 / address3 |
billingAddress.locality | billingDetails.address.city |
billingAddress.administrativeArea | billingDetails.address.province |
billingAddress.postalCode | billingDetails.address.postalCode |
billingAddress.countryCode | billingDetails.address.countryCode |
billingAddress.name / phoneNumber / email | billingDetails.contact.fullName / contactNumber / email (optional — duplicates the flat fields) |
{
"applicationUid": "…",
"merchantUid": "…",
"value": 100.00,
"merchantReference": "GP-REF-123456",
"cardNumber": "4111111111111111",
"expiryMonth": 12,
"expiryYear": 2028,
"cardHolderFullName": "John Doe",
"cardHolderEmailAddress": "john.doe@example.com",
"cardholderContactNumber": "+27821234567",
"billingDetails": {
"address": {
"address1": "14 Street Name",
"city": "Cape Town",
"province": "WC",
"postalCode": "8001",
"countryCode": "ZA"
}
},
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0…"
}
billingDetails is optional and all of its fields are free-text strings; it is stored against the transaction and forwarded to the acquirer where the acquirer accepts address data, but — as noted above — Lesaka does not perform or return an AVS check on it.
Minimum requirement#
At minimum, request the MIN format (name, postalCode, countryCode) plus phoneNumberRequired: true and emailRequired: true on every transaction. Transactions submitted without a billing address will still be processed, but:
- the cardholder name and contact number on the transaction will be recorded as
Not Provided; - the transaction may be declined by merchant-level fraud rules that require an address; and
- the merchant will have weaker evidence in the event of a “cardholder not recognised” chargeback.
Supported Networks, Currencies & Settlement#
Google Pay does not have its own acceptance rules on the Lesaka platform. Once the token is decrypted, the card is processed under exactly the same card configuration as a normal card transaction for the applicationUid you send — network acceptance, 3D Secure, trading currency and acquirer routing are all taken from that application. Values in the Google Pay request that fall outside your application’s configuration are declined by Lesaka at initiate.
Card networks#
Lesaka determines the network from the decrypted card number (BIN lookup) and checks it against the card types enabled for your application. There is no separate Google Pay network list.
| Network | allowedCardNetworks value | Lesaka processing | PAN_ONLY | CRYPTOGRAM_3DS | Liability shift |
|---|---|---|---|---|---|
| Visa | VISA | Supported | 3DS applied per ApplicationUID | Cryptogram passed as CAVV; ECI from Google (default 05) | Requires Fraud Liability Protection for Visa Device Tokens to be enabled in the Google Pay & Wallet Console |
| Mastercard | MASTERCARD | Supported | 3DS applied per ApplicationUID | Cryptogram passed as CAVV; ECI from Google (default 02) | Automatic for qualified device-token transactions |
| American Express | AMEX | Only if Amex is enabled on your application’s card configuration | 3DS applied per ApplicationUID | Cryptogram passed as CAVV; ECI from Google (default 05) | Per Amex rules |
| Discover / JCB / Interac | DISCOVER, JCB, INTERAC | Not supported in South Africa | — | — | — |
Include in allowedCardNetworks only the networks that are enabled on your Lesaka application — for most merchants that is ['MASTERCARD', 'VISA']. If a network is listed in allowedCardNetworks but not enabled on your application, Google Pay will offer the card to the customer and Lesaka will decline it at initiate with <card type> card type not supported. Diners Club is accepted for standard card payments (see Test Cards
) but is not a Google Pay network.
Currency and country of settlement#
| Parameter | Value | Notes |
|---|---|---|
transactionInfo.currencyCode | The trading currency of your applicationUid — ZAR for all standard and test ApplicationUIDs | Lesaka takes the transaction currency from the application’s configured trading currency, not from the Google Pay request. currencyCode in the Google Pay request must match it so that the amount Google displays to the customer is the amount that is authorised. All test ApplicationUIDs are ZAR (see Test Account Details
). |
transactionInfo.countryCode | ZA | Country in which the merchant is settled. Lesaka settles to South African merchant accounts. This value is not read by Lesaka; there is no settlement-country field on the initiate request. |
| Settlement account | South African acquiring bank | Funds are settled to the merchant account linked to your Lesaka merchantUid, in the application’s trading currency. |
| Card issuing country | Any | International cards are accepted; the issuing country is returned in cardCountry on the authorise response. |
Multi-Currency Processing (MCP)#
Merchants enrolled for Multi-Currency Processing may charge the customer in a foreign currency while settling in the application’s trading currency. Both /card/google-pay/initiate and /card/initiate accept an optional multiCurrency object:
"multiCurrency": {
"currencyCode": "USD", // ISO 4217, 3 upper-case letters — the currency shown to the customer
"value": 5.50 // amount in that currency, > 0
}
When multiCurrency is supplied, set Google Pay’s transactionInfo.currencyCode and totalPrice to the same foreign currency and amount so that the customer sees the correct figure. Current exchange rates for your application can be retrieved from POST /products/payments/v1/card/mcp-exchange-rates. If your account is not enrolled, the request fails with Merchant is not signed up for multi-currency processing — contact Lesaka support to enable MCP.
currencyCode and countryCode also affect liability shift: the value in transactionInfo.totalPrice and currencyCode must be the actual authorisation amount and currency (see Integration Requirements
).
Settlement processing#
Google Pay transactions follow the same Real Time or Deferred Settlement processing method configured on your merchant account (see Preparation for Integration
). If auto-settle is enabled, the authorise response returns autoSettle: true and no separate Settle
call is required; otherwise call Settle once you are ready to fulfil the order.
Environment summary#
| Item | Staging | Production |
|---|---|---|
| Google Pay environment | TEST | PRODUCTION |
| Lesaka base URL | https://staging-apiv3.adumoonline.com | https://apiv3.adumoonline.com |
gatewayMerchantId | Test ApplicationUID (see Test Account Details ) | Production ApplicationUID issued by Lesaka |
Google merchantId | Not required in TEST | Required — from Google Pay & Wallet Console |
Security Considerations#
Essential security practices for both integration methods:
Merchant Decryption Flow (Advanced Security)#
- ✓ Implement proper key management for Google Pay decryption keys
- ✓ Ensure PCI DSS compliance when handling decrypted card data
- ✓ Validate token authenticity before processing
Gateway Decryption Flow (Standard Security)#
- ✓ Validate Google Pay response structure before forwarding
- ✓ Implement proper error handling for decryption failures
- ✓ Ensure secure transmission of encrypted tokens
Implementation Notes#
Key technical considerations for successful Google Pay integration:
| Topic | Description |
|---|---|
| Authentication Method | Google Pay tokens can use either PAN_ONLY or CRYPTOGRAM_3DS. PAN_ONLY credentials carry no authentication and require 3D Secure via a 3DS-enabled ApplicationUID — see Authentication Methods & 3D Secure |
| Billing Address | Request with billingAddressRequired: true (MIN format minimum) and forward to Lesaka; Lesaka does not perform AVS — see Billing Address Requirements |
| Networks & Settlement | Networks, trading currency and 3DS all follow the applicationUid’s card configuration; typically Visa/Mastercard in ZAR, foreign-currency pricing via multiCurrency for MCP merchants — see Supported Networks, Currencies & Settlement |
| Token Expiration | Tokens have expiration times that must be validated before processing |
| Assurance Details | Include cardholder authentication and account verification status |
| Error Handling | Properly handle both decryption and payment processing errors |
| Testing Environment | Always use Google Pay’s test environment during development |
Response Handling#
Both /card/google-pay/initiate and /card/initiate return the same initiate response structure. Fields with no value are omitted from the JSON.
{
"transactionId": "48a94027-49bd-46f3-a761-7741a86ee944",
"threeDSecureAuthRequired": false,
"cvvRequired": false,
"threeDSecureProvider": "NONE",
"acsUrl": "",
"acsPayload": "DEPRECATED",
"acsMD": null,
"profileUid": "5C4B9E2A-2C4F-4B4E-9E9F-2A6B0F1E7D11",
"cardToken": "A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D",
"transactionState": "INITIATED",
"autoSettle": false,
"retrievalReferenceNumber": "000000123456"
}
| Field | Description |
|---|---|
transactionId | UID of the transaction — required for Authorise / Settle / Reverse / Refund |
threeDSecureAuthRequired | true when a PAN_ONLY credential requires 3D Secure and the cardholder must be redirected to the ACS. Always false for CRYPTOGRAM_3DS. |
threeDSecureProvider | 3DS provider used (NONE when no challenge is required) |
acsUrl, acsPayload, acsMD, acsTermUrl, acsCode, acsMessage, acsEciFlag, acsEnrolled | Populated only when threeDSecureAuthRequired is true — see the 3D Secure
section |
cardToken, profileUid | Returned on the Gateway flow (the Google Pay card is always tokenised) and on the Merchant flow when saveCardDetails: true |
transactionState | Current state of the transaction |
autoSettle | Whether the application is configured to auto-settle on authorise |
retrievalReferenceNumber | 12-digit RRN |
Authorise, Settle, Reverse and Refund responses are identical to the standard card responses documented in the Enterprise API .
Recommended Approach#
Gateway Decryption Flow — Recommended#
Best for most merchants
Benefits:
- ✓ Simpler implementation
- ✓ Reduced security responsibilities
- ✓ Faster time to market
- ✓ Lower maintenance overhead
Merchant Decryption Flow — Advanced Use Cases#
Choose only if you need:
- • Custom token validation logic
- • Integration with existing Google Pay infrastructure
- • Specific compliance or security requirements
Example Google Pay Request (Direct)#
const baseRequest = {
apiVersion: 2,
apiVersionMinor: 0
};
const allowedCardNetworks = ['VISA', 'MASTERCARD'];
const allowedAuthMethods = ['PAN_ONLY', 'CRYPTOGRAM_3DS'];
const baseCardPaymentMethod = {
type: 'CARD',
parameters: {
allowedAuthMethods,
allowedCardNetworks
}
};
const directTokenizationSpecification = {
type: 'DIRECT',
parameters: {
protocolVersion: 'ECv2',
publicKey: 'YOUR_PUBLIC_KEY_HERE'
}
};
const cardPaymentMethod = Object.assign(
{ tokenizationSpecification: directTokenizationSpecification },
baseCardPaymentMethod
);
const paymentDataRequest = Object.assign({}, baseRequest, {
allowedPaymentMethods: [cardPaymentMethod],
transactionInfo: {
totalPriceStatus: 'FINAL',
totalPriceLabel: 'Total',
totalPrice: '100.00',
currencyCode: 'ZAR',
countryCode: 'ZA',
checkoutOption: 'DEFAULT'
},
merchantInfo: {
merchantName: 'Example Merchant'
}
});
Decrypting the Payment Token#
Google’s merchant cryptography guide documents the ECv2 token decryption process and recommends the Java Tink library for managing encrypted responses:
Example Decrypted Token#
{
"paymentMethod": "CARD",
"paymentMethodDetails": {
"authMethod": "CRYPTOGRAM_3DS",
"pan": "4111111111111111",
"expirationMonth": 12,
"expirationYear": 2028,
"cryptogram": "AAIBBYNoEwAAACcKhAJkdQAAAAA=",
"eciIndicator": "05"
},
"messageId": "example-message-id",
"messageExpiration": "1840752000000"
}