v1.0

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.

S2S Token Flow Reduced PCI Scope

Apple Pay#

Prerequisites

In your Apple Developer account:

Then configure the admin panel (Merchants → Wallets → Apple Pay) with: Merchant Identifier, Certificate (.pem), Private Key (.key), Processing Private Key.

ℹ️
Contact [email protected] to initiate Apple Pay setup. See Apple's demo at applepaydemo.apple.com.

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):

Google Pay#

Prerequisites

Obtaining the Token

Get PaymentData using these parameters:

SALE Request — Google Pay

Identical to Apple Pay but with digital_wallet=googlepay. Use Formula 8 for the hash. Omit card fields.

⚠️
For 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.