/** * Link Account (Account on File) Types */ import { MobileDeeplink } from './common.types'; /** * Link Account request parameters */ export interface LinkAccountRequest { /** Request timestamp in UTC format YYYYMMDDHHmmss */ req_time: string; /** Merchant ID */ merchant_id: string; /** Extra information to include when payment gateway calls return_url */ return_param: string; /** Return URL for account details - OPTIONAL. Defaults to merchant profile pushback_url if not provided. Domain must be whitelisted. MUST be base64 encoded. */ return_url?: string; /** Return deeplink as Base64 encoded JSON string - optional */ return_deeplink?: string; /** HMAC SHA-512 hash */ hash: string; } /** * Simple link account options */ export interface LinkAccountOptions { /** Extra information to include when payment gateway calls return_url */ returnParam: string; /** Return URL for account details - OPTIONAL. Defaults to merchant profile pushback_url if not provided. Domain must be whitelisted. MUST be base64 encoded. */ returnUrl?: string; /** Return deeplink configuration - optional */ returnDeeplink?: MobileDeeplink; } /** * Link account response */ export interface LinkAccountResponse { /** Status object */ status: { /** Status code ('00' = success, '04' = parameter required, '11' = server error) */ code: string; /** Status message */ message: string; }; /** ABA Mobile deeplink for automatic app launch */ deeplink: string; /** QR string for scanning */ qr_string: string; /** Full URL of the QR image */ qr_image: string; /** Token expiry timestamp */ expire_in: number; } /** * Remove account token request parameters */ export interface RemoveAccountTokenRequest { /** Request timestamp in UTC format YYYYMMDDHHmmss */ req_time: string; /** Merchant ID */ merchant_id: string; /** Customer token ID */ ctid: string; /** Payment way token - token generated by the payment gateway */ pwt: string; /** HMAC SHA-512 hash */ hash: string; } /** * Simple remove account token options */ export interface RemoveAccountTokenOptions { /** Customer token ID */ ctid: string; /** Payment way token - token generated by the payment gateway */ pwt: string; } /** * Remove account token response */ export interface RemoveAccountTokenResponse { /** Status object */ status: { /** Status code ('00' = success, '04' = missing parameter, '29' = invalid ctid or pwt, '500' = server error) */ code: string; /** Status message */ message: string; }; } /** * Get linked account detail request parameters */ export interface GetLinkedAccountDetailRequest { /** Request timestamp in UTC format YYYYMMDDHHmmss */ req_time: string; /** Merchant ID */ merchant_id: string; /** Return param - unique request identifier from initial link request */ return_param: string; /** HMAC SHA-512 hash of merchant_id + req_time + return_param */ hash: string; } /** * Simple get linked account detail options */ export interface GetLinkedAccountDetailOptions { /** Return param - unique request identifier from initial link request */ returnParam: string; } /** * Get linked account detail response */ export interface GetLinkedAccountDetailResponse { /** Account data */ data: { /** Customer token ID */ ctid: string; /** Payment way token - token generated by the payment gateway */ pwt: string; /** Masked linked account (only last 4 digits) */ mask_account: string; /** Token expiration timestamp */ expired_in: number; }; /** Status object */ status: { /** Status code ('00' = success, '403' = not found, 'PW59' = invalid merchant, '04' = parameter validation required) */ code: string; /** Status message */ message: string; /** Transaction ID / Return param */ tran_id: string; }; }