@vaam-apps/vpay-sdk 0.11.0 → 0.12.1

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/types.d.ts CHANGED
@@ -9,8 +9,16 @@
9
9
  * `requires_payment_method` with {@link LastPaymentError} populated.
10
10
  */
11
11
  export type PaymentIntentStatus = "requires_payment_method" | "requires_action" | "processing" | "succeeded" | "canceled";
12
- /** Rail codes this SDK's `payment_method_types` values may hold. */
13
- export type PaymentMethodType = "mtn_momo" | "orange_money" | "notchpay";
12
+ /**
13
+ * What this SDK's `payment_method_types` values may hold: a **rail code**
14
+ * (`mtn_momo`, `orange_money`, `notchpay`), meaning that rail pinned, or a
15
+ * **payment-method type** (`mtn_wallet`, `orange_wallet`, from 2026-10-23),
16
+ * meaning the payer's wallet network, with the server's router picking the
17
+ * rail at confirm (ADR-0029 D6, RFC-0008 as revised on 2026-10-23). A type
18
+ * needs a server with migration `0053`; an older one refuses it as an unknown
19
+ * rail. `ConfirmPaymentIntentParams` still names rail codes only.
20
+ */
21
+ export type PaymentMethodType = "mtn_momo" | "orange_money" | "notchpay" | "mtn_wallet" | "orange_wallet";
14
22
  /** Redirect-rail next step, Stripe's own `next_action.redirect_to_url` shape. */
15
23
  export interface NextAction {
16
24
  type: "redirect_to_url";
@@ -1269,9 +1277,11 @@ export type ListCheckoutSessionsParams = {
1269
1277
  *
1270
1278
  * # The rail's code is the outer key, and that is the whole point
1271
1279
  *
1272
- * On the wire this is `destination[<payment_method_type>][…]` — a
1273
- * rail-agnostic container with a rail-specific interior, exactly as
1280
+ * On the wire this is `destination[<rail code>][…]` — a rail-agnostic
1281
+ * container with a rail-specific interior, much as
1274
1282
  * `payment_method_data[<payment_method_type>][…]` is on the confirm path. The
1283
+ * outer key is always the code of the **rail** the charge was made on, never a
1284
+ * payment-method type: the server refuses `destination[mtn_wallet]`. The
1275
1285
  * server strips the outer key and hands the interior to that rail's own
1276
1286
  * adapter, which is the only thing that knows what a payee looks like there.
1277
1287
  * An SDK that flattened this, or that wrote one rail's code into the body
@@ -1324,11 +1334,19 @@ export type RefundDestination = {
1324
1334
  * widening this one.
1325
1335
  */
1326
1336
  kind: "mobile_money";
1327
- /** The rail the charge was made on — its code becomes the outer key. */
1337
+ /**
1338
+ * The rail the charge was made on — its code becomes the outer key.
1339
+ *
1340
+ * A **rail code** (`"mtn_momo"`, `"orange_money"`, `"notchpay"`), never a
1341
+ * payment-method type: `"mtn_wallet"` or `"orange_wallet"` here is refused by
1342
+ * the server with a `400` naming `destination`. For an intent created with a
1343
+ * type, the rail its charge was routed to is on no `/v1` object yet, so the
1344
+ * caller has to know it another way.
1345
+ */
1328
1346
  payment_method_type: PaymentMethodType;
1329
1347
  /**
1330
1348
  * The payee's number, **in international form, starting with `+`**. Sent as
1331
- * `destination[<payment_method_type>][msisdn]`.
1349
+ * `destination[<rail code>][msisdn]`.
1332
1350
  */
1333
1351
  msisdn: string;
1334
1352
  };
package/dist/version.d.ts CHANGED
@@ -9,4 +9,4 @@
9
9
  * releases. A hand-written constant has no such landmine — it just needs to
10
10
  * be bumped alongside `package.json`'s own `version` field.
11
11
  */
12
- export declare const SDK_VERSION = "0.11.0";
12
+ export declare const SDK_VERSION = "0.12.1";
package/dist/version.js CHANGED
@@ -9,4 +9,4 @@
9
9
  * releases. A hand-written constant has no such landmine — it just needs to
10
10
  * be bumped alongside `package.json`'s own `version` field.
11
11
  */
12
- export const SDK_VERSION = "0.11.0"; // x-release-please-version
12
+ export const SDK_VERSION = "0.12.1"; // x-release-please-version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaam-apps/vpay-sdk",
3
- "version": "0.11.0",
3
+ "version": "0.12.1",
4
4
  "description": "The Node.js merchant SDK for vpay's /v1 API: OAuth2 private_key_jwt, payment intents, checkout sessions, refunds, events and webhook verification.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {