@vaam-apps/vpay-sdk 0.13.0 → 0.14.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/index.d.ts +1 -1
- package/dist/types.d.ts +28 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
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>;
|
|
@@ -1341,8 +1366,9 @@ export type RefundDestination = {
|
|
|
1341
1366
|
* A **rail code** (`"mtn_momo"`, `"orange_money"`, `"notchpay"`), or the
|
|
1342
1367
|
* payment-method type the charge records (`"mtn_wallet"`, `"orange_wallet"`):
|
|
1343
1368
|
* a server since 2026-10-24 accepts the type for a charge routed by it, which
|
|
1344
|
-
* is how to refund one without knowing the rail it went to (
|
|
1345
|
-
* names that rail
|
|
1369
|
+
* is how to refund one without knowing the rail it went to. (Since v0.14.0
|
|
1370
|
+
* the intent names that rail too, as `payment_method_details.rail`, so the
|
|
1371
|
+
* rail code is also at hand.) Another type, or a type on an older server, is
|
|
1346
1372
|
* refused with a `400` naming `destination`.
|
|
1347
1373
|
*/
|
|
1348
1374
|
payment_method_type: PaymentMethodType;
|
package/dist/version.d.ts
CHANGED
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.
|
|
12
|
+
export const SDK_VERSION = "0.14.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.
|
|
3
|
+
"version": "0.14.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": {
|