@conto_finance/sdk 0.5.5 → 0.6.0-beta.2
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/README.md +38 -1
- package/dist/index.d.mts +210 -5
- package/dist/index.d.ts +210 -5
- package/dist/index.js +367 -11
- package/dist/index.mjs +364 -11
- package/dist/link-testing.d.mts +49 -0
- package/dist/link-testing.d.ts +49 -0
- package/dist/link-testing.js +285 -0
- package/dist/link-testing.mjs +265 -0
- package/package.json +11 -5
package/README.md
CHANGED
|
@@ -27,7 +27,10 @@ drop-in replacement for `ContoAdmin`.
|
|
|
27
27
|
## Verify the connection
|
|
28
28
|
|
|
29
29
|
Requires Node.js 20.19+. Call `await conto.setup()` to inspect your agent, linked wallets,
|
|
30
|
-
effective policies, and scopes without creating a payment.
|
|
30
|
+
effective policies, and scopes without creating a payment. Its `diagnostics` field reports the
|
|
31
|
+
environment, whether the key can request and execute payments, and issues that say whether the
|
|
32
|
+
agent or an owner acts next. See
|
|
33
|
+
[setup diagnostics](https://conto.finance/docs/sdk/installation#setup-diagnostics).
|
|
31
34
|
|
|
32
35
|
## Agent SDK Quick Start
|
|
33
36
|
|
|
@@ -57,6 +60,40 @@ if (request.status === 'APPROVED') {
|
|
|
57
60
|
}
|
|
58
61
|
```
|
|
59
62
|
|
|
63
|
+
## Checkout checkpoints
|
|
64
|
+
|
|
65
|
+
Use `conto.checkout` when your agent runs its own checkout. Call Conto right before the payment
|
|
66
|
+
method opens and again right before the payment is submitted. Conto checks the agent's rules at
|
|
67
|
+
both points and holds the spend in between. Your checkout must stop whenever a call fails.
|
|
68
|
+
|
|
69
|
+
Checkout checkpoints need SDK 0.6.0-beta.2 or later: `npm install @conto_finance/sdk@beta`.
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
const checkpoint = await conto.checkout.begin({
|
|
73
|
+
idempotencyKey: order.id,
|
|
74
|
+
merchant: { id: 'acme-retail', name: 'ACME Retail', checkoutUrl: page.url() },
|
|
75
|
+
amountMinor: 7900,
|
|
76
|
+
purpose: 'Drip coffee maker the shopper chose',
|
|
77
|
+
lineItems: [{ name: 'Drip coffee maker', quantity: 1, unitAmountMinor: 7900 }],
|
|
78
|
+
});
|
|
79
|
+
// Open Link. The buyer signs in and the final total appears.
|
|
80
|
+
|
|
81
|
+
const confirmed = await conto.checkout.confirm(checkpoint, {
|
|
82
|
+
amountMinor: finalTotal,
|
|
83
|
+
totals: finalTotals, // tax and shipping, if the total changed
|
|
84
|
+
});
|
|
85
|
+
// Submit the payment, then report what happened.
|
|
86
|
+
|
|
87
|
+
await conto.checkout.reportOutcome(confirmed.id, { outcome: 'PAID', reference: orderNumber });
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- If the final total differs from the approved one, `confirm()` starts a new checkpoint at the
|
|
91
|
+
final total, so the rules check the amount actually paid.
|
|
92
|
+
- `reportOutcome()` accepts `PAID`, `NOT_PAID`, or `UNKNOWN`. Until an outcome arrives, the spend
|
|
93
|
+
stays counted. Cancel an unconfirmed checkpoint with `conto.checkout.cancel(id)`.
|
|
94
|
+
- Conto records what your checkout reports and does not see the charge. For control at the
|
|
95
|
+
moment of payment, pay with a Conto-managed wallet or a card Conto authorizes.
|
|
96
|
+
|
|
60
97
|
## External-card Policy Overlay
|
|
61
98
|
|
|
62
99
|
The admin client registers only a masked card alias and assigns cooperative
|
package/dist/index.d.mts
CHANGED
|
@@ -739,8 +739,11 @@ declare class AdminCardsClient {
|
|
|
739
739
|
/** List overlay requests, including executions that need receipt reconciliation. */
|
|
740
740
|
listRequests(input?: ListExternalCardRequestsInput): Promise<ListExternalCardRequestsResponse>;
|
|
741
741
|
/**
|
|
742
|
-
*
|
|
743
|
-
*
|
|
742
|
+
* @deprecated Resolution requires a signed-in user. SDK admin keys and
|
|
743
|
+
* organization API keys receive HTTP 403 INSUFFICIENT_PERMISSIONS from this
|
|
744
|
+
* endpoint. Have a signed-in organization owner or admin review the processor
|
|
745
|
+
* evidence and resolve the request through Conto's authenticated interface.
|
|
746
|
+
* Retained for source compatibility; this method does not bypass that restriction.
|
|
744
747
|
*/
|
|
745
748
|
resolveRequest(requestId: string, input: ResolveExternalCardRequestInput): Promise<ResolveExternalCardRequestResult>;
|
|
746
749
|
/** Pause the Conto-controlled path and revoke live overlay grants. */
|
|
@@ -989,6 +992,8 @@ interface ContoConfig {
|
|
|
989
992
|
baseUrl?: string;
|
|
990
993
|
/** Request timeout in milliseconds. Defaults to 30000 */
|
|
991
994
|
timeout?: number;
|
|
995
|
+
/** Defaults for the configured live Link checkout pilot. These are IDs, never Link credentials. */
|
|
996
|
+
link?: LinkPaymentDefaults;
|
|
992
997
|
}
|
|
993
998
|
interface PaymentRequestInput {
|
|
994
999
|
/** Amount in the wallet chain stablecoin */
|
|
@@ -1699,6 +1704,72 @@ interface CommerceFulfillmentInput {
|
|
|
1699
1704
|
postalCode?: string;
|
|
1700
1705
|
countryCode?: string;
|
|
1701
1706
|
}
|
|
1707
|
+
type CheckoutCheckpointMethod = 'LINK' | 'CARD' | 'SHOP_PAY' | 'PAYPAL';
|
|
1708
|
+
type CheckoutCheckpointStage = 'APPROVED' | 'CONFIRMING' | 'CONFIRMED' | 'PAID' | 'NOT_PAID' | 'OUTCOME_UNKNOWN' | 'DENIED' | 'CANCELLED' | 'EXPIRED';
|
|
1709
|
+
type CheckoutCheckpointNextAction = 'CONFIRM_BEFORE_PAYING' | 'PAY_THEN_REPORT_OUTCOME' | 'REPORT_OUTCOME' | 'WAIT' | 'NONE';
|
|
1710
|
+
type CheckoutOutcome = 'PAID' | 'NOT_PAID' | 'UNKNOWN';
|
|
1711
|
+
/** First checkpoint: the purchase as the checkout shows it before the payment method opens. */
|
|
1712
|
+
interface BeginCheckoutCheckpointInput {
|
|
1713
|
+
/** Stable key for this purchase. Reuse it to retry begin safely. */
|
|
1714
|
+
idempotencyKey: string;
|
|
1715
|
+
merchant: {
|
|
1716
|
+
id: string;
|
|
1717
|
+
name: string;
|
|
1718
|
+
checkoutUrl: string;
|
|
1719
|
+
};
|
|
1720
|
+
/** Integer amount in minor units (cents). */
|
|
1721
|
+
amountMinor: number;
|
|
1722
|
+
currency?: 'USD';
|
|
1723
|
+
purpose: string;
|
|
1724
|
+
/** Optional semantic policy category, such as OFFICE_SUPPLIES. */
|
|
1725
|
+
category?: string;
|
|
1726
|
+
/** Defaults to LINK. */
|
|
1727
|
+
checkoutMethod?: CheckoutCheckpointMethod;
|
|
1728
|
+
lineItems: CommerceLineItemInput[];
|
|
1729
|
+
/** Defaults to one Total entry equal to amountMinor. */
|
|
1730
|
+
totals?: CommerceTotalInput[];
|
|
1731
|
+
}
|
|
1732
|
+
/** Second checkpoint: the final total shown right before the payment is submitted. */
|
|
1733
|
+
interface ConfirmCheckoutCheckpointInput {
|
|
1734
|
+
amountMinor: number;
|
|
1735
|
+
currency?: 'USD';
|
|
1736
|
+
/** Final line items, needed only when the total changed. Defaults to the approved items. */
|
|
1737
|
+
lineItems?: CommerceLineItemInput[];
|
|
1738
|
+
/** Final totals, such as tax and shipping. Defaults to one Total entry. */
|
|
1739
|
+
totals?: CommerceTotalInput[];
|
|
1740
|
+
/** Page where the payment is submitted: the merchant's site or the payment method's. */
|
|
1741
|
+
pageUrl?: string;
|
|
1742
|
+
}
|
|
1743
|
+
interface ReportCheckoutOutcomeInput {
|
|
1744
|
+
outcome: CheckoutOutcome;
|
|
1745
|
+
/** Merchant order or receipt number. Never a payment credential. */
|
|
1746
|
+
reference?: string;
|
|
1747
|
+
}
|
|
1748
|
+
interface CheckoutCheckpoint {
|
|
1749
|
+
id: string;
|
|
1750
|
+
idempotencyKey: string;
|
|
1751
|
+
agentId?: string;
|
|
1752
|
+
checkoutMethod: CheckoutCheckpointMethod;
|
|
1753
|
+
stage: CheckoutCheckpointStage;
|
|
1754
|
+
nextAction: CheckoutCheckpointNextAction;
|
|
1755
|
+
amountMinor: number;
|
|
1756
|
+
currency: string;
|
|
1757
|
+
purpose: string;
|
|
1758
|
+
category?: string;
|
|
1759
|
+
merchant: {
|
|
1760
|
+
id: string;
|
|
1761
|
+
name: string;
|
|
1762
|
+
checkoutUrl?: string;
|
|
1763
|
+
};
|
|
1764
|
+
cart: {
|
|
1765
|
+
lineItems: CommerceLineItemInput[];
|
|
1766
|
+
totals: CommerceTotalInput[];
|
|
1767
|
+
};
|
|
1768
|
+
expiresAt: string;
|
|
1769
|
+
outcomeReference?: string;
|
|
1770
|
+
/** Outcomes are reported by your checkout. Conto does not verify settlement here. */
|
|
1771
|
+
settlementVerified: false;
|
|
1772
|
+
}
|
|
1702
1773
|
/** Exact Stripe Link purchase intent evaluated and bound by Conto policy. */
|
|
1703
1774
|
interface BeginCommerceExecutionCommonInput {
|
|
1704
1775
|
/** Stable key for this exact intent. Reuse it when reconciling or retrying begin. */
|
|
@@ -1740,6 +1811,13 @@ type BeginConnectedLinkExecutionInput = BeginCommerceExecutionCommonInput & {
|
|
|
1740
1811
|
paymentMethodId: string;
|
|
1741
1812
|
};
|
|
1742
1813
|
type BeginCommerceExecutionInput = (BeginConnectedLinkExecutionInput & {
|
|
1814
|
+
executionMethod: 'LINK_PAY_TOKEN';
|
|
1815
|
+
/** A server-configured digital-goods profile and its checkout URL. */
|
|
1816
|
+
counterparty: {
|
|
1817
|
+
canonicalId: string;
|
|
1818
|
+
checkoutUrl: string;
|
|
1819
|
+
};
|
|
1820
|
+
}) | (BeginConnectedLinkExecutionInput & {
|
|
1743
1821
|
/** Primary path: the server resolves the immutable Stripe seller profile. */
|
|
1744
1822
|
executionMethod: 'STRIPE_PAYMENT_INTENT';
|
|
1745
1823
|
counterparty: {
|
|
@@ -1783,6 +1861,66 @@ type BeginCommerceExecutionInput = (BeginConnectedLinkExecutionInput & {
|
|
|
1783
1861
|
checkoutUrl: string;
|
|
1784
1862
|
};
|
|
1785
1863
|
});
|
|
1864
|
+
/** Configuration inspection only: no policy evaluation, credential retrieval, or purchase. */
|
|
1865
|
+
interface LinkSetupInput {
|
|
1866
|
+
connectionId?: string;
|
|
1867
|
+
paymentMethodId?: string;
|
|
1868
|
+
merchantId?: string;
|
|
1869
|
+
}
|
|
1870
|
+
interface LinkSetupCheck {
|
|
1871
|
+
code: string;
|
|
1872
|
+
status: 'PASS' | 'BLOCKED' | 'WARNING';
|
|
1873
|
+
actor: 'developer' | 'owner' | 'operator';
|
|
1874
|
+
message: string;
|
|
1875
|
+
}
|
|
1876
|
+
interface LinkSetupResult {
|
|
1877
|
+
version: 'conto.link-setup.v1';
|
|
1878
|
+
mode: 'LIVE' | 'SIMULATED';
|
|
1879
|
+
configurationStatus: 'CONFIGURED' | 'INCOMPLETE';
|
|
1880
|
+
checks: LinkSetupCheck[];
|
|
1881
|
+
missingScopes: string[];
|
|
1882
|
+
checkout?: {
|
|
1883
|
+
merchantId: string;
|
|
1884
|
+
origin: string;
|
|
1885
|
+
currency: 'USD';
|
|
1886
|
+
maxAmountMinor: number;
|
|
1887
|
+
};
|
|
1888
|
+
paymentAuthorization: 'NOT_EVALUATED';
|
|
1889
|
+
providerVerified: false;
|
|
1890
|
+
settlementVerified: false;
|
|
1891
|
+
}
|
|
1892
|
+
/** Reusable owner-provisioned identifiers. Per-purchase values can override these defaults. */
|
|
1893
|
+
interface LinkPaymentDefaults {
|
|
1894
|
+
connectionId: string;
|
|
1895
|
+
paymentMethodId: string;
|
|
1896
|
+
}
|
|
1897
|
+
/** Exact purchase facts for a configured USD digital-goods checkout. */
|
|
1898
|
+
interface LinkPaymentInput {
|
|
1899
|
+
/** Persist this key before calling pay; reuse it for this exact purchase across restarts. */
|
|
1900
|
+
idempotencyKey: string;
|
|
1901
|
+
connectionId?: string;
|
|
1902
|
+
paymentMethodId?: string;
|
|
1903
|
+
/** Canonical ID of a checkout profile already configured by the deployment operator. */
|
|
1904
|
+
merchantId: string;
|
|
1905
|
+
checkoutUrl: string;
|
|
1906
|
+
amountMinor: number;
|
|
1907
|
+
currency?: 'USD';
|
|
1908
|
+
purpose: string;
|
|
1909
|
+
category?: string;
|
|
1910
|
+
lineItems: CommerceLineItemInput[];
|
|
1911
|
+
/** Required when the final amount differs from the line-item sum. Include the exact total breakdown. */
|
|
1912
|
+
totals?: CommerceTotalInput[];
|
|
1913
|
+
}
|
|
1914
|
+
type LinkPaymentNextAction = 'APPROVE_IN_LINK' | 'WAIT' | 'RESUME' | 'RECONCILE' | 'NONE';
|
|
1915
|
+
/** Safe payment state; submission and completion are not proof of settlement. */
|
|
1916
|
+
interface LinkPaymentResult extends CommerceExecutionResult {
|
|
1917
|
+
executionId: string;
|
|
1918
|
+
status: CommerceExecutionStatus;
|
|
1919
|
+
nextAction: LinkPaymentNextAction;
|
|
1920
|
+
/** Present only while Link approval is needed. Show it to the account owner. */
|
|
1921
|
+
approvalUrl?: string;
|
|
1922
|
+
checkout?: ExecuteCommerceExecutionResult['checkout'];
|
|
1923
|
+
}
|
|
1786
1924
|
type CommerceExecutionStatus = 'DRAFT' | 'ACTION_REQUIRED' | 'AUTHORIZING' | 'AWAITING_APPROVAL' | 'READY' | 'PROCESSING' | 'SETTLED' | 'COMPLETED' | 'DENIED' | 'CANCELLED' | 'FAILED' | 'RETURNED' | 'EXPIRED' | 'NEEDS_RECONCILIATION';
|
|
1787
1925
|
type CommerceExecutionProvider = 'STABLECOIN' | 'TOKENIZED_CARD' | 'STRIPE_LINK';
|
|
1788
1926
|
type CommerceExecutionChannel = 'BROWSER' | 'MERCHANT_API' | 'CREDENTIAL_BROKER' | 'BANK_API' | 'WALLET_SIGNER';
|
|
@@ -2311,7 +2449,14 @@ declare class ContoError extends Error {
|
|
|
2311
2449
|
readonly actionUrl?: string;
|
|
2312
2450
|
readonly fieldErrors?: ApiErrorMetadata['fieldErrors'];
|
|
2313
2451
|
readonly reasons?: string[];
|
|
2314
|
-
|
|
2452
|
+
readonly diagnostics?: SetupDiagnostics;
|
|
2453
|
+
constructor(message: string, metadata: ApiErrorMetadata, diagnostics?: unknown);
|
|
2454
|
+
}
|
|
2455
|
+
/** Execution was attempted. Inspect this existing execution before any further payment action. */
|
|
2456
|
+
declare class LinkPaymentExecutionError extends ContoError {
|
|
2457
|
+
readonly executionId: string;
|
|
2458
|
+
readonly nextAction: "RECONCILE";
|
|
2459
|
+
constructor(executionId: string, error: unknown);
|
|
2315
2460
|
}
|
|
2316
2461
|
/**
|
|
2317
2462
|
* The customer executor returned a receipt, but Conto did not acknowledge the
|
|
@@ -2350,6 +2495,9 @@ declare class Conto {
|
|
|
2350
2495
|
#private;
|
|
2351
2496
|
private baseUrl;
|
|
2352
2497
|
private timeout;
|
|
2498
|
+
link: LinkClient;
|
|
2499
|
+
/** Lightweight checkpoints before the payment method opens and before payment. */
|
|
2500
|
+
checkout: CheckoutClient;
|
|
2353
2501
|
payments: PaymentsClient;
|
|
2354
2502
|
cards: CardsClient;
|
|
2355
2503
|
connectedCards: ConnectedCardsClient;
|
|
@@ -2362,7 +2510,11 @@ declare class Conto {
|
|
|
2362
2510
|
* explicitly bound to this agent. No Link token or payment artifact is
|
|
2363
2511
|
* returned through the agent SDK.
|
|
2364
2512
|
*/
|
|
2365
|
-
listStripeLinkPaymentMethods(connectionId: string
|
|
2513
|
+
listStripeLinkPaymentMethods(connectionId: string, options?: {
|
|
2514
|
+
mode?: 'TEST' | 'LIVE';
|
|
2515
|
+
}): Promise<ListStripeLinkPaymentMethodsResult>;
|
|
2516
|
+
/** Read live Link configuration diagnostics without retrieving credentials or authorizing payment. */
|
|
2517
|
+
getLinkSetup(input?: LinkSetupInput): Promise<LinkSetupResult>;
|
|
2366
2518
|
/**
|
|
2367
2519
|
* Normalize and durably revise a partial agent purchase proposal without
|
|
2368
2520
|
* creating a payment side effect. Missing facts return as NEEDS_CONTEXT
|
|
@@ -2702,4 +2854,57 @@ declare class MppClient {
|
|
|
2702
2854
|
}): Promise<ProtocolServicesResult>;
|
|
2703
2855
|
}
|
|
2704
2856
|
|
|
2705
|
-
|
|
2857
|
+
/** Narrow transport contract used by the isolated, credential-free test client. */
|
|
2858
|
+
type LinkCommerceClient = Pick<Conto, 'getLinkSetup' | 'listStripeLinkPaymentMethods' | 'beginCommerceExecution' | 'getCommerceExecution' | 'refreshCommerceExecution' | 'executeCommerceExecution' | 'cancelCommerceExecution'>;
|
|
2859
|
+
/**
|
|
2860
|
+
* Lightweight checkout checkpoints for any agent runtime. Call begin() before the
|
|
2861
|
+
* payment method opens and confirm() right before the payment is submitted. Pay
|
|
2862
|
+
* only after confirm() succeeds, then report the outcome. Conto decides and
|
|
2863
|
+
* records each step; your checkout enforces the answer.
|
|
2864
|
+
*/
|
|
2865
|
+
declare class CheckoutClient {
|
|
2866
|
+
#private;
|
|
2867
|
+
constructor(client: Pick<Conto, 'request'>);
|
|
2868
|
+
/** First checkpoint. A ContoError means Conto did not approve: stop the checkout. */
|
|
2869
|
+
begin(input: BeginCheckoutCheckpointInput): Promise<CheckoutCheckpoint>;
|
|
2870
|
+
/**
|
|
2871
|
+
* Second checkpoint, right before the payment is submitted. If the total
|
|
2872
|
+
* changed since begin() (tax or shipping, for example), this cancels the
|
|
2873
|
+
* approved checkpoint and starts a new one at the final total, so the agent's
|
|
2874
|
+
* rules see the amount actually being paid. Pay only if this resolves.
|
|
2875
|
+
*/
|
|
2876
|
+
confirm(checkpoint: CheckoutCheckpoint, input: ConfirmCheckoutCheckpointInput): Promise<CheckoutCheckpoint>;
|
|
2877
|
+
/** Report what happened after a confirmed checkpoint. Safe to repeat with the same outcome. */
|
|
2878
|
+
reportOutcome(checkpointId: string, input: ReportCheckoutOutcomeInput): Promise<CheckoutCheckpoint>;
|
|
2879
|
+
/** Cancel a checkpoint that was not confirmed and release its spend. */
|
|
2880
|
+
cancel(checkpointId: string): Promise<CheckoutCheckpoint>;
|
|
2881
|
+
get(checkpointId: string): Promise<CheckoutCheckpoint>;
|
|
2882
|
+
}
|
|
2883
|
+
declare class LinkClient {
|
|
2884
|
+
#private;
|
|
2885
|
+
constructor(client: LinkCommerceClient, defaults?: LinkPaymentDefaults);
|
|
2886
|
+
/** Inspect the configured live path. This is not a payment authorization or provider connectivity test. */
|
|
2887
|
+
setup(input?: LinkSetupInput): Promise<LinkSetupResult>;
|
|
2888
|
+
/** Read masked LIVE funding sources; never selects a source or initiates payment. */
|
|
2889
|
+
paymentMethods(connectionId?: string): Promise<ListStripeLinkPaymentMethodsResult>;
|
|
2890
|
+
/**
|
|
2891
|
+
* Begin one exact intent and execute only if already READY. Otherwise return
|
|
2892
|
+
* the owner's approval action or existing state immediately, without polling.
|
|
2893
|
+
*/
|
|
2894
|
+
pay(input: LinkPaymentInput): Promise<LinkPaymentResult>;
|
|
2895
|
+
/**
|
|
2896
|
+
* Continue the existing payment after approval. Reads before any mutation and
|
|
2897
|
+
* never submits an execution already processing or requiring reconciliation.
|
|
2898
|
+
*/
|
|
2899
|
+
resume(executionId: string): Promise<LinkPaymentResult>;
|
|
2900
|
+
/** Observe and reconcile provider state. This method never submits a payment. */
|
|
2901
|
+
status(executionId: string): Promise<LinkPaymentResult>;
|
|
2902
|
+
/** Request cancellation of this existing Link payment; never retried automatically. */
|
|
2903
|
+
cancel(executionId: string): Promise<LinkPaymentResult>;
|
|
2904
|
+
private identifier;
|
|
2905
|
+
private assertLinkExecution;
|
|
2906
|
+
private executeIfReady;
|
|
2907
|
+
private result;
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
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, type CheckoutCheckpoint, 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, 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 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 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -739,8 +739,11 @@ declare class AdminCardsClient {
|
|
|
739
739
|
/** List overlay requests, including executions that need receipt reconciliation. */
|
|
740
740
|
listRequests(input?: ListExternalCardRequestsInput): Promise<ListExternalCardRequestsResponse>;
|
|
741
741
|
/**
|
|
742
|
-
*
|
|
743
|
-
*
|
|
742
|
+
* @deprecated Resolution requires a signed-in user. SDK admin keys and
|
|
743
|
+
* organization API keys receive HTTP 403 INSUFFICIENT_PERMISSIONS from this
|
|
744
|
+
* endpoint. Have a signed-in organization owner or admin review the processor
|
|
745
|
+
* evidence and resolve the request through Conto's authenticated interface.
|
|
746
|
+
* Retained for source compatibility; this method does not bypass that restriction.
|
|
744
747
|
*/
|
|
745
748
|
resolveRequest(requestId: string, input: ResolveExternalCardRequestInput): Promise<ResolveExternalCardRequestResult>;
|
|
746
749
|
/** Pause the Conto-controlled path and revoke live overlay grants. */
|
|
@@ -989,6 +992,8 @@ interface ContoConfig {
|
|
|
989
992
|
baseUrl?: string;
|
|
990
993
|
/** Request timeout in milliseconds. Defaults to 30000 */
|
|
991
994
|
timeout?: number;
|
|
995
|
+
/** Defaults for the configured live Link checkout pilot. These are IDs, never Link credentials. */
|
|
996
|
+
link?: LinkPaymentDefaults;
|
|
992
997
|
}
|
|
993
998
|
interface PaymentRequestInput {
|
|
994
999
|
/** Amount in the wallet chain stablecoin */
|
|
@@ -1699,6 +1704,72 @@ interface CommerceFulfillmentInput {
|
|
|
1699
1704
|
postalCode?: string;
|
|
1700
1705
|
countryCode?: string;
|
|
1701
1706
|
}
|
|
1707
|
+
type CheckoutCheckpointMethod = 'LINK' | 'CARD' | 'SHOP_PAY' | 'PAYPAL';
|
|
1708
|
+
type CheckoutCheckpointStage = 'APPROVED' | 'CONFIRMING' | 'CONFIRMED' | 'PAID' | 'NOT_PAID' | 'OUTCOME_UNKNOWN' | 'DENIED' | 'CANCELLED' | 'EXPIRED';
|
|
1709
|
+
type CheckoutCheckpointNextAction = 'CONFIRM_BEFORE_PAYING' | 'PAY_THEN_REPORT_OUTCOME' | 'REPORT_OUTCOME' | 'WAIT' | 'NONE';
|
|
1710
|
+
type CheckoutOutcome = 'PAID' | 'NOT_PAID' | 'UNKNOWN';
|
|
1711
|
+
/** First checkpoint: the purchase as the checkout shows it before the payment method opens. */
|
|
1712
|
+
interface BeginCheckoutCheckpointInput {
|
|
1713
|
+
/** Stable key for this purchase. Reuse it to retry begin safely. */
|
|
1714
|
+
idempotencyKey: string;
|
|
1715
|
+
merchant: {
|
|
1716
|
+
id: string;
|
|
1717
|
+
name: string;
|
|
1718
|
+
checkoutUrl: string;
|
|
1719
|
+
};
|
|
1720
|
+
/** Integer amount in minor units (cents). */
|
|
1721
|
+
amountMinor: number;
|
|
1722
|
+
currency?: 'USD';
|
|
1723
|
+
purpose: string;
|
|
1724
|
+
/** Optional semantic policy category, such as OFFICE_SUPPLIES. */
|
|
1725
|
+
category?: string;
|
|
1726
|
+
/** Defaults to LINK. */
|
|
1727
|
+
checkoutMethod?: CheckoutCheckpointMethod;
|
|
1728
|
+
lineItems: CommerceLineItemInput[];
|
|
1729
|
+
/** Defaults to one Total entry equal to amountMinor. */
|
|
1730
|
+
totals?: CommerceTotalInput[];
|
|
1731
|
+
}
|
|
1732
|
+
/** Second checkpoint: the final total shown right before the payment is submitted. */
|
|
1733
|
+
interface ConfirmCheckoutCheckpointInput {
|
|
1734
|
+
amountMinor: number;
|
|
1735
|
+
currency?: 'USD';
|
|
1736
|
+
/** Final line items, needed only when the total changed. Defaults to the approved items. */
|
|
1737
|
+
lineItems?: CommerceLineItemInput[];
|
|
1738
|
+
/** Final totals, such as tax and shipping. Defaults to one Total entry. */
|
|
1739
|
+
totals?: CommerceTotalInput[];
|
|
1740
|
+
/** Page where the payment is submitted: the merchant's site or the payment method's. */
|
|
1741
|
+
pageUrl?: string;
|
|
1742
|
+
}
|
|
1743
|
+
interface ReportCheckoutOutcomeInput {
|
|
1744
|
+
outcome: CheckoutOutcome;
|
|
1745
|
+
/** Merchant order or receipt number. Never a payment credential. */
|
|
1746
|
+
reference?: string;
|
|
1747
|
+
}
|
|
1748
|
+
interface CheckoutCheckpoint {
|
|
1749
|
+
id: string;
|
|
1750
|
+
idempotencyKey: string;
|
|
1751
|
+
agentId?: string;
|
|
1752
|
+
checkoutMethod: CheckoutCheckpointMethod;
|
|
1753
|
+
stage: CheckoutCheckpointStage;
|
|
1754
|
+
nextAction: CheckoutCheckpointNextAction;
|
|
1755
|
+
amountMinor: number;
|
|
1756
|
+
currency: string;
|
|
1757
|
+
purpose: string;
|
|
1758
|
+
category?: string;
|
|
1759
|
+
merchant: {
|
|
1760
|
+
id: string;
|
|
1761
|
+
name: string;
|
|
1762
|
+
checkoutUrl?: string;
|
|
1763
|
+
};
|
|
1764
|
+
cart: {
|
|
1765
|
+
lineItems: CommerceLineItemInput[];
|
|
1766
|
+
totals: CommerceTotalInput[];
|
|
1767
|
+
};
|
|
1768
|
+
expiresAt: string;
|
|
1769
|
+
outcomeReference?: string;
|
|
1770
|
+
/** Outcomes are reported by your checkout. Conto does not verify settlement here. */
|
|
1771
|
+
settlementVerified: false;
|
|
1772
|
+
}
|
|
1702
1773
|
/** Exact Stripe Link purchase intent evaluated and bound by Conto policy. */
|
|
1703
1774
|
interface BeginCommerceExecutionCommonInput {
|
|
1704
1775
|
/** Stable key for this exact intent. Reuse it when reconciling or retrying begin. */
|
|
@@ -1740,6 +1811,13 @@ type BeginConnectedLinkExecutionInput = BeginCommerceExecutionCommonInput & {
|
|
|
1740
1811
|
paymentMethodId: string;
|
|
1741
1812
|
};
|
|
1742
1813
|
type BeginCommerceExecutionInput = (BeginConnectedLinkExecutionInput & {
|
|
1814
|
+
executionMethod: 'LINK_PAY_TOKEN';
|
|
1815
|
+
/** A server-configured digital-goods profile and its checkout URL. */
|
|
1816
|
+
counterparty: {
|
|
1817
|
+
canonicalId: string;
|
|
1818
|
+
checkoutUrl: string;
|
|
1819
|
+
};
|
|
1820
|
+
}) | (BeginConnectedLinkExecutionInput & {
|
|
1743
1821
|
/** Primary path: the server resolves the immutable Stripe seller profile. */
|
|
1744
1822
|
executionMethod: 'STRIPE_PAYMENT_INTENT';
|
|
1745
1823
|
counterparty: {
|
|
@@ -1783,6 +1861,66 @@ type BeginCommerceExecutionInput = (BeginConnectedLinkExecutionInput & {
|
|
|
1783
1861
|
checkoutUrl: string;
|
|
1784
1862
|
};
|
|
1785
1863
|
});
|
|
1864
|
+
/** Configuration inspection only: no policy evaluation, credential retrieval, or purchase. */
|
|
1865
|
+
interface LinkSetupInput {
|
|
1866
|
+
connectionId?: string;
|
|
1867
|
+
paymentMethodId?: string;
|
|
1868
|
+
merchantId?: string;
|
|
1869
|
+
}
|
|
1870
|
+
interface LinkSetupCheck {
|
|
1871
|
+
code: string;
|
|
1872
|
+
status: 'PASS' | 'BLOCKED' | 'WARNING';
|
|
1873
|
+
actor: 'developer' | 'owner' | 'operator';
|
|
1874
|
+
message: string;
|
|
1875
|
+
}
|
|
1876
|
+
interface LinkSetupResult {
|
|
1877
|
+
version: 'conto.link-setup.v1';
|
|
1878
|
+
mode: 'LIVE' | 'SIMULATED';
|
|
1879
|
+
configurationStatus: 'CONFIGURED' | 'INCOMPLETE';
|
|
1880
|
+
checks: LinkSetupCheck[];
|
|
1881
|
+
missingScopes: string[];
|
|
1882
|
+
checkout?: {
|
|
1883
|
+
merchantId: string;
|
|
1884
|
+
origin: string;
|
|
1885
|
+
currency: 'USD';
|
|
1886
|
+
maxAmountMinor: number;
|
|
1887
|
+
};
|
|
1888
|
+
paymentAuthorization: 'NOT_EVALUATED';
|
|
1889
|
+
providerVerified: false;
|
|
1890
|
+
settlementVerified: false;
|
|
1891
|
+
}
|
|
1892
|
+
/** Reusable owner-provisioned identifiers. Per-purchase values can override these defaults. */
|
|
1893
|
+
interface LinkPaymentDefaults {
|
|
1894
|
+
connectionId: string;
|
|
1895
|
+
paymentMethodId: string;
|
|
1896
|
+
}
|
|
1897
|
+
/** Exact purchase facts for a configured USD digital-goods checkout. */
|
|
1898
|
+
interface LinkPaymentInput {
|
|
1899
|
+
/** Persist this key before calling pay; reuse it for this exact purchase across restarts. */
|
|
1900
|
+
idempotencyKey: string;
|
|
1901
|
+
connectionId?: string;
|
|
1902
|
+
paymentMethodId?: string;
|
|
1903
|
+
/** Canonical ID of a checkout profile already configured by the deployment operator. */
|
|
1904
|
+
merchantId: string;
|
|
1905
|
+
checkoutUrl: string;
|
|
1906
|
+
amountMinor: number;
|
|
1907
|
+
currency?: 'USD';
|
|
1908
|
+
purpose: string;
|
|
1909
|
+
category?: string;
|
|
1910
|
+
lineItems: CommerceLineItemInput[];
|
|
1911
|
+
/** Required when the final amount differs from the line-item sum. Include the exact total breakdown. */
|
|
1912
|
+
totals?: CommerceTotalInput[];
|
|
1913
|
+
}
|
|
1914
|
+
type LinkPaymentNextAction = 'APPROVE_IN_LINK' | 'WAIT' | 'RESUME' | 'RECONCILE' | 'NONE';
|
|
1915
|
+
/** Safe payment state; submission and completion are not proof of settlement. */
|
|
1916
|
+
interface LinkPaymentResult extends CommerceExecutionResult {
|
|
1917
|
+
executionId: string;
|
|
1918
|
+
status: CommerceExecutionStatus;
|
|
1919
|
+
nextAction: LinkPaymentNextAction;
|
|
1920
|
+
/** Present only while Link approval is needed. Show it to the account owner. */
|
|
1921
|
+
approvalUrl?: string;
|
|
1922
|
+
checkout?: ExecuteCommerceExecutionResult['checkout'];
|
|
1923
|
+
}
|
|
1786
1924
|
type CommerceExecutionStatus = 'DRAFT' | 'ACTION_REQUIRED' | 'AUTHORIZING' | 'AWAITING_APPROVAL' | 'READY' | 'PROCESSING' | 'SETTLED' | 'COMPLETED' | 'DENIED' | 'CANCELLED' | 'FAILED' | 'RETURNED' | 'EXPIRED' | 'NEEDS_RECONCILIATION';
|
|
1787
1925
|
type CommerceExecutionProvider = 'STABLECOIN' | 'TOKENIZED_CARD' | 'STRIPE_LINK';
|
|
1788
1926
|
type CommerceExecutionChannel = 'BROWSER' | 'MERCHANT_API' | 'CREDENTIAL_BROKER' | 'BANK_API' | 'WALLET_SIGNER';
|
|
@@ -2311,7 +2449,14 @@ declare class ContoError extends Error {
|
|
|
2311
2449
|
readonly actionUrl?: string;
|
|
2312
2450
|
readonly fieldErrors?: ApiErrorMetadata['fieldErrors'];
|
|
2313
2451
|
readonly reasons?: string[];
|
|
2314
|
-
|
|
2452
|
+
readonly diagnostics?: SetupDiagnostics;
|
|
2453
|
+
constructor(message: string, metadata: ApiErrorMetadata, diagnostics?: unknown);
|
|
2454
|
+
}
|
|
2455
|
+
/** Execution was attempted. Inspect this existing execution before any further payment action. */
|
|
2456
|
+
declare class LinkPaymentExecutionError extends ContoError {
|
|
2457
|
+
readonly executionId: string;
|
|
2458
|
+
readonly nextAction: "RECONCILE";
|
|
2459
|
+
constructor(executionId: string, error: unknown);
|
|
2315
2460
|
}
|
|
2316
2461
|
/**
|
|
2317
2462
|
* The customer executor returned a receipt, but Conto did not acknowledge the
|
|
@@ -2350,6 +2495,9 @@ declare class Conto {
|
|
|
2350
2495
|
#private;
|
|
2351
2496
|
private baseUrl;
|
|
2352
2497
|
private timeout;
|
|
2498
|
+
link: LinkClient;
|
|
2499
|
+
/** Lightweight checkpoints before the payment method opens and before payment. */
|
|
2500
|
+
checkout: CheckoutClient;
|
|
2353
2501
|
payments: PaymentsClient;
|
|
2354
2502
|
cards: CardsClient;
|
|
2355
2503
|
connectedCards: ConnectedCardsClient;
|
|
@@ -2362,7 +2510,11 @@ declare class Conto {
|
|
|
2362
2510
|
* explicitly bound to this agent. No Link token or payment artifact is
|
|
2363
2511
|
* returned through the agent SDK.
|
|
2364
2512
|
*/
|
|
2365
|
-
listStripeLinkPaymentMethods(connectionId: string
|
|
2513
|
+
listStripeLinkPaymentMethods(connectionId: string, options?: {
|
|
2514
|
+
mode?: 'TEST' | 'LIVE';
|
|
2515
|
+
}): Promise<ListStripeLinkPaymentMethodsResult>;
|
|
2516
|
+
/** Read live Link configuration diagnostics without retrieving credentials or authorizing payment. */
|
|
2517
|
+
getLinkSetup(input?: LinkSetupInput): Promise<LinkSetupResult>;
|
|
2366
2518
|
/**
|
|
2367
2519
|
* Normalize and durably revise a partial agent purchase proposal without
|
|
2368
2520
|
* creating a payment side effect. Missing facts return as NEEDS_CONTEXT
|
|
@@ -2702,4 +2854,57 @@ declare class MppClient {
|
|
|
2702
2854
|
}): Promise<ProtocolServicesResult>;
|
|
2703
2855
|
}
|
|
2704
2856
|
|
|
2705
|
-
|
|
2857
|
+
/** Narrow transport contract used by the isolated, credential-free test client. */
|
|
2858
|
+
type LinkCommerceClient = Pick<Conto, 'getLinkSetup' | 'listStripeLinkPaymentMethods' | 'beginCommerceExecution' | 'getCommerceExecution' | 'refreshCommerceExecution' | 'executeCommerceExecution' | 'cancelCommerceExecution'>;
|
|
2859
|
+
/**
|
|
2860
|
+
* Lightweight checkout checkpoints for any agent runtime. Call begin() before the
|
|
2861
|
+
* payment method opens and confirm() right before the payment is submitted. Pay
|
|
2862
|
+
* only after confirm() succeeds, then report the outcome. Conto decides and
|
|
2863
|
+
* records each step; your checkout enforces the answer.
|
|
2864
|
+
*/
|
|
2865
|
+
declare class CheckoutClient {
|
|
2866
|
+
#private;
|
|
2867
|
+
constructor(client: Pick<Conto, 'request'>);
|
|
2868
|
+
/** First checkpoint. A ContoError means Conto did not approve: stop the checkout. */
|
|
2869
|
+
begin(input: BeginCheckoutCheckpointInput): Promise<CheckoutCheckpoint>;
|
|
2870
|
+
/**
|
|
2871
|
+
* Second checkpoint, right before the payment is submitted. If the total
|
|
2872
|
+
* changed since begin() (tax or shipping, for example), this cancels the
|
|
2873
|
+
* approved checkpoint and starts a new one at the final total, so the agent's
|
|
2874
|
+
* rules see the amount actually being paid. Pay only if this resolves.
|
|
2875
|
+
*/
|
|
2876
|
+
confirm(checkpoint: CheckoutCheckpoint, input: ConfirmCheckoutCheckpointInput): Promise<CheckoutCheckpoint>;
|
|
2877
|
+
/** Report what happened after a confirmed checkpoint. Safe to repeat with the same outcome. */
|
|
2878
|
+
reportOutcome(checkpointId: string, input: ReportCheckoutOutcomeInput): Promise<CheckoutCheckpoint>;
|
|
2879
|
+
/** Cancel a checkpoint that was not confirmed and release its spend. */
|
|
2880
|
+
cancel(checkpointId: string): Promise<CheckoutCheckpoint>;
|
|
2881
|
+
get(checkpointId: string): Promise<CheckoutCheckpoint>;
|
|
2882
|
+
}
|
|
2883
|
+
declare class LinkClient {
|
|
2884
|
+
#private;
|
|
2885
|
+
constructor(client: LinkCommerceClient, defaults?: LinkPaymentDefaults);
|
|
2886
|
+
/** Inspect the configured live path. This is not a payment authorization or provider connectivity test. */
|
|
2887
|
+
setup(input?: LinkSetupInput): Promise<LinkSetupResult>;
|
|
2888
|
+
/** Read masked LIVE funding sources; never selects a source or initiates payment. */
|
|
2889
|
+
paymentMethods(connectionId?: string): Promise<ListStripeLinkPaymentMethodsResult>;
|
|
2890
|
+
/**
|
|
2891
|
+
* Begin one exact intent and execute only if already READY. Otherwise return
|
|
2892
|
+
* the owner's approval action or existing state immediately, without polling.
|
|
2893
|
+
*/
|
|
2894
|
+
pay(input: LinkPaymentInput): Promise<LinkPaymentResult>;
|
|
2895
|
+
/**
|
|
2896
|
+
* Continue the existing payment after approval. Reads before any mutation and
|
|
2897
|
+
* never submits an execution already processing or requiring reconciliation.
|
|
2898
|
+
*/
|
|
2899
|
+
resume(executionId: string): Promise<LinkPaymentResult>;
|
|
2900
|
+
/** Observe and reconcile provider state. This method never submits a payment. */
|
|
2901
|
+
status(executionId: string): Promise<LinkPaymentResult>;
|
|
2902
|
+
/** Request cancellation of this existing Link payment; never retried automatically. */
|
|
2903
|
+
cancel(executionId: string): Promise<LinkPaymentResult>;
|
|
2904
|
+
private identifier;
|
|
2905
|
+
private assertLinkExecution;
|
|
2906
|
+
private executeIfReady;
|
|
2907
|
+
private result;
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
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, type CheckoutCheckpoint, 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, 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 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 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 };
|