@vaam-apps/vpay-stripe-js 0.13.0 → 0.14.0

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/dist/index.d.ts CHANGED
@@ -14,4 +14,4 @@ export { loadStripe } from "./client.js";
14
14
  export { CheckoutPopupBlockedError, notifyCheckoutOpener } from "./popup.js";
15
15
  export type { StripeError } from "./errors.js";
16
16
  export type { CheckoutPopup, NotifyCheckoutOpenerOptions, OpenCheckoutPopupOptions, } from "./popup.js";
17
- export type { Stripe, CheckoutSession, CheckoutSessionResult, CheckoutSessionStatus, CheckoutSessionUiMode, CheckoutPaymentStatus, EmbeddedCheckout, EmbeddedCheckoutCompleteEvent, InitEmbeddedCheckoutOptions, PaymentIntent, PaymentIntentResult, PaymentIntentStatus, NextAction, LastPaymentError, FailureCode, VpayStripeOptions, ConfirmPaymentOptions, WaitForPaymentIntentOptions, MobileMoneyData, } from "./types.js";
17
+ export type { Stripe, CheckoutSession, CheckoutSessionResult, CheckoutSessionStatus, CheckoutSessionUiMode, CheckoutPaymentStatus, EmbeddedCheckout, EmbeddedCheckoutCompleteEvent, InitEmbeddedCheckoutOptions, PaymentIntent, PaymentMethodDetails, PaymentIntentResult, PaymentIntentStatus, NextAction, LastPaymentError, FailureCode, VpayStripeOptions, ConfirmPaymentOptions, WaitForPaymentIntentOptions, MobileMoneyData, } from "./types.js";
package/dist/types.d.ts CHANGED
@@ -60,16 +60,32 @@ export interface LastPaymentError {
60
60
  code: FailureCode;
61
61
  message: string;
62
62
  }
63
+ /**
64
+ * What a {@link PaymentIntent}'s one charge was made with (vpay since
65
+ * 2026-10-24): the payment-method type the payer chose and the rail vpay
66
+ * charged it on.
67
+ */
68
+ export interface PaymentMethodDetails {
69
+ /**
70
+ * `"mtn_wallet"`, `"orange_wallet"`, or `null` where the charge records no
71
+ * type (a rail-code confirm on a rail serving several, such as `notchpay`).
72
+ */
73
+ type: string | null;
74
+ /** The code of the rail the charge was made on (`"mtn_momo"`, `"notchpay"`, …). */
75
+ rail: string;
76
+ }
63
77
  /**
64
78
  * `vpay_api::model::PaymentIntentWithSecret`: `PaymentIntentObject`'s keys —
65
- * pinned server-side at thirteen by
79
+ * pinned server-side at fourteen by
66
80
  * `every_documented_key_is_present_including_the_null_ones` — plus the
67
81
  * `client_secret` the browser surface flattens in alongside them (D2).
68
82
  *
69
- * **Twelve of the thirteen are declared here.** `customer` (`cus_…` or
83
+ * **Thirteen of the fourteen are declared here.** `customer` (`cus_…` or
70
84
  * `null`, on the wire since 2026-09-06) is not: it arrives and is simply
71
85
  * untyped. This comment said "the twelve keys of `PaymentIntentObject`"
72
- * until 2026-09-23, which was the server's count before `customer`.
86
+ * until 2026-09-23, which was the server's count before `customer`, and
87
+ * "twelve of the thirteen" until 2026-10-24, before
88
+ * `payment_method_details`.
73
89
  *
74
90
  * `client_secret` is `string`, not Stripe's `string | null`: the browser
75
91
  * routes are reachable *only* by presenting one, so a response that omitted
@@ -84,6 +100,11 @@ export interface PaymentIntent {
84
100
  currency: string;
85
101
  status: PaymentIntentStatus;
86
102
  payment_method_types: string[];
103
+ /**
104
+ * What the one charge was made with, `null` until there is one. `?`
105
+ * because a vpay predating 2026-10-24 omits the key.
106
+ */
107
+ payment_method_details?: PaymentMethodDetails | null;
87
108
  /** `null` on a push rail, and on an intent nobody has confirmed. */
88
109
  next_action: NextAction | null;
89
110
  /** Present *with* `requires_payment_method` — there is no `failed` status. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaam-apps/vpay-stripe-js",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "A Stripe.js-shaped browser client for vpay's payer surface: payment intents, embedded and hosted Checkout, zero runtime dependencies.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {