UNPKG

@sahabaplus/moyasar

Version:

A comprehensive TypeScript SDK for integrating with the Moyasar payment gateway

76 lines 4.64 kB
export declare const WebhookEvent: { /** * ## Initiated * First status of a payment. It indicates that the payment has been created but the cardholder did not pay yet. * @hint If the payment is initiated then you need to complete the payment transaction by completing the payment challenge found in `Payment.source.transaction_url` depending on the payment source type. * @see https://docs.moyasar.com/api/payments/payment-status-reference?_highlight=initiated */ readonly PAYOUT_INITIATED: "payout_initiated"; /** * ## Payment Paid * Payment reaches this status when the cardholder pays successfully. * @see https://docs.moyasar.com/api/payments/payment-status-reference?_highlight=paid */ readonly PAYMENT_PAID: "payment_paid"; /** * ## Payment Failed * Payment reaches this status when the cardholder or merchant has a certain error that caused the payment to fail (errors are attached to the `message` attribute). * @see https://docs.moyasar.com/api/payments/payment-status-reference?_highlight=failed */ readonly PAYMENT_FAILED: "payment_failed"; /** * ## Payment Authorized * Payment reaches this status when the merchant authorizes it to be manually captured anytime later —the cardholder is not charged yet. * @note The status authorized is used when a scheme payment is made with `manual: true` option which will cause the system to authorize the payment only without capturing it. The merchant must capture the payment within time it will be voided automatically by the issuer. * @note Please note that when an issuer voids the payment, the status will be kept authorized and **WILL NOT BE updated by the system**. * @see https://docs.moyasar.com/api/payments/payment-status-reference?_highlight=authorized * @see https://docs.moyasar.com/api/payments/01-create-payment#responses */ readonly PAYMENT_AUTHORIZED: "payment_authorized"; /** * ## Payment Captured * Payment reaches this status when the cardholder of an authorized payment is charged successfully. * @see https://docs.moyasar.com/api/payments/payment-status-reference?_highlight=captured */ readonly PAYMENT_CAPTURED: "payment_captured"; /** * ## Payment Refunded * Payment reaches this status when the merchant refunds a paid or captured payment successfully. * @see https://docs.moyasar.com/api/payments/payment-status-reference?_highlight=refunded */ readonly PAYMENT_REFUNDED: "payment_refunded"; /** * ## Payment Voided * Payment reaches this status when the merchant cancels a paid, authorized, or captured payment. It works only if the amount is not settled yet in the merchant’s bank account. * @see https://docs.moyasar.com/api/payments/payment-status-reference?_highlight=voided */ readonly PAYMENT_VOIDED: "payment_voided"; /** * ## Payment Verified * Payment reaches this status when the cardholder verifies his card in the tokenization process. * @see https://docs.moyasar.com/api/payments/payment-status-reference?_highlight=verified */ readonly PAYMENT_VERIFIED: "payment_verified"; readonly PAYMENT_ABANDONED: "payment_abandoned"; readonly PAYMENT_CANCELED: "payment_canceled"; readonly PAYMENT_EXPIRED: "payment_expired"; /** * ## Balance Transferred * When a settlement is created and sent to the merchant bank account, Moyasar will send a webhook notification to the merchant * @see https://docs.moyasar.com/guides/settlements/settlement-notification/#:~:text=Make%20sure%20to%20selected%20the%20balance_transferred%20event */ readonly BALANCE_TRANSFERRED: "balance_transferred"; readonly PAYOUT_PAID: "payout_paid"; readonly PAYOUT_FAILED: "payout_failed"; readonly PAYOUT_CANCELED: "payout_canceled"; readonly PAYOUT_RETURNED: "payout_returned"; }; export type WebhookEvent = (typeof WebhookEvent)[keyof typeof WebhookEvent]; export declare const ALL_WEBHOOK_EVENTS: ("payout_initiated" | "payment_paid" | "payment_failed" | "payment_authorized" | "payment_captured" | "payment_refunded" | "payment_voided" | "payment_verified" | "payment_abandoned" | "payment_canceled" | "payment_expired" | "balance_transferred" | "payout_paid" | "payout_failed" | "payout_canceled" | "payout_returned")[]; export declare const WebhookHttpMethod: { readonly POST: "post"; readonly PUT: "put"; readonly PATCH: "patch"; }; export type WebhookHttpMethod = (typeof WebhookHttpMethod)[keyof typeof WebhookHttpMethod]; //# sourceMappingURL=enums.d.ts.map