Skip to content

Commit 37fe4d3

Browse files
feat: Expose Link card credential_type and explain pay token fill rejections
Stainless-Generated-From: e0e3da155cb2bc8f5f6a09ae6df84dab6c125a71
1 parent b6a069d commit 37fe4d3

1 file changed

Lines changed: 40 additions & 22 deletions

File tree

‎src/resources/vaults/items.ts‎

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ export interface AuthorizeVaultItemOperationRequest {
428428
* be changed with PATCH until the card is authorized at a checkout. Authorize it
429429
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
430430
* and internally chooses a merchant-bound Link Pay Token when supported or a
431-
* virtual card otherwise. Callers never receive or choose how the credential is
432-
* delivered.
431+
* virtual card otherwise. Callers do not choose how the credential is delivered;
432+
* after authorize, state.credential_type reports it.
433433
*/
434434
export type CardVaultItemSpec =
435435
| CardVaultItemSpec.LinkCardVaultItemSpec
@@ -444,8 +444,8 @@ export namespace CardVaultItemSpec {
444444
* be changed with PATCH until the card is authorized at a checkout. Authorize it
445445
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
446446
* and internally chooses a merchant-bound Link Pay Token when supported or a
447-
* virtual card otherwise. Callers never receive or choose how the credential is
448-
* delivered.
447+
* virtual card otherwise. Callers do not choose how the credential is delivered;
448+
* after authorize, state.credential_type reports it.
449449
*/
450450
export interface LinkCardVaultItemSpec {
451451
/**
@@ -648,6 +648,15 @@ export namespace CardVaultItemState {
648648
| 'declined'
649649
| 'recovery_required';
650650

651+
/**
652+
* The Link spend request's credential_type, set when authorize sends the request
653+
* to Link. Absent before authorize and after Link rejects the request; a ready
654+
* card without it fills like card. card is a Link virtual card; fill it with field
655+
* bindings. link_pay_token is a Link Pay Token that Kernel supplies through the
656+
* checkout's Link WebMCP tool; fill it without fields.
657+
*/
658+
credential_type?: 'card' | 'link_pay_token';
659+
651660
domains?: Array<string>;
652661

653662
masks?: LinkCardState.Masks;
@@ -2639,8 +2648,8 @@ export interface PaymentRequestVaultItem {
26392648
* be changed with PATCH until the card is authorized at a checkout. Authorize it
26402649
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
26412650
* and internally chooses a merchant-bound Link Pay Token when supported or a
2642-
* virtual card otherwise. Callers never receive or choose how the credential is
2643-
* delivered.
2651+
* virtual card otherwise. Callers do not choose how the credential is delivered;
2652+
* after authorize, state.credential_type reports it.
26442653
*/
26452654
spec: PaymentRequestVaultItemSpec;
26462655

@@ -2704,8 +2713,8 @@ export namespace PaymentRequestVaultItem {
27042713
* be changed with PATCH until the card is authorized at a checkout. Authorize it
27052714
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
27062715
* and internally chooses a merchant-bound Link Pay Token when supported or a
2707-
* virtual card otherwise. Callers never receive or choose how the credential is
2708-
* delivered.
2716+
* virtual card otherwise. Callers do not choose how the credential is delivered;
2717+
* after authorize, state.credential_type reports it.
27092718
*/
27102719
export type PaymentRequestVaultItemSpec =
27112720
| PaymentRequestVaultItemSpec.LinkCardVaultItemSpec
@@ -2717,8 +2726,8 @@ export namespace PaymentRequestVaultItemSpec {
27172726
* be changed with PATCH until the card is authorized at a checkout. Authorize it
27182727
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
27192728
* and internally chooses a merchant-bound Link Pay Token when supported or a
2720-
* virtual card otherwise. Callers never receive or choose how the credential is
2721-
* delivered.
2729+
* virtual card otherwise. Callers do not choose how the credential is delivered;
2730+
* after authorize, state.credential_type reports it.
27222731
*/
27232732
export interface LinkCardVaultItemSpec {
27242733
/**
@@ -2870,6 +2879,15 @@ export namespace PaymentRequestVaultItemState {
28702879
| 'declined'
28712880
| 'recovery_required';
28722881

2882+
/**
2883+
* The Link spend request's credential_type, set when authorize sends the request
2884+
* to Link. Absent before authorize and after Link rejects the request; a ready
2885+
* card without it fills like card. card is a Link virtual card; fill it with field
2886+
* bindings. link_pay_token is a Link Pay Token that Kernel supplies through the
2887+
* checkout's Link WebMCP tool; fill it without fields.
2888+
*/
2889+
credential_type?: 'card' | 'link_pay_token';
2890+
28732891
domains?: Array<string>;
28742892

28752893
masks?: LinkCardState.Masks;
@@ -3465,8 +3483,8 @@ export namespace VaultItem {
34653483
* be changed with PATCH until the card is authorized at a checkout. Authorize it
34663484
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
34673485
* and internally chooses a merchant-bound Link Pay Token when supported or a
3468-
* virtual card otherwise. Callers never receive or choose how the credential is
3469-
* delivered.
3486+
* virtual card otherwise. Callers do not choose how the credential is delivered;
3487+
* after authorize, state.credential_type reports it.
34703488
*/
34713489
spec: ItemsAPI.CardVaultItemSpec;
34723490

@@ -3757,8 +3775,8 @@ export namespace VaultItemOperationResponse {
37573775
* be changed with PATCH until the card is authorized at a checkout. Authorize it
37583776
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
37593777
* and internally chooses a merchant-bound Link Pay Token when supported or a
3760-
* virtual card otherwise. Callers never receive or choose how the credential is
3761-
* delivered.
3778+
* virtual card otherwise. Callers do not choose how the credential is delivered;
3779+
* after authorize, state.credential_type reports it.
37623780
*/
37633781
spec: ItemsAPI.CardVaultItemSpec;
37643782

@@ -4411,8 +4429,8 @@ export declare namespace ItemUpdateParams {
44114429
* The spec can be changed with PATCH until the card is authorized at a checkout.
44124430
* Authorize it with the browser at final checkout: Kernel inspects the checkout
44134431
* through WebMCP and internally chooses a merchant-bound Link Pay Token when
4414-
* supported or a virtual card otherwise. Callers never receive or choose how the
4415-
* credential is delivered.
4432+
* supported or a virtual card otherwise. Callers do not choose how the credential
4433+
* is delivered; after authorize, state.credential_type reports it.
44164434
*/
44174435
spec: CardVaultItemSpec;
44184436

@@ -4433,8 +4451,8 @@ export declare namespace ItemUpdateParams {
44334451
* The spec can be changed with PATCH until the card is authorized at a checkout.
44344452
* Authorize it with the browser at final checkout: Kernel inspects the checkout
44354453
* through WebMCP and internally chooses a merchant-bound Link Pay Token when
4436-
* supported or a virtual card otherwise. Callers never receive or choose how the
4437-
* credential is delivered.
4454+
* supported or a virtual card otherwise. Callers do not choose how the credential
4455+
* is delivered; after authorize, state.credential_type reports it.
44384456
*/
44394457
spec: PaymentRequestVaultItemSpec;
44404458

@@ -5213,8 +5231,8 @@ export declare namespace ItemUpsertParams {
52135231
* The spec can be changed with PATCH until the card is authorized at a checkout.
52145232
* Authorize it with the browser at final checkout: Kernel inspects the checkout
52155233
* through WebMCP and internally chooses a merchant-bound Link Pay Token when
5216-
* supported or a virtual card otherwise. Callers never receive or choose how the
5217-
* credential is delivered.
5234+
* supported or a virtual card otherwise. Callers do not choose how the credential
5235+
* is delivered; after authorize, state.credential_type reports it.
52185236
*/
52195237
spec: CardVaultItemSpec;
52205238

@@ -5235,8 +5253,8 @@ export declare namespace ItemUpsertParams {
52355253
* The spec can be changed with PATCH until the card is authorized at a checkout.
52365254
* Authorize it with the browser at final checkout: Kernel inspects the checkout
52375255
* through WebMCP and internally chooses a merchant-bound Link Pay Token when
5238-
* supported or a virtual card otherwise. Callers never receive or choose how the
5239-
* credential is delivered.
5256+
* supported or a virtual card otherwise. Callers do not choose how the credential
5257+
* is delivered; after authorize, state.credential_type reports it.
52405258
*/
52415259
spec: PaymentRequestVaultItemSpec;
52425260

0 commit comments

Comments
 (0)