@agent-cards/sdk 0.23.20 → 0.23.22

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +55 -2
  2. package/PREFLIGHT.md +6 -0
  3. package/README.md +169 -5
  4. package/dist/amadeus-checkout.generated.d.ts +6 -1
  5. package/dist/amadeus-checkout.generated.js +26 -2
  6. package/dist/card-fields.generated.js +2341 -127
  7. package/dist/cdp.js +199 -28
  8. package/dist/client.d.ts +177 -9
  9. package/dist/client.js +387 -37
  10. package/dist/comgate.d.ts +50 -0
  11. package/dist/comgate.js +80 -0
  12. package/dist/creditguard.generated.js +4 -2
  13. package/dist/cse-body.js +11 -0
  14. package/dist/cybersource-secure-acceptance.generated.d.ts +1 -1
  15. package/dist/ebanx.d.ts +1 -1
  16. package/dist/ebanx.js +1 -1
  17. package/dist/eprotect.generated.d.ts +1 -1
  18. package/dist/eximbay.d.ts +46 -0
  19. package/dist/eximbay.js +69 -0
  20. package/dist/gmo.generated.js +7 -3
  21. package/dist/hipay.generated.d.ts +5 -5
  22. package/dist/hipay.generated.js +5 -2
  23. package/dist/hold.d.ts +1 -1
  24. package/dist/hold.js +10 -4
  25. package/dist/hosted-entry.d.ts +4 -0
  26. package/dist/hosted-entry.js +32 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/lifecycle.d.ts +9 -4
  29. package/dist/lifecycle.js +16 -4
  30. package/dist/paddle-tokenex.generated.js +7 -3
  31. package/dist/paygent.generated.d.ts +60 -0
  32. package/dist/paygent.generated.js +425 -0
  33. package/dist/payrails.generated.js +7 -3
  34. package/dist/payrexx.d.ts +91 -0
  35. package/dist/payrexx.generated.d.ts +91 -0
  36. package/dist/payrexx.generated.js +536 -0
  37. package/dist/payrexx.js +141 -0
  38. package/dist/pre-claim.d.ts +30 -1
  39. package/dist/pre-claim.js +257 -39
  40. package/dist/preflight-catalog.json +58 -0
  41. package/dist/preflight-schemas.json +4 -0
  42. package/dist/preflight.generated.js +26 -2
  43. package/dist/prepared-processor.d.ts +7 -2
  44. package/dist/prepared-processor.js +16 -2
  45. package/dist/primer.generated.js +2469 -255
  46. package/dist/przelewy24.d.ts +47 -0
  47. package/dist/przelewy24.js +88 -0
  48. package/dist/registry.d.ts +6 -5
  49. package/dist/registry.js +27 -7
  50. package/dist/shiji-sts.generated.js +7 -3
  51. package/dist/stripe-checkout.generated.js +896 -19
  52. package/dist/toast-seal.generated.d.ts +37 -0
  53. package/dist/toast-seal.generated.js +625 -0
  54. package/dist/toast.generated.d.ts +41 -0
  55. package/dist/toast.generated.js +113 -0
  56. package/dist/tokenex-iframe.d.ts +93 -0
  57. package/dist/tokenex-iframe.generated.d.ts +81 -0
  58. package/dist/tokenex-iframe.generated.js +403 -0
  59. package/dist/tokenex-iframe.js +195 -0
  60. package/dist/transbank.d.ts +45 -0
  61. package/dist/transbank.js +73 -0
  62. package/dist/twoc2p.generated.js +7 -3
  63. package/examples/preflight/kernel-native/inventory.json +1 -1
  64. package/package.json +3 -3
package/dist/client.d.ts CHANGED
@@ -242,6 +242,13 @@ export declare const SUPPORTED_REGISTRY_FEATURES: readonly string[];
242
242
  * checkout relay. Served on the same terms: only to a build that lists it, for a company
243
243
  * Agentcard turned Payfast on for.
244
244
  *
