@vaam-apps/vpay-sdk 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
@@ -11,5 +11,5 @@ export { verifyWebhook, type VerifyWebhookOptions } from "./webhooks.js";
11
11
  /** This package's own version, as sent in the `vpay-sdk-node/<version>` User-Agent. */
12
12
  export { SDK_VERSION } from "./version.js";
13
13
  export { VpayError, VpayApiError, VpayAuthError, VpayUnexpectedResponseError, VpayTransportError, VpayConfigError, VpayInvalidParamsError, WebhookSignatureError, } from "./errors.js";
14
- export type { AccountHolder, RetrieveAccountHolderParams, CheckoutSession, CheckoutSessionStatus, CheckoutSessionUiMode, CheckoutPaymentStatus, CreateCheckoutSessionParams, ListCheckoutSessionsParams, Customer, DeletedCustomer, Address, AddressParams, CreateCustomerParams, UpdateCustomerParams, ListCustomersParams, Invoice, InvoiceLine, InvoiceStatus, InvoiceStatusTransitions, DeletedInvoice, DeletedInvoiceItem, CreateInvoiceParams, UpdateInvoiceParams, ListInvoicesParams, PayInvoiceParams, HostedPayInvoiceParams, OutOfBandPayInvoiceParams, OutOfBandParams, OutOfBandMethod, OutOfBandPayment, CreateInvoiceItemParams, UpdateInvoiceItemParams, PaymentIntent, PaymentIntentStatus, PaymentMethodType, NextAction, LastPaymentError, FailureCode, Refund, RefundStatus, Event, KnownEventType, Balance, BalanceAmount, List, ListParams, ListPaymentIntentsParams, ListEventsParams, CreatePaymentIntentParams, ConfirmPaymentIntentParams, MtnMomoPaymentMethodData, OrangeMoneyPaymentMethodData, CreateRefundParams, RefundDestination, UpdateRefundParams, ListRefundsParams, RequestOptions, } from "./types.js";
14
+ export type { AccountHolder, RetrieveAccountHolderParams, CheckoutSession, CheckoutSessionStatus, CheckoutSessionUiMode, CheckoutPaymentStatus, CreateCheckoutSessionParams, ListCheckoutSessionsParams, Customer, DeletedCustomer, Address, AddressParams, CreateCustomerParams, UpdateCustomerParams, ListCustomersParams, Invoice, InvoiceLine, InvoiceStatus, InvoiceStatusTransitions, DeletedInvoice, DeletedInvoiceItem, CreateInvoiceParams, UpdateInvoiceParams, ListInvoicesParams, PayInvoiceParams, HostedPayInvoiceParams, OutOfBandPayInvoiceParams, OutOfBandParams, OutOfBandMethod, OutOfBandPayment, CreateInvoiceItemParams, UpdateInvoiceItemParams, PaymentIntent, PaymentIntentStatus, PaymentMethodDetails, PaymentMethodType, NextAction, LastPaymentError, FailureCode, Refund, RefundStatus, Event, KnownEventType, Balance, BalanceAmount, List, ListParams, ListPaymentIntentsParams, ListEventsParams, CreatePaymentIntentParams, ConfirmPaymentIntentParams, MtnMomoPaymentMethodData, OrangeMoneyPaymentMethodData, CreateRefundParams, RefundDestination, UpdateRefundParams, ListRefundsParams, RequestOptions, } from "./types.js";
15
15
  export { isCheckoutSessionEvent, isInvoiceEvent, isPaymentIntentEvent, isRefundEvent, } from "./types.js";
package/dist/types.d.ts CHANGED
@@ -54,6 +54,23 @@ export interface LastPaymentError {
54
54
  code: FailureCode;
55
55
  message: string;
56
56
  }
57
+ /**
58
+ * What a {@link PaymentIntent}'s one charge was made with (vpay since
59
+ * 2026-10-24): the payment-method type the payer used and the rail vpay
60
+ * charged it on. The outcome of routing; why that rail won is not on the API.
61
+ */
62
+ export interface PaymentMethodDetails {
63
+ /**
64
+ * The charge's payment-method type (`"mtn_wallet"`, `"orange_wallet"`), or
65
+ * `null` where the charge records none: one confirmed by the code of a rail
66
+ * serving several types (`notchpay`), or made before vpay recorded types.
67
+ * A `string` rather than a closed union, so a type this SDK predates still
68
+ * type-checks.
69
+ */
70
+ type: string | null;
71
+ /** The code of the rail the charge was made on (`"mtn_momo"`, `"notchpay"`, …). */
72
+ rail: string;
73
+ }
57
74
  export interface PaymentIntent {
58
75
  id: string;
59
76
  object: "payment_intent";
@@ -63,6 +80,14 @@ export interface PaymentIntent {
63
80
  currency: string;
64
81
  status: PaymentIntentStatus;
65
82
  payment_method_types: string[];
83
+ /**
84
+ * What the intent's one charge was made with, or `null` while it has none.
85
+ *
86
+ * `?` because a vpay predating 2026-10-24 omits the key entirely, for
87
+ * {@link PaymentIntent.customer}'s reason: `undefined` and `null` both mean
88
+ * "no charge to describe".
89
+ */
90
+ payment_method_details?: PaymentMethodDetails | null;
66
91
  next_action: NextAction | null;
67
92
  last_payment_error: LastPaymentError | null;
68
93
  metadata: Record<string, string>;
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.13.0";
12
+ export declare const SDK_VERSION = "0.14.0";
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.13.0"; // x-release-please-version
12
+ export const SDK_VERSION = "0.14.0"; // x-release-please-version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaam-apps/vpay-sdk",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
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": {