Skip to main content

Digital Wallet Integration

Executive Summary

Apple Pay and Google Pay integration through the gateway requires fundamentally different work for card-present (NFC) vs. card-not-present (web/in-app) flows.

Card-present (NFC): Zero gateway-specific logic. Terminal handles EMV contactless. Gateway sets cardDataSource = EMV_CONTACTLESS to TransIT.

Card-not-present: Gateway needs new endpoints. Recommended architecture: processor decryption (Apple Pay) and PAYMENT_GATEWAY tokenization (Google Pay). Both keep encrypted wallet tokens opaque, TransIT decrypts. Minimal PCI scope increase.

Estimated effort: 3 to 5 months for full production, TSYS certification is the long pole.


Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│ CARD-PRESENT (NFC) │
│ │
│ iPhone/Android ──NFC──► Terminal ──EMV Contactless──► Gateway │
│ │
│ Gateway action: Set cardDataSource=EMV_CONTACTLESS → TransIT │
│ Decryption: NONE (terminal + card network handle it) │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│ CARD-NOT-PRESENT: APPLE PAY │
│ │
│ 1. Browser → Gateway: POST /apple-pay/session │
│ Gateway → Apple (mTLS): validate merchant │
│ Gateway → Browser: merchantSession │
│ │
│ 2. Browser → Gateway: POST /apple-pay/charge │
│ { applePayToken: "<encrypted PKPaymentToken>" } │
│ Gateway → TransIT: digital wallet charge │
│ { walletType: APPLE_PAY, encryptedToken: "..." } │
│ TransIT decrypts (holds Payment Processing Cert) │
│ │
│ Decryption: TransIT (processor decryption model) │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│ CARD-NOT-PRESENT: GOOGLE PAY │
│ │
│ 1. Browser → Gateway: GET /google-pay/config │
│ Returns: { gateway: "tsys", gatewayMerchantId: "..." } │
│ (No session validation needed) │
│ │
│ 2. Browser → Gateway: POST /google-pay/charge │
│ { googlePayToken: "<ECv2 encrypted token>" } │
│ Gateway → TransIT: digital wallet charge │
│ { walletType: GOOGLE_PAY, encryptedToken: "..." } │
│ TransIT decrypts (PAYMENT_GATEWAY mode, holds private key) │
│ │
│ Decryption: TransIT (PAYMENT_GATEWAY tokenization) │
└─────────────────────────────────────────────────────────────────┘

Section 1: Apple Pay

Card-Present (NFC Tap)

No gateway-specific logic required. When a customer taps an iPhone/Apple Watch on an NFC terminal:

  1. Device Secure Element communicates via NFC using EMVCo contactless spec (ISO/IEC 14443).
  2. Secure Element passes DPAN (Device PAN), dynamic cryptogram (TAVV), and transaction details to the terminal.
  3. Terminal processes as standard EMV contactless, sends to gateway normally.
  4. Gateway forwards to TransIT with cardDataSource = EMV_CONTACTLESS.
  5. Card network detokenizes DPAN to FPAN and authorizes with issuer.

Card-Not-Present (Web / In-App)

Two server-side steps required:

Step A: Merchant Session Validation (Web only)

Before the Apple Pay sheet appears, Apple requires server-side merchant validation:

  1. Browser calls new ApplePaySession(version, paymentRequest) and onvalidatemerchant fires.
  2. Event provides a validationURL (Apple server URL).
  3. Gateway makes mTLS POST to validationURL using the Merchant Identity Certificate (.p12 from Apple Developer portal).
  4. Apple returns a merchantSession opaque object.
  5. Gateway returns it to browser and session.completeMerchantValidation().
  6. Payment sheet appears.

New endpoint needed: POST /v1/wallet/apple-pay/session

Step B: Payment Token Handling

After Face ID / Touch ID auth, Apple generates a PKPaymentToken containing:

  • paymentData: encrypted blob (DPAN + TAVV cryptogram + transaction details)
  • paymentMethod: card network, display name, type
  • transactionIdentifier: unique transaction ID

Two decryption paths:

PathWho DecryptsPCI Impact
Processor Decryption (recommended)TransIT/TSYS holds certGateway stays out of scope
Merchant DecryptionGateway decryptsSAQ-D scope, avoid

Recommendation: Use processor decryption. Register Payment Processing Certificate with TSYS/TransIT. Gateway passes raw paymentData blob through opaquely.

Apple Pay Registration Requirements

