/** * Link Card Service (Card on File) * Handles card linking operations for Card on File feature */ import { BaseService } from './BaseService'; import { LinkCardFormResponse, LinkCardOptions, RemoveCardTokenRequest, RemoveCardTokenResponse, RemoveCardTokenOptions } from '../types'; /** * Service for Card on File (Link Card) operations */ export declare class LinkCardService extends BaseService { /** * Generate form parameters for client-side HTML form submission * * This method generates the form parameters that can be used to build an HTML form * that submits directly to PayWay. This is useful for client-side implementations * where you want to avoid sending the API key to the client. * * ⚠️ CRITICAL REQUIREMENTS: * - HTML forms MUST include: enctype="multipart/form-data" * - Required fields: merchant_id, return_param, hash * - Example:
*/ generateFormParams(options: LinkCardOptions): LinkCardFormResponse; /** * Remove a customer's linked card token (simplified API) * * Removes a customer's linked card token from your platform. Once the token * is removed, this action cannot be undone, and the token will no longer be * valid for purchases. * * NOTE: Before using this API, ensure your profile has enabled the Card on File feature. * * @param options - Remove card token options * @returns Remove card token response * @throws {PayWayError} If request fails or validation errors occur * * @example * const result = await linkCardService.removeCardToken({ * ctid: '522235F63E4998...ABC270FC9FE07409F6ACD716B88', * pwt: '5222359B5394FF7B...259BFE3868B08461F' * }); * * if (result.status.code === '00') { * console.log('Card token removed successfully'); * } */ removeCardToken(options: RemoveCardTokenOptions): Promise