Skip to content

Commit a556758

Browse files
feat: Expose Link card credential_type and explain pay token fill rejections
Stainless-Generated-From: e3670e2e4190f4bca739941906edad5ca3908134
1 parent ff3251e commit a556758

12 files changed

Lines changed: 52 additions & 27 deletions

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ def update(
166166
be changed with PATCH until the card is authorized at a checkout. Authorize it
167167
with the browser at final checkout: Kernel inspects the checkout through WebMCP
168168
and internally chooses a merchant-bound Link Pay Token when supported or a
169-
virtual card otherwise. Callers never receive or choose how the credential is
170-
delivered.
169+
virtual card otherwise. Callers do not choose how the credential is delivered;
170+
after authorize, state.credential_type reports it.
171171
172172
extra_headers: Send extra headers
173173
@@ -218,8 +218,8 @@ def update(
218218
be changed with PATCH until the card is authorized at a checkout. Authorize it
219219
with the browser at final checkout: Kernel inspects the checkout through WebMCP
220220
and internally chooses a merchant-bound Link Pay Token when supported or a
221-
virtual card otherwise. Callers never receive or choose how the credential is
222-
delivered.
221+
virtual card otherwise. Callers do not choose how the credential is delivered;
222+
after authorize, state.credential_type reports it.
223223
224224
extra_headers: Send extra headers
225225
@@ -1928,8 +1928,8 @@ def upsert(
19281928
be changed with PATCH until the card is authorized at a checkout. Authorize it
19291929
with the browser at final checkout: Kernel inspects the checkout through WebMCP
19301930
and internally chooses a merchant-bound Link Pay Token when supported or a
1931-
virtual card otherwise. Callers never receive or choose how the credential is
1932-
delivered.
1931+
virtual card otherwise. Callers do not choose how the credential is delivered;
1932+
after authorize, state.credential_type reports it.
19331933
19341934
extra_headers: Send extra headers
19351935
@@ -1977,8 +1977,8 @@ def upsert(
19771977
be changed with PATCH until the card is authorized at a checkout. Authorize it
19781978
with the browser at final checkout: Kernel inspects the checkout through WebMCP
19791979
and internally chooses a merchant-bound Link Pay Token when supported or a
1980-
virtual card otherwise. Callers never receive or choose how the credential is
1981-
delivered.
1980+
virtual card otherwise. Callers do not choose how the credential is delivered;
1981+
after authorize, state.credential_type reports it.
19821982
19831983
extra_headers: Send extra headers
19841984
@@ -2257,8 +2257,8 @@ async def update(
22572257
be changed with PATCH until the card is authorized at a checkout. Authorize it
22582258
with the browser at final checkout: Kernel inspects the checkout through WebMCP
22592259
and internally chooses a merchant-bound Link Pay Token when supported or a
2260-
virtual card otherwise. Callers never receive or choose how the credential is
2261-
delivered.
2260+
virtual card otherwise. Callers do not choose how the credential is delivered;
2261+
after authorize, state.credential_type reports it.
22622262
22632263
extra_headers: Send extra headers
22642264
@@ -2309,8 +2309,8 @@ async def update(
23092309
be changed with PATCH until the card is authorized at a checkout. Authorize it
23102310
with the browser at final checkout: Kernel inspects the checkout through WebMCP
23112311
and internally chooses a merchant-bound Link Pay Token when supported or a
2312-
virtual card otherwise. Callers never receive or choose how the credential is
2313-
delivered.
2312+
virtual card otherwise. Callers do not choose how the credential is delivered;
2313+
after authorize, state.credential_type reports it.
23142314
23152315
extra_headers: Send extra headers
23162316
@@ -4019,8 +4019,8 @@ async def upsert(
40194019
be changed with PATCH until the card is authorized at a checkout. Authorize it
40204020
with the browser at final checkout: Kernel inspects the checkout through WebMCP
40214021
and internally chooses a merchant-bound Link Pay Token when supported or a
4022-
virtual card otherwise. Callers never receive or choose how the credential is
4023-
delivered.
4022+
virtual card otherwise. Callers do not choose how the credential is delivered;
4023+
after authorize, state.credential_type reports it.
40244024
40254025
extra_headers: Send extra headers
40264026
@@ -4068,8 +4068,8 @@ async def upsert(
40684068
be changed with PATCH until the card is authorized at a checkout. Authorize it
40694069
with the browser at final checkout: Kernel inspects the checkout through WebMCP
40704070
and internally chooses a merchant-bound Link Pay Token when supported or a
4071-
virtual card otherwise. Callers never receive or choose how the credential is
4072-
delivered.
4071+
virtual card otherwise. Callers do not choose how the credential is delivered;
4072+
after authorize, state.credential_type reports it.
40734073
40744074
extra_headers: Send extra headers
40754075

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class LinkCardVaultItemSpecTotal(BaseModel):
7474
class LinkCardVaultItemSpec(BaseModel):
7575
"""Live Link card request.
7676
77-
Test-mode card creation is not supported. The spec can be changed with PATCH until the card is authorized at a checkout. Authorize it with the browser at final checkout: Kernel inspects the checkout through WebMCP and internally chooses a merchant-bound Link Pay Token when supported or a virtual card otherwise. Callers never receive or choose how the credential is delivered.
77+
Test-mode card creation is not supported. The spec can be changed with PATCH until the card is authorized at a checkout. Authorize it with the browser at final checkout: Kernel inspects the checkout through WebMCP and internally chooses a merchant-bound Link Pay Token when supported or a virtual card otherwise. Callers do not choose how the credential is delivered; after authorize, state.credential_type reports it.
7878
"""
7979

8080
amount: int

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class LinkCardVaultItemSpecTotal(TypedDict, total=False):
7474
class LinkCardVaultItemSpec(TypedDict, total=False):
7575
"""Live Link card request.
7676
77-
Test-mode card creation is not supported. The spec can be changed with PATCH until the card is authorized at a checkout. Authorize it with the browser at final checkout: Kernel inspects the checkout through WebMCP and internally chooses a merchant-bound Link Pay Token when supported or a virtual card otherwise. Callers never receive or choose how the credential is delivered.
77+
Test-mode card creation is not supported. The spec can be changed with PATCH until the card is authorized at a checkout. Authorize it with the browser at final checkout: Kernel inspects the checkout through WebMCP and internally chooses a merchant-bound Link Pay Token when supported or a virtual card otherwise. Callers do not choose how the credential is delivered; after authorize, state.credential_type reports it.
7878
"""
7979

8080
amount: Required[int]

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ class LinkCardState(BaseModel):
5858
and should approve only the new one.
5959
"""
6060

61+
credential_type: Optional[Literal["card", "link_pay_token"]] = None
62+
"""
63+
The Link spend request's credential_type, set when authorize sends the request
64+
to Link. Absent before authorize and after Link rejects the request; a ready
65+
card without it fills like card. card is a Link virtual card; fill it with field
66+
bindings. link_pay_token is a Link Pay Token that Kernel supplies through the
67+
checkout's Link WebMCP tool; fill it without fields.
68+
"""
69+
6170
domains: Optional[List[str]] = None
6271

6372
masks: Optional[LinkCardStateMasks] = None

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class CardVaultItemUpdateRequest(TypedDict, total=False):
2727
until the card is authorized at a checkout. Authorize it with the browser at
2828
final checkout: Kernel inspects the checkout through WebMCP and internally
2929
chooses a merchant-bound Link Pay Token when supported or a virtual card
30-
otherwise. Callers never receive or choose how the credential is delivered.
30+
otherwise. Callers do not choose how the credential is delivered; after
31+
authorize, state.credential_type reports it.
3132
"""
3233

3334
type: Literal["card"]
@@ -43,7 +44,8 @@ class PaymentRequestVaultItemUpdateRequest(TypedDict, total=False):
4344
until the card is authorized at a checkout. Authorize it with the browser at
4445
final checkout: Kernel inspects the checkout through WebMCP and internally
4546
chooses a merchant-bound Link Pay Token when supported or a virtual card
46-
otherwise. Callers never receive or choose how the credential is delivered.
47+
otherwise. Callers do not choose how the credential is delivered; after
48+
authorize, state.credential_type reports it.
4749
"""
4850

4951
type: Required[Literal["payment_request"]]

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ class CardVaultItemRequest(TypedDict, total=False):
219219
until the card is authorized at a checkout. Authorize it with the browser at
220220
final checkout: Kernel inspects the checkout through WebMCP and internally
221221
chooses a merchant-bound Link Pay Token when supported or a virtual card
222-
otherwise. Callers never receive or choose how the credential is delivered.
222+
otherwise. Callers do not choose how the credential is delivered; after
223+
authorize, state.credential_type reports it.
223224
"""
224225

225226
type: Required[Literal["card"]]
@@ -235,7 +236,8 @@ class PaymentRequestVaultItemRequest(TypedDict, total=False):
235236
until the card is authorized at a checkout. Authorize it with the browser at
236237
final checkout: Kernel inspects the checkout through WebMCP and internally
237238
chooses a merchant-bound Link Pay Token when supported or a virtual card
238-
otherwise. Callers never receive or choose how the credential is delivered.
239+
otherwise. Callers do not choose how the credential is delivered; after
240+
authorize, state.credential_type reports it.
239241
"""
240242

241243
type: Required[Literal["payment_request"]]

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ class PaymentRequestVaultItem(BaseModel):
7676
until the card is authorized at a checkout. Authorize it with the browser at
7777
final checkout: Kernel inspects the checkout through WebMCP and internally
7878
chooses a merchant-bound Link Pay Token when supported or a virtual card
79-
otherwise. Callers never receive or choose how the credential is delivered.
79+
otherwise. Callers do not choose how the credential is delivered; after
80+
authorize, state.credential_type reports it.
8081
"""
8182

8283
state: PaymentRequestVaultItemState

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class LinkCardVaultItemSpecTotal(BaseModel):
7171
class LinkCardVaultItemSpec(BaseModel):
7272
"""Live Link card request.
7373
74-
Test-mode card creation is not supported. The spec can be changed with PATCH until the card is authorized at a checkout. Authorize it with the browser at final checkout: Kernel inspects the checkout through WebMCP and internally chooses a merchant-bound Link Pay Token when supported or a virtual card otherwise. Callers never receive or choose how the credential is delivered.
74+
Test-mode card creation is not supported. The spec can be changed with PATCH until the card is authorized at a checkout. Authorize it with the browser at final checkout: Kernel inspects the checkout through WebMCP and internally chooses a merchant-bound Link Pay Token when supported or a virtual card otherwise. Callers do not choose how the credential is delivered; after authorize, state.credential_type reports it.
7575
"""
7676

7777
amount: int

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class LinkCardVaultItemSpecTotal(TypedDict, total=False):
7171
class LinkCardVaultItemSpec(TypedDict, total=False):
7272
"""Live Link card request.
7373
74-
Test-mode card creation is not supported. The spec can be changed with PATCH until the card is authorized at a checkout. Authorize it with the browser at final checkout: Kernel inspects the checkout through WebMCP and internally chooses a merchant-bound Link Pay Token when supported or a virtual card otherwise. Callers never receive or choose how the credential is delivered.
74+
Test-mode card creation is not supported. The spec can be changed with PATCH until the card is authorized at a checkout. Authorize it with the browser at final checkout: Kernel inspects the checkout through WebMCP and internally chooses a merchant-bound Link Pay Token when supported or a virtual card otherwise. Callers do not choose how the credential is delivered; after authorize, state.credential_type reports it.
7575
"""
7676

7777
amount: Required[int]

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ class LinkCardState(BaseModel):
5353
and should approve only the new one.
5454
"""
5555

56+
credential_type: Optional[Literal["card", "link_pay_token"]] = None
57+
"""
58+
The Link spend request's credential_type, set when authorize sends the request
59+
to Link. Absent before authorize and after Link rejects the request; a ready
60+
card without it fills like card. card is a Link virtual card; fill it with field
61+
bindings. link_pay_token is a Link Pay Token that Kernel supplies through the
62+
checkout's Link WebMCP tool; fill it without fields.
63+
"""
64+
5665
domains: Optional[List[str]] = None
5766

5867
masks: Optional[LinkCardStateMasks] = None

0 commit comments

Comments
 (0)