UNPKG

@coin-voyage/paykit

Version:

Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.

19 lines (18 loc) 1.1 kB
import type { PayOrderStatus } from "@coin-voyage/shared/types"; /** Returns the current payment, or undefined if there is none. * * Status values: * - `PENDING` - the user has not paid yet * - `AWAITING_PAYMENT` - the user has requested payment details but not yet executed the payment. * - `AWAITING_CONFIRMATION` - the user has paid & payment is in progress. This status * typically lasts a few seconds. * - `OPTIMISTIC_CONFIRMED` - the user has paid and the payment is verified on the blockchain, but not yet confirmed. This status can last from a few seconds to several minutes, depending on the chains transaction speed. * - `EXECUTING_ORDER` - the payment is confirmed and the order is being executed. This status typically lasts a few seconds. * - `COMPLETED` - the payOrder is finalized and succeeded * - `EXPIRED` - the payOrder expired before the user paid * - `REFUNDED` - the payment was refunded to the payment's configured refund address on the destination chain. */ export declare function usePayStatus(): { paymentId: string; status: PayOrderStatus; } | undefined;