1. Alternative Payment Methods
Sipay API Documentation - ZA
  • Overview
    • Getting Started
    • Test Cards
  • Authentication
    • Token Generation
      POST
  • Commission
    • Commission
      POST
  • HASH
    • Hash Creation
    • Hash Validation
  • Non-Secure Payment
    • Non-Secure Payment Flow
    • Non-Secure Card Payment
      POST
    • Non-Secure Pre-Authorization Payment
      POST
    • Confirm Payment
      POST
  • 3D Secure Payment
    • 3D Secure Payment Flow
    • 3D Secure Card Payment
      POST
    • 3D Secure Pre-Authorization Payment
      POST
    • Complete Payment
      POST
    • Confirm Payment
      POST
  • Non-Secure and 3D Payment with Sipay
    • Non-Secure and 3D Secure Payment with Sipay
  • Check Status
    • Check Status
  • Refund
    • Refund
  • Webhook
    • Webhook
  • Status Codes
    • Status Codes
  • Alternative Payment Methods
    • Overview
    • Payment Flow
    • Base URL & Environments
    • Hash Key
    • Client-side SDK handling
    • Status Codes
    • End-to-end example
    • GPay Payment Example
    • Authentication
      POST
    • walletCheckout
      POST
    • walletPay
      POST
  1. Alternative Payment Methods

Client-side SDK handling

Add a container element to your checkout page and run the script returned by walletCheckout. The script reports the transient token through two channels — use whichever fits your integration.

1 · Container element#

<div id="walletCheckout"></div>

2 · Inject the returned script#

3 · Receive the transient token#

Option A — CustomEvent (bubbles up from the container):#

document.getElementById('walletCheckout')
  .addEventListener('sipay:wallet-token', (e) => {
    const { transientToken, paymentType } = e.detail; // paymentType: 'apple_pay' | 'google_pay'
    submitToYourServer(transientToken);
  });

Option B — global callback (define before the script runs):#

window.sipayWalletTokenHandler = function (transientToken, paymentType) {
    submitToYourServer(transientToken);
};
💡
Forward the transientToken to your own server, then call walletPay server-to-server. Never call walletPay directly from the browser — your bearer token and app_secret must stay server-side.
Modified at 2026-06-01 13:26:46
Previous
Hash Key
Next
Status Codes
Built with