Digital Wallets#
Accept Apple Pay and Google Pay via S2S using payment tokens obtained from the wallet APIs on the client side. No card data touches your server.
Apple Pay#
Prerequisites
In your Apple Developer account:
- Create a Merchant ID in Certificates, Identifiers & Profiles
- Register and verify all payment domains
- Create a Merchant Identity Certificate — generate
*.csr+*.key, upload CSR, download*.pem - Create a Processing Private Key (Payment Processing Certificate) for token decryption
Then configure the admin panel (Merchants → Wallets → Apple Pay) with: Merchant Identifier, Certificate (.pem), Private Key (.key), Processing Private Key.
Client-Side Flow
Check Apple Pay availability
Use ApplePaySession.canMakePayments()
Show Apple Pay button
Per Apple's UX guidelines
Validate merchant identity
Server-side merchant validation session
Create payment request & session
Customer authorises with Face ID / Touch ID
Receive Apple Pay token
Pass the paymentData object to your server
SALE Request — Apple Pay
Include digital_wallet=applepay and payment_token (the full Apple Pay token JSON). Omit all card fields. Use Formula 8 for the hash.
curl -X POST https://{PAYMENT_URL}/post \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "action=SALE" \
-d "client_key={CLIENT_KEY}" \
-d "order_id=ORD-AP-001" \
-d "order_amount=99.99" \
-d "order_currency=USD" \
-d "order_description=Purchase" \
-d "digital_wallet=applepay" \
-d "payment_token={APPLE_PAY_TOKEN_JSON}" \
-d "payer_first_name=Jane" \
-d "payer_last_name=Doe" \
-d "[email protected]" \
-d "payer_phone=77001234567" \
-d "payer_country=KZ" \
-d "payer_city=Astana" \
-d "payer_address=10+Kunayeva" \
-d "payer_zip=010000" \
-d "payer_ip=192.168.1.1" \
-d "term_url_3ds=https://yoursite.com/return" \
-d "hash={FORMULA_8_HASH}"// Formula 8: md5(strtoupper(strrev(email) . PASSWORD)) $hash = md5(strtoupper(strrev($email) . PASSWORD)); $params = [ 'action' => 'SALE', 'client_key' => CLIENT_KEY, 'digital_wallet' => 'applepay', 'payment_token' => $applePayTokenJson, // ... all payer fields ... 'hash' => $hash, ];
Apple Pay Payment Flow
By default, Apple Pay payments are classified as virtual — card details are not stored, and DMS / recurring creation is limited. To enable the card flow (decrypt token, store card data for recurring):
- Set up the Processing Private Key in the admin panel
- Verify your payment provider supports card flow (contact support)
Google Pay#
Prerequisites
- Review Google Pay Web or Android documentation
- Complete the integration checklist and branding requirements
- Verify domains in Google Business Console
- Adhere to Google Pay APIs Acceptable Use Policy and Terms of Service
Obtaining the Token
Get PaymentData using these parameters:
allowPaymentMethods: CARDtokenizationSpecification: { "type": "PAYMENT_GATEWAY" }allowedCardNetworks: ['MASTERCARD', 'VISA', 'AMEX', 'DISCOVER', 'JCB']allowedCardAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS']gateway= value from your CentaPay account managergatewayMerchantId= yourCLIENT_KEY
SALE Request — Google Pay
Identical to Apple Pay but with digital_wallet=googlepay. Use Formula 8 for the hash. Omit card fields.
PAN_ONLY auth method, 3DS responsibility transfers to the acquirer. Ensure your acquirer supports this.Google Pay Payment Flow
Same as Apple Pay: payments default to virtual. To enable card flow, configure the Private Key in admin panel and verify provider support. The "Environment" setting must match (TEST or PRODUCTION) between your token generation and admin panel config.