MineSec API Docs10Glue Payment

Glue Payment models

Generated from components.schemas. Type? is nullable; = null marks an optional field that may be omitted. Click a type name to jump to its definition.

Generated from components.schemas. ? marks an optional field, | null a nullable one. Click a type name to jump to its definition.

data class ErrorResponse(
    val status: Int,
    val path: String,
    val requestId: String,
    val title: String,
    val message: String,
)
interface ErrorResponse {
  status: number;  // int32
  path: string;
  requestId: string;
  title: string;
  message: string;
}
data class Amount(
    /** Monetary value as string */
    val value: String,
    /** ISO alpha-3 currency code */
    val currency: String,
)
interface Amount {
  /** Monetary value as string */
  value: string;
  /** ISO alpha-3 currency code */
  currency: string;
}
data class HistoryTree(
    /** The transaction ID supplied in the request */
    val selectedTransactionId: String,
    /** false when the backend cannot guarantee the full historical hierarchy */
    val treeComplete: Boolean,
    val root: HistoryTreeNode,
)
interface HistoryTree {
  /** The transaction ID supplied in the request */
  selectedTransactionId: string;
  /** false when the backend cannot guarantee the full historical hierarchy */
  treeComplete: boolean;
  root: HistoryTreeNode;
}
data class HistoryTreeNode(
    val tranId: String,
    /** Parent transaction ID; null for the root transaction */
    val linkedTranId: String? = null,
    val tranType: TranType,
    val tranStatus: TranStatus,
    val amount: Amount,
    val createdAt: String,  // date-time
    val updatedAt: String? = null,  // date-time
    /** Child transactions, in backend order */
    val children: List<HistoryTreeNode>,
)
interface HistoryTreeNode {
  tranId: string;
  /** Parent transaction ID; null for the root transaction */
  linkedTranId?: string | null;
  tranType: TranType;
  tranStatus: TranStatus;
  amount: Amount;
  createdAt: string;  // date-time
  updatedAt?: string | null;  // date-time
  /** Child transactions, in backend order */
  children: HistoryTreeNode[];
}
enum class TranType {
    SALE, REFUND, AUTH, AUTH_COMP, DEFERRED_AUTH, INSTALL, CASH_IN, CASH_OUT
}
type TranType =
  | "SALE" | "REFUND" | "AUTH" | "AUTH_COMP" | "DEFERRED_AUTH" | "INSTALL"
  | "CASH_IN" | "CASH_OUT";
enum class TranStatus {
    PROCESSING, APPROVED, DECLINED, VOIDED, REVERSED, AUTH_ONLY, ADJUSTED
}
type TranStatus =
  | "PROCESSING" | "APPROVED" | "DECLINED" | "VOIDED" | "REVERSED"
  | "AUTH_ONLY" | "ADJUSTED";
enum class PaymentMethod {
    VISA, MASTERCARD, UNIONPAY, AMEX, JCB, DISCOVER, DINERS, MAESTRO, HIMYAN, 
    NAPS, MY_DEBIT, ELO, CPACE, NAPAS, TROY, TAKAPAY, SADEEQ, ALIPAY, WECHAT, 
    VISA_QR, MASTERCARD_QR, UNIONPAY_QR, SHOPEE_PAY_QR, GRAB_PAY_QR, 
    ALIPAY_PLUS_QR, DUIT_NOW_QR, PAY_NOW, PH_QR, JCB_EMV_QR, LINEPAY_QR, 
    EZ_PAY, PI_QR, ESUNWALLET_QR, TAIWANPAY_QR, EASYWALLET_QR, JKOPAY_QR, 
    IPASSMONEY_PAY_QR, ICASH_PAY_QR, PLUSPAY_QR, PXPAYPLUS_QR, GAMA_PAY_QR, 
    OPAY_QR, LINEPAYMONEY_QR, PAYPAY_QR, BCCARD_QR, NETS_QR, NTTDATA_QR, UCARD, 
    CUP, SMARTPAY, BONUSPAY_QR, CASHLEZ_QR, UNKNOWN
}
type PaymentMethod =
  | "VISA" | "MASTERCARD" | "UNIONPAY" | "AMEX" | "JCB" | "DISCOVER"
  | "DINERS" | "MAESTRO" | "HIMYAN" | "NAPS" | "MY_DEBIT" | "ELO" | "CPACE"
  | "NAPAS" | "TROY" | "TAKAPAY" | "SADEEQ" | "ALIPAY" | "WECHAT"
  | "VISA_QR" | "MASTERCARD_QR" | "UNIONPAY_QR" | "SHOPEE_PAY_QR"
  | "GRAB_PAY_QR" | "ALIPAY_PLUS_QR" | "DUIT_NOW_QR" | "PAY_NOW" | "PH_QR"
  | "JCB_EMV_QR" | "LINEPAY_QR" | "EZ_PAY" | "PI_QR" | "ESUNWALLET_QR"
  | "TAIWANPAY_QR" | "EASYWALLET_QR" | "JKOPAY_QR" | "IPASSMONEY_PAY_QR"
  | "ICASH_PAY_QR" | "PLUSPAY_QR" | "PXPAYPLUS_QR" | "GAMA_PAY_QR"
  | "OPAY_QR" | "LINEPAYMONEY_QR" | "PAYPAY_QR" | "BCCARD_QR" | "NETS_QR"
  | "NTTDATA_QR" | "UCARD" | "CUP" | "SMARTPAY" | "BONUSPAY_QR"
  | "CASHLEZ_QR" | "UNKNOWN";
enum class EntryMode {
    NFC, SWIPE, CHIP, FALLBACK, MANUAL_KEYED, MERCHANT_PRESENT, 
    CONSUMER_PRESENT, RETRIEVE, UNKNOWN
}
type EntryMode =
  | "NFC" | "SWIPE" | "CHIP" | "FALLBACK" | "MANUAL_KEYED"
  | "MERCHANT_PRESENT" | "CONSUMER_PRESENT" | "RETRIEVE" | "UNKNOWN";
enum class CvmPerformed {
    NO_CVM, SIGNATURE, PIN, OFFLINE_PIN, CDCVM, PIN_BYPASSED
}
type CvmPerformed =
  | "NO_CVM" | "SIGNATURE" | "PIN" | "OFFLINE_PIN" | "CDCVM"
  | "PIN_BYPASSED";
enum class CvmSignatureMode {
    ELECTRONIC_SIGNATURE, SIGN_ON_PAPER
}
type CvmSignatureMode = "ELECTRONIC_SIGNATURE" | "SIGN_ON_PAPER";
enum class EntityStatus {
    ACTIVE, DISABLED
}
type EntityStatus = "ACTIVE" | "DISABLED";
enum class BatchStatus {
    OPEN, SETTLED, SETTLE_FAILED, SETTLEMENT_IN_PROGRESS
}
type BatchStatus =
  | "OPEN" | "SETTLED" | "SETTLE_FAILED" | "SETTLEMENT_IN_PROGRESS";
enum class BatchMode {
    AUTO, MANUAL, NO_NEED, AGGREGATED, MERCHANT_MANUAL
}
type BatchMode =
  | "AUTO" | "MANUAL" | "NO_NEED" | "AGGREGATED" | "MERCHANT_MANUAL";
enum class ActionType {
    NEW, ADJUST, VOID, AUTH_COMP, LINK_REFUND, CONFIRM, MERCHANT_PRESENT_QR, 
    CONSUMER_PRESENT_QR, NOTIFIED, INQUIRY, CLOSE, INCREMENTAL_AUTH
}
type ActionType =
  | "NEW" | "ADJUST" | "VOID" | "AUTH_COMP" | "LINK_REFUND" | "CONFIRM"
  | "MERCHANT_PRESENT_QR" | "CONSUMER_PRESENT_QR" | "NOTIFIED" | "INQUIRY"
  | "CLOSE" | "INCREMENTAL_AUTH";
enum class ActionStatus {
    PROCESSING, SUCCESS, REJECTED, TIMEOUT, REVERSED, TO_BE_REVERSE
}
type ActionStatus =
  | "PROCESSING" | "SUCCESS" | "REJECTED" | "TIMEOUT" | "REVERSED"
  | "TO_BE_REVERSE";
enum class HostMessageFormat {
    MOCK, MPGS_AP, CARD_NOW, TWOC2P, CARDWORKS, SHIFT4, SHIFT4_HD, PAY_STORE, 
    POMELO, EFT_PAY, EZPAY, BANKNBOX, IULINK, RAZER, WALLYT, GCAG, POSTBRIDGE, 
    RENDEZVOUS, STD_JSON, S2M_SELECT, VAULTSPAY, SMART_VISTA, SADAD, AIRWALLEX, 
    AIRWALLEX_EU, WORLDPAY, CASHPLUS, PSS, RAWBANK, NEOCASH, CASHLEZ, QRIS, 
    MASARAT, BONUSPAY, ALTO, AXS, CARDINFOLINK, BBL, ONERWAY, ACB, KEENU, 
    SELECT_STANDARD, SELECT_MANUAL_MODE, SELECT_AUTO_MODE, SELECT_V24_MODE, 
    STD_JSON_BSD, STD_JSON_YEDPAY
}
type HostMessageFormat =
  | "MOCK" | "MPGS_AP" | "CARD_NOW" | "TWOC2P" | "CARDWORKS" | "SHIFT4"
  | "SHIFT4_HD" | "PAY_STORE" | "POMELO" | "EFT_PAY" | "EZPAY" | "BANKNBOX"
  | "IULINK" | "RAZER" | "WALLYT" | "GCAG" | "POSTBRIDGE" | "RENDEZVOUS"
  | "STD_JSON" | "S2M_SELECT" | "VAULTSPAY" | "SMART_VISTA" | "SADAD"
  | "AIRWALLEX" | "AIRWALLEX_EU" | "WORLDPAY" | "CASHPLUS" | "PSS"
  | "RAWBANK" | "NEOCASH" | "CASHLEZ" | "QRIS" | "MASARAT" | "BONUSPAY"
  | "ALTO" | "AXS" | "CARDINFOLINK" | "BBL" | "ONERWAY" | "ACB" | "KEENU"
  | "SELECT_STANDARD" | "SELECT_MANUAL_MODE" | "SELECT_AUTO_MODE"
  | "SELECT_V24_MODE" | "STD_JSON_BSD" | "STD_JSON_YEDPAY";
/** Geo-fence outcome decided by the caller (SRS/TMS) before the request reached Enabler */
enum class GeoResult {
    NA, ALLOWED, FLAGGED, DENIED
}
/** Geo-fence outcome decided by the caller (SRS/TMS) before the request reached Enabler */
type GeoResult = "NA" | "ALLOWED" | "FLAGGED" | "DENIED";
/**
 * Installment selection for a SALE (installment is a sale capability, not a transaction type).
 * Supersedes the legacy count-only installmentPlan
 */
data class InstallmentRequest(
    /** The Installment Plan selected, as managed centrally in MMS */
    val planId: String,
    /** The number of installments requested */
    val installmentCount: Int,
    val revolving: RevolvingRequest? = null,
)
/**
 * Installment selection for a SALE (installment is a sale capability, not a transaction type).
 * Supersedes the legacy count-only installmentPlan
 */
interface InstallmentRequest {
  /** The Installment Plan selected, as managed centrally in MMS */
  planId: string;
  /** The number of installments requested */
  installmentCount: number;  // int32
  revolving?: RevolvingRequest;
}
/**
 * The Installment Plan applied to a transaction. Plan-owned attributes come from the resolved
 * MMS configuration
 */
data class Installment(
    val planId: String,
    /** The plan's display name at the time it was applied */
    val planName: String,
    val installmentCount: Int,
    val interestModel: InterestModel,
    val installmentType: InstallmentType,
    val revolving: Revolving? = null,
    /**
     * Issuer/acquirer enrolment or approval reference, normalised from the authorisation response;
     * absent if the host returned none
     */
    val issuerPreapprovalReference: String? = null,
)
/**
 * The Installment Plan applied to a transaction. Plan-owned attributes come from the resolved
 * MMS configuration
 */
interface Installment {
  planId: string;
  /** The plan's display name at the time it was applied */
  planName: string;
  installmentCount: number;  // int32
  interestModel: InterestModel;
  installmentType: InstallmentType;
  revolving?: Revolving;
  /**
   * Issuer/acquirer enrolment or approval reference, normalised from the authorisation response;
   * absent if the host returned none
   */
  issuerPreapprovalReference?: string;
}
/** Backend-calculated flags for which derived operations a transaction currently permits */
data class AllowedActions(
    val refund: Boolean? = null,  // default false
    val completion: Boolean? = null,  // default false
    val incrementalAuth: Boolean? = null,  // default false
)
/** Backend-calculated flags for which derived operations a transaction currently permits */
interface AllowedActions {
  refund?: boolean;  // default false
  completion?: boolean;  // default false
  incrementalAuth?: boolean;  // default false
}
enum class InterestModel {
    WITH_INTEREST, NO_INTEREST
}
type InterestModel = "WITH_INTEREST" | "NO_INTEREST";
enum class InstallmentType {
    REGULAR, REVOLVING
}
type InstallmentType = "REGULAR" | "REVOLVING";
data class RevolvingRequest(
    val initialPaymentAmount: Amount,
)
interface RevolvingRequest {
  initialPaymentAmount: Amount;
}
data class Revolving(
    val initialPaymentAmount: Amount,
    val remainingAmount: Amount,
)
interface Revolving {
  initialPaymentAmount: Amount;
  remainingAmount: Amount;
}
/** POI request for new transaction */
data class ActionNew(
    val tranType: TranType,
    val amount: Amount,
    val profileId: String,
    /** Optional specific acceptance ID */
    val acptId: String? = null,
    /** Optional TID to select */
    val primaryTid: String? = null,
    val description: String? = null,
    val posReference: String? = null,
    /** External order ID supplied by the integrator */
    val extOrderId: String? = null,
    val preferredAcceptanceTag: String? = null,
    val cvmSignatureMode: CvmSignatureMode? = null,
    val forcePaymentMethod: List<PaymentMethod>? = null,
    val forceFetchProfile: Boolean? = null,  // default false
    val tapToOwnDevice: Boolean? = null,  // default false
    /** Legacy count-only installment plan, superseded by installments; do not send both */
    val installmentPlan: Int? = null,
    /**
     * Installment capability of a SALE: only sent with tranType SALE to pay the sale in
     * installments (IPP / EMI). Supersedes installmentPlan
     */
    val installments: InstallmentRequest? = null,
    /** Linked transaction ID for SCA second transaction */
    val linkedTranId: String? = null,
    /**
     * Indicates if this is a SCA (Strong Customer Authentication) second transaction. When true,
     * linkedTranId is required.
     */
    val isScaSecond: Boolean? = null,
    val extra: Map<String, String>? = null,
    val geoResult: GeoResult? = null,
    /** Device location snapshot captured when the geo-fence check ran; passed through verbatim */
    val geoLocation: Map<String, Any?>? = null,
    /** Identifier of the geo-fence rule the caller matched */
    val geoId: String? = null,
)
/** POI request for new transaction */
interface ActionNew {
  tranType: TranType;
  amount: Amount;
  profileId: string;
  /** Optional specific acceptance ID */
  acptId?: string;
  /** Optional TID to select */
  primaryTid?: string;
  description?: string;
  posReference?: string;
  /** External order ID supplied by the integrator */
  extOrderId?: string;
  preferredAcceptanceTag?: string;
  cvmSignatureMode?: CvmSignatureMode;
  forcePaymentMethod?: PaymentMethod[];
  forceFetchProfile?: boolean;  // default false
  tapToOwnDevice?: boolean;  // default false
  /** Legacy count-only installment plan, superseded by installments; do not send both */
  installmentPlan?: number;  // integer
  /**
   * Installment capability of a SALE: only sent with tranType SALE to pay the sale in
   * installments (IPP / EMI). Supersedes installmentPlan
   */
  installments?: InstallmentRequest;
  /** Linked transaction ID for SCA second transaction */
  linkedTranId?: string;
  /**
   * Indicates if this is a SCA (Strong Customer Authentication) second transaction. When true,
   * linkedTranId is required.
   */
  isScaSecond?: boolean;
  extra?: Record<string, string>;
  geoResult?: GeoResult;
  /** Device location snapshot captured when the geo-fence check ran; passed through verbatim */
  geoLocation?: Record<string, unknown>;
  /** Identifier of the geo-fence rule the caller matched */
  geoId?: string;
}
/** Successful card read result */
data class CardReadSuccess(
    val paymentMethod: PaymentMethod,
    val entryMode: EntryMode,
    val maskedPan: String,
    val needOnline: Boolean? = null,  // default true
    val cardKsn: String? = null,
    val cvmPerformed: CvmPerformed? = null,
    val pinKsn: String? = null,
    val panToken: String? = null,
    val reader: Reader? = null,
    val appleTTP: AppleTap2PayTransData? = null,
    val emvData: Map<String, String>? = null,
)
/** Successful card read result */
interface CardReadSuccess {
  paymentMethod: PaymentMethod;
  entryMode: EntryMode;
  maskedPan: string;
  needOnline?: boolean;  // default true
  cardKsn?: string;
  cvmPerformed?: CvmPerformed;
  pinKsn?: string;
  panToken?: string;
  reader?: Reader;
  appleTTP?: AppleTap2PayTransData;
  emvData?: Record<string, string>;
}
/** Card reader device information */
data class Reader(
    /** Model identifier (e.g., MineHades, D177, Tap2Pay) */
    val model: String,
    /** Brand/manufacturer (e.g., MineSec, PAX, NEXGO) */
    val brand: String,
    val sdkId: String? = null,
    val sdkVersion: String? = null,
    /** Hardware serial number */
    val hardwareSN: String? = null,
    val firmwareVersion: String? = null,
    val emvKernelVersion: String? = null,
)
/** Card reader device information */
interface Reader {
  /** Model identifier (e.g., MineHades, D177, Tap2Pay) */
  model: string;
  /** Brand/manufacturer (e.g., MineSec, PAX, NEXGO) */
  brand: string;
  sdkId?: string;
  sdkVersion?: string;
  /** Hardware serial number */
  hardwareSN?: string;
  firmwareVersion?: string;
  emvKernelVersion?: string;
}
/** Apple Tap to Pay card read data */
data class AppleTap2PayTransData(
    /** JWT token for iOS proximity reader activation */
    val readerToken: String,
    /** Unique physical ID of iPhone Proximity Reader */
    val readerId: String,
    /** iPhone generated unique ID for card tapping */
    val iosTrxId: String,
    /** Base64 encoded payment data from iPhone Proximity Reader */
    val protectedPaymentData: String,
)
/** Apple Tap to Pay card read data */
interface AppleTap2PayTransData {
  /** JWT token for iOS proximity reader activation */
  readerToken: string;
  /** Unique physical ID of iPhone Proximity Reader */
  readerId: string;
  /** iPhone generated unique ID for card tapping */
  iosTrxId: string;
  /** Base64 encoded payment data from iPhone Proximity Reader */
  protectedPaymentData: string;
}
data class TransactionRequest(
    val poiRequest: ActionNew,
    val cardRead: CardReadSuccess,
    val sdkId: String,
    val tokenizationAction: TokenizationAction? = null,
)
interface TransactionRequest {
  poiRequest: ActionNew;
  cardRead: CardReadSuccess;
  sdkId: string;
  tokenizationAction?: TokenizationAction;
}
/** Card transaction paid with a saved payment token instead of a card read. */
data class TokenTransactionRequest(
    val poiRequest: ActionNew,
    val paymentToken: PaymentTokenReference,
    val sdkId: String,
)
/** Card transaction paid with a saved payment token instead of a card read. */
interface TokenTransactionRequest {
  poiRequest: ActionNew;
  paymentToken: PaymentTokenReference;
  sdkId: string;
}
data class PaymentTokenReference(
    /** `paymentToken.tokenValue` returned when the card was tokenized */
    val tokenValue: String,
)
interface PaymentTokenReference {
  /** `paymentToken.tokenValue` returned when the card was tokenized */
  tokenValue: string;
}
data class TransactionRequestMpQr(
    val poiRequest: ActionNew,
    val paymentMethod: PaymentMethod,
    val sdkId: String? = null,
    val callbackUrl: String? = null,
)
interface TransactionRequestMpQr {
  poiRequest: ActionNew;
  paymentMethod: PaymentMethod;
  sdkId?: string;
  callbackUrl?: string;
}
/** Transaction response */
data class Transaction(
    val tranId: String,
    val tranType: TranType,
    val tranStatus: TranStatus,
    val amount: Amount,
    val paymentMethod: PaymentMethod,
    val entryMode: EntryMode,
    val accountMasked: String? = null,
    val accountBin: String? = null,
    val accountLast4: String? = null,
    val issCountryCode: String? = null,
    val cvmPerformed: CvmPerformed? = null,
    val cvmSignatureUrl: String? = null,
    val cvmSignatureBase64: String? = null,
    val aid: String? = null,
    val appName: String? = null,
    val tc: String? = null,
    val tvr: String? = null,
    val tsi: String? = null,
    val atc: String? = null,
    val profileId: String,
    /**
     * Deprecated. Use acptId instead
     * @deprecated
     */
    val acceptanceId: String? = null,
    val acptId: String,
    val sdkId: String? = null,
    val posReference: String? = null,
    /** External order ID supplied by the integrator */
    val extOrderId: String? = null,
    val trace: String,
    val description: String? = null,
    val callbackUrl: String? = null,
    /** Legacy count-only installment plan, superseded by installments */
    val installmentPlan: Int? = null,
    /** Installment applied to this SALE, if it was paid in installments */
    val installments: Installment? = null,
    val merchantName: String,
    val merchantAddr: String,
    val mcc: String,
    val primaryMid: String,
    val primaryTid: String,
    val subMid: String? = null,
    val subTid: String? = null,
    val hostMessageFormat: HostMessageFormat,
    val providerReference: String? = null,
    val providerMchId: String? = null,
    val isvId: String? = null,
    val isvName: String? = null,
    val shopId: String? = null,
    val shopName: String? = null,
    /** ID of the immediate parent transaction (e.g. the original sale for a refund) */
    val linkedTranId: String? = null,
    val linkedSrsTranId: String? = null,
    /**
     * True when at least one derived transaction points to this one. Absent when not evaluated
     * (e.g. list responses)
     */
    val hasChildren: Boolean? = null,
    val refundedAmount: Amount? = null,
    val availableRefundAmount: Amount? = null,
    val completedAmount: Amount? = null,
    val availableCompletionAmount: Amount? = null,
    val allowedActions: AllowedActions? = null,
    val preferredAcceptanceTag: String? = null,
    val extraData: String? = null,
    val rrn: String? = null,
    val approvalCode: String? = null,
    val batchId: String,
    val batchNo: String,
    val actions: List<Action>,
    val srsTranId: String? = null,
    val consumerPaymentDevice: String? = null,
    val geoResult: GeoResult? = null,
    /** Device location snapshot captured when the geo-fence check ran; passed through verbatim */
    val geoLocation: Map<String, Any?>? = null,
    /** Identifier of the geo-fence rule the caller matched */
    val geoId: String? = null,
    val tokenizationActionResponse: TokenizationActionResponse? = null,
    val createdAt: String,  // date-time
    val updatedAt: String? = null,  // date-time
)
/** Transaction response */
interface Transaction {
  tranId: string;
  tranType: TranType;
  tranStatus: TranStatus;
  amount: Amount;
  paymentMethod: PaymentMethod;
  entryMode: EntryMode;
  accountMasked?: string;
  accountBin?: string;
  accountLast4?: string;
  issCountryCode?: string;
  cvmPerformed?: CvmPerformed;
  cvmSignatureUrl?: string;
  cvmSignatureBase64?: string;
  aid?: string;
  appName?: string;
  tc?: string;
  tvr?: string;
  tsi?: string;
  atc?: string;
  profileId: string;
  /**
   * Deprecated. Use acptId instead
   * @deprecated
   */
  acceptanceId?: string;
  acptId: string;
  sdkId?: string;
  posReference?: string;
  /** External order ID supplied by the integrator */
  extOrderId?: string;
  trace: string;
  description?: string;
  callbackUrl?: string;
  /** Legacy count-only installment plan, superseded by installments */
  installmentPlan?: number;  // integer
  /** Installment applied to this SALE, if it was paid in installments */
  installments?: Installment;
  merchantName: string;
  merchantAddr: string;
  mcc: string;
  primaryMid: string;
  primaryTid: string;
  subMid?: string;
  subTid?: string;
  hostMessageFormat: HostMessageFormat;
  providerReference?: string;
  providerMchId?: string;
  isvId?: string;
  isvName?: string;
  shopId?: string;
  shopName?: string;
  /** ID of the immediate parent transaction (e.g. the original sale for a refund) */
  linkedTranId?: string;
  linkedSrsTranId?: string;
  /**
   * True when at least one derived transaction points to this one. Absent when not evaluated
   * (e.g. list responses)
   */
  hasChildren?: boolean;
  refundedAmount?: Amount;
  availableRefundAmount?: Amount;
  completedAmount?: Amount;
  availableCompletionAmount?: Amount;
  allowedActions?: AllowedActions;
  preferredAcceptanceTag?: string;
  extraData?: string;
  rrn?: string;
  approvalCode?: string;
  batchId: string;
  batchNo: string;
  actions: Action[];
  srsTranId?: string;
  consumerPaymentDevice?: string;
  geoResult?: GeoResult;
  /** Device location snapshot captured when the geo-fence check ran; passed through verbatim */
  geoLocation?: Record<string, unknown>;
  /** Identifier of the geo-fence rule the caller matched */
  geoId?: string;
  tokenizationActionResponse?: TokenizationActionResponse;
  createdAt: string;  // date-time
  updatedAt?: string;  // date-time
}
/**
 * Optional card tokenization intent on a transaction request. Requires the `x-idempotency-key`
 * header.
 */
data class TokenizationAction(
    val command: Command,
    /** Tokenization customer to link the instrument to */
    val customerId: String? = null,
    val metadata: Map<String, String>? = null,
) {
    enum class Command {
        TOKENIZE_CARD
    }
}
/**
 * Optional card tokenization intent on a transaction request. Requires the `x-idempotency-key`
 * header.
 */
interface TokenizationAction {
  command: "TOKENIZE_CARD";
  /** Tokenization customer to link the instrument to */
  customerId?: string;
  metadata?: Record<string, string>;
}
enum class TokenizationActionStatus {
    SUCCEEDED, SKIPPED, FAILED
}
type TokenizationActionStatus = "SUCCEEDED" | "SKIPPED" | "FAILED";
/**
 * Tokenization result attached to a transaction that carried `tokenizationAction`.
 * The payment result is independent: SKIPPED or FAILED never changes the transaction.
 */
data class TokenizationActionResponse(
    val command: String,
    val status: TokenizationActionStatus,
    /** Skip or error code when status is not SUCCEEDED, e.g. NOT_ELIGIBLE, TOKENIZATION_UNAVAILABLE */
    val reason: String? = null,
    val message: String? = null,
    /** CREATED or EXISTING when status is SUCCEEDED */
    val outcome: String? = null,
    val idempotencyReplayed: Boolean? = null,
    val instrument: TokenizedInstrument? = null,
    val paymentToken: TokenizedPaymentToken? = null,
    val analyticsToken: TokenizedAnalyticsToken? = null,
)
/**
 * Tokenization result attached to a transaction that carried `tokenizationAction`.
 * The payment result is independent: SKIPPED or FAILED never changes the transaction.
 */