245
+ * `przelewy24_hosted_payment_page`: Przelewy24's pay wall, whose card-free link
246
+ * (secure.przelewy24.pl/trnRequest/<token>, a plain GET the merchant's redirect or script sends
247
+ * the buyer to) this build pauses for the cardholder's device by its exact link (hosted-entry.ts),
248
+ * and whose card method post, card form post and Saferpay resolver this build never lets the
249
+ * agent's browser send (pre-claim.ts, przelewy24.ts). Served on the same terms as NMI's and
250
+ * Redsys's: only to a build that lists it, for a company Agentcard turned Przelewy24 on for.
251
+ *
245
252
  * `wix_payments_tokenize`: the card request Wix Cashier's card frame sends to Wix's
246
253
  * tokenizer (cashier-pci.wixapps.net), only through a prepared checkout: Wix's payment
247
254
  * widget fails the payment 30 seconds after it asks the frame for a token. The
@@ -258,6 +265,31 @@ export declare const SUPPORTED_REGISTRY_FEATURES: readonly string[];
258
265
  * the checkout relay. Served on the same terms: only to a build that lists it, for a company
259
266
  * Agentcard turned PayMongo on for.
260
267
  *
268
+ * `gopay_card_form`: the card post GoPay's card frame sends to its own URL
269
+ * (secure.gopay.com/gp-card-comm/h/<token>) inside the GoPay gateway a shop opens. This build pauses
270
+ * only the frame's own card post and answers it with GoPay's answer as the API recorded it, the
271
+ * empty JSON object the frame reads; the gateway then reads the payment's end from GoPay and runs
272
+ * 3-D Secure in the agent's browser when the bank asks for it. The cardholder's device sends the card
273
+ * through the checkout relay. Served only to a build that lists it, and only for Agentcard's proof
274
+ * company until a reviewed change binds GoPay's payee and amount to the approval: the post names
275
+ * neither. The API takes it only at a shop Agentcard reviewed.
276
+ *
277
+ * `paygent_token`: the token request Paygent's own PaygentToken.js sends from a merchant's
278
+ * page (token.paygent.co.jp/n/token/request), only through a prepared checkout: the script
279
+ * abandons the request 35 seconds after the press that sends it, so the cardholder approves
280
+ * before the press. The cardholder's device sends the card itself and the page gets back
281
+ * Paygent's single-use token alone; the SDK refuses a second token request on the same approval.
282
+ * Served on the same terms: only to a build that lists it, for a company Agentcard turned
283
+ * Paygent on for.
284
+ *
285
+ * `payrexx_card_frame`: the card request Payrexx Pay's card frame sends to its own URL
286
+ * (checkout.payrexx.com/?pspId=44&lang=<xx>) on a Payrexx merchant's page. This build pauses only
287
+ * the frame's own one-time card request and answers it with Payrexx's answer as the API recorded
288
+ * it: the token the merchant's page then charges, or the start of 3-D Secure, whose two later sends
289
+ * of the card this build hands to the cardholder's device under the same approval (payrexx.ts,
290
+ * pre-claim.ts payrexxPreClaim). The cardholder's device sends the card through the checkout relay.
291
+ * Served only to a build that lists it, for a company Agentcard turned Payrexx on for.
292
+ *
261
293
  * `hipay_vault_token`: the token create HiPay's hosted fields send to HiPay's Secure Vault
262
294
  * (secure2-vault.hipay-tpp.com, stage-secure2-vault for a test row), only through a prepared
263
295
  * checkout: the merchant's page gives the frame 20 seconds after Pay. The cardholder's device
@@ -279,6 +311,110 @@ export declare const SUPPORTED_REGISTRY_FEATURES: readonly string[];
279
311
  * Secure step and card lookup this build never lets the agent's browser send (pre-claim.ts,
280
312
  * quickpay.ts). Served on the same terms as NMI's and Redsys's: only to a build that lists it, for a
281
313
  * company Agentcard turned QuickPay on for.
