UNPKG

nasspay

Version:

TypeScript/JavaScript SDK for integrating with the Nass Merchant Payment Gateway. Supports both Portal and Direct API integration methods with comprehensive type definitions.

22 lines (21 loc) 1.38 kB
import { PortalTransactionRequest, PortalTransactionResponse, StatusCheckResponse } from "./types"; /** * Creates a new payment transaction via the Nass Portal. * Merchants can initiate transactions once authenticated. [cite: 11] * @param baseUrl The base URL for the Nass Payment Gateway API (Portal). * @param accessToken The access token obtained from authentication. * @param transactionDetails Details of the transaction to initiate. * @returns A Promise that resolves to the transaction response containing the redirection URL. * @throws {Error} If the transaction initiation fails. */ export declare function initiatePortalTransaction(baseUrl: string, accessToken: string, transactionDetails: PortalTransactionRequest): Promise<PortalTransactionResponse>; /** * Checks the status of a transaction initiated via the Nass Portal. * Merchants can check the status of a transaction within 24 hours of its initiation. [cite: 23] * @param baseUrl The base URL for the Nass Payment Gateway API (Portal). * @param accessToken The access token obtained from authentication. * @param orderId The unique order identifier. * @returns A Promise that resolves to the transaction status response. * @throws {Error} If checking the status fails. */ export declare function checkPortalStatus(baseUrl: string, accessToken: string, orderId: string): Promise<StatusCheckResponse>;