Skip to content

@checkout-kit/core / CheckoutEngine

Interface: CheckoutEngine ​

Properties ​

PropertyModifierType
providerIdsreadonlyreadonly string[]

Methods ​

abort() ​

ts
abort(reason?): Promise<PaymentResult>;

Parameters ​

ParameterType
reason?"user" | "timeout"

Returns ​

Promise<PaymentResult>


fetchIntent() ​

ts
fetchIntent(intentId, providerId?): Promise<PaymentIntent>;

Parameters ​

ParameterType
intentIdstring
providerId?string

Returns ​

Promise<PaymentIntent>


getSnapshot() ​

ts
getSnapshot(): CheckoutSnapshot;

Returns ​

CheckoutSnapshot


hydrate() ​

ts
hydrate(params?): Promise<PaymentResult | null>;

Pick up a payment left in flight by a full-page redirect.

Parameters ​

ParameterType
params?Readonly<Record<string, string>>

Returns ​

Promise<PaymentResult | null>


on() ​

ts
on<T>(type, handler): () => void;

Type Parameters ​

Type Parameter
T extends | "phase_changed" | "provider_changed" | "intent_created" | "action_required" | "action_started" | "action_finished" | "result" | "error"

Parameters ​

ParameterType
typeT
handler(event) => void

Returns ​

() => void


pay() ​

ts
pay(request): Promise<PaymentResult>;

Parameters ​

ParameterType
requestPayRequest

Returns ​

Promise<PaymentResult>


prepare() ​

ts
prepare(input): Promise<void>;

Create the intent ahead of submission. A no-op for providers that do not need it.

Parameters ​

ParameterType
inputCreateIntentInput

Returns ​

Promise<void>


reset() ​

ts
reset(): void;

Returns ​

void


resumeWith() ​

ts
resumeWith(evidence): Promise<PaymentResult>;

Continue with evidence the host obtained itself (e.g. from a return URL).

Parameters ​

ParameterType
evidenceActionEvidence

Returns ​

Promise<PaymentResult>


runPendingAction() ​

ts
runPendingAction(options?): Promise<PaymentResult>;

Execute the pending action and hand its evidence to the provider.

Parameters ​

ParameterType
options?RunActionOptions

Returns ​

Promise<PaymentResult>


subscribe() ​

ts
subscribe(listener): () => void;

Parameters ​

ParameterType
listener() => void

Returns ​

() => void


useProvider() ​

ts
useProvider(providerId): Promise<void>;

Parameters ​

ParameterType
providerIdstring

Returns ​

Promise<void>

Apache-2.0 · Headless engine, provider adapters and runnable examples.