@amos.com/node 0.1.52 → 0.1.54

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/openapi/schema.ts CHANGED
@@ -913,6 +913,26 @@ export interface paths {
913
913
  patch?: never;
914
914
  trace?: never;
915
915
  };
916
+ "/embed/setup_intents/{id}/confirm": {
917
+ parameters: {
918
+ query?: never;
919
+ header?: never;
920
+ path?: never;
921
+ cookie?: never;
922
+ };
923
+ get?: never;
924
+ put?: never;
925
+ /**
926
+ * Confirm a setup intent and wait for card verification
927
+ * @description Confirms the setup intent and, for cards, blocks until processor verification completes. Returns 200 with the post-verification state (for example succeeded, requires_payment_method, or requires_review). Bank account setups succeed without a processor authorization.
928
+ */
929
+ post: operations["ConfirmEmbedSetupIntent"];
930
+ delete?: never;
931
+ options?: never;
932
+ head?: never;
933
+ patch?: never;
934
+ trace?: never;
935
+ };
916
936
  "/embed/setup_intents/{id}/confirm_with_payment_method": {
917
937
  parameters: {
918
938
  query?: never;
@@ -922,7 +942,10 @@ export interface paths {
922
942
  };
923
943
  get?: never;
924
944
  put?: never;
925
- /** Confirm a setup intent with a new payment method */
945
+ /**
946
+ * Confirm a setup intent with a new payment method (async)
947
+ * @description Legacy async confirmation for migration. Accepts a payment method and, for cards, enqueues verification. Returns 202 with verifying or succeeded. Prefer POST /embed/setup_intents/{id}/confirm for synchronous confirmation.
948
+ */
926
949
  post: operations["ConfirmSetupIntentWithPaymentMethod"];
927
950
  delete?: never;
928
951
  options?: never;
@@ -1375,7 +1398,7 @@ export interface components {
1375
1398
  /** Format: uuid */
1376
1399
  processor_id?: string;
1377
1400
  worldpay_mid?: string;
1378
- /** @description ACH verification threshold in cents for this account, taken from the merchant. When the organization sets ach_threshold, that value is used instead. Amounts at or above this require Plaid verification when the render template enables it. */
1401
+ /** @description ACH verification threshold in cents for this account, taken from the organization. Amounts at or above this require Plaid verification when the render template enables it. Defaults to 20000 cents. */
1379
1402
  ach_threshold?: number;
1380
1403
  /** Format: date-time */
1381
1404
  created_at?: string;
@@ -1392,8 +1415,6 @@ export interface components {
1392
1415
  /** Format: uuid */
1393
1416
  customer_id?: string;
1394
1417
  description?: string | null;
1395
- failure_code?: string | null;
1396
- failure_reason?: string | null;
1397
1418
  /** @enum {string|null} */
1398
1419
  allowed_reverse_action?: "void" | "refund" | null;
1399
1420
  metadata?: components["schemas"]["Metadata"];
@@ -1950,8 +1971,6 @@ export interface components {
1950
1971
  Merchant: {
1951
1972
  /** Format: uuid */
1952
1973
  id?: string;
1953
- /** @description ACH verification threshold in cents. Amounts at or above this require Plaid verification. */
1954
- ach_threshold?: number;
1955
1974
  active?: boolean;
1956
1975
  /** Format: uuid */
1957
1976
  organization_id?: string;
@@ -2073,6 +2092,8 @@ export interface components {
2073
2092
  /** Format: uuid */
2074
2093
  customer_id?: string;
2075
2094
  description?: string;
2095
+ /** @description Null after a successful authorization, sale, or capture. */
2096
+ last_payment_error?: components["schemas"]["LastPaymentError"] | null;
2076
2097
  metadata?: components["schemas"]["Metadata"];
2077
2098
  recurring_payment?: components["schemas"]["RecurringPayment"];
2078
2099
  /** Format: uuid */
@@ -2086,6 +2107,15 @@ export interface components {
2086
2107
  /** Format: date-time */
2087
2108
  updated_at?: string;
2088
2109
  };
2110
+ /** @description Canonical post-confirm payment failure. Present after a processor decline, processing exception, or missing vault credential. */
2111
+ LastPaymentError: {
2112
+ /** @enum {string} */
2113
+ type: "card_error" | "processing_error";
2114
+ /** @enum {string} */
2115
+ code: "incorrect_number" | "incorrect_cvc" | "incorrect_postal_code" | "incorrect_pin" | "expired_card" | "insufficient_funds" | "card_declined" | "authentication_failure" | "processing_error" | "vault_token_not_found";
2116
+ /** @description Localized, payer-facing explanation of the failure. */
2117
+ message: string;
2118
+ };
2089
2119
  /** @description How this payment intent relates to a recurring series. Use `initial` for the first charge that establishes the series. Use `network_transaction_id` and/or `transaction_link_id` for subsequent merchant-initiated charges. Do not combine `initial` with network identifiers on the same request. */
2090
2120
  RecurringPayment: {
2091
2121
  /** @description When true, marks the first payment in a recurring series so the processor can treat it as an initial recurring / credential-on-file setup transaction. */
@@ -2326,8 +2356,6 @@ export interface components {
2326
2356
  /** Format: uuid */
2327
2357
  customer_id?: string;
2328
2358
  description?: string | null;
2329
- failure_code?: string | null;
2330
- failure_reason?: string | null;
2331
2359
  metadata?: components["schemas"]["Metadata"];
2332
2360
  /** Format: uuid */
2333
2361
  original_transaction_id?: string;
@@ -2544,8 +2572,6 @@ export interface components {
2544
2572
  /** Format: uuid */
2545
2573
  customer_id?: string;
2546
2574
  description?: string | null;
2547
- failure_code?: string | null;
2548
- failure_reason?: string | null;
2549
2575
  metadata?: components["schemas"]["Metadata"];
2550
2576
  /** Format: uuid */
2551
2577
  original_transaction_id?: string;
@@ -4705,6 +4731,60 @@ export interface operations {
4705
4731
  };
4706
4732
  };
4707
4733
  };
4734
+ ConfirmEmbedSetupIntent: {
4735
+ parameters: {
4736
+ query?: never;
4737
+ header?: never;
4738
+ path: {
4739
+ /** @description The ID of the setup intent to confirm */
4740
+ id: string;
4741
+ };
4742
+ cookie?: never;
4743
+ };
4744
+ requestBody: {
4745
+ content: {
4746
+ "application/json": components["schemas"]["ConfirmSetupIntentWithPaymentMethodRequest"];
4747
+ };
4748
+ };
4749
+ responses: {
4750
+ /** @description Confirmation completed after verification succeeded or failed */
4751
+ 200: {
4752
+ headers: {
4753
+ [name: string]: unknown;
4754
+ };
4755
+ content: {
4756
+ "application/json": components["schemas"]["SetupIntent"];
4757
+ };
4758
+ };
4759
+ /** @description Already-started confirmation returned without a new processor request */
4760
+ 202: {
4761
+ headers: {
4762
+ [name: string]: unknown;
4763
+ };
4764
+ content: {
4765
+ "application/json": components["schemas"]["SetupIntent"];
4766
+ };
4767
+ };
4768
+ /** @description Forbidden */
4769
+ 403: {
4770
+ headers: {
4771
+ [name: string]: unknown;
4772
+ };
4773
+ content: {
4774
+ "application/json": components["schemas"]["Error"];
4775
+ };
4776
+ };
4777
+ /** @description Unprocessable content */
4778
+ 422: {
4779
+ headers: {
4780
+ [name: string]: unknown;
4781
+ };
4782
+ content: {
4783
+ "application/json": components["schemas"]["Error"];
4784
+ };
4785
+ };
4786
+ };
4787
+ };
4708
4788
  ConfirmSetupIntentWithPaymentMethod: {
4709
4789
  parameters: {
4710
4790
  query?: never;
@@ -4721,7 +4801,7 @@ export interface operations {
4721
4801
  };
4722
4802
  };
4723
4803
  responses: {
4724
- /** @description Successful confirmation of setup intent */
4804
+ /** @description Confirmation accepted; card verification continues asynchronously */
4725
4805
  202: {
4726
4806
  headers: {
4727
4807
  [name: string]: unknown;
@@ -5449,6 +5529,8 @@ export const walletProviderTypeValues: ReadonlyArray<FlattenedDeepRequired<compo
5449
5529
  export const webhookEventTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["WebhookEventType"]> = ["charge.cancelled", "charge.created", "charge.errored", "charge.failed", "charge.processing", "charge.requires_capture", "charge.requires_confirmation", "charge.requires_review", "charge.settlement_failed", "charge.succeeded", "customer.created", "customer.updated", "legal_entity.created", "legal_entity.updated", "legal_entity_principal.created", "legal_entity_principal.updated", "legal_entity_application.approved", "legal_entity_application.denied", "legal_entity_application.needs_information", "legal_entity_application.pending", "legal_entity_application.submitted", "merchant.created", "merchant.updated", "payment_intent.cancelled", "payment_intent.created", "payment_intent.errored_authorization", "payment_intent.errored_capture", "payment_intent.errored_sale", "payment_intent.processing_authorization", "payment_intent.processing_capture", "payment_intent.processing_sale", "payment_intent.requires_capture", "payment_intent.requires_confirmation", "payment_intent.requires_payment_method", "payment_intent.requires_review", "payment_intent.succeeded", "processor_transaction.completed", "reconciliation.created", "refund.cancelled", "refund.created", "refund.failed", "refund.pending", "refund.processing", "refund.requires_review", "refund.succeeded", "setup_intent.cancelled", "setup_intent.created", "setup_intent.errored", "setup_intent.failed", "setup_intent.requires_confirmation", "setup_intent.requires_payment_method", "setup_intent.requires_review", "setup_intent.succeeded", "setup_intent.verifying", "void.created", "void.failed", "void.pending", "void.processing", "void.requires_review", "void.succeeded"];
5450
5530
  export const organizationKindValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Organization"]["kind"]> = ["direct", "payfac"];
5451
5531
  export const paymentIntentStateValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["PaymentIntent"]["state"]> = ["requires_payment_method", "requires_confirmation", "requires_capture", "processing_authorization", "processing_capture", "processing_sale", "requires_review", "succeeded", "cancelled", "errored_authorization", "errored_capture", "errored_sale"];
5532
+ export const lastPaymentErrorTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["LastPaymentError"]["type"]> = ["card_error", "processing_error"];
5533
+ export const lastPaymentErrorCodeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["LastPaymentError"]["code"]> = ["incorrect_number", "incorrect_cvc", "incorrect_postal_code", "incorrect_pin", "expired_card", "insufficient_funds", "card_declined", "authentication_failure", "processing_error", "vault_token_not_found"];
5452
5534
  export const processorTransactionPayment_transaction_typeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["ProcessorTransaction"]["payment_transaction_type"]> = ["charge", "refund", "void"];
5453
5535
  export const processorTransactionTransaction_typeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["ProcessorTransaction"]["transaction_type"]> = ["authorization", "authorization_reversal", "capture", "credit", "echeck_credit", "echeck_sale", "echeck_void", "sale", "void"];
5454
5536
  export const refundAllowed_reverse_actionValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Refund"]["allowed_reverse_action"]> = ["void"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amos.com/node",
3
- "version": "0.1.52",
3
+ "version": "0.1.54",
4
4
  "description": "Node.js client for the Amos Pay API.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -50,9 +50,9 @@
50
50
  "openapi-fetch": "0.17.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@biomejs/biome": "2.5.7",
53
+ "@biomejs/biome": "2.5.10",
54
54
  "@changesets/cli": "2.31.1",
55
- "@types/node": "26.1.2",
55
+ "@types/node": "26.3.0",
56
56
  "openapi-typescript": "7.13.0",
57
57
  "tsup": "8.5.1",
58
58
  "typescript": "5.9.3"