314
+ *
315
+ * `revolut_card_field`: the card payment Revolut Business's card field or card popup sends from
316
+ * its frame to /api/public/orders/<order token>/payments on merchant.revolut.com, on a merchant's
317
+ * own page or Revolut's hosted checkout. This build pauses only the frame's card payment and
318
+ * answers it with Revolut's answer as the API recorded it: the payment Revolut created, which the
319
+ * frame then follows, through any 3-D Secure step, in the agent's browser. A payment by Apple Pay,
320
+ * Google Pay or Revolut Pay on the same URL carries no card and continues untouched. Revolut's
321
+ * host answers the Vault's origin, so the cardholder's device sends the card itself, with no relay.
322
+ * Served on the same terms: only to a build that lists it, for a company Agentcard turned Revolut
323
+ * on for.
324
+ *
325
+ * `pay_nl_card_token`: the card token request a shop's card form sends to Pay. (pay.nl),
326
+ * Weeztix's sandboxed frame posting its FormData to payment.pay.nl/v1/Payment/getCardToken/json.
327
+ * This build pauses only the form's own multipart body at that exact URL; the cardholder's
328
+ * device sends the card through the checkout relay, and the frame gets the token answer
329
+ * payment-core's judge rebuilt, with the CORS answer for the frame's own origin, null. The
330
+ * request names no amount, so the agent's pair, above zero, is the one the cardholder approves
331
+ * (PAY_NL_PSP below). Served on the same terms: only to a build that lists it, for a company
332
+ * Agentcard turned Pay. on for.
333
+ *
334
+ * `paypal_card_fields`: PayPal Card Fields' confirm, the POST its v5 frame sends to
335
+ * www.paypal.com and its v6 frame to api-m.paypal.com. This build pauses it only in
336
+ * the frames' own shape, refuses one that asks PayPal to keep the card or forces
337
+ * 3-D Secure in the browser with a `blocked` event, and answers the frame with the
338
+ * order's id and status as the API recorded them. The device sends a v5 confirm
339
+ * through the checkout relay and a v6 one directly. Served on the same terms: only
340
+ * to a build that lists it, for a company Agentcard turned PayPal Card Fields on
341
+ * for. Every other company keeps the checkout guard's refusal (paypal-card-forms.ts).
342
+ *
343
+ * `comgate_hosted_payment_page`: ComGate's payment gateway, whose card-free gateway link
344
+ * (payN.comgate.cz/init?id=<transaction id>, a plain GET) this build pauses for the
345
+ * cardholder's device by its exact link (hosted-entry.ts), in the page, in a frame of it or
346
+ * in a window it opened, and whose card hosts this build never lets the agent's browser post
347
+ * to (pre-claim.ts, comgate.ts). Served on the same terms as NMI's and Redsys's: only to a
348
+ * build that lists it, for a company Agentcard turned ComGate on for.
349
+ *
350
+ * `makecommerce_card_frame`: the card post MakeCommerce's card frame sends to its own card endpoint
351
+ * (cc.maksekeskus.ee/card-payment) under the shop's publishable key. This build pauses only the
352
+ * frame's own one-time card payment and answers it with MakeCommerce's answer as the API recorded
353
+ * it: the URL of MakeCommerce's 3-D Secure page, which the frame then opens in the agent's browser.
354
+ * The cardholder's device sends the card through the checkout relay. Served on the same terms: only
355
+ * to a build that lists it, for a company Agentcard turned MakeCommerce on for.
356
+ *
357
+ * `poynt_collect_nonce`: GoDaddy Payments' card request, the POST Poynt Collect's
358
+ * card frame sends to a store's generate-nonce on services.poynt.net. This build
359
+ * pauses it only as the frame writes it, refuses a body that asks Poynt to keep the
360
+ * card in the browser with a `blocked` event, and answers the frame with the nonce as
361
+ * the API recorded it. The device sends the card through the checkout relay. Served
362
+ * on the same terms: only to a build that lists it, for a company Agentcard turned
363
+ * GoDaddy Payments on for.
364
+ *
365
+ * `tokenex_iframe_tokenize`: the card post TokenEx's hosted iframe v3 sends from its card-number frame
366
+ * to its own document URL on htp.tokenex.com (JetBlue's card form). This build pauses only the PCI frame's
367
+ * own card post with its CVV frame, refuses in the browser every other post on that path that carries a
368
+ * card (tokenex-iframe.ts), answers it with TokenEx's token as the API recorded it, rebuilt from
369
+ * payment-core's allow-list, and answers the same frame's byte-identical repeat from that answer while the
370
+ * approval is being handed off. Served on the same terms: only to a build that lists it, for a company
371
+ * Agentcard turned the TokenEx iframe on for.
372
+ *
373
+ * `transbank_webpay_hosted_payment_page`: Transbank's Webpay Plus, whose card-free entry
374
+ * (webpay3g.transbank.cl/webpayserver/initTransaction?token_ws=<token>, the merchant's
375
+ * redirect, a plain GET) this build pauses for the cardholder's device by its exact link
376
+ * (hosted-entry.ts) in the page or a frame of it, and with attachToCdp also in a window the
377
+ * page opened, and whose hosts this build never lets the agent's browser post to (pre-claim.ts,
378
+ * transbank.ts), so the token is never spent there. attachToPlaywright covers the page it is
379
+ * attached to and that page's frames only, and pauses only a direct or scripted navigation to
380
+ * the entry: its page.route sees no HTTP redirect hop, so a merchant's redirect needs attachToCdp.
381
+ * Served on the same terms as NMI's and Redsys's: only to a build that lists it, for a company
382
+ * Agentcard turned Webpay on for.
383
+ *
384
+ * `sumup_checkout_process`: the card request SumUp's Payment Widget sends from its hidden form frame
385
+ * on gateway.sumup.com, a PUT to https://api.sumup.com/v0.2/checkouts/<checkout id>. This build pauses
386
+ * that PUT as it pauses Gravy's, so only the CDP and Playwright adapters see it (the form frame is
387
+ * cross-origin to the page), and answers the frame with SumUp's own answer as the API recorded it: the
388
+ * paid checkout, or the 3-D Secure step the widget then runs in the agent's browser. The cardholder's
389
+ * device sends the card itself, and the API holds the payment to a merchant Agentcard reviewed, at the
390
+ * amount SumUp holds for the checkout. Served on the same terms: only to a build that lists it, for a
391
+ * company Agentcard turned SumUp on for.
392
+ *
393
+ * `clover_card_token`: the card token request Clover's card frame (the hidden frame of
394
+ * checkout.clover.com that Clover's iframe mounts on a merchant's page) sends to
395
+ * token.clover.com/v1/tokens (token-sandbox.dev.clover.com for a test row), with the number
396
+ * encrypted under Clover's key. This build pauses only the frame's own body at that exact URL; the
397
+ * cardholder's device builds the request again with the real card under the key payment-core pins
398
+ * and sends it to Clover itself, and the frame gets the token answer payment-core's judge rebuilt.
399
+ * The request names no amount, so the agent's pair, above zero, is the one the cardholder approves
400
+ * (CLOVER_PSP below). Served on the same terms: only to a build that lists it, for a company
401
+ * Agentcard turned Clover on for.
402
+ *
403
+ * `eximbay_hosted_payment_page`: Eximbay's payment window, whose card-free signed entry
404
+ * (a form post to /Gateway/BasicProcessor.krp on secureapi.eximbay.com, or its test host) this
405
+ * build pauses for the cardholder's device, in the page or in a window it opened once attachToCdp
406
+ * has armed that window (eximbay.ts names the entry that can leave first), and whose
407
+ * step, amount query, card lookup and card post this build never lets the agent's browser send
408
+ * (pre-claim.ts, eximbay.ts). Served on the same terms as NMI's and Redsys's: only to a build
409
+ * that lists it, for a company Agentcard turned Eximbay on for.
410
+ *
411
+ * `toast_pinned_key`: the card request Toast's payments frame sends to
412
+ * payments.toasttab.com/v1/payment-methods on a Toast online-ordering checkout, with
413
+ * the card sealed in card.cardData under one key every Toast restaurant shares. The
414
+ * cardholder's device seals the real card under that key, which payment-core pins, and
415
+ * this build writes it over the agent's placeholder and nothing else before it
416
+ * continues the request. Served on the same terms: only to a build that lists it, for
417
+ * a company Agentcard turned Toast on for.
282
418
  */