AssetDescriptionRotation
Apple Developer Account (Organization, $99/yr)Required for all certsAnnual
Merchant ID (merchant.com.myriad.gateway)Registered in Apple portalNever expires
Payment Processing CertificatePublic key encrypts tokens; private key held by TSYSAnnually
Merchant Identity Certificate (.p12)mTLS cert for session validationEvery 25 months
Domain Verification File.well-known/apple-developer-merchantid-domain-associationPer domain, one-time

For multi-tenant: Apply for Apple's Payment Platform status to use the Web Merchant Registration API for programmatic domain registration.


Section 2: Google Pay

Card-Present (NFC Tap)

Identical to Apple Pay card-present. Standard EMV contactless. No Google Pay-specific logic. Gateway sets cardDataSource = EMV_CONTACTLESS.

Card-Not-Present (Web / Android)

Simpler than Apple Pay, no merchant session validation required.

  1. Client initializes PaymentsClient with gateway config.
  2. User taps Google Pay button, selects card, authenticates.
  3. Google returns encrypted PaymentMethodToken (ECv2 protocol).
  4. Client sends token to gateway.
  5. Gateway passes through to TransIT.

Tokenization Modes

PAYMENT_GATEWAY (recommended):

const tokenizationSpecification = {
type: 'PAYMENT_GATEWAY',
parameters: {
'gateway': 'tsys', // Must confirm with TSYS
'gatewayMerchantId': 'YOUR_MERCHANT_ID'
}
};
  • Google encrypts with TransIT's public key (registered by TSYS with Google).
  • Gateway passes encrypted blob straight through.
  • No key management. No PCI scope increase.

DIRECT (not recommended):

  • Google encrypts with your gateway's ECDSA public key.
  • Gateway must decrypt using Google's Tink library.
  • Requires annual key rotation and PCI DSS compliance for card data.

Auth Methods in Google Pay Tokens

MethodDescriptionSecurity
CRYPTOGRAM_3DSDevice-bound DPAN + TAVV cryptogramHigher, equivalent to Apple Pay
PAN_ONLYCard stored in Google account, no device bindingLower, returns real PAN, no cryptogram

Google Pay Registration

  1. Create profile at https://pay.google.com/business/console
  2. Accept Terms of Service.
  3. Merchant ID appears in console.
  4. Submit integration for production review.
  5. No domain verification file needed. No mTLS certificates needed.

Google Pay API vs Google Wallet

Google Pay APIGoogle Wallet
PurposeAccept paymentsStore passes/loyalty/transit
Our use caseYesNot relevant
Token typePaymentMethodToken (ECv2)N/A

Section 3: TransIT API Integration

Card-Present Fields

FieldValueNotes
cardDataSourceEMV_CONTACTLESSConfirmed supported by TSYS MultiPass
EMV tag dataStandard contactless tagsTerminal handles; DPAN in track data

Card-Not-Present Fields

Based on TSYS-family processor documentation (Heartland Portico WalletData):

FieldValuesDescription
PaymentSourceApplePayWeb, ApplePayApp, GooglePayWeb, GooglePayAppWallet type
CryptogramBase64/Hex encodedTAVV (Apple) or TAVV/DSRP (Google)
ECI05, 06, 07Electronic Commerce Indicator
WalletTypeAPPLE_PAY, GOOGLE_PAYProcessor-level wallet identifier

Certification

TSYS was among the first processors certified for Apple Pay (2015). Digital wallet certification involves:

  • Running test transactions through TSYS sandbox (stagegw.transnox.com)
  • Wallet-specific test data scenarios
  • Passthrough mode, simpler certification than decryption mode

Section 4: PCI Scope Impact

Token Types

Token TypeWhat It IsPCI Scope
FPAN (Funding PAN)Real card numberFull scope, never touch
DPAN (Device PAN)Network token (DPAN != FPAN)In scope if decrypted
Encrypted PKPaymentTokenApple's encrypted blobOut of scope if passthrough
Encrypted ECv2 tokenGoogle's encrypted blobOut of scope if passthrough
Cryptogram (TAVV)One-time auth valueIn scope only if decrypted

By Integration Path

PathPCI Impact
Full passthrough (recommended)Minimal, encrypted tokens are not cardholder data
Gateway decryptsSAQ-D scope, HSM required, annual QSA audit
Card-present NFCSame as existing EMV scope

Recommendation: Use PAYMENT_GATEWAY (Google) + processor decryption (Apple). Gateway never sees plaintext DPAN or cryptogram. No PCI scope expansion.


