@orvello/sdk 0.7.4 → 0.7.5

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/CONTRACT_SHA256 CHANGED
@@ -1 +1 @@
1
- a43f5ee82135a27003853cb05b2cea0f57c63b4fe23795f7b838ef0cb2deb5d9
1
+ 29bbbf64365d404e54e1596605e4d1c7fe1b86ed99797a52f04d40053b721a0e
package/dist/contract.cjs CHANGED
@@ -2244,7 +2244,21 @@ var apiRoutes_bookkeeping = {
2244
2244
  meta: {
2245
2245
  tags: ["bookkeeping", "payments-external"],
2246
2246
  summary: "Settle invoice via external API",
2247
- description: "One-shot settlement for shop/payment-provider flows: creates payment, allocates it to the invoice, and can auto-close shortfall as discount so no manual allocation step remains.",
2247
+ description: "One-shot settlement for shop/payment-provider flows. Preferred contract: grossAmount (customer payment, settles the invoice), feeAmount + feeProvider + feeReference (provider fee, booked as expense, never as customer discount), paidAt (actual payment time) and, for a payment currency other than the invoice currency, originalAmount/originalCurrency (documented gross in invoice currency; realized FX difference is recorded). Legacy contract (payoutAmount + bookedAt, optional closeGapStrategy=discount) keeps working unchanged; existing discounts are not reinterpreted. A changed fee for an already used reference is rejected with 409: use /settle-invoice/fee-correction.",
2248
+ bodyContentType: "application/json",
2249
+ validated: { "params": false, "query": false, "body": true }
2250
+ },
2251
+ types: null
2252
+ },
2253
+ // Contract source: explicit
2254
+ "bookkeeping_payments_settlement_fee_correction_external": {
2255
+ method: "POST",
2256
+ path: "/bookkeeping/payments/external/settle-invoice/fee-correction",
2257
+ auth: { "type": "unified_bearer", "allowUserSession": false, "allowOAuth2": true, "allowApiKey": true, "requireRole": "editor", "scopes": ["payments:write", "invoices:write"] },
2258
+ meta: {
2259
+ tags: ["bookkeeping", "payments-external"],
2260
+ summary: "Correct the provider fee of an external settlement",
2261
+ description: "Later provider fee change (e.g. fee refund) on a settlement made with grossAmount/feeAmount. The original payment stays unchanged; the difference is booked on correctedAt as its own account movement with a signed fee receipt. Idempotent per correctionRef. Legacy net-payout settlements are refused (422): their fee was never documented.",
2248
2262
  bodyContentType: "application/json",
2249
2263
  validated: { "params": false, "query": false, "body": true }
2250
2264
  },