283
419
  export declare const SUPPORTED_CAPABILITIES: readonly string[];
284
420
  /**
@@ -358,8 +494,9 @@ export interface TokenReplay extends ExecutionMetadata {
358
494
  amountAuthority?: AmountAuthority;
359
495
  /**
360
496
  * An EBANX token approval that covers the sends EBANX's page makes after it (its 3-D Secure calls and the hosted
361
- * page's confirm), for a company Agentcard turned that on for: until when (ISO 8601) the adapters may ask the
362
- * cardholder's device to send them (sendEbanxFollowUp). Absent on every other approval.
497
+ * page's confirm), for a company Agentcard turned that on for, or a Payrexx card request whose answer started 3-D
498
+ * Secure, which covers the card frame's two 3-D Secure sends: until when (ISO 8601) the adapters may ask the
499
+ * cardholder's device to send them (sendEbanxFollowUp, sendPayrexxFollowUp). Absent on every other approval.
363
500
  */
364
501
  followUpsUntil?: string;
365
502
  }
@@ -838,7 +975,10 @@ export interface PlaceholderCard {
838
975
  /**
839
976
  * The placeholder number for a network (lowercase, as GET /api/v2/vault_cards names it) on a
840
977
  * processor's page: the processor's own number for that network when `overrides` names one, else
841
- * the network's default, else undefined for a network with no placeholder.
978
+ * the network's default, else undefined for a network with no placeholder. On a TokenEx iframe
979
+ * (`tokenex_iframe`) the number must also be one TokenEx's frame reads as that network, since the frame
980
+ * names the brand to the page from the typed digits and the cardholder's device refuses a mismatch: the
981
+ * frame's table takes Visa, Mastercard and American Express, so every other network gets undefined.
842
982
  */
843
983
  export declare function placeholderNumber(brand: string, psp?: string, overrides?: Readonly<Record<string, Readonly<Record<string, string>>>>): string | undefined;
844
984
  /**
@@ -861,7 +1001,9 @@ export declare class PreparationRequiredError extends Error {
861
1001
  * when the merchant's server created the payment), so the `amount` and
862
1002
  * `currency` you pass are what the cardholder approves, and for WSPay the
863
1003
  * figure the API compares with WSPay's answer when that answer names one (a
864
- * 3-D Secure step names none). Thrown locally before any create or
1004
+ * 3-D Secure step names none). A Revolut card payment names the order's
1005
+ * amount but not its currency, so it takes the same pair, above zero.
1006
+ * Thrown locally before any create or
865
1007
  * prompt, and terminal: the same request without an amount fails the same
866
1008
  * way. The API answers 400 amount_required for the same case. A page total
867
1009
  * (`pageAmount`) does not count.
@@ -1131,12 +1273,12 @@ export interface PresetRefusal {
1131
1273
  /** A decline reason only the company presets stamp (see PresetRefusedError). */
1132
1274
  export declare const PRESET_REFUSAL_REASONS: ReadonlySet<string>;
1133
1275
  /**
1134
- * How often sendEbanxFollowUp reads a send back while the cardholder's device has it: every half second, whatever the
1135
- * client's own `pollIntervalMs`. One send is out at a time per approval, so this is 120 reads a minute, inside the
1136
- * API's 240 a minute per caller and authorization (routes/api/v2/checkout-follow-ups.ts).
1276
+ * How often sendEbanxFollowUp and sendPayrexxFollowUp read a send back while the cardholder's device has it: every
1277
+ * half second, whatever the client's own `pollIntervalMs`. One send is out at a time per approval, so this is 120
1278
+ * reads a minute, inside the API's 240 a minute per caller and authorization (routes/api/v2/checkout-follow-ups.ts).
1137
1279
  */
1138
1280
  export declare const EBANX_FOLLOW_UP_READ_MS = 500;
1139
- /** The longest sendEbanxFollowUp waits after reads the API refused as too many (429): 1, 2, 4, 8, then 15 seconds. */
1281
+ /** The longest a follow-up send waits after reads the API refused as too many (429): 1, 2, 4, 8, then 15 seconds. */
1140
1282
  export declare const EBANX_FOLLOW_UP_BACKOFF_MAX_MS = 15000;
1141
1283
  export declare class CheckoutApiError extends Error {
1142
1284
  status: number;
@@ -1219,6 +1361,8 @@ export declare class CheckoutAuthError extends Error {
1219
1361
  * https://pgw-ui.2c2p.com/payment/4.1/{token}.
1220
1362
  * On QuickPay's host the window's session reads `{session}`:
1221
1363
  * https://payment.quickpay.net/{session}/3ds_auth.
1364
+ * On FastSpring's store hosts the session id reads `{session}`:
1365
+ * https://daisydisk.onfastspring.com/session/{session}/payment.
1222
1366
  * A string that is not a URL keeps the part before any `?` or `#`, with the
1223
1367
  * same segments masked for every processor whose host it names.
1224
1368
  * A URL is read by its host only when the parser finds one. Text before a URL
@@ -1482,7 +1626,9 @@ export declare class VaultClient {
1482
1626
  * The facts hold only while the cardholder pays with that card. `psp` names the processor
1483
1627
  * whose card form the agent types into (the recognizer's name, `worldline_mycheckout`): a
1484
1628
  * processor that needs its own number for the card's network gets it, and every other gets the
1485
- * network's default. Throws PlaceholderCardError when there is no such card, its network has no
1629
+ * network's default. On a TokenEx iframe (`tokenex_iframe`, JetBlue) the number is one TokenEx's frame
1630
+ * reads as the card's own network, Visa, Mastercard or American Express, and any other network has no
1631
+ * placeholder there. Throws PlaceholderCardError when there is no such card, its network has no
1486
1632
  * placeholder, or it carries no expiry.
1487
1633
  */
1488
1634
  placeholderCard(input: {
@@ -1607,6 +1753,28 @@ export declare class VaultClient {
1607
1753
  headers: Record<string, string>;
1608
1754
  body: string;
1609
1755
  }>;
1756
+ /**
1757
+ * Send one of Payrexx's 3-D Secure sends an approved Payrexx card request covers (payrexx.ts says which: the card
1758
+ * frame's authentication after the ACS method and its post-authentication after the bank's challenge, bound to that
1759
+ * approval) from the cardholder's device, and resolve with Payrexx's answer for the paused request, exactly as
1760
+ * sendEbanxFollowUp does for EBANX: the same create, reads and clocks, and no prompt. Rejects with a
1761
+ * PayrexxFollowUpError naming why there is no answer and whether the card may have reached Payrexx.
1762
+ */
1763
+ sendPayrexxFollowUp(authorizationId: string, request: {
1764
+ url: string;
1765
+ method: 'POST';
1766
+ headers: Record<string, string>;
1767
+ body: string;
1768
+ }, options?: {
1769
+ signal?: AbortSignal;
1770
+ until?: number;
1771
+ }): Promise<{
1772
+ status: number;
1773
+ headers: Record<string, string>;
1774
+ body: string;
1775
+ }>;
1776
+ /** The send behind sendEbanxFollowUp and sendPayrexxFollowUp; `fail` builds the processor's error for a send with no answer. */
1777
+ private sendFollowUp;
1610
1778
  /**
1611
1779
  * Create a merchant-session probe, the phase-0 read of the deterministic merchant total:
1612
1780
  * `user` is the org's connected user, who opens the returned Vault link and reads the