interface TokenizationActionResponse {
  command: string;
  status: TokenizationActionStatus;
  /** Skip or error code when status is not SUCCEEDED, e.g. NOT_ELIGIBLE, TOKENIZATION_UNAVAILABLE */
  reason?: string;
  message?: string;
  /** CREATED or EXISTING when status is SUCCEEDED */
  outcome?: string;
  idempotencyReplayed?: boolean;
  instrument?: TokenizedInstrument;
  paymentToken?: TokenizedPaymentToken;
  analyticsToken?: TokenizedAnalyticsToken;
}
/** Standalone card tokenization request (no payment) */
data class InstrumentTokenizationRequest(
    val cardRead: CardReadSuccess,
    /** Terminal profile whose merchant owns the tokenization scope. Defaults to the JWT profileId. */
    val profileId: String? = null,
    /** Tokenization customer to link the instrument to */
    val customerId: String? = null,
    val metadata: Map<String, String>? = null,
    val sdkId: String? = null,
)
/** Standalone card tokenization request (no payment) */
interface InstrumentTokenizationRequest {
  cardRead: CardReadSuccess;
  /** Terminal profile whose merchant owns the tokenization scope. Defaults to the JWT profileId. */
  profileId?: string;
  /** Tokenization customer to link the instrument to */
  customerId?: string;
  metadata?: Record<string, string>;
  sdkId?: string;
}
data class InstrumentTokenizationResponse(
    /** CREATED for a new instrument, EXISTING when the card was already tokenized for this merchant */
    val outcome: String,
    val idempotencyReplayed: Boolean,
    val instrument: TokenizedInstrument,
    val paymentToken: TokenizedPaymentToken,
    val analyticsToken: TokenizedAnalyticsToken,
)
interface InstrumentTokenizationResponse {
  /** CREATED for a new instrument, EXISTING when the card was already tokenized for this merchant */
  outcome: string;
  idempotencyReplayed: boolean;
  instrument: TokenizedInstrument;
  paymentToken: TokenizedPaymentToken;
  analyticsToken: TokenizedAnalyticsToken;
}
data class TokenizedInstrument(
    val instrumentId: String,
    val instrumentType: String,
    val status: String,
    val cardBrand: String,
    val maskedPan: String,
    val lastFour: String,
    val expiryMonth: Int,
    val expiryYear: Int,
)
interface TokenizedInstrument {
  instrumentId: string;
  instrumentType: string;
  status: string;
  cardBrand: string;
  maskedPan: string;
  lastFour: string;
  expiryMonth: number;  // integer
  expiryYear: number;  // integer
}
data class TokenizedPaymentToken(
    val tokenId: String,
    val tokenKind: String,
    val status: String,
    val paymentCapable: Boolean,
    val provider: String,
    /** Present only when the tokenization exposure policy permits returning it */
    val tokenValue: String? = null,
)
interface TokenizedPaymentToken {
  tokenId: string;
  tokenKind: string;
  status: string;
  paymentCapable: boolean;
  provider: string;
  /** Present only when the tokenization exposure policy permits returning it */
  tokenValue?: string;
}
data class TokenizedAnalyticsToken(
    val analyticsTokenId: String,
    val status: String,
    val paymentCapable: Boolean,
)
interface TokenizedAnalyticsToken {
  analyticsTokenId: string;
  status: string;
  paymentCapable: boolean;
}
/** Request to perform action on transaction. */
data class ActionRequest(
    val actionType: ActionType,
    val amount: Amount? = null,
    val originalActionId: String? = null,
    val posReference: String? = null,
    val srsTranId: String? = null,
)
/** Request to perform action on transaction. */
interface ActionRequest {
  actionType: ActionType;
  amount?: Amount;
  originalActionId?: string;
  posReference?: string;
  srsTranId?: string;
}
/** Transaction action */
data class Action(
    val actionId: String,
    val trace: String,
    val actionType: ActionType,
    val actionStatus: ActionStatus,
    val requestId: String,
    val amount: Amount? = null,
    val tranId: String? = null,
    val reason: String? = null,
    val hostRespCode: String? = null,
    val hostRespMessage: String? = null,
    val posReference: String? = null,
    val extraData: String? = null,
    val hostRespExtra: Map<String, Any?>? = null,
    val geoResult: GeoResult? = null,
    /** Device location snapshot captured when the geo-fence check ran; passed through verbatim */
    val geoLocation: Map<String, Any?>? = null,
    /** Identifier of the geo-fence rule the caller matched */
    val geoId: String? = null,
    val createdAt: String,  // date-time
    val updatedAt: String? = null,  // date-time
)
/** Transaction action */
interface Action {
  actionId: string;
  trace: string;
  actionType: ActionType;
  actionStatus: ActionStatus;
  requestId: string;
  amount?: Amount;
  tranId?: string;
  reason?: string;
  hostRespCode?: string;
  hostRespMessage?: string;
  posReference?: string;
  extraData?: string;
  hostRespExtra?: Record<string, unknown>;
  geoResult?: GeoResult;
  /** Device location snapshot captured when the geo-fence check ran; passed through verbatim */
  geoLocation?: Record<string, unknown>;
  /** Identifier of the geo-fence rule the caller matched */
  geoId?: string;
  createdAt: string;  // date-time
  updatedAt?: string;  // date-time
}
data class Batch(
    val batchId: String,
    val batchNo: String,
    val batchStatus: BatchStatus,
    val batchMode: BatchMode? = null,
    val profileId: String,
    val acptId: String,
    val merchantName: String? = null,
    val providerMchId: String? = null,
    val isvId: String? = null,
    val isvName: String? = null,
    val shopId: String? = null,
    val shopName: String? = null,
    val currency: String,
    val primaryMid: String,
    val primaryTid: String,
    val hostMessageFormat: HostMessageFormat,
    val signedOn: Boolean? = null,
    val tranSummaries: List<TranTypeSummary>,
    val batchSummary: BatchSummary,
    val createdAt: String,  // date-time
    val updatedAt: String? = null,  // date-time
)
interface Batch {
  batchId: string;
  batchNo: string;
  batchStatus: BatchStatus;
  batchMode?: BatchMode;
  profileId: string;
  acptId: string;
  merchantName?: string;
  providerMchId?: string;
  isvId?: string;
  isvName?: string;
  shopId?: string;
  shopName?: string;
  currency: string;
  primaryMid: string;
  primaryTid: string;
  hostMessageFormat: HostMessageFormat;
  signedOn?: boolean;
  tranSummaries: TranTypeSummary[];
  batchSummary: BatchSummary;
  createdAt: string;  // date-time
  updatedAt?: string;  // date-time
}
data class TranTypeSummary(
    val tranType: TranType,
    val tranStatus: TranStatus,
    val paymentMethod: PaymentMethod? = null,
    val count: Int,
    val total: Amount,
)
interface TranTypeSummary {
  tranType: TranType;
  tranStatus: TranStatus;
  paymentMethod?: PaymentMethod;
  count: number;  // int32
  total: Amount;
}
data class BatchSummary(
    val currency: String,
    val mchCreditTotal: String,
    val mchCreditCount: Int,
    val mchDebitTotal: String,
    val mchDebitCount: Int,
)
interface BatchSummary {
  currency: string;
  mchCreditTotal: string;
  mchCreditCount: number;  // int32
  mchDebitTotal: string;
  mchDebitCount: number;  // int32
}
data class Profile(
    val profileId: String,
    val profileName: String,
    val providerReference: String? = null,
    val providerMchId: String? = null,
    val isvId: String? = null,
    val isvName: String? = null,
    val shopId: String? = null,
    val shopName: String? = null,
    val merchantName: String,
    val merchantAddr: String,
    val merchantPhone: String? = null,
    val merchantEmail: String? = null,
    val merchantCity: String? = null,
    val merchantPostalCode: String? = null,
    val mcc: String,
    val countryCode: String,
    val currency: String,
    val entityStatus: EntityStatus,
    val createdAt: String,  // date-time
    val updatedAt: String? = null,  // date-time
)
interface Profile {
  profileId: string;
  profileName: string;
  providerReference?: string;
  providerMchId?: string;
  isvId?: string;
  isvName?: string;
  shopId?: string;
  shopName?: string;
  merchantName: string;
  merchantAddr: string;
  merchantPhone?: string;
  merchantEmail?: string;
  merchantCity?: string;
  merchantPostalCode?: string;
  mcc: string;
  countryCode: string;
  currency: string;
  entityStatus: EntityStatus;
  createdAt: string;  // date-time
  updatedAt?: string;  // date-time
}
data class ProfileWithAcceptances(
    val profileId: String,
    val profileName: String,
    val providerReference: String? = null,
    val providerMchId: String? = null,
    val isvId: String? = null,
    val isvName: String? = null,
    val shopId: String? = null,
    val shopName: String? = null,
    val merchantName: String,
    val merchantAddr: String,
    val merchantPhone: String? = null,
    val merchantEmail: String? = null,
    val merchantCity: String? = null,
    val merchantPostalCode: String? = null,
    val mcc: String,
    val countryCode: String,
    val currency: String,
    val acceptances: List<Acceptance>,
    val acptSelection: Map<String, List<PaymentMethod>>? = null,
    val entityStatus: EntityStatus,
    val createdAt: String,  // date-time
    val updatedAt: String? = null,  // date-time
)
interface ProfileWithAcceptances {
  profileId: string;
  profileName: string;
  providerReference?: string;
  providerMchId?: string;
  isvId?: string;
  isvName?: string;
  shopId?: string;
  shopName?: string;
  merchantName: string;
  merchantAddr: string;
  merchantPhone?: string;
  merchantEmail?: string;
  merchantCity?: string;
  merchantPostalCode?: string;
  mcc: string;
  countryCode: string;
  currency: string;
  acceptances: Acceptance[];
  acptSelection?: Record<string, PaymentMethod[]>;
  entityStatus: EntityStatus;
  createdAt: string;  // date-time
  updatedAt?: string;  // date-time
}
data class Acceptance(
    val acptId: String,
    val acptName: String? = null,
    val acptReference: String? = null,
    val hostMessageFormat: HostMessageFormat,
    val supportedPayments: List<PaymentMethod>,
    val primaryMid: String,
    val primaryTid: String,
    val extraParams: Map<String, String>,
    val keyId: String? = null,
    val tags: List<String>? = null,
    val entityStatus: EntityStatus,
    val createdAt: String,  // date-time
    val updatedAt: String? = null,  // date-time
)
interface Acceptance {
  acptId: string;
  acptName?: string;
  acptReference?: string;
  hostMessageFormat: HostMessageFormat;
  supportedPayments: PaymentMethod[];
  primaryMid: string;
  primaryTid: string;
  extraParams: Record<string, string>;
  keyId?: string;
  tags?: string[];
  entityStatus: EntityStatus;
  createdAt: string;  // date-time
  updatedAt?: string;  // date-time
}