@amos.com/node 0.1.75 → 0.1.76

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
@@ -1468,8 +1468,6 @@ export interface components {
1468
1468
  last4?: string;
1469
1469
  state?: string;
1470
1470
  three_d_secure_supported?: boolean | null;
1471
- /** @description Legacy card token. Prefer vault_token for new integrations. */
1472
- token?: string;
1473
1471
  /**
1474
1472
  * Format: uuid
1475
1473
  * @description Vault UUID for this card. Used for charges and Vault callbacks.
@@ -1513,6 +1511,7 @@ export interface components {
1513
1511
  /** Format: uuid */
1514
1512
  customer_id?: string;
1515
1513
  description?: string | null;
1514
+ failure?: components["schemas"]["PaymentFailure"] | null;
1516
1515
  /** @enum {string|null} */
1517
1516
  allowed_reverse_action?: "void" | "refund" | null;
1518
1517
  metadata?: components["schemas"]["Metadata"];
@@ -1960,6 +1959,16 @@ export interface components {
1960
1959
  SubscriptionIntervalType: "day" | "week" | "month" | "year";
1961
1960
  /** @enum {string} */
1962
1961
  SubscriptionPlanType: "fixed" | "variable";
1962
+ /** @description Why a transaction failed, in terms that are the same for every processor. */
1963
+ PaymentFailure: {
1964
+ /** @description Stable failure code, for example insufficient_funds, issuer_declined or incorrect_cvc. New codes may be added over time, so treat unknown values as generic_decline. */
1965
+ code: string;
1966
+ type: components["schemas"]["PaymentFailureType"];
1967
+ /** @description Human readable explanation. Safe to show to the merchant. */
1968
+ message: string;
1969
+ };
1970
+ /** @enum {string} */
1971
+ PaymentFailureType: "payment_method_error" | "processing_error";
1963
1972
  /** @enum {string} */
1964
1973
  TransactionSourceType: "api" | "dashboard" | "iframe" | "system" | "subscription" | "admin";
1965
1974
  /** @enum {string} */
@@ -2604,6 +2613,7 @@ export interface components {
2604
2613
  /** Format: uuid */
2605
2614
  customer_id?: string;
2606
2615
  description?: string | null;
2616
+ failure?: components["schemas"]["PaymentFailure"] | null;
2607
2617
  metadata?: components["schemas"]["Metadata"];
2608
2618
  /** Format: uuid */
2609
2619
  original_transaction_id?: string;
@@ -2842,6 +2852,7 @@ export interface components {
2842
2852
  /** Format: uuid */
2843
2853
  customer_id?: string;
2844
2854
  description?: string | null;
2855
+ failure?: components["schemas"]["PaymentFailure"] | null;
2845
2856
  metadata?: components["schemas"]["Metadata"];
2846
2857
  /** Format: uuid */
2847
2858
  original_transaction_id?: string;
@@ -6138,6 +6149,7 @@ export const payoutStateTypeValues: ReadonlyArray<FlattenedDeepRequired<componen
6138
6149
  export const refundStateTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["RefundStateType"]> = ["pending", "processing", "requires_review", "succeeded", "cancelled", "failed"];
6139
6150
  export const subscriptionIntervalTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["SubscriptionIntervalType"]> = ["day", "week", "month", "year"];
6140
6151
  export const subscriptionPlanTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["SubscriptionPlanType"]> = ["fixed", "variable"];
6152
+ export const paymentFailureTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["PaymentFailureType"]> = ["payment_method_error", "processing_error"];
6141
6153
  export const transactionSourceTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["TransactionSourceType"]> = ["api", "dashboard", "iframe", "system", "subscription", "admin"];
6142
6154
  export const walletProviderTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["WalletProviderType"]> = ["googlepay", "applepay"];
6143
6155
  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.active", "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", "legal_entity_application.under_review", "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", "payment_method.updated", "payout.failed", "payout.notification_of_change", "payout.pending", "payout.processing", "payout.returned", "payout.same_day_missed", "payout.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"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amos.com/node",
3
- "version": "0.1.75",
3
+ "version": "0.1.76",
4
4
  "description": "Node.js client for the Amos Pay API.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",