Skip to main content

PaymentMode

Controls how the SDK processes payments:
enum PaymentMode {
  POOL        = 'POOL',         // Custodial — pay from company pool wallet
  SESSION_KEY = 'SESSION_KEY',  // Non-custodial — pay from user's wallet via session key
}
ValueWhen to use
POOLCustodial fintechs, expense tools, closed-loop payment apps
SESSION_KEYNon-custodial wallets, DeFi apps, user-controlled funds
See Payment Modes for a full comparison.

PaymentStatus

The lifecycle status of a payment:
enum PaymentStatus {
  PENDING    = 'pending',     // Created, not yet submitted to chain
  PROCESSING = 'processing',  // Submitted, awaiting confirmation
  CONFIRMED  = 'confirmed',   // Confirmed on-chain
  FAILED     = 'failed',      // Transaction failed or rejected
}
import { PaymentStatus } from '@taprails/tap-to-pay';

if (result.status === PaymentStatus.CONFIRMED) {
  showSuccessScreen();
} else if (result.status === PaymentStatus.FAILED) {
  showErrorScreen();
}

FlowType

Controls which UI flow PaymentFlowManager renders:
type FlowType = 'merchant' | 'customer';

FlowState

Union of all possible UI states across merchant and customer flows:
type MerchantFlowState =
  | 'idle'
  | 'creating'
  | 'waiting'
  | 'processing'
  | 'success'
  | 'error';

type CustomerFlowState =
  | 'idle'
  | 'scanning'
  | 'confirming'
  | 'processing'
  | 'success'
  | 'error';

type FlowState = MerchantFlowState | CustomerFlowState;

MerchantStatus

Controls whether a merchant can receive payments. Checked on every payments/process request.
enum MerchantStatus {
  ACTIVE       // Normal operations — payments accepted
  PAUSED       // Self-service pause by the partner company
  FROZEN       // Platform-imposed hold (admin only)
  BLACKLISTED  // Permanent ban for fraud / non-compliance (admin only)
  SUSPENDED    // Temporary administrative hold (admin only)
}
See MerchantStatus reference → for full details on who can set each status and what happens to in-flight payments.