@causalfoundry/js-sdk
Version:
Causal Foundry WEB SDK (JS/TS)
51 lines (50 loc) • 1.29 kB
TypeScript
import { CurrencyCode } from "../../core/commonTypes";
export declare enum PaymentsTypes {
DeferredPayment = "deferred_payment",
PaymentMethod = "payment_method"
}
export declare enum PaymentAction {
PaymentProcessed = "payment_processed",
View = "view",
Add = "add",
Remove = "remove",
Update = "update",
Select = "select",
Other = "other"
}
export declare 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;
meta?: any;
}