Host API 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.
typealias Instant = String
type Instant = string;
typealias Currency = String
type Currency = string;
typealias BigDecimal = String
type BigDecimal = string;
data class StdJsonSignOnResp(
val hostReferenceId: String? = null,
val respCode: String,
val respMessage: String? = null,
val extra: Map<String, String>? = null,
)
interface StdJsonSignOnResp {
hostReferenceId?: string | null;
respCode: string;
respMessage?: string | null;
extra?: Record<string, string> | null;
}
data class StdJsonSignOnReq(
val acptId: String,
val primaryMid: String,
val primaryTid: String,
val profileId: String,
val subMid: String? = null,
val subTid: String? = null,
val timestamp: String,
val trace: String,
val sdkId: String? = null,
)
interface StdJsonSignOnReq {
acptId: string;
primaryMid: string;
primaryTid: string;
profileId: string;
subMid?: string | null;
subTid?: string | null;
timestamp: string;
trace: string;
sdkId?: string | null;
}
data class StdJsonSignOffResp(
val respCode: String,
val respMessage: String? = null,
val extra: Map<String, String>? = null,
)
interface StdJsonSignOffResp {
respCode: string;
respMessage?: string | null;
extra?: Record<string, string> | null;
}
data class StdJsonSignOffReq(
val acptId: String,
val primaryMid: String,
val primaryTid: String,
val profileId: String,
val subMid: String? = null,
val subTid: String? = null,
val timestamp: String,
val trace: String,
)
interface StdJsonSignOffReq {
acptId: string;
primaryMid: string;
primaryTid: string;
profileId: string;
subMid?: string | null;
subTid?: string | null;
timestamp: string;
trace: string;
}
data class StdJsonTranResp(
val approvalCode: String? = null,
val hostReferenceId: String? = null,
val respCode: String,
val respMessage: String? = null,
val rrn: String? = null,
val extra: Map<String, String>? = null,
)
interface StdJsonTranResp {
approvalCode?: string | null;
hostReferenceId?: string | null;
respCode: string;
respMessage?: string | null;
rrn?: string | null;
extra?: Record<string, string> | null;
}
data class StdJsonTranReq(
val acptId: String,
val actionType: ActionType,
val amountValue: String,
val batchId: String,
val batchNo: String,
val cardData: Map<String, String>? = null,
val consumerDevice: ConsumerPaymentDevice? = null,
val currency: String,
val cvmPerformed: CvmPerformed,
val enbrTranId: String,
val entryMode: EntryMode,
/**
* Present only on installment sales (`tranType: SALE`) that selected a plan; omitted
* otherwise, including legacy `tranType: INSTALL` requests, which carry only a count. Carried
* unchanged on the original request and on its reversal, void/adjust and batch upload, so
* `externalPlanCode` always matches the original sale even if the plan configuration later
* changes.
*/
val installment: StdJsonInstallment? = null,
val isReversal: Boolean? = null,
val linkedEnbrTranId: String? = null,
val mcc: String,
val merchantAddress: String,
val merchantDevice: MerchantDevice,
val merchantName: String,
val orgApprovalCode: String? = null,
val orgRrn: String? = null,
val orgTrace: String? = null,
val paymentMethod: PaymentMethod,
val pinBlock: StdJsonPinBlock? = null,
val posExtra: Map<String, String>? = null,
val posReference: String? = null,
val primaryMid: String,
val primaryTid: String,
val profileId: String,
val sdkId: String? = null,
val subMid: String? = null,
val subTid: String? = null,
val timestamp: String,
val trace: String,
val track2Data: StdJsonTrack2? = null,
val tranType: TranType,
)
interface StdJsonTranReq {
acptId: string;
actionType: ActionType;
amountValue: string;
batchId: string;
batchNo: string;
cardData?: Record<string, string> | null;
consumerDevice?: ConsumerPaymentDevice | null;
currency: string;
cvmPerformed: CvmPerformed;
enbrTranId: string;
entryMode: EntryMode;
/**
* Present only on installment sales (`tranType: SALE`) that selected a plan; omitted
* otherwise, including legacy `tranType: INSTALL` requests, which carry only a count. Carried
* unchanged on the original request and on its reversal, void/adjust and batch upload, so
* `externalPlanCode` always matches the original sale even if the plan configuration later
* changes.
*/
installment?: StdJsonInstallment | null;
isReversal?: boolean;
linkedEnbrTranId?: string | null;
mcc: string;
merchantAddress: string;
merchantDevice: MerchantDevice;
merchantName: string;
orgApprovalCode?: string | null;
orgRrn?: string | null;
orgTrace?: string | null;
paymentMethod: PaymentMethod;
pinBlock?: StdJsonPinBlock | null;
posExtra?: Record<string, string> | null;
posReference?: string | null;
primaryMid: string;
primaryTid: string;
profileId: string;
sdkId?: string | null;
subMid?: string | null;
subTid?: string | null;
timestamp: string;
trace: string;
track2Data?: StdJsonTrack2 | null;
tranType: TranType;
}
/** Dedicated encrypted PIN block. When present, EMV tag 99 is omitted from cardData. */
data class StdJsonPinBlock(
/** DUKPT KSN for the PIN block key (TDES: 20 hex, AES: 24 hex). */
val pinKsn: String,
/** Hex encrypted PIN block (ISO format-0 for TDES, format-4 for AES). */
val data: String,
)
/** Dedicated encrypted PIN block. When present, EMV tag 99 is omitted from cardData. */
interface StdJsonPinBlock {
/** DUKPT KSN for the PIN block key (TDES: 20 hex, AES: 24 hex). */
pinKsn: string;
/** Hex encrypted PIN block (ISO format-0 for TDES, format-4 for AES). */
data: string;
}
/**
* Dedicated encrypted Track2 data. When present, EMV tag 57 is omitted from cardData; read the
* PAN from here after decryption.
*/
data class StdJsonTrack2(
/** DUKPT KSN for the Track2 data key. */
val track2Ksn: String,
/** Hex encrypted Track2 data (DUKPT data-encryption). */
val data: String,
/**
* Number of hex characters of Track2 before encryption. The plaintext is zero-padded up to the
* cipher block size (8 bytes TDES, 16 bytes AES) before encryption, so after decrypting take
* the first track2Length hex characters and discard the rest. Counts hex characters, not
* bytes: 38 means 19 bytes of Track2.
*/
val track2Length: Int,
)
/**
* Dedicated encrypted Track2 data. When present, EMV tag 57 is omitted from cardData; read the
* PAN from here after decryption.
*/
interface StdJsonTrack2 {
/** DUKPT KSN for the Track2 data key. */
track2Ksn: string;
/** Hex encrypted Track2 data (DUKPT data-encryption). */
data: string;
/**
* Number of hex characters of Track2 before encryption. The plaintext is zero-padded up to the
* cipher block size (8 bytes TDES, 16 bytes AES) before encryption, so after decrypting take
* the first track2Length hex characters and discard the rest. Counts hex characters, not
* bytes: 38 means 19 bytes of Track2.
*/
track2Length: number; // integer
}
/**
* Resolved installment instruction. MineSec validates the selection against the merchant's
* configured plans before sending; the host must not calculate interest or amortization from
* it.
*/
data class StdJsonInstallment(
/**
* Number of installments. For REVOLVING it applies to `revolving.remainingAmount`, excluding
* the initial payment.
*/
val installmentCount: Int, // >= 1
val interestModel: InterestModel,
val installmentType: InstallmentType,
/** Acquirer-defined plan code, when the integration requires one. */
val externalPlanCode: String? = null,
/** Present only when `installmentType` is REVOLVING. */
val revolving: Revolving? = null,
/** Issuer preapproval reference, when required and available. */
val issuerPreapprovalReference: String? = null,
)
/**
* Resolved installment instruction. MineSec validates the selection against the merchant's
* configured plans before sending; the host must not calculate interest or amortization from
* it.
*/
interface StdJsonInstallment {
/**
* Number of installments. For REVOLVING it applies to `revolving.remainingAmount`, excluding
* the initial payment.
*/
installmentCount: number; // integer, >= 1
interestModel: InterestModel;
installmentType: InstallmentType;
/** Acquirer-defined plan code, when the integration requires one. */
externalPlanCode?: string | null;
/** Present only when `installmentType` is REVOLVING. */
revolving?: Revolving | null;
/** Issuer preapproval reference, when required and available. */
issuerPreapprovalReference?: string | null;
}
/**
* Split of the transaction amount for a REVOLVING installment: 0 < initialPaymentAmount <
* amountValue, and remainingAmount = amountValue - initialPaymentAmount.
*/
data class Revolving(
/**
* Amount paid upfront. Same currency as the transaction; value uses the currency's ISO decimal
* fraction, as `amountValue`.
*/
val initialPaymentAmount: Amount,
/**
* Amount spread over `installmentCount`. Same currency as the transaction; value uses the
* currency's ISO decimal fraction, as `amountValue`.
*/
val remainingAmount: Amount,
)
/**
* Split of the transaction amount for a REVOLVING installment: 0 < initialPaymentAmount <
* amountValue, and remainingAmount = amountValue - initialPaymentAmount.
*/
interface Revolving {
/**
* Amount paid upfront. Same currency as the transaction; value uses the currency's ISO decimal
* fraction, as `amountValue`.
*/
initialPaymentAmount: Amount;
/**
* Amount spread over `installmentCount`. Same currency as the transaction; value uses the
* currency's ISO decimal fraction, as `amountValue`.
*/
remainingAmount: Amount;
}
enum class InterestModel {
WITH_INTEREST, NO_INTEREST
}
type InterestModel = "WITH_INTEREST" | "NO_INTEREST";
enum class InstallmentType {
REGULAR, REVOLVING
}
type InstallmentType = "REGULAR" | "REVOLVING";
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 ConsumerPaymentDevice {
Card, MobilePhone, Tablet, MiniCard, Watch, MobileTag, KeyFob, Case, Other
}
type ConsumerPaymentDevice =
| "Card" | "MobilePhone" | "Tablet" | "MiniCard" | "Watch" | "MobileTag"
| "KeyFob" | "Case" | "Other";
enum class CvmPerformed {
NO_CVM, SIGNATURE, PIN, OFFLINE_PIN, CDCVM
}
type CvmPerformed = "NO_CVM" | "SIGNATURE" | "PIN" | "OFFLINE_PIN" | "CDCVM";
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 MerchantDevice {
SOFTPOS, TERMINAL, MPOS, OTHER
}
type MerchantDevice = "SOFTPOS" | "TERMINAL" | "MPOS" | "OTHER";
enum class PaymentMethod {
VISA, MASTERCARD, UNIONPAY, AMEX, JCB, DISCOVER, DINERS, MAESTRO, HIMYAN,
NAPS, MY_DEBIT, ELO, CPACE, NAPAS, TROY, TAKAPAY, SADEEQ, UNKNOWN
}
type PaymentMethod =
| "VISA" | "MASTERCARD" | "UNIONPAY" | "AMEX" | "JCB" | "DISCOVER"
| "DINERS" | "MAESTRO" | "HIMYAN" | "NAPS" | "MY_DEBIT" | "ELO" | "CPACE"
| "NAPAS" | "TROY" | "TAKAPAY" | "SADEEQ" | "UNKNOWN";
enum class TranType {
SALE, REFUND, AUTH, AUTH_COMP, DEFERRED_AUTH, INSTALL
}
type TranType =
| "SALE" | "REFUND" | "AUTH" | "AUTH_COMP" | "DEFERRED_AUTH" | "INSTALL";
data class StdJsonSettleResp(
val hostReferenceId: String? = null,
val respCode: String,
val respMessage: String? = null,
val extra: Map<String, String>? = null,
)
interface StdJsonSettleResp {
hostReferenceId?: string | null;
respCode: string;
respMessage?: string | null;
extra?: Record<string, string> | null;
}
data class StdJsonSettleReq(
val acptId: String,
val batchId: String,
val batchNo: String,
val isSecond: Boolean? = null,
val primaryMid: String,
val primaryTid: String,
val profileId: String,
val subMid: String? = null,
val subTid: String? = null,
val summary: List<TranTypeSummary>,
val timestamp: String,
val trace: String,
)
interface StdJsonSettleReq {
acptId: string;
batchId: string;
batchNo: string;
isSecond?: boolean;
primaryMid: string;
primaryTid: string;
profileId: string;
subMid?: string | null;
subTid?: string | null;
summary: TranTypeSummary[];
timestamp: string;
trace: string;
}
data class TranTypeSummary(
val count: Int,
val paymentMethod: PaymentMethod? = null,
val total: Amount,
val tranStatus: TranStatus,
val tranType: TranType,
)
interface TranTypeSummary {
count: number; // int32
paymentMethod?: PaymentMethod | null;
total: Amount;
tranStatus: TranStatus;
tranType: TranType;
}
data class Amount(
val currency: String,
val value: String,
)
interface Amount {
currency: string;
value: string;
}
enum class TranStatus {
PROCESSING, APPROVED, DECLINED, VOIDED, REVERSED, AUTH_ONLY, ADJUSTED
}
type TranStatus =
| "PROCESSING" | "APPROVED" | "DECLINED" | "VOIDED" | "REVERSED"
| "AUTH_ONLY" | "ADJUSTED";
/**
* Payment methods accepted on the QR endpoints. `UNIFIED_QR` is the aggregated code: the host
* identifies the wallet and returns the concrete method on `SUCCESS`.
*/
enum class QrPaymentMethod {
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, UNIFIED_QR
}
/**
* Payment methods accepted on the QR endpoints. `UNIFIED_QR` is the aggregated code: the host
* identifies the wallet and returns the concrete method on `SUCCESS`.
*/
type QrPaymentMethod =
| "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" | "UNIFIED_QR";
/**
* `MPQR`: merchant presented, the host returns a QR to display. `CPQR`: consumer presented,
* the merchant scans the customer's code and the host charges it.
*/
enum class QrMode {
MPQR, CPQR
}
/**
* `MPQR`: merchant presented, the host returns a QR to display. `CPQR`: consumer presented,
* the merchant scans the customer's code and the host charges it.
*/
type QrMode = "MPQR" | "CPQR";
/**
* The only field MineSec uses for the outcome. `CLOSED`: cancelled or expired before any money
* moved. `REVERSED`: charged, then returned by a cancellation.
*/
enum class QrStatus {
PENDING, SUCCESS, FAILED, CLOSED, REVERSED
}
/**
* The only field MineSec uses for the outcome. `CLOSED`: cancelled or expired before any money
* moved. `REVERSED`: charged, then returned by a cancellation.
*/
type QrStatus = "PENDING" | "SUCCESS" | "FAILED" | "CLOSED" | "REVERSED";
/**
* Why a payment or refund is `FAILED`. Use one of the listed codes where one fits:
* `CODE_EXPIRED`, `CODE_INVALID`, `INSUFFICIENT_FUNDS`, `USER_CANCELLED`, `RISK_REJECTED`,
* `LIMIT_EXCEEDED`, `UNSUPPORTED_WALLET`, `DUPLICATE`, `SYSTEM_ERROR`. `UNSUPPORTED_WALLET`:
* the host cannot place a `UNIFIED_QR` consumer code, or the merchant does not accept its
* wallet. A code outside the list is accepted and treated as a generic failure.
*/
typealias QrFailureCode = String
/**
* Why a payment or refund is `FAILED`. Use one of the listed codes where one fits:
* `CODE_EXPIRED`, `CODE_INVALID`, `INSUFFICIENT_FUNDS`, `USER_CANCELLED`, `RISK_REJECTED`,
* `LIMIT_EXCEEDED`, `UNSUPPORTED_WALLET`, `DUPLICATE`, `SYSTEM_ERROR`. `UNSUPPORTED_WALLET`:
* the host cannot place a `UNIFIED_QR` consumer code, or the merchant does not accept its
* wallet. A code outside the list is accepted and treated as a generic failure.
*/
type QrFailureCode = string;
/** How the scanned consumer code is encoded. */
enum class QrConsumerCodeFormat {
BARCODE_NUMERIC, QR_TEXT, EMV_CPM_BASE64
}
/** How the scanned consumer code is encoded. */
type QrConsumerCodeFormat = "BARCODE_NUMERIC" | "QR_TEXT" | "EMV_CPM_BASE64";
/** How the merchant captured the consumer code. */
enum class QrScanMethod {
CAMERA, SCANNER
}
/** How the merchant captured the consumer code. */
type QrScanMethod = "CAMERA" | "SCANNER";
/** How `qrCode.content` is to be rendered. */
enum class QrCodeFormat {
EMVCO_MPM, URL, RAW
}
/** How `qrCode.content` is to be rendered. */
type QrCodeFormat = "EMVCO_MPM" | "URL" | "RAW";
/** Whether `enbrTranId` names a payment or a refund. */
enum class QrInquiryType {
PAYMENT, REFUND
}
/** Whether `enbrTranId` names a payment or a refund. */
type QrInquiryType = "PAYMENT" | "REFUND";
/**
* `TIMEOUT`: MineSec got no final status in time. `MERCHANT_VOID`: the merchant voids a paid
* transaction.
*/
enum class QrCancelReason {
USER_CANCELLED, TIMEOUT, MERCHANT_VOID
}
/**
* `TIMEOUT`: MineSec got no final status in time. `MERCHANT_VOID`: the merchant voids a paid
* transaction.
*/
type QrCancelReason = "USER_CANCELLED" | "TIMEOUT" | "MERCHANT_VOID";
/** Whether the notify reports a payment or a refund. */
enum class QrEventType {
PAYMENT, REFUND
}
/** Whether the notify reports a payment or a refund. */
type QrEventType = "PAYMENT" | "REFUND";
/** The customer's code scanned by the merchant. */
data class StdJsonQrConsumerCode(
/** The scanned content. A one-time payment token. */
val value: String,
val format: QrConsumerCodeFormat,
val scanMethod: QrScanMethod? = null,
)
/** The customer's code scanned by the merchant. */
interface StdJsonQrConsumerCode {
/** The scanned content. A one-time payment token. */
value: string;
format: QrConsumerCodeFormat;
scanMethod?: QrScanMethod;
}
/** The QR to display. */
data class StdJsonQrCode(
/** The payload to render as a QR. */
val content: String,
val format: QrCodeFormat,
/**
* Reference carried inside the QR, e.g. the EMVCo reference label seen on the payer's
* statement.
*/
val reference: String? = null,
)
/** The QR to display. */
interface StdJsonQrCode {
/** The payload to render as a QR. */
content: string;
format: QrCodeFormat;
/**
* Reference carried inside the QR, e.g. the EMVCo reference label seen on the payer's
* statement.
*/
reference?: string | null;
}
data class StdJsonQrPayer(
/** The wallet's opaque user id. */
val id: String? = null,
/** The payer's bank or wallet, for national schemes. */
val institution: String? = null,
val maskedAccount: String? = null,
/** e.g. `BALANCE`, `CARD`. */
val fundingSource: String? = null,
)
interface StdJsonQrPayer {
/** The wallet's opaque user id. */
id?: string | null;
/** The payer's bank or wallet, for national schemes. */
institution?: string | null;
maskedAccount?: string | null;
/** e.g. `BALANCE`, `CARD`. */
fundingSource?: string | null;
}
/** Creates an MPQR order or charges a scanned CPQR code. `consumerCode` is required for `CPQR`. */
data class StdJsonQrPaymentReq(
/** Idempotency key of the payment. */
val enbrTranId: String,
/** The transaction id shown on the SRS side and the portal. */
val srsTranId: String? = null,
/** Per-message sequence number. */
val trace: String,
val posReference: String? = null,
/** The merchant's own order number. */
val extOrderId: String? = null,
/** MineSec tenant. */
val pboId: String,
val isvId: String? = null,
/** MineSec merchant profile. */
val profileId: String,
/** The merchant id in the provider's own system. */
val providerMchId: String? = null,
/** The merchant reference in the provider's own system. */
val providerReference: String? = null,
val shopId: String? = null,
val shopName: String? = null,
/** The acceptance (routing entry) used. */
val acptId: String,
val primaryMid: String,
val primaryTid: String,
/** Wallet sub-merchant id. */
val subMid: String? = null,
val subTid: String? = null,
/** The SoftPOS device. */
val sdkId: String? = null,
/** Cashier. */
val operatorId: String? = null,
val merchantDevice: MerchantDevice,
val qrMode: QrMode,
/** Only `SALE` is supported. */
val tranType: TranType,
/** Same formatting as `/transactions`. */
val amountValue: String,
val currency: String,
val paymentMethod: QrPaymentMethod,
/**
* Optional, `MPQR` with `UNIFIED_QR` only: the wallets the host may put in the code. When
* absent, the host uses the wallets it has enabled for the merchant. Not sent for `CPQR`: the
* host identifies the wallet from `consumerCode`.
*/
val acceptedPaymentMethods: List<QrPaymentMethod>? = null, // min items 1
/** Already included in `amountValue`. */
val tipAmount: String? = null,
val consumerCode: StdJsonQrConsumerCode? = null,
/**
* MPQR: requested validity. The host may shorten it; `expiresAt` in the response is
* authoritative.
*/
val qrExpirySeconds: Int? = null, // >= 1
/**
* Where to send the notify for this transaction. Call it unchanged, never build it. Omitted
* when no notify is set up for the host.
*/
val notifyUrl: String? = null,
val merchantName: String,
val merchantAddress: String,
/** EMVCo MPM tag 60. */
val merchantCity: String,
/** ISO 3166-1 alpha-2. EMVCo MPM tag 58. */
val merchantCountry: String,
val merchantPostalCode: String? = null,
val mcc: String,
/** Mandatory for some wallets. */
val terminalIp: String? = null,
/** For reference only. QR is normally host-captured. */
val batchId: String? = null,
/** For reference only. */
val batchNo: String? = null,
val posExtra: Map<String, String>? = null,
val timestamp: String,
) {
enum class TranType {
SALE
}
}
/** Creates an MPQR order or charges a scanned CPQR code. `consumerCode` is required for `CPQR`. */
interface StdJsonQrPaymentReq {
/** Idempotency key of the payment. */
enbrTranId: string;
/** The transaction id shown on the SRS side and the portal. */
srsTranId?: string;
/** Per-message sequence number. */
trace: string;
posReference?: string;
/** The merchant's own order number. */
extOrderId?: string;
/** MineSec tenant. */
pboId: string;
isvId?: string;
/** MineSec merchant profile. */
profileId: string;
/** The merchant id in the provider's own system. */
providerMchId?: string;
/** The merchant reference in the provider's own system. */
providerReference?: string;
shopId?: string;
shopName?: string;
/** The acceptance (routing entry) used. */
acptId: string;
primaryMid: string;
primaryTid: string;
/** Wallet sub-merchant id. */
subMid?: string;
subTid?: string;
/** The SoftPOS device. */
sdkId?: string;
/** Cashier. */
operatorId?: string;
merchantDevice: MerchantDevice;
qrMode: QrMode;
/** Only `SALE` is supported. */
tranType: "SALE";
/** Same formatting as `/transactions`. */
amountValue: string;
currency: string;
paymentMethod: QrPaymentMethod;
/**
* Optional, `MPQR` with `UNIFIED_QR` only: the wallets the host may put in the code. When
* absent, the host uses the wallets it has enabled for the merchant. Not sent for `CPQR`: the
* host identifies the wallet from `consumerCode`.
*/
acceptedPaymentMethods?: QrPaymentMethod[]; // min items 1
/** Already included in `amountValue`. */
tipAmount?: string;
consumerCode?: StdJsonQrConsumerCode;
/**
* MPQR: requested validity. The host may shorten it; `expiresAt` in the response is
* authoritative.
*/
qrExpirySeconds?: number; // integer, >= 1
/**
* Where to send the notify for this transaction. Call it unchanged, never build it. Omitted
* when no notify is set up for the host.
*/
notifyUrl?: string;
merchantName: string;
merchantAddress: string;
/** EMVCo MPM tag 60. */
merchantCity: string;
/** ISO 3166-1 alpha-2. EMVCo MPM tag 58. */
merchantCountry: string;
merchantPostalCode?: string;
mcc: string;
/** Mandatory for some wallets. */
terminalIp?: string;
/** For reference only. QR is normally host-captured. */
batchId?: string;
/** For reference only. */
batchNo?: string;
posExtra?: Record<string, string>;
timestamp: string;
}
data class StdJsonQrInquiryReq(
/** The payment or the refund being queried. */
val enbrTranId: String,
/** The transaction id shown on the SRS side and the portal. */
val srsTranId: String? = null,
/** Per-message sequence number. */
val trace: String,
val posReference: String? = null,
/** The merchant's own order number. */
val extOrderId: String? = null,
/** MineSec tenant. */
val pboId: String,
val isvId: String? = null,
/** MineSec merchant profile. */
val profileId: String,
/** The merchant id in the provider's own system. */
val providerMchId: String? = null,
/** The merchant reference in the provider's own system. */
val providerReference: String? = null,
val shopId: String? = null,
val shopName: String? = null,
/** The acceptance (routing entry) used. */
val acptId: String,
val primaryMid: String,
val primaryTid: String,
/** Wallet sub-merchant id. */
val subMid: String? = null,
val subTid: String? = null,
/** The SoftPOS device. */
val sdkId: String? = null,
/** Cashier. */
val operatorId: String? = null,
val inquiryType: QrInquiryType,
/** `rrn` from the host's create response. Sent when known. */
val rrn: String? = null, // max length 64
/** For reference only. QR is normally host-captured. */
val batchId: String? = null,
/** For reference only. */
val batchNo: String? = null,
val timestamp: String,
)
interface StdJsonQrInquiryReq {
/** The payment or the refund being queried. */
enbrTranId: string;
/** The transaction id shown on the SRS side and the portal. */
srsTranId?: string;
/** Per-message sequence number. */
trace: string;
posReference?: string;
/** The merchant's own order number. */
extOrderId?: string;
/** MineSec tenant. */
pboId: string;
isvId?: string;
/** MineSec merchant profile. */
profileId: string;
/** The merchant id in the provider's own system. */
providerMchId?: string;
/** The merchant reference in the provider's own system. */
providerReference?: string;
shopId?: string;
shopName?: string;
/** The acceptance (routing entry) used. */
acptId: string;
primaryMid: string;
primaryTid: string;
/** Wallet sub-merchant id. */
subMid?: string;
subTid?: string;
/** The SoftPOS device. */
sdkId?: string;
/** Cashier. */
operatorId?: string;
inquiryType: QrInquiryType;
/** `rrn` from the host's create response. Sent when known. */
rrn?: string; // max length 64
/** For reference only. QR is normally host-captured. */
batchId?: string;
/** For reference only. */
batchNo?: string;
timestamp: string;
}
data class StdJsonQrCancellationReq(
/** The payment being cancelled. */
val enbrTranId: String,
/** Tells two cancellation attempts on one payment apart. */
val enbrActionId: String,
/** The transaction id shown on the SRS side and the portal. */
val srsTranId: String? = null,
/** Per-message sequence number. */
val trace: String,
val posReference: String? = null,
/** The merchant's own order number. */
val extOrderId: String? = null,
/** MineSec tenant. */
val pboId: String,
val isvId: String? = null,
/** MineSec merchant profile. */
val profileId: String,
/** The merchant id in the provider's own system. */
val providerMchId: String? = null,
/** The merchant reference in the provider's own system. */
val providerReference: String? = null,
val shopId: String? = null,
val shopName: String? = null,
/** The acceptance (routing entry) used. */
val acptId: String,
val primaryMid: String,
val primaryTid: String,
/** Wallet sub-merchant id. */
val subMid: String? = null,
val subTid: String? = null,
/** The SoftPOS device. */
val sdkId: String? = null,
/** Cashier. */
val operatorId: String? = null,
val reason: QrCancelReason,
/** `rrn` from the host's create response. Sent when known. */
val rrn: String? = null, // max length 64
/** For reference only. QR is normally host-captured. */
val batchId: String? = null,
/** For reference only. */
val batchNo: String? = null,
val timestamp: String,
)
interface StdJsonQrCancellationReq {
/** The payment being cancelled. */
enbrTranId: string;
/** Tells two cancellation attempts on one payment apart. */
enbrActionId: string;
/** The transaction id shown on the SRS side and the portal. */
srsTranId?: string;
/** Per-message sequence number. */
trace: string;
posReference?: string;
/** The merchant's own order number. */
extOrderId?: string;
/** MineSec tenant. */
pboId: string;
isvId?: string;
/** MineSec merchant profile. */
profileId: string;
/** The merchant id in the provider's own system. */
providerMchId?: string;
/** The merchant reference in the provider's own system. */
providerReference?: string;
shopId?: string;
shopName?: string;
/** The acceptance (routing entry) used. */
acptId: string;
primaryMid: string;
primaryTid: string;
/** Wallet sub-merchant id. */
subMid?: string;
subTid?: string;
/** The SoftPOS device. */
sdkId?: string;
/** Cashier. */
operatorId?: string;
reason: QrCancelReason;
/** `rrn` from the host's create response. Sent when known. */
rrn?: string; // max length 64
/** For reference only. QR is normally host-captured. */
batchId?: string;
/** For reference only. */
batchNo?: string;
timestamp: string;
}
data class StdJsonQrRefundReq(
/** Idempotency key of the refund itself, not the original payment. */
val enbrTranId: String,
/** The transaction id shown on the SRS side and the portal. */
val srsTranId: String? = null,
/** Per-message sequence number. */
val trace: String,
val posReference: String? = null,
/** The merchant's own order number. */
val extOrderId: String? = null,
/** MineSec tenant. */
val pboId: String,
val isvId: String? = null,
/** MineSec merchant profile. */
val profileId: String,
/** The merchant id in the provider's own system. */
val providerMchId: String? = null,
/** The merchant reference in the provider's own system. */
val providerReference: String? = null,
val shopId: String? = null,
val shopName: String? = null,
/** The acceptance (routing entry) used. */
val acptId: String,
val primaryMid: String,
val primaryTid: String,
/** Wallet sub-merchant id. */
val subMid: String? = null,
val subTid: String? = null,
/** The SoftPOS device. */
val sdkId: String? = null,
/** Cashier. */
val operatorId: String? = null,
/** Amount to refund. Same formatting as `/transactions`. */
val amountValue: String,
val currency: String,
/** Free text. */
val reason: String? = null,
/**
* Where to send the notify for this transaction. Call it unchanged, never build it. Omitted
* when no notify is set up for the host.
*/
val notifyUrl: String? = null,
/** The original payment. */
val linkedEnbrTranId: String,
/** `rrn` of the original payment. */
val orgRrn: String, // max length 64
/** For reference only. QR is normally host-captured. */
val batchId: String? = null,
/** For reference only. */
val batchNo: String? = null,
val timestamp: String,
)
interface StdJsonQrRefundReq {
/** Idempotency key of the refund itself, not the original payment. */
enbrTranId: string;
/** The transaction id shown on the SRS side and the portal. */
srsTranId?: string;
/** Per-message sequence number. */
trace: string;
posReference?: string;
/** The merchant's own order number. */
extOrderId?: string;
/** MineSec tenant. */
pboId: string;
isvId?: string;
/** MineSec merchant profile. */
profileId: string;
/** The merchant id in the provider's own system. */
providerMchId?: string;
/** The merchant reference in the provider's own system. */
providerReference?: string;
shopId?: string;
shopName?: string;
/** The acceptance (routing entry) used. */
acptId: string;
primaryMid: string;
primaryTid: string;
/** Wallet sub-merchant id. */
subMid?: string;
subTid?: string;
/** The SoftPOS device. */
sdkId?: string;
/** Cashier. */
operatorId?: string;
/** Amount to refund. Same formatting as `/transactions`. */
amountValue: string;
currency: string;
/** Free text. */
reason?: string;
/**
* Where to send the notify for this transaction. Call it unchanged, never build it. Omitted
* when no notify is set up for the host.
*/
notifyUrl?: string;
/** The original payment. */
linkedEnbrTranId: string;
/** `rrn` of the original payment. */
orgRrn: string; // max length 64
/** For reference only. QR is normally host-captured. */
batchId?: string;
/** For reference only. */
batchNo?: string;
timestamp: string;
}
/**
* Result of a QR payment or refund. Returned by every `/qr-payments` endpoint and sent as the
* notify body.
*/
data class StdJsonQrResult(
/**
* The host's own result code, kept for diagnostics. Must be `00` when `status` is `PENDING` or
* `SUCCESS`.
*/
val respCode: String,
/** Human-readable result. Required when `status` is `FAILED`. */
val respMessage: String? = null,
val status: QrStatus,
/** Required when `status` is `FAILED`. */
val failureCode: QrFailureCode? = null,
/** Echo of the request. */
val enbrTranId: String,
/**
* The host's own reference for this payment or refund, issued at create time. MineSec stores
* it, sends it back on every follow-up call and searches by it. Required when `status` is
* `PENDING`, `SUCCESS` or `REVERSED`, and the same value in every response for one payment. It
* may be absent only when the host holds no order: a payment rejected before an order was
* created, or a cancellation for a create the host never received. Put the wallet's own
* transaction id, if different, in `extra.walletTransactionId`.
*/
val rrn: String? = null, // max length 64
/** Card scheme QR only. */
val approvalCode: String? = null,
/** The merchant id on the wallet or scheme side. */
val networkMerchantId: String? = null,
/** Echo of the request. Expected on a notify. */
val primaryMid: String? = null,
/** Echo of the request. Expected on a notify. */
val primaryTid: String? = null,
/**
* Required when `status` is `SUCCESS`, and then concrete, never `UNIFIED_QR`. A
* `QrPaymentMethod` value. A wallet missing from that list is still accepted; ask MineSec to
* add it.
*/
val paymentMethod: String? = null,
/** Echo of the request. Checked by MineSec. */
val amountValue: String,
/** Echo of the request. Checked by MineSec. */
val currency: String,
/** MPQR: the QR to display while `status` is `PENDING`. */
val qrCode: StdJsonQrCode? = null,
/** MPQR: when the QR stops being payable. ISO 8601 UTC. */
val expiresAt: String? = null,
/** When the payment succeeded. ISO 8601 UTC. */
val paidAt: String? = null,
val payer: StdJsonQrPayer? = null,
/** Cross-border wallets: what the payer was charged. */
val payerAmount: String? = null,
val exchangeRate: String? = null,
val discountAmount: String? = null,
val settlementDate: String? = null,
val settlementReference: String? = null,
/** Refunds: the original payment. */
val linkedEnbrTranId: String? = null,
/** Refunds: `rrn` of the original payment. */
val orgRrn: String? = null, // max length 64
/** Refunds: when the refund succeeded. ISO 8601 UTC. */
val refundedAt: String? = null,
/** Refund inquiries: the amount refunded. */
val refundedAmount: String? = null,
/**
* Host-specific values, stored with the transaction. `walletTransactionId`: the wallet or
* scheme transaction id (the number on the payer's receipt), when it differs from `rrn`.
*/
val extra: Map<String, String>? = null,
)
/**
* Result of a QR payment or refund. Returned by every `/qr-payments` endpoint and sent as the
* notify body.
*/
interface StdJsonQrResult {
/**
* The host's own result code, kept for diagnostics. Must be `00` when `status` is `PENDING` or
* `SUCCESS`.
*/
respCode: string;
/** Human-readable result. Required when `status` is `FAILED`. */
respMessage?: string | null;
status: QrStatus;
/** Required when `status` is `FAILED`. */
failureCode?: QrFailureCode | null;
/** Echo of the request. */
enbrTranId: string;
/**
* The host's own reference for this payment or refund, issued at create time. MineSec stores
* it, sends it back on every follow-up call and searches by it. Required when `status` is
* `PENDING`, `SUCCESS` or `REVERSED`, and the same value in every response for one payment. It
* may be absent only when the host holds no order: a payment rejected before an order was
* created, or a cancellation for a create the host never received. Put the wallet's own
* transaction id, if different, in `extra.walletTransactionId`.
*/
rrn?: string | null; // max length 64
/** Card scheme QR only. */
approvalCode?: string | null;
/** The merchant id on the wallet or scheme side. */
networkMerchantId?: string | null;
/** Echo of the request. Expected on a notify. */
primaryMid?: string | null;
/** Echo of the request. Expected on a notify. */
primaryTid?: string | null;
/**
* Required when `status` is `SUCCESS`, and then concrete, never `UNIFIED_QR`. A
* `QrPaymentMethod` value. A wallet missing from that list is still accepted; ask MineSec to
* add it.
*/
paymentMethod?: string | null;
/** Echo of the request. Checked by MineSec. */
amountValue: string;
/** Echo of the request. Checked by MineSec. */
currency: string;
/** MPQR: the QR to display while `status` is `PENDING`. */
qrCode?: StdJsonQrCode | null;
/** MPQR: when the QR stops being payable. ISO 8601 UTC. */
expiresAt?: string | null;
/** When the payment succeeded. ISO 8601 UTC. */
paidAt?: string | null;
payer?: StdJsonQrPayer | null;
/** Cross-border wallets: what the payer was charged. */
payerAmount?: string | null;
exchangeRate?: string | null;
discountAmount?: string | null;
settlementDate?: string | null;
settlementReference?: string | null;
/** Refunds: the original payment. */
linkedEnbrTranId?: string | null;
/** Refunds: `rrn` of the original payment. */
orgRrn?: string | null; // max length 64
/** Refunds: when the refund succeeded. ISO 8601 UTC. */
refundedAt?: string | null;
/** Refund inquiries: the amount refunded. */
refundedAmount?: string | null;
/**
* Host-specific values, stored with the transaction. `walletTransactionId`: the wallet or
* scheme transaction id (the number on the payer's receipt), when it differs from `rrn`.
*/
extra?: Record<string, string> | null;
}
/**
* The fields of `StdJsonQrResult` plus the event. Sent once per final status, never for
* `PENDING`.
*/
data class StdJsonQrNotify(
/** Unique per event. Repeated on a retry of the same event. */
val eventId: String,
val eventType: QrEventType,
/** ISO 8601 UTC. */
val eventTime: String,
/**
* The host's own result code, kept for diagnostics. Must be `00` when `status` is `PENDING` or
* `SUCCESS`.
*/
val respCode: String,
/** Human-readable result. Required when `status` is `FAILED`. */
val respMessage: String? = null,
val status: QrStatus,
/** Required when `status` is `FAILED`. */
val failureCode: QrFailureCode? = null,
/** Echo of the request. */
val enbrTranId: String,
/**
* The host's own reference for this payment or refund, issued at create time. MineSec stores
* it, sends it back on every follow-up call and searches by it. Required when `status` is
* `PENDING`, `SUCCESS` or `REVERSED`, and the same value in every response for one payment. It
* may be absent only when the host holds no order: a payment rejected before an order was
* created, or a cancellation for a create the host never received. Put the wallet's own
* transaction id, if different, in `extra.walletTransactionId`.
*/
val rrn: String? = null, // max length 64
/** Card scheme QR only. */
val approvalCode: String? = null,
/** The merchant id on the wallet or scheme side. */
val networkMerchantId: String? = null,
/** Echo of the request. Expected on a notify. */
val primaryMid: String? = null,
/** Echo of the request. Expected on a notify. */
val primaryTid: String? = null,
/**
* Required when `status` is `SUCCESS`, and then concrete, never `UNIFIED_QR`. A
* `QrPaymentMethod` value. A wallet missing from that list is still accepted; ask MineSec to
* add it.
*/
val paymentMethod: String? = null,
/** Echo of the request. Checked by MineSec. */
val amountValue: String,
/** Echo of the request. Checked by MineSec. */
val currency: String,
/** MPQR: the QR to display while `status` is `PENDING`. */
val qrCode: StdJsonQrCode? = null,
/** MPQR: when the QR stops being payable. ISO 8601 UTC. */
val expiresAt: String? = null,
/** When the payment succeeded. ISO 8601 UTC. */
val paidAt: String? = null,
val payer: StdJsonQrPayer? = null,
/** Cross-border wallets: what the payer was charged. */
val payerAmount: String? = null,
val exchangeRate: String? = null,
val discountAmount: String? = null,
val settlementDate: String? = null,
val settlementReference: String? = null,
/** Refunds: the original payment. */
val linkedEnbrTranId: String? = null,
/** Refunds: `rrn` of the original payment. */
val orgRrn: String? = null, // max length 64
/** Refunds: when the refund succeeded. ISO 8601 UTC. */
val refundedAt: String? = null,
/** Refund inquiries: the amount refunded. */
val refundedAmount: String? = null,
/**
* Host-specific values, stored with the transaction. `walletTransactionId`: the wallet or
* scheme transaction id (the number on the payer's receipt), when it differs from `rrn`.
*/
val extra: Map<String, String>? = null,
)
/**
* The fields of `StdJsonQrResult` plus the event. Sent once per final status, never for
* `PENDING`.
*/
interface StdJsonQrNotify {
/** Unique per event. Repeated on a retry of the same event. */
eventId: string;
eventType: QrEventType;
/** ISO 8601 UTC. */
eventTime: string;
/**
* The host's own result code, kept for diagnostics. Must be `00` when `status` is `PENDING` or
* `SUCCESS`.
*/
respCode: string;
/** Human-readable result. Required when `status` is `FAILED`. */
respMessage?: string | null;
status: QrStatus;
/** Required when `status` is `FAILED`. */
failureCode?: QrFailureCode | null;
/** Echo of the request. */
enbrTranId: string;
/**
* The host's own reference for this payment or refund, issued at create time. MineSec stores
* it, sends it back on every follow-up call and searches by it. Required when `status` is
* `PENDING`, `SUCCESS` or `REVERSED`, and the same value in every response for one payment. It
* may be absent only when the host holds no order: a payment rejected before an order was
* created, or a cancellation for a create the host never received. Put the wallet's own
* transaction id, if different, in `extra.walletTransactionId`.
*/
rrn?: string | null; // max length 64
/** Card scheme QR only. */
approvalCode?: string | null;
/** The merchant id on the wallet or scheme side. */
networkMerchantId?: string | null;
/** Echo of the request. Expected on a notify. */
primaryMid?: string | null;
/** Echo of the request. Expected on a notify. */
primaryTid?: string | null;
/**
* Required when `status` is `SUCCESS`, and then concrete, never `UNIFIED_QR`. A
* `QrPaymentMethod` value. A wallet missing from that list is still accepted; ask MineSec to
* add it.
*/
paymentMethod?: string | null;
/** Echo of the request. Checked by MineSec. */
amountValue: string;
/** Echo of the request. Checked by MineSec. */
currency: string;
/** MPQR: the QR to display while `status` is `PENDING`. */
qrCode?: StdJsonQrCode | null;
/** MPQR: when the QR stops being payable. ISO 8601 UTC. */
expiresAt?: string | null;
/** When the payment succeeded. ISO 8601 UTC. */
paidAt?: string | null;
payer?: StdJsonQrPayer | null;
/** Cross-border wallets: what the payer was charged. */
payerAmount?: string | null;
exchangeRate?: string | null;
discountAmount?: string | null;
settlementDate?: string | null;
settlementReference?: string | null;
/** Refunds: the original payment. */
linkedEnbrTranId?: string | null;
/** Refunds: `rrn` of the original payment. */
orgRrn?: string | null; // max length 64
/** Refunds: when the refund succeeded. ISO 8601 UTC. */
refundedAt?: string | null;
/** Refund inquiries: the amount refunded. */
refundedAmount?: string | null;
/**
* Host-specific values, stored with the transaction. `walletTransactionId`: the wallet or
* scheme transaction id (the number on the payer's receipt), when it differs from `rrn`.
*/
extra?: Record<string, string> | null;
}
data class StdJsonQrNotifyAck(
val respCode: String,
val respMessage: String? = null,
)
interface StdJsonQrNotifyAck {
respCode: string;
respMessage?: string | null;
}