UNPKG

react-native-yoco

Version:

The Yoco SDK allows app developers to integrate with Yoco card machines to accept in-person payments from within their application. The most common scenario is to accept Yoco payments from within your Point of Sale application.

64 lines 1.87 kB
import { PaymentType, SupportedCurrency } from "./ReactNativeYocoEnums"; export type ChangeEventPayload = { value: string; }; export type ConfigureParams = { secret: string; }; export type PaymentParameters = { receiptDelegate?: unknown; userInfo?: Record<string, unknown>; staffMember?: unknown; note?: string; billId?: string; receiptNumber?: string; }; export type ChargeParams = { amountInCents: number; paymentType: PaymentType; currency: SupportedCurrency; /** Pass undefined or null to not ask for tip, 0 to ask and pass a valid number to include tip in amount */ tipInCents?: number | null; paymentParameters?: PaymentParameters; }; export type GetPaymentResultParams = { transactionId: string; /** Show result, success or error (more info: https://developer.yoco.com/in-person/android/show-transaction-result-android) */ showResult?: boolean; }; export type ReceiptInfo = { authorizationCode?: string; transactionTime?: string; }; export type PaymentResult = { resultCode?: string; errorMessage?: string; amountInCents?: number; tipInCents?: number; finalAmountInCents?: number; paymentType?: PaymentType; currency?: SupportedCurrency; transactionId?: string; clientTransactionId?: string; receiptInfo?: ReceiptInfo; }; export type QueryTransactionsParams = { receiptNumber: string; }; export type QueryTransactionsResult = { resultCode?: string; errorMessage?: string; transactions?: PaymentResult[]; }; export type StaffMember = { name: string; staffNumber: number; }; export type RefundParams = { transactionId: string; amountInCents: number; userInfo?: Record<string, any>; staffMember?: StaffMember; }; export type RefundResult = PaymentResult & {}; //# sourceMappingURL=ReactNativeYoco.types.d.ts.map