Models

All data api responses will contain either a TransactionPublic or a SettlementInstructionPublic as their payload.

export enum SETTLEMENT_METHOD {
LIQUID_WALLET = 'LIQUID_WALLET',
LIQUID_PARTNER_WALLET = 'LIQUID_PARTNER_WALLET',
PAYPAL = 'PAYPAL',
BLOCKCHAIN_TRANSFER = 'BLOCKCHAIN_TRANSFER',
BLOCKCHAIN_PARTNER_WALLET = 'BLOCKCHAIN_PARTNER_WALLET',
BLOCKCHAIN_DELEGATED_BROADCAST = 'BLOCKCHAIN_DELEGATED_BROADCAST',
CARD_PAYMENT = "CARD_PAYMENT"
}
export enum SETTLEMENT_DIRECTION {
FUNDING = 'FUNDING',
PAYOUT = 'PAYOUT'
}
export enum SETTLEMENT_ACCOUNT_KEY_TYPE {
EMAIL = 'EMAIL',
API_KEY = 'API_KEY',
LIQUID_USER_JWT = 'LIQUID_USER_JWT',
LIQUID_USER_ID = 'LIQUID_USER_ID',
WALLET_ADDRESS = 'WALLET_ADDRESS',
EXTERNAL_USER_ID = 'EXTERNAL_USER_ID',
FINGERPRINT = 'FINGERPRINT'
}
export enum SETTLEMENT_TRANSACTION_KEY_TYPE {
LIQUID_TRANSFER_ID = 'LIQUID_TRANSFER_ID',
LIQUID_PAYMENT_REFERENCE = 'LIQUID_PAYMENT_REFERENCE',
MEMO_ID = 'MEMO_ID',
TRANSACTION_HASH = 'TRANSACTION_HASH',
TRANSCATION_RECEIPT = 'TRANSCATION_RECEIPT',
PAYMENT_ID = 'PAYMENT_ID',
SIGNED_RAW_TRANSACTION = 'SIGNED_RAW_TRANSACTION',
CARD_TOKEN = 'CARD_TOKEN',
CARD_RECEIPT = 'CARD_RECEIPT'
}
export enum TRANSACTION_STATUS {
NOT_STARTED = 'NOT_STARTED',
SETTLEMENT_METHOD_REQUIRED = 'SETTLEMENT_METHOD_REQUIRED',
INPUT_PARAMETERS_REQUIRED = 'INPUT_PARAMETERS_REQUIRED',
FUNDING_STARTED = 'FUNDING_STARTED',
FUNDING_COMPLETE = 'FUNDING_COMPLETE',
CONVERSION_STARTED = 'CONVERSION_STARTED',
CONVERSION_COMPLETE = 'CONVERSION_COMPLETE',
PAYOUT_STARTED = 'PAYOUT_STARTED',
PAYOUT_COMPLETE = 'PAYOUT_COMPLETE',
FILLED = 'FILLED',
BROKEN = 'BROKEN',
CANCELLED = 'CANCELLED'
}
export enum SETTLEMENT_INSTRUCTION_STATUS {
QUEUED = 'QUEUED',
STARTED = 'STARTED',
PARAMETERS_REQUIRED = 'PARAMETERS_REQUIRED',
READY = 'READY',
WAITING_USER = 'WAITING_USER',
WAITING_EXTERNAL = 'WAITING_EXTERNAL',
WAITING_INTERNAL = 'WAITING_INTERNAL',
COMPLETE = 'COMPLETE',
CANCELLED = 'CANCELLED',
MANUAL_INTERVENTION_REQUIRED = 'MANUAL_INTERVENTION_REQUIRED'
}
export interface TransactionPublic {
transaction_id: string;
client_ref?: string;
api_key: string;
status: TRANSACTION_STATUS;
funding_settlement?: SettlementInstructionPublic;
payout_settlement?: SettlementInstructionPublic;
_links: ApiLinks;
}
export interface SettlementInstructionPublic {
settlement_instruction_id: string;
currency: string;
method: SETTLEMENT_METHOD;
direction: SETTLEMENT_DIRECTION;
quantity: string;
status?: SETTLEMENT_INSTRUCTION_STATUS;
setup_parameters?: SettlementSetupParameter;
required_input_parameters?: SettlementRequiredInput;
input_parameters?: SettlementReceivedInput;
result_parameters?: SettlementSetupParameter;
transaction_id: string;
expires: {
unix_ms: number;
iso8601: string;
ttl_ms: number;
}
_links: ApiLinks;
}
export interface ApiLinks {
[id: string]: {
href: string;
}
}
export interface SettlementRequiredInput {
account_key?: {
type: SETTLEMENT_ACCOUNT_KEY_TYPE;
label: string;
required: boolean;
validation: string;
}
transaction_key?: {
type: SETTLEMENT_TRANSACTION_KEY_TYPE;
label: string;
required: boolean;
validation: string;
}
}
export interface SettlementReceivedInput {
account_key?: {
type: SETTLEMENT_ACCOUNT_KEY_TYPE;
value: string;
}
transaction_key?: {
type: SETTLEMENT_TRANSACTION_KEY_TYPE;
value: string;
}
}
export interface SettlementSetupParameter {
account_key?: {
type: SETTLEMENT_ACCOUNT_KEY_TYPE;
value: string
}
transaction_key?: {
type: SETTLEMENT_TRANSACTION_KEY_TYPE;
value: string;
}
}