nimbbl-mobile-react-native-sdk
Version: 
Nimbbl React Native SDK for payment integration
100 lines • 2.36 kB
TypeScript
/**
 * @fileoverview Type definitions for Nimbbl React Native SDK
 * @version 1.0.0
 * @author Nimbbl Tech
 */
/**
 * SDK Configuration object
 */
export interface SDKConfig {
    /** Environment (sandbox/production) */
    environment: 'sandbox' | 'production';
    /** Additional configuration options */
    options?: {
        timeout?: number;
        enable_logging?: boolean;
        enable_analytics?: boolean;
        api_base_url?: string;
    };
}
/**
 * Order data for creating payments
 */
export interface OrderData {
    /** Order amount in smallest currency unit */
    amount: number;
    /** Currency code (e.g., 'INR', 'USD') */
    currency: string;
    /** Unique order identifier (optional) */
    order_id?: string;
    /** Customer information */
    customer_details: CustomerDetails;
    /** Order details */
    order_details?: OrderDetails;
    /** Allowed payment methods */
    payment_methods?: string[];
}
/**
 * Customer details for payment
 */
export interface CustomerDetails {
    /** Customer name */
    name: string;
    /** Customer email address */
    email: string;
    /** Customer phone number */
    phone: string;
}
/**
 * Order details
 */
export interface OrderDetails {
    /** Order title/name */
    title: string;
    /** Order description */
    description: string;
}
/**
 * Order response from API
 */
export interface OrderResponse {
    /** Order ID */
    order_id: string;
    /** Order token for payment */
    token: string;
    /** Order status */
    status: string;
    /** Order amount */
    amount: number;
    /** Currency code */
    currency: string;
}
/**
 * Payment options for processing
 */
export interface PaymentOptions {
    /** Payment mode code */
    payment_mode_code?: string;
    /** Bank code for banking payments */
    bank_code?: string;
    /** Wallet code for wallet payments */
    wallet_code?: string;
    /** Payment flow type */
    payment_flow?: string;
    /** Additional payment parameters */
    additional_params?: Record<string, any>;
}
/**
 * Payment response from API
 */
export interface PaymentResponse {
    /** Payment status */
    status: string;
    /** Payment ID */
    payment_id?: string;
    /** Transaction ID */
    transaction_id?: string;
    /** Error message if payment failed */
    error?: string;
}
//# sourceMappingURL=types.d.ts.map