@conto_finance/sdk 0.6.0-beta.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -638,40 +638,6 @@ interface RollbackPolicyVersionResponse extends Policy {
638
638
  restoredFromVersion: number;
639
639
  newVersion: number | null;
640
640
  }
641
- type StripeLinkCheckoutReadinessStatus = 'NOT_READY' | 'READY_FOR_VERIFICATION' | 'VERIFIED' | 'VERIFICATION_FAILED';
642
- type StripeLinkCheckoutVerification = 'NOT_RUN' | 'NOT_READY' | 'VERIFIED' | 'ACCOUNT_MISMATCH' | 'PROVIDER_UNAVAILABLE';
643
- /**
644
- * Non-identifying readiness projection for the configured Stripe Link
645
- * Checkout adapter. Merchant/account identifiers, URLs, credentials, hashes,
646
- * Stripe objects, and raw provider errors are intentionally absent.
647
- */
648
- interface StripeLinkCheckoutReadiness {
649
- readonly status: StripeLinkCheckoutReadinessStatus;
650
- readonly mode: 'TEST' | 'LIVE' | null;
651
- readonly checks: {
652
- readonly providerEnabled: boolean;
653
- readonly checkoutEnabled: boolean;
654
- readonly organizationAllowed: boolean;
655
- readonly configurationValid: boolean;
656
- readonly accountVerified: boolean;
657
- };
658
- readonly canVerify: boolean;
659
- readonly verifiedAt: string | null;
660
- readonly verification: StripeLinkCheckoutVerification;
661
- readonly scope: {
662
- readonly configuredMerchantCheckoutOnly: true;
663
- readonly statement: string;
664
- };
665
- readonly link: {
666
- readonly eligibilityGuaranteed: false;
667
- readonly displayGuaranteed: false;
668
- readonly selectionGuaranteed: false;
669
- readonly statement: string;
670
- };
671
- }
672
- interface StripeLinkCheckoutReadinessResult {
673
- readonly readiness: StripeLinkCheckoutReadiness;
674
- }
675
641
  declare class ContoAdmin {
676
642
  #private;
677
643
  private baseUrl;
@@ -681,22 +647,10 @@ declare class ContoAdmin {
681
647
  cards: AdminCardsClient;
682
648
  policies: PoliciesClient;
683
649
  team: TeamClient;
684
- paymentRails: PaymentRailsClient;
685
650
  constructor(config: ContoAdminConfig);
686
651
  /** Make an authenticated request to the Conto API */
687
652
  request<T>(method: string, path: string, body?: Record<string, unknown>): Promise<T>;
688
653
  }
689
- declare class PaymentRailsClient {
690
- private client;
691
- constructor(client: ContoAdmin);
692
- /** Read gate and configuration readiness without calling Stripe. */
693
- getStripeLinkCheckoutReadiness(): Promise<StripeLinkCheckoutReadinessResult>;
694
- /**
695
- * Ask Conto to verify that its configured Stripe credential resolves to its
696
- * configured merchant account. This call never returns either identifier.
697
- */
698
- verifyStripeLinkCheckoutAccount(): Promise<StripeLinkCheckoutReadinessResult>;
699
- }
700
654
  declare class AdminCardsClient {
701
655
  private client;
702
656
  constructor(client: ContoAdmin);
@@ -739,8 +693,11 @@ declare class AdminCardsClient {
739
693
  /** List overlay requests, including executions that need receipt reconciliation. */
740
694
  listRequests(input?: ListExternalCardRequestsInput): Promise<ListExternalCardRequestsResponse>;
741
695
  /**
742
- * Resolve a claimed execution after checking the customer's processor or
743
- * receipt. Resolving NOT_EXECUTED releases the reserved policy amount.
696
+ * @deprecated Resolution requires a signed-in user. SDK admin keys and
697
+ * organization API keys receive HTTP 403 INSUFFICIENT_PERMISSIONS from this
698
+ * endpoint. Have a signed-in organization owner or admin review the processor
699
+ * evidence and resolve the request through Conto's authenticated interface.
700
+ * Retained for source compatibility; this method does not bypass that restriction.
744
701
  */
745
702
  resolveRequest(requestId: string, input: ResolveExternalCardRequestInput): Promise<ResolveExternalCardRequestResult>;
746
703
  /** Pause the Conto-controlled path and revoke live overlay grants. */
@@ -989,8 +946,6 @@ interface ContoConfig {
989
946
  baseUrl?: string;
990
947
  /** Request timeout in milliseconds. Defaults to 30000 */
991
948
  timeout?: number;
992
- /** Defaults for the configured live Link checkout pilot. These are IDs, never Link credentials. */
993
- link?: LinkPaymentDefaults;
994
949
  }
995
950
  interface PaymentRequestInput {
996
951
  /** Amount in the wallet chain stablecoin */
@@ -1663,21 +1618,6 @@ interface TestCheckoutResult extends TestCardReceipt {
1663
1618
  replayed: boolean;
1664
1619
  status: 'COMPLETED';
1665
1620
  }
1666
- interface StripeLinkPaymentMethod {
1667
- id: string;
1668
- type: string;
1669
- isDefault: boolean;
1670
- displayLabel: string;
1671
- last4?: string;
1672
- eligibleCredentialTypes: string[];
1673
- }
1674
- interface ListStripeLinkPaymentMethodsResult {
1675
- /** Authenticated tenant context, returned so operators can verify a target before writes. */
1676
- organizationId: string;
1677
- connectionId: string;
1678
- /** Masked Link payment methods eligible for the bound agent. */
1679
- paymentMethods: StripeLinkPaymentMethod[];
1680
- }
1681
1621
  type CommerceTotalType = 'subtotal' | 'tax' | 'total' | 'items_base_amount' | 'items_discount' | 'discount' | 'fulfillment' | 'shipping' | 'fee' | 'gift_wrap' | 'tip' | 'store_credit';
1682
1622
  interface CommerceLineItemInput {
1683
1623
  name: string;
@@ -1701,6 +1641,88 @@ interface CommerceFulfillmentInput {
1701
1641
  postalCode?: string;
1702
1642
  countryCode?: string;
1703
1643
  }
1644
+ type CheckoutCheckpointMethod = 'LINK' | 'CARD' | 'SHOP_PAY' | 'PAYPAL';
1645
+ type CheckoutCheckpointStage = 'AWAITING_APPROVAL' | 'APPROVED' | 'CONFIRMING' | 'CONFIRMED' | 'PAID' | 'NOT_PAID' | 'OUTCOME_UNKNOWN' | 'DENIED' | 'CANCELLED' | 'EXPIRED';
1646
+ type CheckoutCheckpointNextAction = 'WAIT_FOR_APPROVAL' | 'CONFIRM_BEFORE_PAYING' | 'PAY_THEN_REPORT_OUTCOME' | 'REPORT_OUTCOME' | 'WAIT' | 'NONE';
1647
+ type CheckoutOutcome = 'PAID' | 'NOT_PAID' | 'UNKNOWN';
1648
+ /** First checkpoint: the purchase as the checkout shows it before the payment method opens. */
1649
+ interface BeginCheckoutCheckpointInput {
1650
+ /** Stable key for this purchase. Reuse it to retry begin safely. */
1651
+ idempotencyKey: string;
1652
+ merchant: {
1653
+ id: string;
1654
+ name: string;
1655
+ checkoutUrl: string;
1656
+ };
1657
+ /** Integer amount in minor units (cents). */
1658
+ amountMinor: number;
1659
+ currency?: 'USD';
1660
+ purpose: string;
1661
+ /** Optional semantic policy category, such as OFFICE_SUPPLIES. */
1662
+ category?: string;
1663
+ /** Defaults to LINK. */
1664
+ checkoutMethod?: CheckoutCheckpointMethod;
1665
+ lineItems: CommerceLineItemInput[];
1666
+ /** Defaults to one Total entry equal to amountMinor. */
1667
+ totals?: CommerceTotalInput[];
1668
+ }
1669
+ /** Second checkpoint: the final total shown right before the payment is submitted. */
1670
+ interface ConfirmCheckoutCheckpointInput {
1671
+ amountMinor: number;
1672
+ currency?: 'USD';
1673
+ /** Final line items, needed only when the total changed. Defaults to the approved items. */
1674
+ lineItems?: CommerceLineItemInput[];
1675
+ /** Final totals, such as tax and shipping. Defaults to one Total entry. */
1676
+ totals?: CommerceTotalInput[];
1677
+ /** Page where the payment is submitted: the merchant's site or the payment method's. */
1678
+ pageUrl?: string;
1679
+ }
1680
+ interface ReportCheckoutOutcomeInput {
1681
+ outcome: CheckoutOutcome;
1682
+ /** Merchant order or receipt number. Never a payment credential. */
1683
+ reference?: string;
1684
+ }
1685
+ interface CheckoutCheckpoint {
1686
+ id: string;
1687
+ idempotencyKey: string;
1688
+ agentId?: string;
1689
+ checkoutMethod: CheckoutCheckpointMethod;
1690
+ stage: CheckoutCheckpointStage;
1691
+ nextAction: CheckoutCheckpointNextAction;
1692
+ amountMinor: number;
1693
+ currency: string;
1694
+ purpose: string;
1695
+ category?: string;
1696
+ merchant: {
1697
+ id: string;
1698
+ name: string;
1699
+ checkoutUrl?: string;
1700
+ };
1701
+ cart: {
1702
+ lineItems: CommerceLineItemInput[];
1703
+ totals: CommerceTotalInput[];
1704
+ };
1705
+ /** While AWAITING_APPROVAL, when the owner's decision window closes. Otherwise when the approval lapses. */
1706
+ expiresAt: string;
1707
+ /** Present when the agent's rules sent this purchase to the owner for approval. */
1708
+ approval?: CheckoutCheckpointApproval;
1709
+ outcomeReference?: string;
1710
+ /** Outcomes are reported by your checkout. Conto does not verify settlement here. */
1711
+ settlementVerified: false;
1712
+ }
1713
+ interface CheckoutCheckpointApproval {
1714
+ requestId: string;
1715
+ status: 'PENDING' | 'APPROVED' | 'DENIED' | 'EXPIRED' | 'CANCELLED';
1716
+ /** Set while PENDING. */
1717
+ expiresAt?: string;
1718
+ }
1719
+ interface WaitForCheckoutApprovalOptions {
1720
+ /** Stop waiting after this long. Defaults to 10 minutes. The spend stays held until you cancel. */
1721
+ timeoutMs?: number;
1722
+ /** Time between status reads. Defaults to 5 seconds, minimum 1 second. */
1723
+ pollIntervalMs?: number;
1724
+ signal?: AbortSignal;
1725
+ }
1704
1726
  /** Exact Stripe Link purchase intent evaluated and bound by Conto policy. */
1705
1727
  interface BeginCommerceExecutionCommonInput {
1706
1728
  /** Stable key for this exact intent. Reuse it when reconciling or retrying begin. */
@@ -1792,66 +1814,6 @@ type BeginCommerceExecutionInput = (BeginConnectedLinkExecutionInput & {
1792
1814
  checkoutUrl: string;
1793
1815
  };
1794
1816
  });
1795
- /** Configuration inspection only: no policy evaluation, credential retrieval, or purchase. */
1796
- interface LinkSetupInput {
1797
- connectionId?: string;
1798
- paymentMethodId?: string;
1799
- merchantId?: string;
1800
- }
1801
- interface LinkSetupCheck {
1802
- code: string;
1803
- status: 'PASS' | 'BLOCKED' | 'WARNING';
1804
- actor: 'developer' | 'owner' | 'operator';
1805
- message: string;
1806
- }
1807
- interface LinkSetupResult {
1808
- version: 'conto.link-setup.v1';
1809
- mode: 'LIVE' | 'SIMULATED';
1810
- configurationStatus: 'CONFIGURED' | 'INCOMPLETE';
1811
- checks: LinkSetupCheck[];
1812
- missingScopes: string[];
1813
- checkout?: {
1814
- merchantId: string;
1815
- origin: string;
1816
- currency: 'USD';
1817
- maxAmountMinor: number;
1818
- };
1819
- paymentAuthorization: 'NOT_EVALUATED';
1820
- providerVerified: false;
1821
- settlementVerified: false;
1822
- }
1823
- /** Reusable owner-provisioned identifiers. Per-purchase values can override these defaults. */
1824
- interface LinkPaymentDefaults {
1825
- connectionId: string;
1826
- paymentMethodId: string;
1827
- }
1828
- /** Exact purchase facts for a configured USD digital-goods checkout. */
1829
- interface LinkPaymentInput {
1830
- /** Persist this key before calling pay; reuse it for this exact purchase across restarts. */
1831
- idempotencyKey: string;
1832
- connectionId?: string;
1833
- paymentMethodId?: string;
1834
- /** Canonical ID of a checkout profile already configured by the deployment operator. */
1835
- merchantId: string;
1836
- checkoutUrl: string;
1837
- amountMinor: number;
1838
- currency?: 'USD';
1839
- purpose: string;
1840
- category?: string;
1841
- lineItems: CommerceLineItemInput[];
1842
- /** Required when the final amount differs from the line-item sum. Include the exact total breakdown. */
1843
- totals?: CommerceTotalInput[];
1844
- }
1845
- type LinkPaymentNextAction = 'APPROVE_IN_LINK' | 'WAIT' | 'RESUME' | 'RECONCILE' | 'NONE';
1846
- /** Safe payment state; submission and completion are not proof of settlement. */
1847
- interface LinkPaymentResult extends CommerceExecutionResult {
1848
- executionId: string;
1849
- status: CommerceExecutionStatus;
1850
- nextAction: LinkPaymentNextAction;
1851
- /** Present only while Link approval is needed. Show it to the account owner. */
1852
- approvalUrl?: string;
1853
- checkout?: ExecuteCommerceExecutionResult['checkout'];
1854
- }
1855
1817
  type CommerceExecutionStatus = 'DRAFT' | 'ACTION_REQUIRED' | 'AUTHORIZING' | 'AWAITING_APPROVAL' | 'READY' | 'PROCESSING' | 'SETTLED' | 'COMPLETED' | 'DENIED' | 'CANCELLED' | 'FAILED' | 'RETURNED' | 'EXPIRED' | 'NEEDS_RECONCILIATION';
1856
1818
  type CommerceExecutionProvider = 'STABLECOIN' | 'TOKENIZED_CARD' | 'STRIPE_LINK';
1857
1819
  type CommerceExecutionChannel = 'BROWSER' | 'MERCHANT_API' | 'CREDENTIAL_BROKER' | 'BANK_API' | 'WALLET_SIGNER';
@@ -2258,6 +2220,13 @@ interface MppPreAuthorizeInput {
2258
2220
  credentialId?: string;
2259
2221
  challengeId?: string;
2260
2222
  paymentMethod?: string;
2223
+ /**
2224
+ * Wallet address your MPP client pays from. Provide together with network
2225
+ * when the agent has more than one wallet it signs with.
2226
+ */
2227
+ payerAddress?: string;
2228
+ /** CAIP-2 network of payerAddress, for example eip155:42431. */
2229
+ network?: string;
2261
2230
  }
2262
2231
  interface MppPreAuthorizeResult extends ProtocolPreAuthorizeResult {
2263
2232
  mpp: {
@@ -2383,12 +2352,6 @@ declare class ContoError extends Error {
2383
2352
  readonly diagnostics?: SetupDiagnostics;
2384
2353
  constructor(message: string, metadata: ApiErrorMetadata, diagnostics?: unknown);
2385
2354
  }
2386
- /** Execution was attempted. Inspect this existing execution before any further payment action. */
2387
- declare class LinkPaymentExecutionError extends ContoError {
2388
- readonly executionId: string;
2389
- readonly nextAction: "RECONCILE";
2390
- constructor(executionId: string, error: unknown);
2391
- }
2392
2355
  /**
2393
2356
  * The customer executor returned a receipt, but Conto did not acknowledge the
2394
2357
  * confirmation. Persist confirmationInput and retry cards.confirm(); never run
@@ -2416,6 +2379,41 @@ declare class BrowserActionFinalizationPendingError<TResult = unknown> extends C
2416
2379
  observation: BrowserActionDispatchObservationInput;
2417
2380
  });
2418
2381
  }
2382
+ /**
2383
+ * The checkpoint is closed and approves nothing: denied, cancelled, expired, or
2384
+ * reported not paid. Stop this checkout. Start a new purchase with a new
2385
+ * idempotency key if the buyer still wants it.
2386
+ */
2387
+ declare class CheckoutCheckpointClosedError extends ContoError {
2388
+ readonly checkpoint: CheckoutCheckpoint;
2389
+ readonly stage: CheckoutCheckpointStage;
2390
+ constructor(checkpoint: CheckoutCheckpoint, message?: string, code?: string);
2391
+ }
2392
+ /** The owner rejected this purchase. Its spend was released. Do not pay. */
2393
+ declare class CheckoutApprovalDeniedError extends CheckoutCheckpointClosedError {
2394
+ constructor(checkpoint: CheckoutCheckpoint);
2395
+ }
2396
+ /** The owner did not decide before the approval expired. Its spend was released. Do not pay. */
2397
+ declare class CheckoutApprovalExpiredError extends CheckoutCheckpointClosedError {
2398
+ constructor(checkpoint: CheckoutCheckpoint);
2399
+ }
2400
+ /**
2401
+ * The owner has not approved this purchase yet. Do not pay. Wait with
2402
+ * waitForApproval(error.checkpoint), then confirm the approved checkpoint, or
2403
+ * cancel it to release the spend.
2404
+ */
2405
+ declare class CheckoutApprovalPendingError extends ContoError {
2406
+ readonly checkpoint: CheckoutCheckpoint;
2407
+ constructor(checkpoint: CheckoutCheckpoint);
2408
+ }
2409
+ /**
2410
+ * waitForApproval stopped before the owner decided. The spend is still held:
2411
+ * wait again, or cancel the checkpoint to release it.
2412
+ */
2413
+ declare class CheckoutApprovalTimeoutError extends ContoError {
2414
+ readonly checkpoint: CheckoutCheckpoint;
2415
+ constructor(checkpoint: CheckoutCheckpoint);
2416
+ }
2419
2417
  interface ContoRequestOptions {
2420
2418
  /** Set only when repeating this request cannot create an additional side effect. */
2421
2419
  idempotent?: boolean;
@@ -2426,7 +2424,8 @@ declare class Conto {
2426
2424
  #private;
2427
2425
  private baseUrl;
2428
2426
  private timeout;
2429
- link: LinkClient;
2427
+ /** Lightweight checkpoints before the payment method opens and before payment. */
2428
+ checkout: CheckoutClient;
2430
2429
  payments: PaymentsClient;
2431
2430
  cards: CardsClient;
2432
2431
  connectedCards: ConnectedCardsClient;
@@ -2434,16 +2433,6 @@ declare class Conto {
2434
2433
  x402: X402Client;
2435
2434
  mpp: MppClient;
2436
2435
  constructor(config: ContoConfig);
2437
- /**
2438
- * List masked Link payment methods for a session-created connection that is
2439
- * explicitly bound to this agent. No Link token or payment artifact is
2440
- * returned through the agent SDK.
2441
- */
2442
- listStripeLinkPaymentMethods(connectionId: string, options?: {
2443
- mode?: 'TEST' | 'LIVE';
2444
- }): Promise<ListStripeLinkPaymentMethodsResult>;
2445
- /** Read live Link configuration diagnostics without retrieving credentials or authorizing payment. */
2446
- getLinkSetup(input?: LinkSetupInput): Promise<LinkSetupResult>;
2447
2436
  /**
2448
2437
  * Normalize and durably revise a partial agent purchase proposal without
2449
2438
  * creating a payment side effect. Missing facts return as NEEDS_CONTEXT
@@ -2461,6 +2450,12 @@ declare class Conto {
2461
2450
  beginCommerceExecution(input: BeginCommerceExecutionInput): Promise<CommerceExecutionResult>;
2462
2451
  /** Atomically consume the Conto authorization for one exact browser action. */
2463
2452
  authorizeCheckoutAction(executionId: string, browserSessionId: string, action: AgentCheckoutAction | BrowserCheckoutAction): Promise<AuthorizeCheckoutActionResult>;
2453
+ /**
2454
+ * Report whether an authorized guarded browser checkout was paid. PAID keeps
2455
+ * the held spend counted, NOT_PAID releases it, and UNKNOWN keeps it held for
2456
+ * the owner to review. Safe to repeat with the same outcome.
2457
+ */
2458
+ reportCommerceExecutionOutcome(executionId: string, input: ReportCheckoutOutcomeInput): Promise<CommerceExecutionResult>;
2464
2459
  /** Claim a durable browser action for one stable privileged-runtime attempt. */
2465
2460
  claimBrowserAction(authorizationId: string, dispatchAttemptId: string, browserSessionId: string, action: AgentCheckoutAction | BrowserCheckoutAction): Promise<BrowserActionClaimResult>;
2466
2461
  /** Finalize the exact dispatch attempt; this never performs the browser side effect. */
@@ -2783,34 +2778,51 @@ declare class MppClient {
2783
2778
  }): Promise<ProtocolServicesResult>;
2784
2779
  }
2785
2780
 
2786
- /** Narrow transport contract used by the isolated, credential-free test client. */
2787
- type LinkCommerceClient = Pick<Conto, 'getLinkSetup' | 'listStripeLinkPaymentMethods' | 'beginCommerceExecution' | 'getCommerceExecution' | 'refreshCommerceExecution' | 'executeCommerceExecution' | 'cancelCommerceExecution'>;
2788
- /** High-level client for the configured Link Pay Token checkout pilot. */
2789
- declare class LinkClient {
2781
+ /**
2782
+ * Lightweight checkout checkpoints for any agent runtime. Call begin() before the
2783
+ * payment method opens and confirm() right before the payment is submitted. Pay
2784
+ * only after confirm() succeeds, then report the outcome. Conto decides and
2785
+ * records each step; your checkout enforces the answer.
2786
+ *
2787
+ * When the agent's rules require approval, begin() returns stage
2788
+ * AWAITING_APPROVAL with the spend held. Do not open the payment method yet:
2789
+ * call waitForApproval() and continue with the checkpoint it returns.
2790
+ */
2791
+ declare class CheckoutClient {
2790
2792
  #private;
2791
- constructor(client: LinkCommerceClient, defaults?: LinkPaymentDefaults);
2792
- /** Inspect the configured live path. This is not a payment authorization or provider connectivity test. */
2793
- setup(input?: LinkSetupInput): Promise<LinkSetupResult>;
2794
- /** Read masked LIVE funding sources; never selects a source or initiates payment. */
2795
- paymentMethods(connectionId?: string): Promise<ListStripeLinkPaymentMethodsResult>;
2793
+ constructor(client: Pick<Conto, 'request'>);
2794
+ /**
2795
+ * First checkpoint. Open the payment method only when the stage is APPROVED.
2796
+ * AWAITING_APPROVAL means the owner must decide first: call waitForApproval().
2797
+ * A ContoError means Conto did not approve: stop the checkout. A
2798
+ * CheckoutCheckpointClosedError means this idempotency key belongs to a
2799
+ * checkpoint that already closed.
2800
+ */
2801
+ begin(input: BeginCheckoutCheckpointInput): Promise<CheckoutCheckpoint>;
2802
+ /**
2803
+ * Waits while the owner decides on a checkpoint in AWAITING_APPROVAL and
2804
+ * resolves to the approved checkpoint. Throws CheckoutApprovalDeniedError,
2805
+ * CheckoutApprovalExpiredError, CheckoutCheckpointClosedError, or
2806
+ * CheckoutApprovalTimeoutError (the spend stays held until you cancel).
2807
+ */
2808
+ waitForApproval(checkpoint: CheckoutCheckpoint, options?: WaitForCheckoutApprovalOptions): Promise<CheckoutCheckpoint>;
2796
2809
  /**
2797
- * Begin one exact intent and execute only if already READY. Otherwise return
2798
- * the owner's approval action or existing state immediately, without polling.
2810
+ * Second checkpoint, right before the payment is submitted. If the total
2811
+ * changed since begin() (tax or shipping, for example), this cancels the
2812
+ * approved checkpoint and starts a new one at the final total, so the agent's
2813
+ * rules see the amount actually being paid. Pay only if this resolves. A
2814
+ * CheckoutApprovalPendingError means the owner must approve first: call
2815
+ * waitForApproval(error.checkpoint), then confirm the checkpoint it returns.
2799
2816
  */
2800
- pay(input: LinkPaymentInput): Promise<LinkPaymentResult>;
2817
+ confirm(checkpoint: CheckoutCheckpoint, input: ConfirmCheckoutCheckpointInput): Promise<CheckoutCheckpoint>;
2818
+ /** Report what happened after a confirmed checkpoint. Safe to repeat with the same outcome. */
2819
+ reportOutcome(checkpointId: string, input: ReportCheckoutOutcomeInput): Promise<CheckoutCheckpoint>;
2801
2820
  /**
2802
- * Continue the existing payment after approval. Reads before any mutation and
2803
- * never submits an execution already processing or requiring reconciliation.
2821
+ * Cancel a checkpoint that was not confirmed and release its spend. A
2822
+ * checkpoint waiting for the owner can be cancelled too.
2804
2823
  */
2805
- resume(executionId: string): Promise<LinkPaymentResult>;
2806
- /** Observe and reconcile provider state. This method never submits a payment. */
2807
- status(executionId: string): Promise<LinkPaymentResult>;
2808
- /** Request cancellation of this existing Link payment; never retried automatically. */
2809
- cancel(executionId: string): Promise<LinkPaymentResult>;
2810
- private identifier;
2811
- private assertLinkExecution;
2812
- private executeIfReady;
2813
- private result;
2824
+ cancel(checkpointId: string): Promise<CheckoutCheckpoint>;
2825
+ get(checkpointId: string): Promise<CheckoutCheckpoint>;
2814
2826
  }
2815
2827
 
2816
- export { type AdminExternalCardOverlayEnforcement, type Agent, type AgentCheckoutAction, type AgentCheckoutActionKind, type AgentExternalCard, type AgentSetupResult, type AgentStatus, type AgentType, type AgentWalletLink, type ApprovedExternalCardExecution, type AssignExternalCardInput, type AssignedPolicy, type AuthorizeCheckoutActionResult, type BeginCommerceExecutionInput, type BrowserActionClaimResult, type BrowserActionDispatchObservationInput, BrowserActionFinalizationPendingError, type BrowserActionFinalizeResult, type BrowserCheckoutAction, type BrowserCheckoutTargetResolver, type BrowserCheckoutTargetSnapshot, type BrowserCheckoutTargetVerificationCode, BrowserCheckoutTargetVerificationError, type CanonicalBrowserCheckoutTargetSnapshot, CardsClient, type ChainType, type CheckoutActionAuthorization, type CommerceCheckoutMethod, type CommerceContextRequirement, type CommerceExecution, type CommerceExecutionAdapterKind, type CommerceExecutionArtifactKind, type CommerceExecutionChannel, type CommerceExecutionConstraint, type CommerceExecutionConstraintCoverage, type CommerceExecutionConstraintCoverageLevel, type CommerceExecutionDeliveryMode, type CommerceExecutionEvidence, type CommerceExecutionProvider, type CommerceExecutionResult, type CommerceExecutionSourceKind, type CommerceExecutionStatus, type CommerceFactConfidence, type CommerceFactProvenanceInput, type CommerceFactSource, type CommerceFulfillmentInput, type CommerceLineItemInput, type CommerceProposalFactKey, type CommerceProposalMissingFact, type CommerceProposalResolution, type CommerceProposalState, type CommerceSettlementRail, type CommerceTotalInput, type CommerceTotalType, type ComparePolicyVersionsResponse, type ConnectedCardBrief, type ConnectedCardCredential, type ConnectedCardDrawInput, type ConnectedCardDrawMerchant, type ConnectedCardDrawResult, type ConnectedCardDrawable, type ConnectedCardListResult, type ConnectedCardMandate, type ConnectedCardMandateMerchant, type ConnectedCardReference, ConnectedCardsClient, Conto, ContoAdmin, type ContoAdminConfig, ContoAdminError, type ContoConfig, ContoError, type ContoRequestOptions, type ControlledExternalCardPaymentResult, ControlledExternalCardPaymentTool, type CreateAgentInput, type CreatePolicyInput, type CreatePolicyRuleInput, type CreateSdkKeyInput, type CreateSdkKeyResult, type CreateWalletInput, type CustodyType, type CustomerCustodyMode, type CustomerWalletControlModel, type CustomerWalletKeyAccess, type DelegationType, type ExecuteCommerceExecutionResult, type ExternalCard, type ExternalCardApprovalInput, type ExternalCardApprovalResult, type ExternalCardConfirmationInput, ExternalCardConfirmationPendingError, type ExternalCardConfirmationResult, type ExternalCardExecutionClaimResult, type ExternalCardExecutionResult, type ExternalCardExecutor, type ExternalCardOverlayEnforcement, type ExternalCardRequestStatusResult, type ExternalWalletApprovalInput, type ExternalWalletApprovalResult, type ExternalWalletConfirmationInput, type ExternalWalletConfirmationResult, type FreezeAgentInput, Conto as Giro, type ContoConfig as GiroConfig, ContoError as GiroError, type GuardCheckoutResult, type GuardedBrowserDispatchResult, type GuardedCheckoutInput, LinkClient, type LinkCommerceClient, type LinkPaymentDefaults, LinkPaymentExecutionError, type LinkPaymentInput, type LinkPaymentNextAction, type LinkPaymentResult, type LinkSetupCheck, type LinkSetupInput, type LinkSetupResult, type LinkWalletInput, type ListAgentsParams, type ListAgentsResponse, type ListPoliciesParams, type ListPoliciesResponse, type ListPolicyVersionsResponse, type ListStripeLinkPaymentMethodsResult, type ListWalletsParams, type ListWalletsResponse, type MppBudgetResult, type MppPreAuthorizeInput, type MppPreAuthorizeResult, type MppRecordInput, type MppRecordResult, type NormalizeCommerceProposalInput, type OrganizationMember, type PaginatedResponse, type PaginationParams, type PauseExternalCardAssignmentResult, type PaymentExecuteResult, type PaymentRequestInput, type PaymentRequestResult, type PaymentStatusResult, type Policy, type PolicyRule, type PolicyType, type PolicyVersionChangeType, type PolicyVersionDetail, type PolicyVersionDiff, type PolicyVersionFieldChange, type PolicyVersionSnapshot, type PolicyVersionSnapshotRule, type PolicyVersionSummary, type PrivilegedBrowserCheckoutDriver, type ProtocolBudgetResult, type ProtocolPreAuthorizeResult, type ProtocolRecordGrant, type ProtocolRecordGrantResult, type ProtocolServiceSummary, type ProtocolServicesResult, type ProvisionWalletResult, type RefreshBalanceResult, type RegisterExternalCardInput, type RollbackPolicyVersionResponse, type RuleAction, type RuleOperator, type RuleType, type RunGuardedCheckoutResult, type SdkKey, type SdkKeyType, type SetupCapabilityState, type SetupCardDiagnostics, type SetupDiagnosticAction, type SetupDiagnosticIssue, type SetupDiagnosticIssueCode, type SetupDiagnostics, type SetupWalletDiagnostics, type StripeLinkCheckoutReadiness, type StripeLinkCheckoutReadinessResult, type StripeLinkCheckoutReadinessStatus, type StripeLinkCheckoutVerification, type StripeLinkPaymentMethod, type TestCardCredential, type TestCardDrawResult, type TestCardDrawable, type TestCardListResult, type TestCardReceipt, TestCardsClient, type TestCheckoutInput, type TestCheckoutResult, type TestMerchant, type TestMerchantProduct, type UnfreezeAgentInput, type UpdateAgentInput, type UpdateExternalCardAssignmentInput, type UpdatePolicyInput, type UpdatePolicyRuleInput, type UpdateWalletInput, type VerifiedBrowserCheckoutTarget, type Wallet, type WalletChainBalanceSnapshot, type WalletStatus, type WalletType, type X402Authorization, type X402BudgetResult, type X402PayInput, type X402PayResult, type X402PaymentRequirements, type X402PreAuthorizeInput, type X402PreAuthorizeResult, type X402RecordInput, type X402RecordResult, canonicalizeBrowserCheckoutTarget, createVerifiedBrowserCheckoutDriver, Conto as default, fingerprintBrowserCheckoutTarget };
2828
+ export { type AdminExternalCardOverlayEnforcement, type Agent, type AgentCheckoutAction, type AgentCheckoutActionKind, type AgentExternalCard, type AgentSetupResult, type AgentStatus, type AgentType, type AgentWalletLink, type ApprovedExternalCardExecution, type AssignExternalCardInput, type AssignedPolicy, type AuthorizeCheckoutActionResult, type BeginCheckoutCheckpointInput, type BeginCommerceExecutionInput, type BrowserActionClaimResult, type BrowserActionDispatchObservationInput, BrowserActionFinalizationPendingError, type BrowserActionFinalizeResult, type BrowserCheckoutAction, type BrowserCheckoutTargetResolver, type BrowserCheckoutTargetSnapshot, type BrowserCheckoutTargetVerificationCode, BrowserCheckoutTargetVerificationError, type CanonicalBrowserCheckoutTargetSnapshot, CardsClient, type ChainType, type CheckoutActionAuthorization, CheckoutApprovalDeniedError, CheckoutApprovalExpiredError, CheckoutApprovalPendingError, CheckoutApprovalTimeoutError, type CheckoutCheckpoint, type CheckoutCheckpointApproval, CheckoutCheckpointClosedError, type CheckoutCheckpointMethod, type CheckoutCheckpointNextAction, type CheckoutCheckpointStage, CheckoutClient, type CheckoutOutcome, type CommerceCheckoutMethod, type CommerceContextRequirement, type CommerceExecution, type CommerceExecutionAdapterKind, type CommerceExecutionArtifactKind, type CommerceExecutionChannel, type CommerceExecutionConstraint, type CommerceExecutionConstraintCoverage, type CommerceExecutionConstraintCoverageLevel, type CommerceExecutionDeliveryMode, type CommerceExecutionEvidence, type CommerceExecutionProvider, type CommerceExecutionResult, type CommerceExecutionSourceKind, type CommerceExecutionStatus, type CommerceFactConfidence, type CommerceFactProvenanceInput, type CommerceFactSource, type CommerceFulfillmentInput, type CommerceLineItemInput, type CommerceProposalFactKey, type CommerceProposalMissingFact, type CommerceProposalResolution, type CommerceProposalState, type CommerceSettlementRail, type CommerceTotalInput, type CommerceTotalType, type ComparePolicyVersionsResponse, type ConfirmCheckoutCheckpointInput, type ConnectedCardBrief, type ConnectedCardCredential, type ConnectedCardDrawInput, type ConnectedCardDrawMerchant, type ConnectedCardDrawResult, type ConnectedCardDrawable, type ConnectedCardListResult, type ConnectedCardMandate, type ConnectedCardMandateMerchant, type ConnectedCardReference, ConnectedCardsClient, Conto, ContoAdmin, type ContoAdminConfig, ContoAdminError, type ContoConfig, ContoError, type ContoRequestOptions, type ControlledExternalCardPaymentResult, ControlledExternalCardPaymentTool, type CreateAgentInput, type CreatePolicyInput, type CreatePolicyRuleInput, type CreateSdkKeyInput, type CreateSdkKeyResult, type CreateWalletInput, type CustodyType, type CustomerCustodyMode, type CustomerWalletControlModel, type CustomerWalletKeyAccess, type DelegationType, type ExecuteCommerceExecutionResult, type ExternalCard, type ExternalCardApprovalInput, type ExternalCardApprovalResult, type ExternalCardConfirmationInput, ExternalCardConfirmationPendingError, type ExternalCardConfirmationResult, type ExternalCardExecutionClaimResult, type ExternalCardExecutionResult, type ExternalCardExecutor, type ExternalCardOverlayEnforcement, type ExternalCardRequestStatusResult, type ExternalWalletApprovalInput, type ExternalWalletApprovalResult, type ExternalWalletConfirmationInput, type ExternalWalletConfirmationResult, type FreezeAgentInput, Conto as Giro, type ContoConfig as GiroConfig, ContoError as GiroError, type GuardCheckoutResult, type GuardedBrowserDispatchResult, type GuardedCheckoutInput, type LinkWalletInput, type ListAgentsParams, type ListAgentsResponse, type ListPoliciesParams, type ListPoliciesResponse, type ListPolicyVersionsResponse, type ListWalletsParams, type ListWalletsResponse, type MppBudgetResult, type MppPreAuthorizeInput, type MppPreAuthorizeResult, type MppRecordInput, type MppRecordResult, type NormalizeCommerceProposalInput, type OrganizationMember, type PaginatedResponse, type PaginationParams, type PauseExternalCardAssignmentResult, type PaymentExecuteResult, type PaymentRequestInput, type PaymentRequestResult, type PaymentStatusResult, type Policy, type PolicyRule, type PolicyType, type PolicyVersionChangeType, type PolicyVersionDetail, type PolicyVersionDiff, type PolicyVersionFieldChange, type PolicyVersionSnapshot, type PolicyVersionSnapshotRule, type PolicyVersionSummary, type PrivilegedBrowserCheckoutDriver, type ProtocolBudgetResult, type ProtocolPreAuthorizeResult, type ProtocolRecordGrant, type ProtocolRecordGrantResult, type ProtocolServiceSummary, type ProtocolServicesResult, type ProvisionWalletResult, type RefreshBalanceResult, type RegisterExternalCardInput, type ReportCheckoutOutcomeInput, type RollbackPolicyVersionResponse, type RuleAction, type RuleOperator, type RuleType, type RunGuardedCheckoutResult, type SdkKey, type SdkKeyType, type SetupCapabilityState, type SetupCardDiagnostics, type SetupDiagnosticAction, type SetupDiagnosticIssue, type SetupDiagnosticIssueCode, type SetupDiagnostics, type SetupWalletDiagnostics, type TestCardCredential, type TestCardDrawResult, type TestCardDrawable, type TestCardListResult, type TestCardReceipt, TestCardsClient, type TestCheckoutInput, type TestCheckoutResult, type TestMerchant, type TestMerchantProduct, type UnfreezeAgentInput, type UpdateAgentInput, type UpdateExternalCardAssignmentInput, type UpdatePolicyInput, type UpdatePolicyRuleInput, type UpdateWalletInput, type VerifiedBrowserCheckoutTarget, type WaitForCheckoutApprovalOptions, type Wallet, type WalletChainBalanceSnapshot, type WalletStatus, type WalletType, type X402Authorization, type X402BudgetResult, type X402PayInput, type X402PayResult, type X402PaymentRequirements, type X402PreAuthorizeInput, type X402PreAuthorizeResult, type X402RecordInput, type X402RecordResult, canonicalizeBrowserCheckoutTarget, createVerifiedBrowserCheckoutDriver, Conto as default, fingerprintBrowserCheckoutTarget };