@vaam-apps/vpay-sdk 0.8.0 → 0.9.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/resources/refunds.d.ts +3 -0
- package/dist/types.d.ts +22 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
*
|
|
11
11
|
* - `orange_money`'s refund is a declared `NotImplemented` token — an Orange
|
|
12
12
|
* refund is an outbound transfer this repository has no specification for;
|
|
13
|
+
* - `notchpay`'s refund is a declared `NotImplemented` token too — Notch Pay
|
|
14
|
+
* documents refunds in a guide only, with nothing that makes a replay safe
|
|
15
|
+
* (RFC-0012 § 7);
|
|
13
16
|
* - `mtn_momo`'s is MTN's Disbursements `transfer`, WireMock-proven and
|
|
14
17
|
* rail-unproven: **no real MTN Disbursements credential exists in this
|
|
15
18
|
* project** — the only `disbursement_subscription_key` anywhere is the stub
|
package/dist/types.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export type PaymentIntentStatus = "requires_payment_method" | "requires_action" | "processing" | "succeeded" | "canceled";
|
|
12
12
|
/** Rail codes this SDK's `payment_method_types` values may hold. */
|
|
13
|
-
export type PaymentMethodType = "mtn_momo" | "orange_money";
|
|
13
|
+
export type PaymentMethodType = "mtn_momo" | "orange_money" | "notchpay";
|
|
14
14
|
/** Redirect-rail next step, Stripe's own `next_action.redirect_to_url` shape. */
|
|
15
15
|
export interface NextAction {
|
|
16
16
|
type: "redirect_to_url";
|
|
@@ -1161,8 +1161,21 @@ export type MtnMomoPaymentMethodData = {
|
|
|
1161
1161
|
export type OrangeMoneyPaymentMethodData = {
|
|
1162
1162
|
type: "orange_money";
|
|
1163
1163
|
};
|
|
1164
|
+
/**
|
|
1165
|
+
* Notch Pay (RFC-0012, 2026-10-20): a push rail, so the same instrument as
|
|
1166
|
+
* MTN's, under this rail's own code. The server's adapter is proven against a
|
|
1167
|
+
* stub only and has never called Notch Pay.
|
|
1168
|
+
*/
|
|
1169
|
+
export type NotchPayPaymentMethodData = {
|
|
1170
|
+
type: "notchpay";
|
|
1171
|
+
notchpay: {
|
|
1172
|
+
msisdn: string;
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1164
1175
|
export type ConfirmPaymentIntentParams = {
|
|
1165
1176
|
payment_method_data: MtnMomoPaymentMethodData;
|
|
1177
|
+
} | {
|
|
1178
|
+
payment_method_data: NotchPayPaymentMethodData;
|
|
1166
1179
|
} | {
|
|
1167
1180
|
payment_method_data: OrangeMoneyPaymentMethodData;
|
|
1168
1181
|
return_url: string;
|
|
@@ -1323,8 +1336,8 @@ export type RefundDestination = {
|
|
|
1323
1336
|
* # No refund this creates has ever moved money
|
|
1324
1337
|
*
|
|
1325
1338
|
* The route is real and so is every refusal it makes, but nothing on the
|
|
1326
|
-
* other side of it pays anybody: `orange_money`'s
|
|
1327
|
-
* `NotImplemented`
|
|
1339
|
+
* other side of it pays anybody: `orange_money`'s and `notchpay`'s refunds
|
|
1340
|
+
* are declared `NotImplemented` tokens, `mtn_momo`'s is MTN's Disbursements `transfer`
|
|
1328
1341
|
* which is WireMock-proven and for which **no real MTN credential exists in
|
|
1329
1342
|
* this project** — the only `disbursement_subscription_key` anywhere is the
|
|
1330
1343
|
* stub the e2e/demo stack points at a WireMock container, and the product has
|
|
@@ -1352,10 +1365,12 @@ export interface CreateRefundParams {
|
|
|
1352
1365
|
*
|
|
1353
1366
|
* Optional because the port allows a rail that refunds to the instrument
|
|
1354
1367
|
* that paid, and such a rail refuses a `destination` with a `400`.
|
|
1355
|
-
*
|
|
1356
|
-
*
|
|
1357
|
-
* `
|
|
1358
|
-
*
|
|
1368
|
+
* `mtn_momo` and `orange_money` both declare that a refund needs a payee,
|
|
1369
|
+
* so a create with no `destination` is a `400` naming `destination` on
|
|
1370
|
+
* either. `notchpay` (2026-10-20) is the first shipping rail that refunds
|
|
1371
|
+
* to the instrument that paid and so refuses one — but its refund is a
|
|
1372
|
+
* declared `NotImplemented` token, so a refund there fails whatever it
|
|
1373
|
+
* carries.
|
|
1359
1374
|
*/
|
|
1360
1375
|
destination?: RefundDestination | undefined;
|
|
1361
1376
|
metadata?: Record<string, string> | undefined;
|
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.9.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.
|
|
3
|
+
"version": "0.9.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": {
|