Authorization

This document provides technical specifications for Authorization workflow APIs: /authorize, /authorize/{order_id}/capture (for capture), and /authorize/{order_id}/void. These APIs support a two-step payment process, allowing merchants to reserve funds first (Authorization) and then confirm the final amount (Capture) or release the reserved funds (Void).

Shared Request Data Models

The following objects are used across one or more API requests.

Product Model

Input ParameterTypeMax LengthDescription
nameString100Name of the product or service.
descriptionString255Detailed description of the product/item.
priceDecimal-Unit price of the product.
quantityInteger-Number of units purchased.

Order Model

Input ParameterTypeMax LengthDescription
idString50Merchant's unique ID for the order (used to track the overall payment lifecycle).
referenceString50Secondary internal reference number for the order.
descriptionString255A brief description of the transaction's purpose.
currencyString3The 3-letter currency code (e.g., "KWD").
amountDecimal-The total amount for the current transaction (authorization amount, capture amount, or void amount).

Payment Gateway Model

Input ParameterTypeMax LengthDescription
srcString10Specifies the payment source (KNET, apple-pay, samsung-pay, google-pay, and cc).

Customer Model

Input ParameterTypeMax LengthDescription
uniqueIdString100Unique identifier for the customer.
nameString100Customer's full name.
emailString100Customer's email address.
mobileString20Customer's mobile number, including the country code.

Enhancements and Updates

We have expanded our Authorization capabilities to support complex merchant workflows, multi-merchant platforms, and modern digital wallets.
Key Enhancements

  1. Partial Capture Logic
    Settle a final amount that is less than or equal to the original pre-authorized total
    Use Cases: When final order fulfillment costs less than estimated (e.g., out-of-stock items, weighted items, or adjusted service charges).
    How it Works: Pass the updated final amount in your POST request to /authorize/{order_id}/capture
    The remaining uncaptured balance is released back to the cardholder
  2. Multi-Merchant Support in Capture API
    Process multi-merchant payouts directly during the capture step for marketplace and platform businesses.
    Use Cases: E-commerce marketplaces, delivery platforms, and booking portals where funds need to be split across sub-merchants.
    How it Works: Include the extraMerchantData array in your POST request to /authorize/{order_id}/capture to specify IBANs, sub-merchant settlement amounts, and platform commission rates.
  3. Expanded Digital Wallet Support
    You can now authorize holds using KNET and digital wallets in addition to credit cards by setting the payment source in paymentGateway.src
    Supported Sources: KNET, apple-pay, samsung-pay, google-pay, and cc.
  4. Automated Authorization Expiration & Cleanup
    Automatically track and expire authorizations that have passed their valid time window.
    The backend computes an explicit expiration timestamp (expires_at) at transaction creation time based on AuthorizationExpiryInMinutes (or default fallback values).
    A scheduled system job runs to sweep and automatically expire any active Authorization transactions that have expired.