@402flow/sdk 0.1.0-alpha.23 → 0.1.0-alpha.25
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 +151 -3
- package/dist/contracts.d.ts +1167 -130
- package/dist/contracts.js +67 -0
- package/dist/contracts.js.map +1 -1
- package/dist/executors.d.ts +27 -0
- package/dist/executors.js +2 -0
- package/dist/executors.js.map +1 -0
- package/dist/harness-instructions.d.ts +8 -0
- package/dist/harness-instructions.js.map +1 -1
- package/dist/http-utils.d.ts +1 -0
- package/dist/http-utils.js +12 -0
- package/dist/http-utils.js.map +1 -0
- package/dist/index.d.ts +14 -3
- package/dist/index.js +119 -28
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
package/dist/contracts.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export declare const paidRequestProtocolSchema: z.ZodEnum<["x402", "l402"]>;
|
|
|
30
30
|
export type PaidRequestProtocol = z.infer<typeof paidRequestProtocolSchema>;
|
|
31
31
|
export declare const paidRequestHttpMethodSchema: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
|
|
32
32
|
export type PaidRequestHttpMethod = z.infer<typeof paidRequestHttpMethodSchema>;
|
|
33
|
+
export declare const paidRequestExecutionProviderSchema: z.ZodString;
|
|
34
|
+
export type PaidRequestExecutionProvider = z.infer<typeof paidRequestExecutionProviderSchema>;
|
|
33
35
|
export declare const paidRequestReasonCodeSchema: z.ZodEnum<["policy_allow", "policy_denied", "policy_review_required", "challenge_candidate_malformed", "challenge_no_supported_candidates", "challenge_mixed_environment_candidates", "challenge_execution_identity_unavailable", "challenge_execution_identity_ambiguous", "payment_execution_in_progress", "preflight_incompatible", "merchant_rejected", "merchant_execution_failed", "settlement_proof_conflict", "merchant_transport_lost"]>;
|
|
34
36
|
export type PaidRequestReasonCode = z.infer<typeof paidRequestReasonCodeSchema>;
|
|
35
37
|
export declare const defaultMoneyPrecision = 6;
|
|
@@ -82,6 +84,7 @@ export declare const paidRequestContextSchema: z.ZodObject<{
|
|
|
82
84
|
agent: z.ZodString;
|
|
83
85
|
description: z.ZodOptional<z.ZodString>;
|
|
84
86
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
87
|
+
executionProvider: z.ZodOptional<z.ZodString>;
|
|
85
88
|
attribution: z.ZodOptional<z.ZodObject<{
|
|
86
89
|
discoverySource: z.ZodOptional<z.ZodEnum<["coinbase_bazaar", "dexter", "pay_sh", "x402scan", "manual", "direct", "observed", "imported", "unknown"]>>;
|
|
87
90
|
resourceIdentity: z.ZodOptional<z.ZodObject<{
|
|
@@ -122,6 +125,7 @@ export declare const paidRequestContextSchema: z.ZodObject<{
|
|
|
122
125
|
agent: string;
|
|
123
126
|
description?: string | undefined;
|
|
124
127
|
metadata?: Record<string, unknown> | undefined;
|
|
128
|
+
executionProvider?: string | undefined;
|
|
125
129
|
attribution?: {
|
|
126
130
|
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
127
131
|
resourceIdentity?: {
|
|
@@ -136,6 +140,7 @@ export declare const paidRequestContextSchema: z.ZodObject<{
|
|
|
136
140
|
agent: string;
|
|
137
141
|
description?: string | undefined;
|
|
138
142
|
metadata?: Record<string, unknown> | undefined;
|
|
143
|
+
executionProvider?: string | undefined;
|
|
139
144
|
attribution?: {
|
|
140
145
|
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
141
146
|
resourceIdentity?: {
|
|
@@ -4296,6 +4301,7 @@ export declare const sdkPaymentDecisionRequestSchema: z.ZodObject<{
|
|
|
4296
4301
|
agent: z.ZodString;
|
|
4297
4302
|
description: z.ZodOptional<z.ZodString>;
|
|
4298
4303
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4304
|
+
executionProvider: z.ZodOptional<z.ZodString>;
|
|
4299
4305
|
attribution: z.ZodOptional<z.ZodObject<{
|
|
4300
4306
|
discoverySource: z.ZodOptional<z.ZodEnum<["coinbase_bazaar", "dexter", "pay_sh", "x402scan", "manual", "direct", "observed", "imported", "unknown"]>>;
|
|
4301
4307
|
resourceIdentity: z.ZodOptional<z.ZodObject<{
|
|
@@ -4336,6 +4342,7 @@ export declare const sdkPaymentDecisionRequestSchema: z.ZodObject<{
|
|
|
4336
4342
|
agent: string;
|
|
4337
4343
|
description?: string | undefined;
|
|
4338
4344
|
metadata?: Record<string, unknown> | undefined;
|
|
4345
|
+
executionProvider?: string | undefined;
|
|
4339
4346
|
attribution?: {
|
|
4340
4347
|
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4341
4348
|
resourceIdentity?: {
|
|
@@ -4350,6 +4357,7 @@ export declare const sdkPaymentDecisionRequestSchema: z.ZodObject<{
|
|
|
4350
4357
|
agent: string;
|
|
4351
4358
|
description?: string | undefined;
|
|
4352
4359
|
metadata?: Record<string, unknown> | undefined;
|
|
4360
|
+
executionProvider?: string | undefined;
|
|
4353
4361
|
attribution?: {
|
|
4354
4362
|
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4355
4363
|
resourceIdentity?: {
|
|
@@ -4411,6 +4419,7 @@ export declare const sdkPaymentDecisionRequestSchema: z.ZodObject<{
|
|
|
4411
4419
|
agent: string;
|
|
4412
4420
|
description?: string | undefined;
|
|
4413
4421
|
metadata?: Record<string, unknown> | undefined;
|
|
4422
|
+
executionProvider?: string | undefined;
|
|
4414
4423
|
attribution?: {
|
|
4415
4424
|
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4416
4425
|
resourceIdentity?: {
|
|
@@ -4440,6 +4449,7 @@ export declare const sdkPaymentDecisionRequestSchema: z.ZodObject<{
|
|
|
4440
4449
|
agent: string;
|
|
4441
4450
|
description?: string | undefined;
|
|
4442
4451
|
metadata?: Record<string, unknown> | undefined;
|
|
4452
|
+
executionProvider?: string | undefined;
|
|
4443
4453
|
attribution?: {
|
|
4444
4454
|
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4445
4455
|
resourceIdentity?: {
|
|
@@ -4453,6 +4463,174 @@ export declare const sdkPaymentDecisionRequestSchema: z.ZodObject<{
|
|
|
4453
4463
|
idempotencyKey?: string | undefined;
|
|
4454
4464
|
}>;
|
|
4455
4465
|
export type SdkPaymentDecisionRequest = z.infer<typeof sdkPaymentDecisionRequestSchema>;
|
|
4466
|
+
export declare const sdkPaymentAuthorizationRequestSchema: z.ZodObject<{
|
|
4467
|
+
context: z.ZodObject<{
|
|
4468
|
+
organization: z.ZodString;
|
|
4469
|
+
agent: z.ZodString;
|
|
4470
|
+
description: z.ZodOptional<z.ZodString>;
|
|
4471
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4472
|
+
executionProvider: z.ZodOptional<z.ZodString>;
|
|
4473
|
+
attribution: z.ZodOptional<z.ZodObject<{
|
|
4474
|
+
discoverySource: z.ZodOptional<z.ZodEnum<["coinbase_bazaar", "dexter", "pay_sh", "x402scan", "manual", "direct", "observed", "imported", "unknown"]>>;
|
|
4475
|
+
resourceIdentity: z.ZodOptional<z.ZodObject<{
|
|
4476
|
+
kind: z.ZodLiteral<"http_endpoint">;
|
|
4477
|
+
method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
|
|
4478
|
+
canonicalUrl: z.ZodString;
|
|
4479
|
+
canonicalKey: z.ZodString;
|
|
4480
|
+
}, "strip", z.ZodTypeAny, {
|
|
4481
|
+
kind: "http_endpoint";
|
|
4482
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4483
|
+
canonicalUrl: string;
|
|
4484
|
+
canonicalKey: string;
|
|
4485
|
+
}, {
|
|
4486
|
+
kind: "http_endpoint";
|
|
4487
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4488
|
+
canonicalUrl: string;
|
|
4489
|
+
canonicalKey: string;
|
|
4490
|
+
}>>;
|
|
4491
|
+
}, "strip", z.ZodTypeAny, {
|
|
4492
|
+
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4493
|
+
resourceIdentity?: {
|
|
4494
|
+
kind: "http_endpoint";
|
|
4495
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4496
|
+
canonicalUrl: string;
|
|
4497
|
+
canonicalKey: string;
|
|
4498
|
+
} | undefined;
|
|
4499
|
+
}, {
|
|
4500
|
+
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4501
|
+
resourceIdentity?: {
|
|
4502
|
+
kind: "http_endpoint";
|
|
4503
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4504
|
+
canonicalUrl: string;
|
|
4505
|
+
canonicalKey: string;
|
|
4506
|
+
} | undefined;
|
|
4507
|
+
}>>;
|
|
4508
|
+
}, "strip", z.ZodTypeAny, {
|
|
4509
|
+
organization: string;
|
|
4510
|
+
agent: string;
|
|
4511
|
+
description?: string | undefined;
|
|
4512
|
+
metadata?: Record<string, unknown> | undefined;
|
|
4513
|
+
executionProvider?: string | undefined;
|
|
4514
|
+
attribution?: {
|
|
4515
|
+
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4516
|
+
resourceIdentity?: {
|
|
4517
|
+
kind: "http_endpoint";
|
|
4518
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4519
|
+
canonicalUrl: string;
|
|
4520
|
+
canonicalKey: string;
|
|
4521
|
+
} | undefined;
|
|
4522
|
+
} | undefined;
|
|
4523
|
+
}, {
|
|
4524
|
+
organization: string;
|
|
4525
|
+
agent: string;
|
|
4526
|
+
description?: string | undefined;
|
|
4527
|
+
metadata?: Record<string, unknown> | undefined;
|
|
4528
|
+
executionProvider?: string | undefined;
|
|
4529
|
+
attribution?: {
|
|
4530
|
+
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4531
|
+
resourceIdentity?: {
|
|
4532
|
+
kind: "http_endpoint";
|
|
4533
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4534
|
+
canonicalUrl: string;
|
|
4535
|
+
canonicalKey: string;
|
|
4536
|
+
} | undefined;
|
|
4537
|
+
} | undefined;
|
|
4538
|
+
}>;
|
|
4539
|
+
request: z.ZodObject<{
|
|
4540
|
+
url: z.ZodString;
|
|
4541
|
+
method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
|
|
4542
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4543
|
+
body: z.ZodOptional<z.ZodString>;
|
|
4544
|
+
bodyHash: z.ZodOptional<z.ZodString>;
|
|
4545
|
+
}, "strip", z.ZodTypeAny, {
|
|
4546
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4547
|
+
url: string;
|
|
4548
|
+
headers?: Record<string, string> | undefined;
|
|
4549
|
+
body?: string | undefined;
|
|
4550
|
+
bodyHash?: string | undefined;
|
|
4551
|
+
}, {
|
|
4552
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4553
|
+
url: string;
|
|
4554
|
+
headers?: Record<string, string> | undefined;
|
|
4555
|
+
body?: string | undefined;
|
|
4556
|
+
bodyHash?: string | undefined;
|
|
4557
|
+
}>;
|
|
4558
|
+
challenge: z.ZodObject<{
|
|
4559
|
+
protocol: z.ZodEnum<["x402", "l402"]>;
|
|
4560
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4561
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
4562
|
+
}, "strip", z.ZodTypeAny, {
|
|
4563
|
+
headers: Record<string, string>;
|
|
4564
|
+
protocol: "x402" | "l402";
|
|
4565
|
+
body?: unknown;
|
|
4566
|
+
}, {
|
|
4567
|
+
protocol: "x402" | "l402";
|
|
4568
|
+
headers?: Record<string, string> | undefined;
|
|
4569
|
+
body?: unknown;
|
|
4570
|
+
}>;
|
|
4571
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
4572
|
+
}, "strip", z.ZodTypeAny, {
|
|
4573
|
+
request: {
|
|
4574
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4575
|
+
url: string;
|
|
4576
|
+
headers?: Record<string, string> | undefined;
|
|
4577
|
+
body?: string | undefined;
|
|
4578
|
+
bodyHash?: string | undefined;
|
|
4579
|
+
};
|
|
4580
|
+
challenge: {
|
|
4581
|
+
headers: Record<string, string>;
|
|
4582
|
+
protocol: "x402" | "l402";
|
|
4583
|
+
body?: unknown;
|
|
4584
|
+
};
|
|
4585
|
+
context: {
|
|
4586
|
+
organization: string;
|
|
4587
|
+
agent: string;
|
|
4588
|
+
description?: string | undefined;
|
|
4589
|
+
metadata?: Record<string, unknown> | undefined;
|
|
4590
|
+
executionProvider?: string | undefined;
|
|
4591
|
+
attribution?: {
|
|
4592
|
+
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4593
|
+
resourceIdentity?: {
|
|
4594
|
+
kind: "http_endpoint";
|
|
4595
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4596
|
+
canonicalUrl: string;
|
|
4597
|
+
canonicalKey: string;
|
|
4598
|
+
} | undefined;
|
|
4599
|
+
} | undefined;
|
|
4600
|
+
};
|
|
4601
|
+
idempotencyKey?: string | undefined;
|
|
4602
|
+
}, {
|
|
4603
|
+
request: {
|
|
4604
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4605
|
+
url: string;
|
|
4606
|
+
headers?: Record<string, string> | undefined;
|
|
4607
|
+
body?: string | undefined;
|
|
4608
|
+
bodyHash?: string | undefined;
|
|
4609
|
+
};
|
|
4610
|
+
challenge: {
|
|
4611
|
+
protocol: "x402" | "l402";
|
|
4612
|
+
headers?: Record<string, string> | undefined;
|
|
4613
|
+
body?: unknown;
|
|
4614
|
+
};
|
|
4615
|
+
context: {
|
|
4616
|
+
organization: string;
|
|
4617
|
+
agent: string;
|
|
4618
|
+
description?: string | undefined;
|
|
4619
|
+
metadata?: Record<string, unknown> | undefined;
|
|
4620
|
+
executionProvider?: string | undefined;
|
|
4621
|
+
attribution?: {
|
|
4622
|
+
discoverySource?: "coinbase_bazaar" | "dexter" | "pay_sh" | "x402scan" | "manual" | "direct" | "observed" | "imported" | "unknown" | undefined;
|
|
4623
|
+
resourceIdentity?: {
|
|
4624
|
+
kind: "http_endpoint";
|
|
4625
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4626
|
+
canonicalUrl: string;
|
|
4627
|
+
canonicalKey: string;
|
|
4628
|
+
} | undefined;
|
|
4629
|
+
} | undefined;
|
|
4630
|
+
};
|
|
4631
|
+
idempotencyKey?: string | undefined;
|
|
4632
|
+
}>;
|
|
4633
|
+
export type SdkPaymentAuthorizationRequest = SdkPaymentDecisionRequest;
|
|
4456
4634
|
/** Durable receipt shape returned after the control plane records an outcome. */
|
|
4457
4635
|
export declare const sdkReceiptSchema: z.ZodObject<{
|
|
4458
4636
|
receiptId: z.ZodString;
|
|
@@ -4549,58 +4727,905 @@ export declare const sdkReceiptSchema: z.ZodObject<{
|
|
|
4549
4727
|
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
4550
4728
|
completedAt?: string | undefined;
|
|
4551
4729
|
}, {
|
|
4552
|
-
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
4553
|
-
protocol: "x402" | "l402";
|
|
4554
|
-
receiptId: string;
|
|
4730
|
+
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
4731
|
+
protocol: "x402" | "l402";
|
|
4732
|
+
receiptId: string;
|
|
4733
|
+
paidRequestId: string;
|
|
4734
|
+
paymentAttemptId: string;
|
|
4735
|
+
organizationId: string;
|
|
4736
|
+
agentId: string;
|
|
4737
|
+
money: {
|
|
4738
|
+
asset: string;
|
|
4739
|
+
amount: string;
|
|
4740
|
+
amountMinor: string;
|
|
4741
|
+
precision: number;
|
|
4742
|
+
unit: "minor";
|
|
4743
|
+
};
|
|
4744
|
+
authorizationOutcome: "allowed";
|
|
4745
|
+
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
4746
|
+
requestUrl: string;
|
|
4747
|
+
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4748
|
+
createdAt: string;
|
|
4749
|
+
confirmedAt?: string | undefined;
|
|
4750
|
+
merchantId?: string | undefined;
|
|
4751
|
+
confirmationSource?: "chain_observer" | undefined;
|
|
4752
|
+
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
4753
|
+
attributionBasis?: Record<string, unknown> | undefined;
|
|
4754
|
+
attributionRuleVersion?: string | undefined;
|
|
4755
|
+
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
4756
|
+
canonicalSettlementKey?: string | undefined;
|
|
4757
|
+
paymentReference?: string | undefined;
|
|
4758
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
4759
|
+
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
4760
|
+
settlementIdentifier?: string | undefined;
|
|
4761
|
+
supersededByReceiptId?: string | undefined;
|
|
4762
|
+
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
4763
|
+
completedAt?: string | undefined;
|
|
4764
|
+
}>;
|
|
4765
|
+
export type SdkReceipt = z.infer<typeof sdkReceiptSchema>;
|
|
4766
|
+
/** Normalized merchant HTTP response embedded in SDK results and decisions. */
|
|
4767
|
+
export declare const sdkMerchantResponseSchema: z.ZodObject<{
|
|
4768
|
+
status: z.ZodNumber;
|
|
4769
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4770
|
+
body: z.ZodDefault<z.ZodString>;
|
|
4771
|
+
}, "strip", z.ZodTypeAny, {
|
|
4772
|
+
status: number;
|
|
4773
|
+
headers: Record<string, string>;
|
|
4774
|
+
body: string;
|
|
4775
|
+
}, {
|
|
4776
|
+
status: number;
|
|
4777
|
+
headers?: Record<string, string> | undefined;
|
|
4778
|
+
body?: string | undefined;
|
|
4779
|
+
}>;
|
|
4780
|
+
export type SdkMerchantResponse = z.infer<typeof sdkMerchantResponseSchema>;
|
|
4781
|
+
export declare const sdkDelegatedExecutionStatusSchema: z.ZodEnum<["succeeded", "failed", "inconclusive", "preflight_failed"]>;
|
|
4782
|
+
export type SdkDelegatedExecutionStatus = z.infer<typeof sdkDelegatedExecutionStatusSchema>;
|
|
4783
|
+
export declare const sdkDelegatedMerchantOutcomeSchema: z.ZodEnum<["success_response", "failure_response", "no_response", "unknown"]>;
|
|
4784
|
+
export type SdkDelegatedMerchantOutcome = z.infer<typeof sdkDelegatedMerchantOutcomeSchema>;
|
|
4785
|
+
export declare const sdkDelegatedExecutionDiagnosticCodeSchema: z.ZodEnum<["preflight_incompatible", "merchant_rejected", "merchant_execution_failed", "merchant_transport_lost", "settlement_proof_conflict"]>;
|
|
4786
|
+
export type SdkDelegatedExecutionDiagnosticCode = z.infer<typeof sdkDelegatedExecutionDiagnosticCodeSchema>;
|
|
4787
|
+
export declare const sdkDelegatedExecutionResultSchema: z.ZodObject<{
|
|
4788
|
+
protocol: z.ZodEnum<["x402", "l402"]>;
|
|
4789
|
+
executionStatus: z.ZodEnum<["succeeded", "failed", "inconclusive", "preflight_failed"]>;
|
|
4790
|
+
settlementEvidenceClass: z.ZodEnum<["none", "inconclusive", "merchant_verifiable_success", "settled"]>;
|
|
4791
|
+
merchantOutcome: z.ZodEnum<["success_response", "failure_response", "no_response", "unknown"]>;
|
|
4792
|
+
settlementReference: z.ZodOptional<z.ZodString>;
|
|
4793
|
+
paymentReference: z.ZodOptional<z.ZodString>;
|
|
4794
|
+
evidenceSource: z.ZodOptional<z.ZodEnum<["merchant", "local_simulation"]>>;
|
|
4795
|
+
signerSubmissionEvidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4796
|
+
merchantResponse: z.ZodOptional<z.ZodObject<{
|
|
4797
|
+
status: z.ZodNumber;
|
|
4798
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4799
|
+
body: z.ZodDefault<z.ZodString>;
|
|
4800
|
+
}, "strip", z.ZodTypeAny, {
|
|
4801
|
+
status: number;
|
|
4802
|
+
headers: Record<string, string>;
|
|
4803
|
+
body: string;
|
|
4804
|
+
}, {
|
|
4805
|
+
status: number;
|
|
4806
|
+
headers?: Record<string, string> | undefined;
|
|
4807
|
+
body?: string | undefined;
|
|
4808
|
+
}>>;
|
|
4809
|
+
diagnostic: z.ZodOptional<z.ZodObject<{
|
|
4810
|
+
code: z.ZodEnum<["preflight_incompatible", "merchant_rejected", "merchant_execution_failed", "merchant_transport_lost", "settlement_proof_conflict"]>;
|
|
4811
|
+
message: z.ZodOptional<z.ZodString>;
|
|
4812
|
+
}, "strip", z.ZodTypeAny, {
|
|
4813
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4814
|
+
message?: string | undefined;
|
|
4815
|
+
}, {
|
|
4816
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4817
|
+
message?: string | undefined;
|
|
4818
|
+
}>>;
|
|
4819
|
+
protocolArtifacts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4820
|
+
}, "strip", z.ZodTypeAny, {
|
|
4821
|
+
protocol: "x402" | "l402";
|
|
4822
|
+
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
4823
|
+
executionStatus: "inconclusive" | "succeeded" | "failed" | "preflight_failed";
|
|
4824
|
+
merchantOutcome: "unknown" | "success_response" | "failure_response" | "no_response";
|
|
4825
|
+
paymentReference?: string | undefined;
|
|
4826
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
4827
|
+
settlementReference?: string | undefined;
|
|
4828
|
+
signerSubmissionEvidence?: Record<string, unknown> | undefined;
|
|
4829
|
+
merchantResponse?: {
|
|
4830
|
+
status: number;
|
|
4831
|
+
headers: Record<string, string>;
|
|
4832
|
+
body: string;
|
|
4833
|
+
} | undefined;
|
|
4834
|
+
diagnostic?: {
|
|
4835
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4836
|
+
message?: string | undefined;
|
|
4837
|
+
} | undefined;
|
|
4838
|
+
protocolArtifacts?: Record<string, unknown> | undefined;
|
|
4839
|
+
}, {
|
|
4840
|
+
protocol: "x402" | "l402";
|
|
4841
|
+
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
4842
|
+
executionStatus: "inconclusive" | "succeeded" | "failed" | "preflight_failed";
|
|
4843
|
+
merchantOutcome: "unknown" | "success_response" | "failure_response" | "no_response";
|
|
4844
|
+
paymentReference?: string | undefined;
|
|
4845
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
4846
|
+
settlementReference?: string | undefined;
|
|
4847
|
+
signerSubmissionEvidence?: Record<string, unknown> | undefined;
|
|
4848
|
+
merchantResponse?: {
|
|
4849
|
+
status: number;
|
|
4850
|
+
headers?: Record<string, string> | undefined;
|
|
4851
|
+
body?: string | undefined;
|
|
4852
|
+
} | undefined;
|
|
4853
|
+
diagnostic?: {
|
|
4854
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4855
|
+
message?: string | undefined;
|
|
4856
|
+
} | undefined;
|
|
4857
|
+
protocolArtifacts?: Record<string, unknown> | undefined;
|
|
4858
|
+
}>;
|
|
4859
|
+
export type SdkDelegatedExecutionResult = z.infer<typeof sdkDelegatedExecutionResultSchema>;
|
|
4860
|
+
export declare const sdkPaymentFinalizationRequestSchema: z.ZodObject<{
|
|
4861
|
+
paidRequestId: z.ZodString;
|
|
4862
|
+
paymentAttemptId: z.ZodString;
|
|
4863
|
+
result: z.ZodObject<{
|
|
4864
|
+
protocol: z.ZodEnum<["x402", "l402"]>;
|
|
4865
|
+
executionStatus: z.ZodEnum<["succeeded", "failed", "inconclusive", "preflight_failed"]>;
|
|
4866
|
+
settlementEvidenceClass: z.ZodEnum<["none", "inconclusive", "merchant_verifiable_success", "settled"]>;
|
|
4867
|
+
merchantOutcome: z.ZodEnum<["success_response", "failure_response", "no_response", "unknown"]>;
|
|
4868
|
+
settlementReference: z.ZodOptional<z.ZodString>;
|
|
4869
|
+
paymentReference: z.ZodOptional<z.ZodString>;
|
|
4870
|
+
evidenceSource: z.ZodOptional<z.ZodEnum<["merchant", "local_simulation"]>>;
|
|
4871
|
+
signerSubmissionEvidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4872
|
+
merchantResponse: z.ZodOptional<z.ZodObject<{
|
|
4873
|
+
status: z.ZodNumber;
|
|
4874
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4875
|
+
body: z.ZodDefault<z.ZodString>;
|
|
4876
|
+
}, "strip", z.ZodTypeAny, {
|
|
4877
|
+
status: number;
|
|
4878
|
+
headers: Record<string, string>;
|
|
4879
|
+
body: string;
|
|
4880
|
+
}, {
|
|
4881
|
+
status: number;
|
|
4882
|
+
headers?: Record<string, string> | undefined;
|
|
4883
|
+
body?: string | undefined;
|
|
4884
|
+
}>>;
|
|
4885
|
+
diagnostic: z.ZodOptional<z.ZodObject<{
|
|
4886
|
+
code: z.ZodEnum<["preflight_incompatible", "merchant_rejected", "merchant_execution_failed", "merchant_transport_lost", "settlement_proof_conflict"]>;
|
|
4887
|
+
message: z.ZodOptional<z.ZodString>;
|
|
4888
|
+
}, "strip", z.ZodTypeAny, {
|
|
4889
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4890
|
+
message?: string | undefined;
|
|
4891
|
+
}, {
|
|
4892
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4893
|
+
message?: string | undefined;
|
|
4894
|
+
}>>;
|
|
4895
|
+
protocolArtifacts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4896
|
+
}, "strip", z.ZodTypeAny, {
|
|
4897
|
+
protocol: "x402" | "l402";
|
|
4898
|
+
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
4899
|
+
executionStatus: "inconclusive" | "succeeded" | "failed" | "preflight_failed";
|
|
4900
|
+
merchantOutcome: "unknown" | "success_response" | "failure_response" | "no_response";
|
|
4901
|
+
paymentReference?: string | undefined;
|
|
4902
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
4903
|
+
settlementReference?: string | undefined;
|
|
4904
|
+
signerSubmissionEvidence?: Record<string, unknown> | undefined;
|
|
4905
|
+
merchantResponse?: {
|
|
4906
|
+
status: number;
|
|
4907
|
+
headers: Record<string, string>;
|
|
4908
|
+
body: string;
|
|
4909
|
+
} | undefined;
|
|
4910
|
+
diagnostic?: {
|
|
4911
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4912
|
+
message?: string | undefined;
|
|
4913
|
+
} | undefined;
|
|
4914
|
+
protocolArtifacts?: Record<string, unknown> | undefined;
|
|
4915
|
+
}, {
|
|
4916
|
+
protocol: "x402" | "l402";
|
|
4917
|
+
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
4918
|
+
executionStatus: "inconclusive" | "succeeded" | "failed" | "preflight_failed";
|
|
4919
|
+
merchantOutcome: "unknown" | "success_response" | "failure_response" | "no_response";
|
|
4920
|
+
paymentReference?: string | undefined;
|
|
4921
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
4922
|
+
settlementReference?: string | undefined;
|
|
4923
|
+
signerSubmissionEvidence?: Record<string, unknown> | undefined;
|
|
4924
|
+
merchantResponse?: {
|
|
4925
|
+
status: number;
|
|
4926
|
+
headers?: Record<string, string> | undefined;
|
|
4927
|
+
body?: string | undefined;
|
|
4928
|
+
} | undefined;
|
|
4929
|
+
diagnostic?: {
|
|
4930
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4931
|
+
message?: string | undefined;
|
|
4932
|
+
} | undefined;
|
|
4933
|
+
protocolArtifacts?: Record<string, unknown> | undefined;
|
|
4934
|
+
}>;
|
|
4935
|
+
}, "strip", z.ZodTypeAny, {
|
|
4936
|
+
paidRequestId: string;
|
|
4937
|
+
paymentAttemptId: string;
|
|
4938
|
+
result: {
|
|
4939
|
+
protocol: "x402" | "l402";
|
|
4940
|
+
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
4941
|
+
executionStatus: "inconclusive" | "succeeded" | "failed" | "preflight_failed";
|
|
4942
|
+
merchantOutcome: "unknown" | "success_response" | "failure_response" | "no_response";
|
|
4943
|
+
paymentReference?: string | undefined;
|
|
4944
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
4945
|
+
settlementReference?: string | undefined;
|
|
4946
|
+
signerSubmissionEvidence?: Record<string, unknown> | undefined;
|
|
4947
|
+
merchantResponse?: {
|
|
4948
|
+
status: number;
|
|
4949
|
+
headers: Record<string, string>;
|
|
4950
|
+
body: string;
|
|
4951
|
+
} | undefined;
|
|
4952
|
+
diagnostic?: {
|
|
4953
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4954
|
+
message?: string | undefined;
|
|
4955
|
+
} | undefined;
|
|
4956
|
+
protocolArtifacts?: Record<string, unknown> | undefined;
|
|
4957
|
+
};
|
|
4958
|
+
}, {
|
|
4959
|
+
paidRequestId: string;
|
|
4960
|
+
paymentAttemptId: string;
|
|
4961
|
+
result: {
|
|
4962
|
+
protocol: "x402" | "l402";
|
|
4963
|
+
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
4964
|
+
executionStatus: "inconclusive" | "succeeded" | "failed" | "preflight_failed";
|
|
4965
|
+
merchantOutcome: "unknown" | "success_response" | "failure_response" | "no_response";
|
|
4966
|
+
paymentReference?: string | undefined;
|
|
4967
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
4968
|
+
settlementReference?: string | undefined;
|
|
4969
|
+
signerSubmissionEvidence?: Record<string, unknown> | undefined;
|
|
4970
|
+
merchantResponse?: {
|
|
4971
|
+
status: number;
|
|
4972
|
+
headers?: Record<string, string> | undefined;
|
|
4973
|
+
body?: string | undefined;
|
|
4974
|
+
} | undefined;
|
|
4975
|
+
diagnostic?: {
|
|
4976
|
+
code: "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4977
|
+
message?: string | undefined;
|
|
4978
|
+
} | undefined;
|
|
4979
|
+
protocolArtifacts?: Record<string, unknown> | undefined;
|
|
4980
|
+
};
|
|
4981
|
+
}>;
|
|
4982
|
+
export type SdkPaymentFinalizationRequest = z.infer<typeof sdkPaymentFinalizationRequestSchema>;
|
|
4983
|
+
export declare const sdkPaymentAuthorizationAuthorizedResponseSchema: z.ZodObject<{
|
|
4984
|
+
outcome: z.ZodLiteral<"authorized">;
|
|
4985
|
+
paidRequestId: z.ZodString;
|
|
4986
|
+
paymentAttemptId: z.ZodString;
|
|
4987
|
+
reasonCode: z.ZodEnum<["policy_allow", "policy_denied", "policy_review_required", "challenge_candidate_malformed", "challenge_no_supported_candidates", "challenge_mixed_environment_candidates", "challenge_execution_identity_unavailable", "challenge_execution_identity_ambiguous", "payment_execution_in_progress", "preflight_incompatible", "merchant_rejected", "merchant_execution_failed", "settlement_proof_conflict", "merchant_transport_lost"]>;
|
|
4988
|
+
reason: z.ZodString;
|
|
4989
|
+
}, "strip", z.ZodTypeAny, {
|
|
4990
|
+
paidRequestId: string;
|
|
4991
|
+
paymentAttemptId: string;
|
|
4992
|
+
outcome: "authorized";
|
|
4993
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4994
|
+
reason: string;
|
|
4995
|
+
}, {
|
|
4996
|
+
paidRequestId: string;
|
|
4997
|
+
paymentAttemptId: string;
|
|
4998
|
+
outcome: "authorized";
|
|
4999
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
5000
|
+
reason: string;
|
|
5001
|
+
}>;
|
|
5002
|
+
export type SdkPaymentAuthorizationAuthorizedResponse = z.infer<typeof sdkPaymentAuthorizationAuthorizedResponseSchema>;
|
|
5003
|
+
export declare const sdkPaymentDecisionAllowResponseSchema: z.ZodObject<{
|
|
5004
|
+
outcome: z.ZodLiteral<"allow">;
|
|
5005
|
+
paidRequestId: z.ZodString;
|
|
5006
|
+
paymentAttemptId: z.ZodString;
|
|
5007
|
+
reasonCode: z.ZodEnum<["policy_allow", "policy_denied", "policy_review_required", "challenge_candidate_malformed", "challenge_no_supported_candidates", "challenge_mixed_environment_candidates", "challenge_execution_identity_unavailable", "challenge_execution_identity_ambiguous", "payment_execution_in_progress", "preflight_incompatible", "merchant_rejected", "merchant_execution_failed", "settlement_proof_conflict", "merchant_transport_lost"]>;
|
|
5008
|
+
reason: z.ZodString;
|
|
5009
|
+
merchantResponse: z.ZodObject<{
|
|
5010
|
+
status: z.ZodNumber;
|
|
5011
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5012
|
+
body: z.ZodDefault<z.ZodString>;
|
|
5013
|
+
}, "strip", z.ZodTypeAny, {
|
|
5014
|
+
status: number;
|
|
5015
|
+
headers: Record<string, string>;
|
|
5016
|
+
body: string;
|
|
5017
|
+
}, {
|
|
5018
|
+
status: number;
|
|
5019
|
+
headers?: Record<string, string> | undefined;
|
|
5020
|
+
body?: string | undefined;
|
|
5021
|
+
}>;
|
|
5022
|
+
receipt: z.ZodObject<{
|
|
5023
|
+
receiptId: z.ZodString;
|
|
5024
|
+
paidRequestId: z.ZodString;
|
|
5025
|
+
paymentAttemptId: z.ZodString;
|
|
5026
|
+
organizationId: z.ZodString;
|
|
5027
|
+
agentId: z.ZodString;
|
|
5028
|
+
merchantId: z.ZodOptional<z.ZodString>;
|
|
5029
|
+
protocol: z.ZodEnum<["x402", "l402"]>;
|
|
5030
|
+
money: z.ZodEffects<z.ZodObject<{
|
|
5031
|
+
asset: z.ZodString;
|
|
5032
|
+
amount: z.ZodString;
|
|
5033
|
+
amountMinor: z.ZodString;
|
|
5034
|
+
precision: z.ZodNumber;
|
|
5035
|
+
unit: z.ZodLiteral<"minor">;
|
|
5036
|
+
}, "strip", z.ZodTypeAny, {
|
|
5037
|
+
asset: string;
|
|
5038
|
+
amount: string;
|
|
5039
|
+
amountMinor: string;
|
|
5040
|
+
precision: number;
|
|
5041
|
+
unit: "minor";
|
|
5042
|
+
}, {
|
|
5043
|
+
asset: string;
|
|
5044
|
+
amount: string;
|
|
5045
|
+
amountMinor: string;
|
|
5046
|
+
precision: number;
|
|
5047
|
+
unit: "minor";
|
|
5048
|
+
}>, {
|
|
5049
|
+
asset: string;
|
|
5050
|
+
amount: string;
|
|
5051
|
+
amountMinor: string;
|
|
5052
|
+
precision: number;
|
|
5053
|
+
unit: "minor";
|
|
5054
|
+
}, {
|
|
5055
|
+
asset: string;
|
|
5056
|
+
amount: string;
|
|
5057
|
+
amountMinor: string;
|
|
5058
|
+
precision: number;
|
|
5059
|
+
unit: "minor";
|
|
5060
|
+
}>;
|
|
5061
|
+
authorizationOutcome: z.ZodEnum<["allowed"]>;
|
|
5062
|
+
status: z.ZodEnum<["confirmed", "provisional", "expired_unconfirmed", "refunded", "void"]>;
|
|
5063
|
+
reconciliationStatus: z.ZodEnum<["none", "required", "in_progress", "resolved", "refunded"]>;
|
|
5064
|
+
confirmationSource: z.ZodOptional<z.ZodEnum<["chain_observer"]>>;
|
|
5065
|
+
attributionStrength: z.ZodOptional<z.ZodEnum<["strong_request_scoped", "constrained_unique"]>>;
|
|
5066
|
+
attributionBasis: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5067
|
+
attributionRuleVersion: z.ZodOptional<z.ZodString>;
|
|
5068
|
+
confirmedAt: z.ZodOptional<z.ZodString>;
|
|
5069
|
+
finalityLevelUsed: z.ZodOptional<z.ZodEnum<["evm_block_confirmations_12", "solana_commitment_finalized"]>>;
|
|
5070
|
+
requestUrl: z.ZodString;
|
|
5071
|
+
requestMethod: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
|
|
5072
|
+
canonicalSettlementKey: z.ZodOptional<z.ZodString>;
|
|
5073
|
+
paymentReference: z.ZodOptional<z.ZodString>;
|
|
5074
|
+
evidenceSource: z.ZodOptional<z.ZodEnum<["merchant", "local_simulation"]>>;
|
|
5075
|
+
settlementEvidenceClass: z.ZodOptional<z.ZodEnum<["none", "inconclusive", "merchant_verifiable_success", "settled"]>>;
|
|
5076
|
+
settlementIdentifier: z.ZodOptional<z.ZodString>;
|
|
5077
|
+
supersededByReceiptId: z.ZodOptional<z.ZodString>;
|
|
5078
|
+
fulfillmentStatus: z.ZodOptional<z.ZodEnum<["succeeded", "failed", "inconclusive"]>>;
|
|
5079
|
+
createdAt: z.ZodString;
|
|
5080
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
5081
|
+
}, "strip", z.ZodTypeAny, {
|
|
5082
|
+
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5083
|
+
protocol: "x402" | "l402";
|
|
5084
|
+
receiptId: string;
|
|
5085
|
+
paidRequestId: string;
|
|
5086
|
+
paymentAttemptId: string;
|
|
5087
|
+
organizationId: string;
|
|
5088
|
+
agentId: string;
|
|
5089
|
+
money: {
|
|
5090
|
+
asset: string;
|
|
5091
|
+
amount: string;
|
|
5092
|
+
amountMinor: string;
|
|
5093
|
+
precision: number;
|
|
5094
|
+
unit: "minor";
|
|
5095
|
+
};
|
|
5096
|
+
authorizationOutcome: "allowed";
|
|
5097
|
+
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
5098
|
+
requestUrl: string;
|
|
5099
|
+
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
5100
|
+
createdAt: string;
|
|
5101
|
+
confirmedAt?: string | undefined;
|
|
5102
|
+
merchantId?: string | undefined;
|
|
5103
|
+
confirmationSource?: "chain_observer" | undefined;
|
|
5104
|
+
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
5105
|
+
attributionBasis?: Record<string, unknown> | undefined;
|
|
5106
|
+
attributionRuleVersion?: string | undefined;
|
|
5107
|
+
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
5108
|
+
canonicalSettlementKey?: string | undefined;
|
|
5109
|
+
paymentReference?: string | undefined;
|
|
5110
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
5111
|
+
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
5112
|
+
settlementIdentifier?: string | undefined;
|
|
5113
|
+
supersededByReceiptId?: string | undefined;
|
|
5114
|
+
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
5115
|
+
completedAt?: string | undefined;
|
|
5116
|
+
}, {
|
|
5117
|
+
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5118
|
+
protocol: "x402" | "l402";
|
|
5119
|
+
receiptId: string;
|
|
5120
|
+
paidRequestId: string;
|
|
5121
|
+
paymentAttemptId: string;
|
|
5122
|
+
organizationId: string;
|
|
5123
|
+
agentId: string;
|
|
5124
|
+
money: {
|
|
5125
|
+
asset: string;
|
|
5126
|
+
amount: string;
|
|
5127
|
+
amountMinor: string;
|
|
5128
|
+
precision: number;
|
|
5129
|
+
unit: "minor";
|
|
5130
|
+
};
|
|
5131
|
+
authorizationOutcome: "allowed";
|
|
5132
|
+
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
5133
|
+
requestUrl: string;
|
|
5134
|
+
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
5135
|
+
createdAt: string;
|
|
5136
|
+
confirmedAt?: string | undefined;
|
|
5137
|
+
merchantId?: string | undefined;
|
|
5138
|
+
confirmationSource?: "chain_observer" | undefined;
|
|
5139
|
+
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
5140
|
+
attributionBasis?: Record<string, unknown> | undefined;
|
|
5141
|
+
attributionRuleVersion?: string | undefined;
|
|
5142
|
+
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
5143
|
+
canonicalSettlementKey?: string | undefined;
|
|
5144
|
+
paymentReference?: string | undefined;
|
|
5145
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
5146
|
+
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
5147
|
+
settlementIdentifier?: string | undefined;
|
|
5148
|
+
supersededByReceiptId?: string | undefined;
|
|
5149
|
+
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
5150
|
+
completedAt?: string | undefined;
|
|
5151
|
+
}>;
|
|
5152
|
+
}, "strip", z.ZodTypeAny, {
|
|
5153
|
+
paidRequestId: string;
|
|
5154
|
+
paymentAttemptId: string;
|
|
5155
|
+
merchantResponse: {
|
|
5156
|
+
status: number;
|
|
5157
|
+
headers: Record<string, string>;
|
|
5158
|
+
body: string;
|
|
5159
|
+
};
|
|
5160
|
+
outcome: "allow";
|
|
5161
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
5162
|
+
reason: string;
|
|
5163
|
+
receipt: {
|
|
5164
|
+
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5165
|
+
protocol: "x402" | "l402";
|
|
5166
|
+
receiptId: string;
|
|
5167
|
+
paidRequestId: string;
|
|
5168
|
+
paymentAttemptId: string;
|
|
5169
|
+
organizationId: string;
|
|
5170
|
+
agentId: string;
|
|
5171
|
+
money: {
|
|
5172
|
+
asset: string;
|
|
5173
|
+
amount: string;
|
|
5174
|
+
amountMinor: string;
|
|
5175
|
+
precision: number;
|
|
5176
|
+
unit: "minor";
|
|
5177
|
+
};
|
|
5178
|
+
authorizationOutcome: "allowed";
|
|
5179
|
+
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
5180
|
+
requestUrl: string;
|
|
5181
|
+
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
5182
|
+
createdAt: string;
|
|
5183
|
+
confirmedAt?: string | undefined;
|
|
5184
|
+
merchantId?: string | undefined;
|
|
5185
|
+
confirmationSource?: "chain_observer" | undefined;
|
|
5186
|
+
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
5187
|
+
attributionBasis?: Record<string, unknown> | undefined;
|
|
5188
|
+
attributionRuleVersion?: string | undefined;
|
|
5189
|
+
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
5190
|
+
canonicalSettlementKey?: string | undefined;
|
|
5191
|
+
paymentReference?: string | undefined;
|
|
5192
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
5193
|
+
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
5194
|
+
settlementIdentifier?: string | undefined;
|
|
5195
|
+
supersededByReceiptId?: string | undefined;
|
|
5196
|
+
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
5197
|
+
completedAt?: string | undefined;
|
|
5198
|
+
};
|
|
5199
|
+
}, {
|
|
5200
|
+
paidRequestId: string;
|
|
5201
|
+
paymentAttemptId: string;
|
|
5202
|
+
merchantResponse: {
|
|
5203
|
+
status: number;
|
|
5204
|
+
headers?: Record<string, string> | undefined;
|
|
5205
|
+
body?: string | undefined;
|
|
5206
|
+
};
|
|
5207
|
+
outcome: "allow";
|
|
5208
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
5209
|
+
reason: string;
|
|
5210
|
+
receipt: {
|
|
5211
|
+
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5212
|
+
protocol: "x402" | "l402";
|
|
5213
|
+
receiptId: string;
|
|
5214
|
+
paidRequestId: string;
|
|
5215
|
+
paymentAttemptId: string;
|
|
5216
|
+
organizationId: string;
|
|
5217
|
+
agentId: string;
|
|
5218
|
+
money: {
|
|
5219
|
+
asset: string;
|
|
5220
|
+
amount: string;
|
|
5221
|
+
amountMinor: string;
|
|
5222
|
+
precision: number;
|
|
5223
|
+
unit: "minor";
|
|
5224
|
+
};
|
|
5225
|
+
authorizationOutcome: "allowed";
|
|
5226
|
+
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
5227
|
+
requestUrl: string;
|
|
5228
|
+
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
5229
|
+
createdAt: string;
|
|
5230
|
+
confirmedAt?: string | undefined;
|
|
5231
|
+
merchantId?: string | undefined;
|
|
5232
|
+
confirmationSource?: "chain_observer" | undefined;
|
|
5233
|
+
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
5234
|
+
attributionBasis?: Record<string, unknown> | undefined;
|
|
5235
|
+
attributionRuleVersion?: string | undefined;
|
|
5236
|
+
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
5237
|
+
canonicalSettlementKey?: string | undefined;
|
|
5238
|
+
paymentReference?: string | undefined;
|
|
5239
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
5240
|
+
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
5241
|
+
settlementIdentifier?: string | undefined;
|
|
5242
|
+
supersededByReceiptId?: string | undefined;
|
|
5243
|
+
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
5244
|
+
completedAt?: string | undefined;
|
|
5245
|
+
};
|
|
5246
|
+
}>;
|
|
5247
|
+
export declare const sdkPaymentDecisionPaidFulfillmentFailedResponseSchema: z.ZodObject<{
|
|
5248
|
+
outcome: z.ZodLiteral<"paid_fulfillment_failed">;
|
|
5249
|
+
paidRequestId: z.ZodString;
|
|
5250
|
+
paymentAttemptId: z.ZodString;
|
|
5251
|
+
reasonCode: z.ZodEnum<["merchant_rejected", "merchant_execution_failed"]>;
|
|
5252
|
+
reason: z.ZodString;
|
|
5253
|
+
merchantResponse: z.ZodObject<{
|
|
5254
|
+
status: z.ZodNumber;
|
|
5255
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5256
|
+
body: z.ZodDefault<z.ZodString>;
|
|
5257
|
+
}, "strip", z.ZodTypeAny, {
|
|
5258
|
+
status: number;
|
|
5259
|
+
headers: Record<string, string>;
|
|
5260
|
+
body: string;
|
|
5261
|
+
}, {
|
|
5262
|
+
status: number;
|
|
5263
|
+
headers?: Record<string, string> | undefined;
|
|
5264
|
+
body?: string | undefined;
|
|
5265
|
+
}>;
|
|
5266
|
+
settlementEvidenceClass: z.ZodEnum<["none", "inconclusive", "merchant_verifiable_success", "settled"]>;
|
|
5267
|
+
fulfillmentStatus: z.ZodLiteral<"failed">;
|
|
5268
|
+
receipt: z.ZodObject<{
|
|
5269
|
+
receiptId: z.ZodString;
|
|
5270
|
+
paidRequestId: z.ZodString;
|
|
5271
|
+
paymentAttemptId: z.ZodString;
|
|
5272
|
+
organizationId: z.ZodString;
|
|
5273
|
+
agentId: z.ZodString;
|
|
5274
|
+
merchantId: z.ZodOptional<z.ZodString>;
|
|
5275
|
+
protocol: z.ZodEnum<["x402", "l402"]>;
|
|
5276
|
+
money: z.ZodEffects<z.ZodObject<{
|
|
5277
|
+
asset: z.ZodString;
|
|
5278
|
+
amount: z.ZodString;
|
|
5279
|
+
amountMinor: z.ZodString;
|
|
5280
|
+
precision: z.ZodNumber;
|
|
5281
|
+
unit: z.ZodLiteral<"minor">;
|
|
5282
|
+
}, "strip", z.ZodTypeAny, {
|
|
5283
|
+
asset: string;
|
|
5284
|
+
amount: string;
|
|
5285
|
+
amountMinor: string;
|
|
5286
|
+
precision: number;
|
|
5287
|
+
unit: "minor";
|
|
5288
|
+
}, {
|
|
5289
|
+
asset: string;
|
|
5290
|
+
amount: string;
|
|
5291
|
+
amountMinor: string;
|
|
5292
|
+
precision: number;
|
|
5293
|
+
unit: "minor";
|
|
5294
|
+
}>, {
|
|
5295
|
+
asset: string;
|
|
5296
|
+
amount: string;
|
|
5297
|
+
amountMinor: string;
|
|
5298
|
+
precision: number;
|
|
5299
|
+
unit: "minor";
|
|
5300
|
+
}, {
|
|
5301
|
+
asset: string;
|
|
5302
|
+
amount: string;
|
|
5303
|
+
amountMinor: string;
|
|
5304
|
+
precision: number;
|
|
5305
|
+
unit: "minor";
|
|
5306
|
+
}>;
|
|
5307
|
+
authorizationOutcome: z.ZodEnum<["allowed"]>;
|
|
5308
|
+
status: z.ZodEnum<["confirmed", "provisional", "expired_unconfirmed", "refunded", "void"]>;
|
|
5309
|
+
reconciliationStatus: z.ZodEnum<["none", "required", "in_progress", "resolved", "refunded"]>;
|
|
5310
|
+
confirmationSource: z.ZodOptional<z.ZodEnum<["chain_observer"]>>;
|
|
5311
|
+
attributionStrength: z.ZodOptional<z.ZodEnum<["strong_request_scoped", "constrained_unique"]>>;
|
|
5312
|
+
attributionBasis: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5313
|
+
attributionRuleVersion: z.ZodOptional<z.ZodString>;
|
|
5314
|
+
confirmedAt: z.ZodOptional<z.ZodString>;
|
|
5315
|
+
finalityLevelUsed: z.ZodOptional<z.ZodEnum<["evm_block_confirmations_12", "solana_commitment_finalized"]>>;
|
|
5316
|
+
requestUrl: z.ZodString;
|
|
5317
|
+
requestMethod: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
|
|
5318
|
+
canonicalSettlementKey: z.ZodOptional<z.ZodString>;
|
|
5319
|
+
paymentReference: z.ZodOptional<z.ZodString>;
|
|
5320
|
+
evidenceSource: z.ZodOptional<z.ZodEnum<["merchant", "local_simulation"]>>;
|
|
5321
|
+
settlementEvidenceClass: z.ZodOptional<z.ZodEnum<["none", "inconclusive", "merchant_verifiable_success", "settled"]>>;
|
|
5322
|
+
settlementIdentifier: z.ZodOptional<z.ZodString>;
|
|
5323
|
+
supersededByReceiptId: z.ZodOptional<z.ZodString>;
|
|
5324
|
+
fulfillmentStatus: z.ZodOptional<z.ZodEnum<["succeeded", "failed", "inconclusive"]>>;
|
|
5325
|
+
createdAt: z.ZodString;
|
|
5326
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
5327
|
+
}, "strip", z.ZodTypeAny, {
|
|
5328
|
+
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5329
|
+
protocol: "x402" | "l402";
|
|
5330
|
+
receiptId: string;
|
|
5331
|
+
paidRequestId: string;
|
|
5332
|
+
paymentAttemptId: string;
|
|
5333
|
+
organizationId: string;
|
|
5334
|
+
agentId: string;
|
|
5335
|
+
money: {
|
|
5336
|
+
asset: string;
|
|
5337
|
+
amount: string;
|
|
5338
|
+
amountMinor: string;
|
|
5339
|
+
precision: number;
|
|
5340
|
+
unit: "minor";
|
|
5341
|
+
};
|
|
5342
|
+
authorizationOutcome: "allowed";
|
|
5343
|
+
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
5344
|
+
requestUrl: string;
|
|
5345
|
+
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
5346
|
+
createdAt: string;
|
|
5347
|
+
confirmedAt?: string | undefined;
|
|
5348
|
+
merchantId?: string | undefined;
|
|
5349
|
+
confirmationSource?: "chain_observer" | undefined;
|
|
5350
|
+
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
5351
|
+
attributionBasis?: Record<string, unknown> | undefined;
|
|
5352
|
+
attributionRuleVersion?: string | undefined;
|
|
5353
|
+
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
5354
|
+
canonicalSettlementKey?: string | undefined;
|
|
5355
|
+
paymentReference?: string | undefined;
|
|
5356
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
5357
|
+
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
5358
|
+
settlementIdentifier?: string | undefined;
|
|
5359
|
+
supersededByReceiptId?: string | undefined;
|
|
5360
|
+
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
5361
|
+
completedAt?: string | undefined;
|
|
5362
|
+
}, {
|
|
5363
|
+
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5364
|
+
protocol: "x402" | "l402";
|
|
5365
|
+
receiptId: string;
|
|
5366
|
+
paidRequestId: string;
|
|
5367
|
+
paymentAttemptId: string;
|
|
5368
|
+
organizationId: string;
|
|
5369
|
+
agentId: string;
|
|
5370
|
+
money: {
|
|
5371
|
+
asset: string;
|
|
5372
|
+
amount: string;
|
|
5373
|
+
amountMinor: string;
|
|
5374
|
+
precision: number;
|
|
5375
|
+
unit: "minor";
|
|
5376
|
+
};
|
|
5377
|
+
authorizationOutcome: "allowed";
|
|
5378
|
+
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
5379
|
+
requestUrl: string;
|
|
5380
|
+
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
5381
|
+
createdAt: string;
|
|
5382
|
+
confirmedAt?: string | undefined;
|
|
5383
|
+
merchantId?: string | undefined;
|
|
5384
|
+
confirmationSource?: "chain_observer" | undefined;
|
|
5385
|
+
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
5386
|
+
attributionBasis?: Record<string, unknown> | undefined;
|
|
5387
|
+
attributionRuleVersion?: string | undefined;
|
|
5388
|
+
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
5389
|
+
canonicalSettlementKey?: string | undefined;
|
|
5390
|
+
paymentReference?: string | undefined;
|
|
5391
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
5392
|
+
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
5393
|
+
settlementIdentifier?: string | undefined;
|
|
5394
|
+
supersededByReceiptId?: string | undefined;
|
|
5395
|
+
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
5396
|
+
completedAt?: string | undefined;
|
|
5397
|
+
}>;
|
|
5398
|
+
evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5399
|
+
}, "strip", z.ZodTypeAny, {
|
|
5400
|
+
paidRequestId: string;
|
|
5401
|
+
paymentAttemptId: string;
|
|
5402
|
+
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
5403
|
+
fulfillmentStatus: "failed";
|
|
5404
|
+
merchantResponse: {
|
|
5405
|
+
status: number;
|
|
5406
|
+
headers: Record<string, string>;
|
|
5407
|
+
body: string;
|
|
5408
|
+
};
|
|
5409
|
+
outcome: "paid_fulfillment_failed";
|
|
5410
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5411
|
+
reason: string;
|
|
5412
|
+
receipt: {
|
|
5413
|
+
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5414
|
+
protocol: "x402" | "l402";
|
|
5415
|
+
receiptId: string;
|
|
5416
|
+
paidRequestId: string;
|
|
5417
|
+
paymentAttemptId: string;
|
|
5418
|
+
organizationId: string;
|
|
5419
|
+
agentId: string;
|
|
5420
|
+
money: {
|
|
5421
|
+
asset: string;
|
|
5422
|
+
amount: string;
|
|
5423
|
+
amountMinor: string;
|
|
5424
|
+
precision: number;
|
|
5425
|
+
unit: "minor";
|
|
5426
|
+
};
|
|
5427
|
+
authorizationOutcome: "allowed";
|
|
5428
|
+
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
5429
|
+
requestUrl: string;
|
|
5430
|
+
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
5431
|
+
createdAt: string;
|
|
5432
|
+
confirmedAt?: string | undefined;
|
|
5433
|
+
merchantId?: string | undefined;
|
|
5434
|
+
confirmationSource?: "chain_observer" | undefined;
|
|
5435
|
+
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
5436
|
+
attributionBasis?: Record<string, unknown> | undefined;
|
|
5437
|
+
attributionRuleVersion?: string | undefined;
|
|
5438
|
+
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
5439
|
+
canonicalSettlementKey?: string | undefined;
|
|
5440
|
+
paymentReference?: string | undefined;
|
|
5441
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
5442
|
+
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
5443
|
+
settlementIdentifier?: string | undefined;
|
|
5444
|
+
supersededByReceiptId?: string | undefined;
|
|
5445
|
+
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
5446
|
+
completedAt?: string | undefined;
|
|
5447
|
+
};
|
|
5448
|
+
evidence?: Record<string, unknown> | undefined;
|
|
5449
|
+
}, {
|
|
5450
|
+
paidRequestId: string;
|
|
5451
|
+
paymentAttemptId: string;
|
|
5452
|
+
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
5453
|
+
fulfillmentStatus: "failed";
|
|
5454
|
+
merchantResponse: {
|
|
5455
|
+
status: number;
|
|
5456
|
+
headers?: Record<string, string> | undefined;
|
|
5457
|
+
body?: string | undefined;
|
|
5458
|
+
};
|
|
5459
|
+
outcome: "paid_fulfillment_failed";
|
|
5460
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5461
|
+
reason: string;
|
|
5462
|
+
receipt: {
|
|
5463
|
+
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5464
|
+
protocol: "x402" | "l402";
|
|
5465
|
+
receiptId: string;
|
|
5466
|
+
paidRequestId: string;
|
|
5467
|
+
paymentAttemptId: string;
|
|
5468
|
+
organizationId: string;
|
|
5469
|
+
agentId: string;
|
|
5470
|
+
money: {
|
|
5471
|
+
asset: string;
|
|
5472
|
+
amount: string;
|
|
5473
|
+
amountMinor: string;
|
|
5474
|
+
precision: number;
|
|
5475
|
+
unit: "minor";
|
|
5476
|
+
};
|
|
5477
|
+
authorizationOutcome: "allowed";
|
|
5478
|
+
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
5479
|
+
requestUrl: string;
|
|
5480
|
+
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
5481
|
+
createdAt: string;
|
|
5482
|
+
confirmedAt?: string | undefined;
|
|
5483
|
+
merchantId?: string | undefined;
|
|
5484
|
+
confirmationSource?: "chain_observer" | undefined;
|
|
5485
|
+
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
5486
|
+
attributionBasis?: Record<string, unknown> | undefined;
|
|
5487
|
+
attributionRuleVersion?: string | undefined;
|
|
5488
|
+
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
5489
|
+
canonicalSettlementKey?: string | undefined;
|
|
5490
|
+
paymentReference?: string | undefined;
|
|
5491
|
+
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
5492
|
+
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
5493
|
+
settlementIdentifier?: string | undefined;
|
|
5494
|
+
supersededByReceiptId?: string | undefined;
|
|
5495
|
+
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
5496
|
+
completedAt?: string | undefined;
|
|
5497
|
+
};
|
|
5498
|
+
evidence?: Record<string, unknown> | undefined;
|
|
5499
|
+
}>;
|
|
5500
|
+
export declare const sdkPaymentDecisionExecutionFailedResponseSchema: z.ZodObject<{
|
|
5501
|
+
outcome: z.ZodLiteral<"execution_failed">;
|
|
5502
|
+
paidRequestId: z.ZodString;
|
|
5503
|
+
paymentAttemptId: z.ZodString;
|
|
5504
|
+
reasonCode: z.ZodEnum<["merchant_rejected", "merchant_execution_failed"]>;
|
|
5505
|
+
reason: z.ZodString;
|
|
5506
|
+
merchantResponse: z.ZodObject<{
|
|
5507
|
+
status: z.ZodNumber;
|
|
5508
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5509
|
+
body: z.ZodDefault<z.ZodString>;
|
|
5510
|
+
}, "strip", z.ZodTypeAny, {
|
|
5511
|
+
status: number;
|
|
5512
|
+
headers: Record<string, string>;
|
|
5513
|
+
body: string;
|
|
5514
|
+
}, {
|
|
5515
|
+
status: number;
|
|
5516
|
+
headers?: Record<string, string> | undefined;
|
|
5517
|
+
body?: string | undefined;
|
|
5518
|
+
}>;
|
|
5519
|
+
evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5520
|
+
}, "strip", z.ZodTypeAny, {
|
|
5521
|
+
paidRequestId: string;
|
|
5522
|
+
paymentAttemptId: string;
|
|
5523
|
+
merchantResponse: {
|
|
5524
|
+
status: number;
|
|
5525
|
+
headers: Record<string, string>;
|
|
5526
|
+
body: string;
|
|
5527
|
+
};
|
|
5528
|
+
outcome: "execution_failed";
|
|
5529
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5530
|
+
reason: string;
|
|
5531
|
+
evidence?: Record<string, unknown> | undefined;
|
|
5532
|
+
}, {
|
|
5533
|
+
paidRequestId: string;
|
|
5534
|
+
paymentAttemptId: string;
|
|
5535
|
+
merchantResponse: {
|
|
5536
|
+
status: number;
|
|
5537
|
+
headers?: Record<string, string> | undefined;
|
|
5538
|
+
body?: string | undefined;
|
|
5539
|
+
};
|
|
5540
|
+
outcome: "execution_failed";
|
|
5541
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5542
|
+
reason: string;
|
|
5543
|
+
evidence?: Record<string, unknown> | undefined;
|
|
5544
|
+
}>;
|
|
5545
|
+
export declare const sdkPaymentDecisionPreflightFailedResponseSchema: z.ZodObject<{
|
|
5546
|
+
outcome: z.ZodLiteral<"preflight_failed">;
|
|
5547
|
+
paidRequestId: z.ZodString;
|
|
5548
|
+
paymentAttemptId: z.ZodString;
|
|
5549
|
+
reasonCode: z.ZodLiteral<"preflight_incompatible">;
|
|
5550
|
+
reason: z.ZodString;
|
|
5551
|
+
evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5552
|
+
}, "strip", z.ZodTypeAny, {
|
|
5553
|
+
paidRequestId: string;
|
|
5554
|
+
paymentAttemptId: string;
|
|
5555
|
+
outcome: "preflight_failed";
|
|
5556
|
+
reasonCode: "preflight_incompatible";
|
|
5557
|
+
reason: string;
|
|
5558
|
+
evidence?: Record<string, unknown> | undefined;
|
|
5559
|
+
}, {
|
|
5560
|
+
paidRequestId: string;
|
|
5561
|
+
paymentAttemptId: string;
|
|
5562
|
+
outcome: "preflight_failed";
|
|
5563
|
+
reasonCode: "preflight_incompatible";
|
|
5564
|
+
reason: string;
|
|
5565
|
+
evidence?: Record<string, unknown> | undefined;
|
|
5566
|
+
}>;
|
|
5567
|
+
export declare const sdkPaymentDecisionExecutingResponseSchema: z.ZodObject<{
|
|
5568
|
+
outcome: z.ZodLiteral<"executing">;
|
|
5569
|
+
paidRequestId: z.ZodString;
|
|
5570
|
+
paymentAttemptId: z.ZodString;
|
|
5571
|
+
reasonCode: z.ZodLiteral<"payment_execution_in_progress">;
|
|
5572
|
+
reason: z.ZodString;
|
|
5573
|
+
}, "strip", z.ZodTypeAny, {
|
|
5574
|
+
paidRequestId: string;
|
|
5575
|
+
paymentAttemptId: string;
|
|
5576
|
+
outcome: "executing";
|
|
5577
|
+
reasonCode: "payment_execution_in_progress";
|
|
5578
|
+
reason: string;
|
|
5579
|
+
}, {
|
|
5580
|
+
paidRequestId: string;
|
|
5581
|
+
paymentAttemptId: string;
|
|
5582
|
+
outcome: "executing";
|
|
5583
|
+
reasonCode: "payment_execution_in_progress";
|
|
5584
|
+
reason: string;
|
|
5585
|
+
}>;
|
|
5586
|
+
export declare const sdkPaymentDecisionInconclusiveResponseSchema: z.ZodObject<{
|
|
5587
|
+
outcome: z.ZodLiteral<"inconclusive">;
|
|
5588
|
+
paidRequestId: z.ZodString;
|
|
5589
|
+
paymentAttemptId: z.ZodString;
|
|
5590
|
+
reasonCode: z.ZodLiteral<"merchant_transport_lost">;
|
|
5591
|
+
reason: z.ZodString;
|
|
5592
|
+
evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5593
|
+
}, "strip", z.ZodTypeAny, {
|
|
5594
|
+
paidRequestId: string;
|
|
5595
|
+
paymentAttemptId: string;
|
|
5596
|
+
outcome: "inconclusive";
|
|
5597
|
+
reasonCode: "merchant_transport_lost";
|
|
5598
|
+
reason: string;
|
|
5599
|
+
evidence?: Record<string, unknown> | undefined;
|
|
5600
|
+
}, {
|
|
4555
5601
|
paidRequestId: string;
|
|
4556
5602
|
paymentAttemptId: string;
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
amount: string;
|
|
4562
|
-
amountMinor: string;
|
|
4563
|
-
precision: number;
|
|
4564
|
-
unit: "minor";
|
|
4565
|
-
};
|
|
4566
|
-
authorizationOutcome: "allowed";
|
|
4567
|
-
reconciliationStatus: "none" | "refunded" | "required" | "in_progress" | "resolved";
|
|
4568
|
-
requestUrl: string;
|
|
4569
|
-
requestMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4570
|
-
createdAt: string;
|
|
4571
|
-
confirmedAt?: string | undefined;
|
|
4572
|
-
merchantId?: string | undefined;
|
|
4573
|
-
confirmationSource?: "chain_observer" | undefined;
|
|
4574
|
-
attributionStrength?: "strong_request_scoped" | "constrained_unique" | undefined;
|
|
4575
|
-
attributionBasis?: Record<string, unknown> | undefined;
|
|
4576
|
-
attributionRuleVersion?: string | undefined;
|
|
4577
|
-
finalityLevelUsed?: "evm_block_confirmations_12" | "solana_commitment_finalized" | undefined;
|
|
4578
|
-
canonicalSettlementKey?: string | undefined;
|
|
4579
|
-
paymentReference?: string | undefined;
|
|
4580
|
-
evidenceSource?: "merchant" | "local_simulation" | undefined;
|
|
4581
|
-
settlementEvidenceClass?: "none" | "inconclusive" | "merchant_verifiable_success" | "settled" | undefined;
|
|
4582
|
-
settlementIdentifier?: string | undefined;
|
|
4583
|
-
supersededByReceiptId?: string | undefined;
|
|
4584
|
-
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
4585
|
-
completedAt?: string | undefined;
|
|
5603
|
+
outcome: "inconclusive";
|
|
5604
|
+
reasonCode: "merchant_transport_lost";
|
|
5605
|
+
reason: string;
|
|
5606
|
+
evidence?: Record<string, unknown> | undefined;
|
|
4586
5607
|
}>;
|
|
4587
|
-
export
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
5608
|
+
export declare const sdkPaymentDecisionDenyResponseSchema: z.ZodObject<{
|
|
5609
|
+
outcome: z.ZodLiteral<"deny">;
|
|
5610
|
+
paidRequestId: z.ZodOptional<z.ZodString>;
|
|
5611
|
+
reasonCode: z.ZodEnum<["policy_allow", "policy_denied", "policy_review_required", "challenge_candidate_malformed", "challenge_no_supported_candidates", "challenge_mixed_environment_candidates", "challenge_execution_identity_unavailable", "challenge_execution_identity_ambiguous", "payment_execution_in_progress", "preflight_incompatible", "merchant_rejected", "merchant_execution_failed", "settlement_proof_conflict", "merchant_transport_lost"]>;
|
|
5612
|
+
reason: z.ZodString;
|
|
5613
|
+
policyReviewEventId: z.ZodOptional<z.ZodString>;
|
|
4593
5614
|
}, "strip", z.ZodTypeAny, {
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
5615
|
+
outcome: "deny";
|
|
5616
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
5617
|
+
reason: string;
|
|
5618
|
+
paidRequestId?: string | undefined;
|
|
5619
|
+
policyReviewEventId?: string | undefined;
|
|
4597
5620
|
}, {
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
5621
|
+
outcome: "deny";
|
|
5622
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
5623
|
+
reason: string;
|
|
5624
|
+
paidRequestId?: string | undefined;
|
|
5625
|
+
policyReviewEventId?: string | undefined;
|
|
4601
5626
|
}>;
|
|
4602
|
-
|
|
4603
|
-
export declare const
|
|
5627
|
+
/** Full union of decision outcomes the control plane can return to the SDK. */
|
|
5628
|
+
export declare const sdkPaymentDecisionResponseSchema: z.ZodDiscriminatedUnion<"outcome", [z.ZodObject<{
|
|
4604
5629
|
outcome: z.ZodLiteral<"allow">;
|
|
4605
5630
|
paidRequestId: z.ZodString;
|
|
4606
5631
|
paymentAttemptId: z.ZodString;
|
|
@@ -4752,14 +5777,14 @@ export declare const sdkPaymentDecisionAllowResponseSchema: z.ZodObject<{
|
|
|
4752
5777
|
}, "strip", z.ZodTypeAny, {
|
|
4753
5778
|
paidRequestId: string;
|
|
4754
5779
|
paymentAttemptId: string;
|
|
4755
|
-
outcome: "allow";
|
|
4756
|
-
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4757
|
-
reason: string;
|
|
4758
5780
|
merchantResponse: {
|
|
4759
5781
|
status: number;
|
|
4760
5782
|
headers: Record<string, string>;
|
|
4761
5783
|
body: string;
|
|
4762
5784
|
};
|
|
5785
|
+
outcome: "allow";
|
|
5786
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
5787
|
+
reason: string;
|
|
4763
5788
|
receipt: {
|
|
4764
5789
|
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
4765
5790
|
protocol: "x402" | "l402";
|
|
@@ -4799,14 +5824,14 @@ export declare const sdkPaymentDecisionAllowResponseSchema: z.ZodObject<{
|
|
|
4799
5824
|
}, {
|
|
4800
5825
|
paidRequestId: string;
|
|
4801
5826
|
paymentAttemptId: string;
|
|
4802
|
-
outcome: "allow";
|
|
4803
|
-
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
4804
|
-
reason: string;
|
|
4805
5827
|
merchantResponse: {
|
|
4806
5828
|
status: number;
|
|
4807
5829
|
headers?: Record<string, string> | undefined;
|
|
4808
5830
|
body?: string | undefined;
|
|
4809
5831
|
};
|
|
5832
|
+
outcome: "allow";
|
|
5833
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
5834
|
+
reason: string;
|
|
4810
5835
|
receipt: {
|
|
4811
5836
|
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
4812
5837
|
protocol: "x402" | "l402";
|
|
@@ -4843,8 +5868,7 @@ export declare const sdkPaymentDecisionAllowResponseSchema: z.ZodObject<{
|
|
|
4843
5868
|
fulfillmentStatus?: "inconclusive" | "succeeded" | "failed" | undefined;
|
|
4844
5869
|
completedAt?: string | undefined;
|
|
4845
5870
|
};
|
|
4846
|
-
}
|
|
4847
|
-
export declare const sdkPaymentDecisionPaidFulfillmentFailedResponseSchema: z.ZodObject<{
|
|
5871
|
+
}>, z.ZodObject<{
|
|
4848
5872
|
outcome: z.ZodLiteral<"paid_fulfillment_failed">;
|
|
4849
5873
|
paidRequestId: z.ZodString;
|
|
4850
5874
|
paymentAttemptId: z.ZodString;
|
|
@@ -5001,14 +6025,14 @@ export declare const sdkPaymentDecisionPaidFulfillmentFailedResponseSchema: z.Zo
|
|
|
5001
6025
|
paymentAttemptId: string;
|
|
5002
6026
|
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
5003
6027
|
fulfillmentStatus: "failed";
|
|
5004
|
-
outcome: "paid_fulfillment_failed";
|
|
5005
|
-
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5006
|
-
reason: string;
|
|
5007
6028
|
merchantResponse: {
|
|
5008
6029
|
status: number;
|
|
5009
6030
|
headers: Record<string, string>;
|
|
5010
6031
|
body: string;
|
|
5011
6032
|
};
|
|
6033
|
+
outcome: "paid_fulfillment_failed";
|
|
6034
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
6035
|
+
reason: string;
|
|
5012
6036
|
receipt: {
|
|
5013
6037
|
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5014
6038
|
protocol: "x402" | "l402";
|
|
@@ -5051,14 +6075,14 @@ export declare const sdkPaymentDecisionPaidFulfillmentFailedResponseSchema: z.Zo
|
|
|
5051
6075
|
paymentAttemptId: string;
|
|
5052
6076
|
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
5053
6077
|
fulfillmentStatus: "failed";
|
|
5054
|
-
outcome: "paid_fulfillment_failed";
|
|
5055
|
-
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5056
|
-
reason: string;
|
|
5057
6078
|
merchantResponse: {
|
|
5058
6079
|
status: number;
|
|
5059
6080
|
headers?: Record<string, string> | undefined;
|
|
5060
6081
|
body?: string | undefined;
|
|
5061
6082
|
};
|
|
6083
|
+
outcome: "paid_fulfillment_failed";
|
|
6084
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
6085
|
+
reason: string;
|
|
5062
6086
|
receipt: {
|
|
5063
6087
|
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5064
6088
|
protocol: "x402" | "l402";
|
|
@@ -5096,53 +6120,25 @@ export declare const sdkPaymentDecisionPaidFulfillmentFailedResponseSchema: z.Zo
|
|
|
5096
6120
|
completedAt?: string | undefined;
|
|
5097
6121
|
};
|
|
5098
6122
|
evidence?: Record<string, unknown> | undefined;
|
|
5099
|
-
}
|
|
5100
|
-
|
|
5101
|
-
outcome: z.ZodLiteral<"execution_failed">;
|
|
6123
|
+
}>, z.ZodObject<{
|
|
6124
|
+
outcome: z.ZodLiteral<"executing">;
|
|
5102
6125
|
paidRequestId: z.ZodString;
|
|
5103
6126
|
paymentAttemptId: z.ZodString;
|
|
5104
|
-
reasonCode: z.
|
|
6127
|
+
reasonCode: z.ZodLiteral<"payment_execution_in_progress">;
|
|
5105
6128
|
reason: z.ZodString;
|
|
5106
|
-
merchantResponse: z.ZodObject<{
|
|
5107
|
-
status: z.ZodNumber;
|
|
5108
|
-
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5109
|
-
body: z.ZodDefault<z.ZodString>;
|
|
5110
|
-
}, "strip", z.ZodTypeAny, {
|
|
5111
|
-
status: number;
|
|
5112
|
-
headers: Record<string, string>;
|
|
5113
|
-
body: string;
|
|
5114
|
-
}, {
|
|
5115
|
-
status: number;
|
|
5116
|
-
headers?: Record<string, string> | undefined;
|
|
5117
|
-
body?: string | undefined;
|
|
5118
|
-
}>;
|
|
5119
|
-
evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5120
6129
|
}, "strip", z.ZodTypeAny, {
|
|
5121
6130
|
paidRequestId: string;
|
|
5122
6131
|
paymentAttemptId: string;
|
|
5123
|
-
outcome: "
|
|
5124
|
-
reasonCode: "
|
|
6132
|
+
outcome: "executing";
|
|
6133
|
+
reasonCode: "payment_execution_in_progress";
|
|
5125
6134
|
reason: string;
|
|
5126
|
-
merchantResponse: {
|
|
5127
|
-
status: number;
|
|
5128
|
-
headers: Record<string, string>;
|
|
5129
|
-
body: string;
|
|
5130
|
-
};
|
|
5131
|
-
evidence?: Record<string, unknown> | undefined;
|
|
5132
6135
|
}, {
|
|
5133
6136
|
paidRequestId: string;
|
|
5134
6137
|
paymentAttemptId: string;
|
|
5135
|
-
outcome: "
|
|
5136
|
-
reasonCode: "
|
|
6138
|
+
outcome: "executing";
|
|
6139
|
+
reasonCode: "payment_execution_in_progress";
|
|
5137
6140
|
reason: string;
|
|
5138
|
-
|
|
5139
|
-
status: number;
|
|
5140
|
-
headers?: Record<string, string> | undefined;
|
|
5141
|
-
body?: string | undefined;
|
|
5142
|
-
};
|
|
5143
|
-
evidence?: Record<string, unknown> | undefined;
|
|
5144
|
-
}>;
|
|
5145
|
-
export declare const sdkPaymentDecisionPreflightFailedResponseSchema: z.ZodObject<{
|
|
6141
|
+
}>, z.ZodObject<{
|
|
5146
6142
|
outcome: z.ZodLiteral<"preflight_failed">;
|
|
5147
6143
|
paidRequestId: z.ZodString;
|
|
5148
6144
|
paymentAttemptId: z.ZodString;
|
|
@@ -5163,27 +6159,51 @@ export declare const sdkPaymentDecisionPreflightFailedResponseSchema: z.ZodObjec
|
|
|
5163
6159
|
reasonCode: "preflight_incompatible";
|
|
5164
6160
|
reason: string;
|
|
5165
6161
|
evidence?: Record<string, unknown> | undefined;
|
|
5166
|
-
}
|
|
5167
|
-
|
|
5168
|
-
outcome: z.ZodLiteral<"executing">;
|
|
6162
|
+
}>, z.ZodObject<{
|
|
6163
|
+
outcome: z.ZodLiteral<"execution_failed">;
|
|
5169
6164
|
paidRequestId: z.ZodString;
|
|
5170
6165
|
paymentAttemptId: z.ZodString;
|
|
5171
|
-
reasonCode: z.
|
|
6166
|
+
reasonCode: z.ZodEnum<["merchant_rejected", "merchant_execution_failed"]>;
|
|
5172
6167
|
reason: z.ZodString;
|
|
6168
|
+
merchantResponse: z.ZodObject<{
|
|
6169
|
+
status: z.ZodNumber;
|
|
6170
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6171
|
+
body: z.ZodDefault<z.ZodString>;
|
|
6172
|
+
}, "strip", z.ZodTypeAny, {
|
|
6173
|
+
status: number;
|
|
6174
|
+
headers: Record<string, string>;
|
|
6175
|
+
body: string;
|
|
6176
|
+
}, {
|
|
6177
|
+
status: number;
|
|
6178
|
+
headers?: Record<string, string> | undefined;
|
|
6179
|
+
body?: string | undefined;
|
|
6180
|
+
}>;
|
|
6181
|
+
evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5173
6182
|
}, "strip", z.ZodTypeAny, {
|
|
5174
6183
|
paidRequestId: string;
|
|
5175
6184
|
paymentAttemptId: string;
|
|
5176
|
-
|
|
5177
|
-
|
|
6185
|
+
merchantResponse: {
|
|
6186
|
+
status: number;
|
|
6187
|
+
headers: Record<string, string>;
|
|
6188
|
+
body: string;
|
|
6189
|
+
};
|
|
6190
|
+
outcome: "execution_failed";
|
|
6191
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5178
6192
|
reason: string;
|
|
6193
|
+
evidence?: Record<string, unknown> | undefined;
|
|
5179
6194
|
}, {
|
|
5180
6195
|
paidRequestId: string;
|
|
5181
6196
|
paymentAttemptId: string;
|
|
5182
|
-
|
|
5183
|
-
|
|
6197
|
+
merchantResponse: {
|
|
6198
|
+
status: number;
|
|
6199
|
+
headers?: Record<string, string> | undefined;
|
|
6200
|
+
body?: string | undefined;
|
|
6201
|
+
};
|
|
6202
|
+
outcome: "execution_failed";
|
|
6203
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5184
6204
|
reason: string;
|
|
5185
|
-
|
|
5186
|
-
|
|
6205
|
+
evidence?: Record<string, unknown> | undefined;
|
|
6206
|
+
}>, z.ZodObject<{
|
|
5187
6207
|
outcome: z.ZodLiteral<"inconclusive">;
|
|
5188
6208
|
paidRequestId: z.ZodString;
|
|
5189
6209
|
paymentAttemptId: z.ZodString;
|
|
@@ -5204,8 +6224,7 @@ export declare const sdkPaymentDecisionInconclusiveResponseSchema: z.ZodObject<{
|
|
|
5204
6224
|
reasonCode: "merchant_transport_lost";
|
|
5205
6225
|
reason: string;
|
|
5206
6226
|
evidence?: Record<string, unknown> | undefined;
|
|
5207
|
-
}
|
|
5208
|
-
export declare const sdkPaymentDecisionDenyResponseSchema: z.ZodObject<{
|
|
6227
|
+
}>, z.ZodObject<{
|
|
5209
6228
|
outcome: z.ZodLiteral<"deny">;
|
|
5210
6229
|
paidRequestId: z.ZodOptional<z.ZodString>;
|
|
5211
6230
|
reasonCode: z.ZodEnum<["policy_allow", "policy_denied", "policy_review_required", "challenge_candidate_malformed", "challenge_no_supported_candidates", "challenge_mixed_environment_candidates", "challenge_execution_identity_unavailable", "challenge_execution_identity_ambiguous", "payment_execution_in_progress", "preflight_incompatible", "merchant_rejected", "merchant_execution_failed", "settlement_proof_conflict", "merchant_transport_lost"]>;
|
|
@@ -5223,9 +6242,27 @@ export declare const sdkPaymentDecisionDenyResponseSchema: z.ZodObject<{
|
|
|
5223
6242
|
reason: string;
|
|
5224
6243
|
paidRequestId?: string | undefined;
|
|
5225
6244
|
policyReviewEventId?: string | undefined;
|
|
5226
|
-
}>;
|
|
5227
|
-
|
|
5228
|
-
export declare const
|
|
6245
|
+
}>]>;
|
|
6246
|
+
export type SdkPaymentDecisionResponse = z.infer<typeof sdkPaymentDecisionResponseSchema>;
|
|
6247
|
+
export declare const sdkPaymentAuthorizationResponseSchema: z.ZodDiscriminatedUnion<"outcome", [z.ZodObject<{
|
|
6248
|
+
outcome: z.ZodLiteral<"authorized">;
|
|
6249
|
+
paidRequestId: z.ZodString;
|
|
6250
|
+
paymentAttemptId: z.ZodString;
|
|
6251
|
+
reasonCode: z.ZodEnum<["policy_allow", "policy_denied", "policy_review_required", "challenge_candidate_malformed", "challenge_no_supported_candidates", "challenge_mixed_environment_candidates", "challenge_execution_identity_unavailable", "challenge_execution_identity_ambiguous", "payment_execution_in_progress", "preflight_incompatible", "merchant_rejected", "merchant_execution_failed", "settlement_proof_conflict", "merchant_transport_lost"]>;
|
|
6252
|
+
reason: z.ZodString;
|
|
6253
|
+
}, "strip", z.ZodTypeAny, {
|
|
6254
|
+
paidRequestId: string;
|
|
6255
|
+
paymentAttemptId: string;
|
|
6256
|
+
outcome: "authorized";
|
|
6257
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
6258
|
+
reason: string;
|
|
6259
|
+
}, {
|
|
6260
|
+
paidRequestId: string;
|
|
6261
|
+
paymentAttemptId: string;
|
|
6262
|
+
outcome: "authorized";
|
|
6263
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
6264
|
+
reason: string;
|
|
6265
|
+
}>, z.ZodObject<{
|
|
5229
6266
|
outcome: z.ZodLiteral<"allow">;
|
|
5230
6267
|
paidRequestId: z.ZodString;
|
|
5231
6268
|
paymentAttemptId: z.ZodString;
|
|
@@ -5377,14 +6414,14 @@ export declare const sdkPaymentDecisionResponseSchema: z.ZodDiscriminatedUnion<"
|
|
|
5377
6414
|
}, "strip", z.ZodTypeAny, {
|
|
5378
6415
|
paidRequestId: string;
|
|
5379
6416
|
paymentAttemptId: string;
|
|
5380
|
-
outcome: "allow";
|
|
5381
|
-
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
5382
|
-
reason: string;
|
|
5383
6417
|
merchantResponse: {
|
|
5384
6418
|
status: number;
|
|
5385
6419
|
headers: Record<string, string>;
|
|
5386
6420
|
body: string;
|
|
5387
6421
|
};
|
|
6422
|
+
outcome: "allow";
|
|
6423
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
6424
|
+
reason: string;
|
|
5388
6425
|
receipt: {
|
|
5389
6426
|
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5390
6427
|
protocol: "x402" | "l402";
|
|
@@ -5424,14 +6461,14 @@ export declare const sdkPaymentDecisionResponseSchema: z.ZodDiscriminatedUnion<"
|
|
|
5424
6461
|
}, {
|
|
5425
6462
|
paidRequestId: string;
|
|
5426
6463
|
paymentAttemptId: string;
|
|
5427
|
-
outcome: "allow";
|
|
5428
|
-
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
5429
|
-
reason: string;
|
|
5430
6464
|
merchantResponse: {
|
|
5431
6465
|
status: number;
|
|
5432
6466
|
headers?: Record<string, string> | undefined;
|
|
5433
6467
|
body?: string | undefined;
|
|
5434
6468
|
};
|
|
6469
|
+
outcome: "allow";
|
|
6470
|
+
reasonCode: "policy_allow" | "policy_denied" | "policy_review_required" | "challenge_candidate_malformed" | "challenge_no_supported_candidates" | "challenge_mixed_environment_candidates" | "challenge_execution_identity_unavailable" | "challenge_execution_identity_ambiguous" | "payment_execution_in_progress" | "preflight_incompatible" | "merchant_rejected" | "merchant_execution_failed" | "settlement_proof_conflict" | "merchant_transport_lost";
|
|
6471
|
+
reason: string;
|
|
5435
6472
|
receipt: {
|
|
5436
6473
|
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5437
6474
|
protocol: "x402" | "l402";
|
|
@@ -5625,14 +6662,14 @@ export declare const sdkPaymentDecisionResponseSchema: z.ZodDiscriminatedUnion<"
|
|
|
5625
6662
|
paymentAttemptId: string;
|
|
5626
6663
|
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
5627
6664
|
fulfillmentStatus: "failed";
|
|
5628
|
-
outcome: "paid_fulfillment_failed";
|
|
5629
|
-
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5630
|
-
reason: string;
|
|
5631
6665
|
merchantResponse: {
|
|
5632
6666
|
status: number;
|
|
5633
6667
|
headers: Record<string, string>;
|
|
5634
6668
|
body: string;
|
|
5635
6669
|
};
|
|
6670
|
+
outcome: "paid_fulfillment_failed";
|
|
6671
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
6672
|
+
reason: string;
|
|
5636
6673
|
receipt: {
|
|
5637
6674
|
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5638
6675
|
protocol: "x402" | "l402";
|
|
@@ -5675,14 +6712,14 @@ export declare const sdkPaymentDecisionResponseSchema: z.ZodDiscriminatedUnion<"
|
|
|
5675
6712
|
paymentAttemptId: string;
|
|
5676
6713
|
settlementEvidenceClass: "none" | "inconclusive" | "merchant_verifiable_success" | "settled";
|
|
5677
6714
|
fulfillmentStatus: "failed";
|
|
5678
|
-
outcome: "paid_fulfillment_failed";
|
|
5679
|
-
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5680
|
-
reason: string;
|
|
5681
6715
|
merchantResponse: {
|
|
5682
6716
|
status: number;
|
|
5683
6717
|
headers?: Record<string, string> | undefined;
|
|
5684
6718
|
body?: string | undefined;
|
|
5685
6719
|
};
|
|
6720
|
+
outcome: "paid_fulfillment_failed";
|
|
6721
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
6722
|
+
reason: string;
|
|
5686
6723
|
receipt: {
|
|
5687
6724
|
status: "confirmed" | "provisional" | "expired_unconfirmed" | "refunded" | "void";
|
|
5688
6725
|
protocol: "x402" | "l402";
|
|
@@ -5782,26 +6819,26 @@ export declare const sdkPaymentDecisionResponseSchema: z.ZodDiscriminatedUnion<"
|
|
|
5782
6819
|
}, "strip", z.ZodTypeAny, {
|
|
5783
6820
|
paidRequestId: string;
|
|
5784
6821
|
paymentAttemptId: string;
|
|
5785
|
-
outcome: "execution_failed";
|
|
5786
|
-
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5787
|
-
reason: string;
|
|
5788
6822
|
merchantResponse: {
|
|
5789
6823
|
status: number;
|
|
5790
6824
|
headers: Record<string, string>;
|
|
5791
6825
|
body: string;
|
|
5792
6826
|
};
|
|
6827
|
+
outcome: "execution_failed";
|
|
6828
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
6829
|
+
reason: string;
|
|
5793
6830
|
evidence?: Record<string, unknown> | undefined;
|
|
5794
6831
|
}, {
|
|
5795
6832
|
paidRequestId: string;
|
|
5796
6833
|
paymentAttemptId: string;
|
|
5797
|
-
outcome: "execution_failed";
|
|
5798
|
-
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
5799
|
-
reason: string;
|
|
5800
6834
|
merchantResponse: {
|
|
5801
6835
|
status: number;
|
|
5802
6836
|
headers?: Record<string, string> | undefined;
|
|
5803
6837
|
body?: string | undefined;
|
|
5804
6838
|
};
|
|
6839
|
+
outcome: "execution_failed";
|
|
6840
|
+
reasonCode: "merchant_rejected" | "merchant_execution_failed";
|
|
6841
|
+
reason: string;
|
|
5805
6842
|
evidence?: Record<string, unknown> | undefined;
|
|
5806
6843
|
}>, z.ZodObject<{
|
|
5807
6844
|
outcome: z.ZodLiteral<"inconclusive">;
|
|
@@ -5843,7 +6880,7 @@ export declare const sdkPaymentDecisionResponseSchema: z.ZodDiscriminatedUnion<"
|
|
|
5843
6880
|
paidRequestId?: string | undefined;
|
|
5844
6881
|
policyReviewEventId?: string | undefined;
|
|
5845
6882
|
}>]>;
|
|
5846
|
-
export type
|
|
6883
|
+
export type SdkPaymentAuthorizationResponse = z.infer<typeof sdkPaymentAuthorizationResponseSchema>;
|
|
5847
6884
|
/** Receipt lookup response returned by AgentPayClient.lookupReceipt(). */
|
|
5848
6885
|
export declare const sdkReceiptResponseSchema: z.ZodObject<{
|
|
5849
6886
|
receipt: z.ZodObject<{
|