@checkout-kit/core / ActionRunner
Interface: ActionRunner<K>
Type Parameters
| Type Parameter | Default type |
|---|---|
K extends PaymentActionKind | PaymentActionKind |
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
kind | readonly | K | - |
surfaces | readonly | readonly ActionSurface[] | Surfaces this runner can render on. The registry keys on kind:surface. |
Methods
run()
ts
run(action, ctx): Promise<ActionEvidence>;Parameters
| Parameter | Type |
|---|---|
action | | Extract<ActionBase & { fields?: Readonly<Record<string, string>>; kind: "redirect"; method: "GET" | "POST"; returnUrlField?: string; surface: "top" | "iframe" | "popup"; url: string; }, { kind: K; }> | Extract<ActionBase & { fields: readonly ("number" | "exp" | "cvc" | "holder")[]; kind: "collect_fields"; origin: string; surface: "inline"; theme?: Readonly<Record<string, string>>; url: string; }, { kind: K; }> | Extract<ActionBase & { integrity?: string; kind: "sdk_handoff"; params: Readonly<Record<string, unknown>>; scriptUrl?: string; sdk: string; surface: "none"; }, { kind: K; }> | Extract<ActionBase & { completion: { intervalMs: number; timeoutMs: number; via: "poll"; }; deeplink?: string; format: "qr" | "code" | "instructions"; imageUrl?: string; instructions?: string; kind: "display"; surface: "inline"; value: string; }, { kind: K; }> | Extract<ActionBase & { kind: "poll"; surface: "none"; }, { kind: K; }> |
ctx | RunnerContext |
Returns
Promise<ActionEvidence>