Skip to content

Commit eed3e7b

Browse files
feat: Deliver Kernel card details through fill
Stainless-Generated-From: 9e1188cd7d4ff2411cf480d9989938bb90840560
1 parent 84a69ad commit eed3e7b

6 files changed

Lines changed: 79 additions & 6 deletions

File tree

‎src/kernel/resources/vaults/items.py‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,9 @@ def perform_operation(
434434
return HTTP 429 and retain the card item; stop, back off, and retry the same
435435
authorize operation.
436436
437+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
438+
submit checkout promptly after filling. A repeated fill is safe.
439+
437440
Fill returns a value-free execution result. Validation failures before writing
438441
return 400 (invalid request or targets), 403 (access or destination denied), 404
439442
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -487,6 +490,9 @@ def perform_operation(
487490
return HTTP 429 and retain the card item; stop, back off, and retry the same
488491
authorize operation.
489492
493+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
494+
submit checkout promptly after filling. A repeated fill is safe.
495+
490496
Fill returns a value-free execution result. Validation failures before writing
491497
return 400 (invalid request or targets), 403 (access or destination denied), 404
492498
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -542,6 +548,9 @@ def perform_operation(
542548
return HTTP 429 and retain the card item; stop, back off, and retry the same
543549
authorize operation.
544550
551+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
552+
submit checkout promptly after filling. A repeated fill is safe.
553+
545554
Fill returns a value-free execution result. Validation failures before writing
546555
return 400 (invalid request or targets), 403 (access or destination denied), 404
547556
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -596,6 +605,9 @@ def perform_operation(
596605
return HTTP 429 and retain the card item; stop, back off, and retry the same
597606
authorize operation.
598607
608+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
609+
submit checkout promptly after filling. A repeated fill is safe.
610+
599611
Fill returns a value-free execution result. Validation failures before writing
600612
return 400 (invalid request or targets), 403 (access or destination denied), 404
601613
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -645,6 +657,9 @@ def perform_operation(
645657
return HTTP 429 and retain the card item; stop, back off, and retry the same
646658
authorize operation.
647659
660+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
661+
submit checkout promptly after filling. A repeated fill is safe.
662+
648663
Fill returns a value-free execution result. Validation failures before writing
649664
return 400 (invalid request or targets), 403 (access or destination denied), 404
650665
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -703,6 +718,9 @@ def perform_operation(
703718
return HTTP 429 and retain the card item; stop, back off, and retry the same
704719
authorize operation.
705720
721+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
722+
submit checkout promptly after filling. A repeated fill is safe.
723+
706724
Fill returns a value-free execution result. Validation failures before writing
707725
return 400 (invalid request or targets), 403 (access or destination denied), 404
708726
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -772,6 +790,9 @@ def perform_operation(
772790
return HTTP 429 and retain the card item; stop, back off, and retry the same
773791
authorize operation.
774792
793+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
794+
submit checkout promptly after filling. A repeated fill is safe.
795+
775796
Fill returns a value-free execution result. Validation failures before writing
776797
return 400 (invalid request or targets), 403 (access or destination denied), 404
777798
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -821,6 +842,9 @@ def perform_operation(
821842
return HTTP 429 and retain the card item; stop, back off, and retry the same
822843
authorize operation.
823844
845+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
846+
submit checkout promptly after filling. A repeated fill is safe.
847+
824848
Fill returns a value-free execution result. Validation failures before writing
825849
return 400 (invalid request or targets), 403 (access or destination denied), 404
826850
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -873,6 +897,9 @@ def perform_operation(
873897
return HTTP 429 and retain the card item; stop, back off, and retry the same
874898
authorize operation.
875899
900+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
901+
submit checkout promptly after filling. A repeated fill is safe.
902+
876903
Fill returns a value-free execution result. Validation failures before writing
877904
return 400 (invalid request or targets), 403 (access or destination denied), 404
878905
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -929,6 +956,9 @@ def perform_operation(
929956
return HTTP 429 and retain the card item; stop, back off, and retry the same
930957
authorize operation.
931958
959+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
960+
submit checkout promptly after filling. A repeated fill is safe.
961+
932962
Fill returns a value-free execution result. Validation failures before writing
933963
return 400 (invalid request or targets), 403 (access or destination denied), 404
934964
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -979,6 +1009,9 @@ def perform_operation(
9791009
return HTTP 429 and retain the card item; stop, back off, and retry the same
9801010
authorize operation.
9811011
1012+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
1013+
submit checkout promptly after filling. A repeated fill is safe.
1014+
9821015
Fill returns a value-free execution result. Validation failures before writing
9831016
return 400 (invalid request or targets), 403 (access or destination denied), 404
9841017
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -1035,6 +1068,9 @@ def perform_operation(
10351068
return HTTP 429 and retain the card item; stop, back off, and retry the same
10361069
authorize operation.
10371070
1071+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
1072+
submit checkout promptly after filling. A repeated fill is safe.
1073+
10381074
Fill returns a value-free execution result. Validation failures before writing
10391075
return 400 (invalid request or targets), 403 (access or destination denied), 404
10401076
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -1770,6 +1806,9 @@ async def perform_operation(
17701806
return HTTP 429 and retain the card item; stop, back off, and retry the same
17711807
authorize operation.
17721808
1809+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
1810+
submit checkout promptly after filling. A repeated fill is safe.
1811+
17731812
Fill returns a value-free execution result. Validation failures before writing
17741813
return 400 (invalid request or targets), 403 (access or destination denied), 404
17751814
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -1823,6 +1862,9 @@ async def perform_operation(
18231862
return HTTP 429 and retain the card item; stop, back off, and retry the same
18241863
authorize operation.
18251864
1865+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
1866+
submit checkout promptly after filling. A repeated fill is safe.
1867+
18261868
Fill returns a value-free execution result. Validation failures before writing
18271869
return 400 (invalid request or targets), 403 (access or destination denied), 404
18281870
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -1878,6 +1920,9 @@ async def perform_operation(
18781920
return HTTP 429 and retain the card item; stop, back off, and retry the same
18791921
authorize operation.
18801922
1923+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
1924+
submit checkout promptly after filling. A repeated fill is safe.
1925+
18811926
Fill returns a value-free execution result. Validation failures before writing
18821927
return 400 (invalid request or targets), 403 (access or destination denied), 404
18831928
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -1932,6 +1977,9 @@ async def perform_operation(
19321977
return HTTP 429 and retain the card item; stop, back off, and retry the same
19331978
authorize operation.
19341979
1980+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
1981+
submit checkout promptly after filling. A repeated fill is safe.
1982+
19351983
Fill returns a value-free execution result. Validation failures before writing
19361984
return 400 (invalid request or targets), 403 (access or destination denied), 404
19371985
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -1981,6 +2029,9 @@ async def perform_operation(
19812029
return HTTP 429 and retain the card item; stop, back off, and retry the same
19822030
authorize operation.
19832031
2032+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
2033+
submit checkout promptly after filling. A repeated fill is safe.
2034+
19842035
Fill returns a value-free execution result. Validation failures before writing
19852036
return 400 (invalid request or targets), 403 (access or destination denied), 404
19862037
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -2039,6 +2090,9 @@ async def perform_operation(
20392090
return HTTP 429 and retain the card item; stop, back off, and retry the same
20402091
authorize operation.
20412092
2093+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
2094+
submit checkout promptly after filling. A repeated fill is safe.
2095+
20422096
Fill returns a value-free execution result. Validation failures before writing
20432097
return 400 (invalid request or targets), 403 (access or destination denied), 404
20442098
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -2108,6 +2162,9 @@ async def perform_operation(
21082162
return HTTP 429 and retain the card item; stop, back off, and retry the same
21092163
authorize operation.
21102164
2165+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
2166+
submit checkout promptly after filling. A repeated fill is safe.
2167+
21112168
Fill returns a value-free execution result. Validation failures before writing
21122169
return 400 (invalid request or targets), 403 (access or destination denied), 404
21132170
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -2157,6 +2214,9 @@ async def perform_operation(
21572214
return HTTP 429 and retain the card item; stop, back off, and retry the same
21582215
authorize operation.
21592216
2217+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
2218+
submit checkout promptly after filling. A repeated fill is safe.
2219+
21602220
Fill returns a value-free execution result. Validation failures before writing
21612221
return 400 (invalid request or targets), 403 (access or destination denied), 404
21622222
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -2209,6 +2269,9 @@ async def perform_operation(
22092269
return HTTP 429 and retain the card item; stop, back off, and retry the same
22102270
authorize operation.
22112271
2272+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
2273+
submit checkout promptly after filling. A repeated fill is safe.
2274+
22122275
Fill returns a value-free execution result. Validation failures before writing
22132276
return 400 (invalid request or targets), 403 (access or destination denied), 404
22142277
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -2265,6 +2328,9 @@ async def perform_operation(
22652328
return HTTP 429 and retain the card item; stop, back off, and retry the same
22662329
authorize operation.
22672330
2331+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
2332+
submit checkout promptly after filling. A repeated fill is safe.
2333+
22682334
Fill returns a value-free execution result. Validation failures before writing
22692335
return 400 (invalid request or targets), 403 (access or destination denied), 404
22702336
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -2315,6 +2381,9 @@ async def perform_operation(
23152381
return HTTP 429 and retain the card item; stop, back off, and retry the same
23162382
authorize operation.
23172383
2384+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
2385+
submit checkout promptly after filling. A repeated fill is safe.
2386+
23182387
Fill returns a value-free execution result. Validation failures before writing
23192388
return 400 (invalid request or targets), 403 (access or destination denied), 404
23202389
(resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -2371,6 +2440,9 @@ async def perform_operation(
23712440
return HTTP 429 and retain the card item; stop, back off, and retry the same
23722441
authorize operation.
23732442
2443+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
2444+
submit checkout promptly after filling. A repeated fill is safe.
2445+
23742446
Fill returns a value-free execution result. Validation failures before writing
23752447
return 400 (invalid request or targets), 403 (access or destination denied), 404
23762448
(resource not found), or 409 (item or browser not ready). Once writing starts,

‎src/kernel/types/vaults/kernel_card_state.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ def __getattr__(self, attr: str) -> str: ...
3232

3333

3434
class KernelCardState(BaseModel):
35-
"""
36-
A ready Kernel card retains its encrypted network token and one-time code for the fill operation until the item's expires_at. Fill and submit checkout before then. Visa purchases require a spend_approval action before the code is issued; Mastercard purchases need no hosted approval. masks.last4 is the enrolled card's last four digits; masks.token_last4 is the network token's last four digits shown to the merchant. Kernel cards do not expose aliases or support egress substitution. Kernel does not observe whether the merchant charged the card.
35+
"""A ready Kernel card supports authorize, fill, then submit checkout.
36+
37+
Card details are delivered for a few minutes after fill; submit promptly. Repeated fill is safe and never submits checkout. Visa purchases require a spend_approval action before details are issued; Mastercard purchases need no hosted approval. masks.last4 is the enrolled card's last four digits; masks.token_last4, when present, is the token's last four digits shown to the merchant. Kernel does not observe whether the merchant charged the card.
3738
"""
3839

3940
provider: Literal["kernel"]

‎src/kernel/types/vaults/kernel_card_vault_item_spec.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class KernelCardVaultItemSpec(BaseModel):
1212
"""One live purchase with a Kernel-enrolled card.
1313
14-
Authorization obtains an agentic network token number, expiry and one-time 3-digit code. They are stored encrypted for the fill operation, which types them only on merchant_url's origin; the merchant's own checkout submits the payment. The one-time code is valid until the item's expires_at; fill and submit checkout before then. Mastercard purchases need no cardholder approval. A Visa purchase returns a spend_approval action: the cardholder approves it with a Visa passkey, and Kernel registers a Visa intent for one transaction up to the amount before issuing the code. Card updates are not supported; delete and create a new item instead.
14+
Authorization obtains an agentic network token number, expiry and one-time 3-digit code. They are stored encrypted for the fill operation, which types them only on merchant_url's origin; the merchant's own checkout submits the payment. The one-time code is valid until the item's expires_at; fill and submit checkout before then. Mastercard purchases need no cardholder approval. A Visa purchase returns a spend_approval action: the cardholder approves it with a Visa passkey, and Kernel registers a Visa intent for one transaction up to the amount before issuing the code. For supported cards whose network cannot be enrolled for agentic tokens, authorize prepares checkout details without issuing a one-time code. The card can be filled into one checkout before its expires_at, one hour after authorization. Fill types those details on merchant_url's origin. The amount, merchant_url and merchant_country are recorded but do not restrict payment requests sent by the browser. Card updates are not supported; delete and create a new item instead.
1515
"""
1616

1717
amount: int

‎src/kernel/types/vaults/kernel_card_vault_item_spec_param.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class KernelCardVaultItemSpecParam(TypedDict, total=False):
1111
"""One live purchase with a Kernel-enrolled card.
1212
13-
Authorization obtains an agentic network token number, expiry and one-time 3-digit code. They are stored encrypted for the fill operation, which types them only on merchant_url's origin; the merchant's own checkout submits the payment. The one-time code is valid until the item's expires_at; fill and submit checkout before then. Mastercard purchases need no cardholder approval. A Visa purchase returns a spend_approval action: the cardholder approves it with a Visa passkey, and Kernel registers a Visa intent for one transaction up to the amount before issuing the code. Card updates are not supported; delete and create a new item instead.
13+
Authorization obtains an agentic network token number, expiry and one-time 3-digit code. They are stored encrypted for the fill operation, which types them only on merchant_url's origin; the merchant's own checkout submits the payment. The one-time code is valid until the item's expires_at; fill and submit checkout before then. Mastercard purchases need no cardholder approval. A Visa purchase returns a spend_approval action: the cardholder approves it with a Visa passkey, and Kernel registers a Visa intent for one transaction up to the amount before issuing the code. For supported cards whose network cannot be enrolled for agentic tokens, authorize prepares checkout details without issuing a one-time code. The card can be filled into one checkout before its expires_at, one hour after authorization. Fill types those details on merchant_url's origin. The amount, merchant_url and merchant_country are recorded but do not restrict payment requests sent by the browser. Card updates are not supported; delete and create a new item instead.
1414
"""
1515

1616
amount: Required[int]

0 commit comments

Comments
 (0)