Skip to content

PaymentCallback & Status ​

PaymentCallback ​

Returned by every gateway's handleCallback() and by ayaPay().verifyRedirect(), after the signature has been verified.

Property / MethodTypeDescription
orderIdstringYour order ID
statusPaymentStatusThe status mapped onto this package's statuses
gatewayStatusstringThe gateway's own status value, unmapped
gatewayReferencestring | undefinedThe gateway's ID for the payment
amountstring | undefinedThe amount as the gateway sent it
rawReadonly<Record<string, unknown>>The verified payload; JSON numbers are their exact text as strings
isSuccessful()booleanstatus === PaymentStatus.Successful
acknowledgementAcknowledgementThe response the gateway expects (status, body, headers)

In NestJS, return the callback from an @AcknowledgeCallback() handler, or call acknowledge(res, callback), to send the acknowledgement.

PaymentStatusResult ​

Returned by kbzPay().status(), ayaPay().status() and yomaMmqr().status().

Property / MethodTypeDescription
orderIdstring | undefinedYour order ID. undefined for Yoma MMQR, which only returns the reference
statusPaymentStatusThe mapped status
gatewayStatusstringThe gateway's own status value
gatewayReferencestring | undefinedThe gateway's ID for the payment
amountstring | undefinedThe amount as the gateway reported it
rawReadonly<Record<string, unknown>>The gateway's response
isSuccessful()booleanstatus === PaymentStatus.Successful

PaymentStatus ​

ValueStringPaymentStatus.isFinal()
PaymentStatus.Successfulsuccessfultrue
PaymentStatus.Pendingpendingfalse
PaymentStatus.Failedfailedtrue
PaymentStatus.Canceledcanceledtrue
PaymentStatus.Expiredexpiredtrue
PaymentStatus.Unknownunknownfalse

PaymentStatus.values lists every status.

Released under the MIT License, except where a package says otherwise.