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

End-to-end example

A minimal happy-path walkthrough.

Step 1 — Server: get token#

POST /ccpayment/api/token
{ "app_id": "APP_ID", "app_secret": "APP_SECRET" }
→ data.token = "eyJ..."

Step 2 — Server: start the wallet session#

POST /ccpayment/api/walletCheckout
Authorization: Bearer eyJ...
{
  "merchant_key": "MERCHANT_KEY",
  "hash_key": generateSipayHashKey(["149.90","TRY","MERCHANT_KEY","ORDER-2026-0001"], APP_SECRET),
  "invoice_id": "ORDER-2026-0001",
  "total": 149.90,
  "currency_code": "TRY",
  "payment_service_provider": ["apple_pay","google_pay"]
}
→ JavaScript (send to the browser)

Step 3 — Browser: render & capture token#

<div id="walletCheckout"></div>
<script>/* injected walletCheckout JS */</script>
<script>
  document.getElementById('walletCheckout')
    .addEventListener('sipay:wallet-token', e => {
      postToServer({ transientToken: e.detail.transientToken });
    });
</script>

Step 4 — Server: finalize#

POST /ccpayment/api/walletPay
Authorization: Bearer eyJ...
{
  "merchant_key": "MERCHANT_KEY",
  "hash_key": generateSipayHashKey(["ORDER-2026-0001","MERCHANT_KEY"], APP_SECRET),
  "invoice_id": "ORDER-2026-0001",
  "cybersource_transient_token": "eyJraWQiOi..."
}
→ { "status_code": 100, "status_description": "Payment process successful", "data": { ... } }
Modified at 2026-06-02 14:26:50
Previous
Status Codes
Next
GPay Payment Example
Built with