Skip to content

A self-hosted UPI & COD payment gateway with zero per-transaction platform fees, universal JavaScript checkout integration, dynamic QR payments, WhatsApp OTP authentication, and automated payment verification.

JavaScript

docs: explain durable outcome replay and merchant deduplication

generaltony007e08e3df3239d
diff --git a/docs/MERCHANT_INTEGRATION.md b/docs/MERCHANT_INTEGRATION.md
index 6ee1b15..9ab2f88 100644
--- a/docs/MERCHANT_INTEGRATION.md
+++ b/docs/MERCHANT_INTEGRATION.md
@@ -16,6 +16,8 @@ Public outcomes:
Breaking change: UPI observer webhooks now send `X-Gateway-Event: OBSERVED_SUCCESS` and `event: "OBSERVED_SUCCESS"`. Older integrations that treated UPI `SUCCESS` as paid must switch. `SUCCESS` remains the COD and counter event.
+Webhook crash recovery queues each new dispatchable outcome in the same SQLite transaction as its payment-status change. One payment may therefore have separate pending `OBSERVED_SUCCESS`, `MANUAL_REVIEW`, and `RECONCILED` notifications. Dispatching one outcome does not remove the others. Upgrading the outbox preserves already-pending notifications but does not create notifications for historical UPI outcomes. Merchants must still deduplicate by delivery ID: a crash after receipt but before acknowledgement can cause a retry. Delivery order must not be used as a substitute for checking the event and `settlementState`.
+
---
## 2. Using `@youpi/merchant-sdk`