Skip to content

Results ​

Starting a payment returns one of five classes from @laranex/myanmar-payments. Their union is the PaymentResult type, and each exposes flow: PaymentFlow.

RedirectPayment ​

Returned by kbzPay().pwa() and wavePay().initiate().

PropertyTypeDescription
orderIdstringYour order ID
urlstringThe gateway page to redirect the customer to
gatewayReferencestring | undefinedThe gateway's ID for this attempt (KBZ prepay_id, Wave transaction_id)
rawReadonly<Record<string, unknown>>The gateway's response, for logging

FormPayment ​

Returned by ayaPay().initiate() and cyberSource().hostedCheckout().

Property / MethodTypeDescription
orderIdstringYour order ID
actionstringThe gateway URL the form posts to
fieldsreadonly FormField[]The signed hidden fields (name, value), in signing order. Post them unchanged
enctypestringThe form encoding the gateway expects
field(name)string | undefinedThe value of one field
values()Record<string, string>The fields as an object, e.g. for your own template
toHtml(nonce?)stringA full HTML page that posts the form on load. Pass your Content-Security-Policy nonce to add it to the inline <script>

this.payments.autoSubmitUrl(payment) returns the link to the module's auto-submitting page. It throws when the form route is disabled (The form route is disabled (formRoute.enabled is false).) or formLink.ttlMinutes is missing; the FormPayment itself is still returned by initiate() or hostedCheckout().

QrPayment ​

Returned by kbzPay().qr(), yomaMmqr().initiate() and yomaMmqr().renewQr().

Property / MethodTypeDescription
orderIdstringYour order ID
qrStringstring | undefinedA QR payload to encode yourself (KBZ Pay)
qrImagestring | undefinedA base64 image to display as is (Yoma MMQR)
expiresAtDate | undefinedWhen the QR stops being payable
referencestring | undefinedThe gateway's ID for this QR (KBZ prepay_id, Yoma refLabel)
rawReadonly<Record<string, unknown>>The gateway's response, for logging
qrImageDataUri(mimeType = 'image/png')string | undefinedqrImage as a data URI for <img src>

AppPayment ​

Returned by kbzPay().app().

Property / MethodTypeDescription
orderIdstringYour order ID
orderInfostringThe signed order string the SDK expects
signstringThe signature of orderInfo
signTypestringSHA256
rawReadonly<Record<string, unknown>>The gateway's response, for logging
toJSON()objectorderId, orderInfo, sign, signType for your mobile app

MiniAppPayment ​

Returned by wavePayMiniApp().payment(). No request is sent: return it to your mini app page, which hands it unchanged to WaveJsSDK.paymentModule.makePayment().

Property / MethodTypeDescription
orderIdstringYour order ID (orderID)
amountAmountThe signed total, in whole kyat
miniAppIdstringThe configured mini app ID (miniAppID)
merchantReferenceIdstringYour ID for this attempt (merchantRefID)
callbackUrlstringThe signed callback URL (callBackUrl)
hashValuestringThe payload's hash (hashValue)
itemsreadonly MiniAppPaymentItem[]The line items, { name, amount } with amount an Amount
toJSON()objectExactly the makePayment object: amount, miniAppID, merchantRefID, orderID, callBackUrl, hashValue, items (name, amount), amounts as numbers
toJsonString()stringThe same object as compact JSON, amounts with every digit

PaymentFlow ​

ValueStringResult
PaymentFlow.RedirectredirectRedirectPayment
PaymentFlow.FormformFormPayment
PaymentFlow.QrqrQrPayment
PaymentFlow.AppappAppPayment
PaymentFlow.MiniAppmini_appMiniAppPayment