UNPKG

@causalfoundry/js-sdk

Version:

Causal Foundry WEB SDK (JS/TS)

56 lines (50 loc) 1.28 kB
import { CurrencyCode } from "../../core/commonTypes"; export enum PaymentsTypes { DeferredPayment = "deferred_payment", PaymentMethod = "payment_method" } export enum PaymentAction { PaymentProcessed = 'payment_processed', View = "view", Add = "add", Remove = "remove", Update = "update", Select = "select", Other = "other" } export enum PaymentMethod { BankCard = "bank_card", BankTransfer = "bank_transfer", CashOnDelivery = "cash_on_delivery", Cheque = "cheque", Credit = "credit", PointOfSale = "point_of_sale", MobileTransfer = "mobile_transfer", Cash = "cash", Wallet = "wallet", Other = "other" } export interface DeferredPaymentProperties { id: string, /** * this `order_id` will map with the IDs * within both `Checkout` and `Delivery` events */ order_id: string; action: PaymentAction, account_balance: number, payment_amount: number, currency: CurrencyCode, is_successful: boolean, type: PaymentMethod, meta?: any } export interface PaymentMethodProperties { id: string, action: PaymentAction, order_id: string, type: PaymentMethod, payment_amount: number currency: CurrencyCode // required - ISO 4217, meta?: any }