Section 5: Implementation Checklist

New Endpoints

Apple Pay

EndpointMethodDescriptionEffort
/v1/wallet/apple-pay/sessionPOSTMerchant session validation (mTLS to Apple)Medium
/v1/wallet/apple-pay/chargePOSTProcess Apple Pay token (CNP)Small
/v1/wallet/apple-pay/authorizePOSTAuthorize Apple Pay token (CNP)Small

Google Pay

EndpointMethodDescriptionEffort
/v1/wallet/google-pay/chargePOSTProcess Google Pay token (CNP)Small
/v1/wallet/google-pay/authorizePOSTAuthorize Google Pay token (CNP)Small
/v1/wallet/google-pay/configGETReturn gateway/merchantId configSmall

Card-Present

No new endpoints, handled by existing terminal flow with cardDataSource = EMV_CONTACTLESS.

SDK Additions

interface WalletService {
// Apple Pay CNP
suspend fun validateApplePayMerchant(
validationUrl: String,
domain: String,
): MerchantSession

suspend fun chargeApplePay(
token: ApplePayToken,
amount: Money,
merchantId: String,
): ChargeResponse

// Google Pay CNP
fun getGooglePayConfig(merchantId: String): GooglePayConfig

suspend fun chargeGooglePay(
token: GooglePayToken,
amount: Money,
merchantId: String,
): ChargeResponse
}

Certificates & Keys

AssetWho Holds ItStorageRotation
Apple Merchant Identity Certificate (.p12)GatewaySecret ManagerEvery 25 months
Apple Payment Processing Cert private keyTSYS (processor decryption)N/AAnnually
Apple domain verification fileGateway domainCloud Run / CDNOne-time per domain
Google Pay ECDSA key pairN/A (PAYMENT_GATEWAY mode)N/AN/A
Google Pay Merchant IDConfigurationSpanner / configN/A

Third-Party Registrations

RegistrationWhereEffort
Apple Developer Account (Organization)developer.apple.comSmall ($99/yr)
Apple Merchant ID + certsApple Developer portalSmall to medium
Apple Pay Web Merchant Registration APIApple (application)Medium
Google Pay & Wallet Consolepay.google.com/business/consoleSmall
Google Pay production approvalGoogle reviewSmall to medium
TSYS digital wallet certificationTSYS account teamLarge

Effort Estimates

ComponentEffort
Apple Pay merchant session endpointMedium
Apple Pay CNP charge/auth endpointsSmall
Google Pay CNP charge/auth endpointsSmall
Google Pay client config endpointSmall
Multi-tenant merchant registration (Apple)Large
Certificate management infrastructureMedium
TransIT digital wallet API integrationMedium
TSYS certification testingLarge
Card-present NFCSmall
PCI documentation updateSmall to medium
Domain verification automationMedium

Total: 3 to 5 months, TSYS certification is the long pole item.


Section 6: Blockers, Must Confirm with TSYS

Before writing implementation code, get answers from TSYS account team:

  1. Is TransIT registered as a Google Pay gateway partner? What is the gateway identifier for PAYMENT_GATEWAY tokenization?
  2. Does TransIT offer Apple Pay processor decryption? What is the process for registering the Payment Processing Certificate with them?
  3. What are the exact TransIT API fields for submitting wallet tokens (encrypted passthrough vs. decrypted fields)?
  4. What is the certification timeline for digital wallet transaction types?
  5. Does TransIT support multi-merchant wallet configurations (one gateway, many merchant IDs)?

ResourceURL
Apple Pay Platform Integration Guidehttps://developer.apple.com/download/files/Apple-Pay-Platform-Integration-Guide.pdf
Apple Pay Token Format Referencehttps://developer.apple.com/documentation/passkit/payment-token-format-reference
Apple Pay Environment Setuphttps://developer.apple.com/documentation/applepayontheweb/configuring-your-environment
Google Pay Web APIhttps://developers.google.com/pay/api/web/overview
Google Pay Payment Data Cryptographyhttps://developers.google.com/pay/api/web/guides/resources/payment-data-cryptography
Google Pay Consolehttps://pay.google.com/business/console
GOV.UK Pay Connector (reference impl)https://github.com/alphagov/pay-connector
Adyen Apple Pay Decryptionhttps://docs.adyen.com/payment-methods/apple-pay/api-only/apple-pay-token-decryption
TransIT Developer Portalhttps://developers.tsys.com