1. BAS SDK Payment
BasGate Document v2
  • BAS SDK Payment
    • Payment Flow
    • Payment Api backend
      • Introduction
      • Authentication
      • Initiate Transaction
      • Check Transaction Status
    • Frontend Bas Payment SDK
      • Flutter SDK
      • Android SDK
      • IOS SDK
    • Signature
      • Signature (Checksum) Documentation
    • Tools
      • Laravel Payment Gateway SDK
  1. BAS SDK Payment

Payment Flow

The Payment SDK enables third-party developers to independently integrate with the BAS platform. It allows developers to embed the Payment SDK into their applications, facilitating payment integration without requiring their app to be added to the BAS platform.

💳 Payment Integration Workflow#

This document describes the secure payment process between the Customer, the Merchant, and the Bas Payment Gateway.

1. Initialization Phase (Setting up the Order)#

Checkout Trigger: The process begins when the Customer clicks the "Checkout" button on the Merchant Frontend.
Session Creation: The Merchant Backend sends the order details to the Bas API.
Security Token: The Bas API generates a unique TrxToken (Transaction Token). This token acts as a secure ID for the payment, ensuring that order details cannot be tampered with by the user.

2. Execution Phase (The Payment Experience)#

SDK Activation: The Merchant Frontend uses the TrxToken to launch the Bas SDK.
Dynamic UI: The SDK automatically fetches and displays the available payment methods (Cards, Wallets, etc.) directly to the Customer.
Direct Processing: The Customer enters their details. The SDK sends this sensitive data directly to Bas for processing. This keeps the Merchant's servers safe and out of reach of sensitive card data.

3. Verification Phase (Ensuring Authenticity)#

Handover: Once the payment is processed, the SDK returns the Customer to the Merchant Frontend.
The "Truth" Check: To prevent fraud, the Merchant Backend performs a Server-to-Server check. It calls the Check Status API to confirm with Bas that the payment was actually successful.
Final Confirmation: Once verified, the Merchant updates the database and shows a "Success" message to the Customer.

🛡️ Why this flow is professional:#

FeatureBenefit
TokenizationProtects order data from being modified in the browser.
SDK IntegrationReduces the Merchant's security liability (PCI Compliance).
Backend VerificationEnsures that "Success" messages are real and not faked by hackers.

Note: For production environments, it is recommended to also implement Webhooks to handle cases where the user closes their browser before the final redirect.
Modified at 2026-05-12 20:28:09
Next
Introduction
Built with