platform-types 1.10.748 → 1.10.749
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/order.d.ts +12 -15
- package/dist/payment.d.ts +35 -0
- package/package.json +1 -1
package/dist/order.d.ts
CHANGED
|
@@ -1641,24 +1641,21 @@ declare global {
|
|
|
1641
1641
|
interface LinkedPaymentEntry {
|
|
1642
1642
|
source: 'mp' | 'stripe' | 'mp_movement';
|
|
1643
1643
|
/**
|
|
1644
|
-
* The amount this
|
|
1645
|
-
* — **not** the amount originally settled. It is what
|
|
1644
|
+
* The amount this payment counts toward the order. It is what
|
|
1646
1645
|
* `deriveOrderFinancialAxis` sums, so it has to mean money the order can
|
|
1647
1646
|
* still count.
|
|
1648
1647
|
*
|
|
1649
|
-
* ⚠️
|
|
1650
|
-
*
|
|
1651
|
-
*
|
|
1652
|
-
*
|
|
1653
|
-
*
|
|
1654
|
-
*
|
|
1655
|
-
*
|
|
1656
|
-
*
|
|
1657
|
-
*
|
|
1658
|
-
*
|
|
1659
|
-
*
|
|
1660
|
-
* A consumer reconciling against provider refund history will find those
|
|
1661
|
-
* rows disagree, and the disagreement is the back catalogue, not a bug.
|
|
1648
|
+
* ⚠️ **No writer shrinks it on a refund.** A refund or settled chargeback
|
|
1649
|
+
* MercadoPago reports later is detected and recorded on the payment's
|
|
1650
|
+
* status observation, never here: the entry keeps its linked figure until
|
|
1651
|
+
* the operator mirrors the refund by hand (an unlink removes the entry).
|
|
1652
|
+
* Entries on HISTORICAL orders may carry a smaller figure (or be gone):
|
|
1653
|
+
* the removed outbound MercadoPago refund lowered a partially refunded
|
|
1654
|
+
* entry to its un-refunded remainder and removed an exhausted one, and
|
|
1655
|
+
* those rows keep what it wrote. Entries written before that refund
|
|
1656
|
+
* existed carry their pre-refund figure; nothing is backfilled either way,
|
|
1657
|
+
* so a consumer reconciling against provider refund history will find
|
|
1658
|
+
* rows that disagree, and the disagreement is the back catalogue, not a bug.
|
|
1662
1659
|
*
|
|
1663
1660
|
* ⚠️ Denominated in `currency` below — the PAYMENT's denomination, not the
|
|
1664
1661
|
* order's. Never sum this field across entries without converting.
|
package/dist/payment.d.ts
CHANGED
|
@@ -35,6 +35,41 @@ declare global {
|
|
|
35
35
|
source: PaymentReceivedSource;
|
|
36
36
|
paidAt: number;
|
|
37
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* MercadoPago's CUMULATIVE refunded amount for this payment, in its own currency
|
|
40
|
+
* (`transaction_amount_refunded`, else the sum of `refunds[]` with status
|
|
41
|
+
* `approved`; never less than the full `amount` on `providerStatus: 'refunded'`). Written by
|
|
42
|
+
* the payment status service (`mercadopagoPaymentStatus.ts`) on every observation
|
|
43
|
+
* — the webhook and the poller's re-check alike. Absent means none observed, never
|
|
44
|
+
* an unknown. Present ⇒ a link refuses the payment (`LINK_LOCKED` `refunded-payment`).
|
|
45
|
+
*/
|
|
46
|
+
refundedAmount?: number;
|
|
47
|
+
/**
|
|
48
|
+
* MercadoPago's `refunds[]` as last observed, same writer: `id` is MercadoPago's
|
|
49
|
+
* numeric refund id as a string, `amount` in the payment's currency, `status` as
|
|
50
|
+
* MercadoPago states it (`approved` once the money moved, `in_process` before), and
|
|
51
|
+
* `at` its `date_created` in epoch ms. Absent when MercadoPago listed none.
|
|
52
|
+
*/
|
|
53
|
+
refunds?: {
|
|
54
|
+
id: string;
|
|
55
|
+
amount: number;
|
|
56
|
+
status: string;
|
|
57
|
+
at: number;
|
|
58
|
+
}[];
|
|
59
|
+
/**
|
|
60
|
+
* A dispute on the payment, same writer: present while `providerStatus` is
|
|
61
|
+
* `charged_back` or `in_mediation`. A later observation that shows neither clears it,
|
|
62
|
+
* except a SETTLED chargeback, which is kept through a later `approved`. On
|
|
63
|
+
* `charged_back`, `statusDetail` says what happened to the money: `settled` (taken for
|
|
64
|
+
* the full amount — reported for the operator to mirror by hand; the books are not
|
|
65
|
+
* changed), `reimbursed` (MercadoPago covered the seller) or `in_process` (still
|
|
66
|
+
* open). Any other detail, and a mediation, reads as still open. Present ⇒ a link
|
|
67
|
+
* refuses the payment.
|
|
68
|
+
*/
|
|
69
|
+
chargeback?: {
|
|
70
|
+
status: string;
|
|
71
|
+
statusDetail?: string;
|
|
72
|
+
};
|
|
38
73
|
}
|
|
39
74
|
/** GET /payments/pending returns this page inside the standard data envelope. */
|
|
40
75
|
interface MpPaymentObservationPage {
|