Checkout
API reference
Types and exports for @oleq-ai/pay.
@oleq-ai/pay
import {
OleqPayCheckout,
OleqPayCheckoutError,
type CheckoutPayload,
type CheckoutEvent,
type OleqPayCheckoutOptions,
type OpenOptions,
type OleqPayCheckoutErrorCode,
} from '@oleq-ai/pay';CheckoutPayload
| Field | Required | Notes |
|---|---|---|
apikey | yes | Public key only (≥10 chars, not sk_…) |
amount | yes | Number or numeric string, must be > 0 |
orderid | yes | String or number |
reference | yes | Non-empty string |
callbackurl | no | Must be a valid URL when set |
returnurl | no | Must be a valid URL when set |
OpenOptions
{
onSuccess?: (event: { type: 'oleqpay:success'; vreference: string; amount?: string }) => void;
onError?: (event: { type: 'oleqpay:failed'; vreference?: string; message?: string }) => void;
onClose?: () => void;
}@oleq-ai/pay/react
import {
useOleqPayCheckout,
type UseOleqPayCheckoutOptions,
type OleqPayCheckoutResult,
} from '@oleq-ai/pay/react';@oleq-ai/pay/nest
import {
OleqPayCheckoutModule,
createOleqPayCheckout,
OLEQPAY_CHECKOUT_OPTIONS,
type OleqPayCheckoutModuleOptions,
type OleqPayCheckoutModuleAsyncOptions,
} from '@oleq-ai/pay/nest';