@depay/widgets 9.0.2 → 9.0.3

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/README.md CHANGED
@@ -317,7 +317,31 @@ DePayWidgets.Payment({
317
317
  })
318
318
  ```
319
319
 
320
- Once the payment has been submitted by the widget, it will call the configured endpoint with:
320
+ Once a user clicks "Pay" in the widget, and before the transaction is handed over to the wallet, the widget will send a payment trace (without transaction_id) to the configured endpoint.
321
+
322
+ This is where the payment tracing starts:
323
+
324
+ ```
325
+ POST /track/payments
326
+ BODY:
327
+ {
328
+ "blockchain": "ethereum",
329
+ "sender": "0x769794c94e9f113e357023dab73e81dbd6db201c",
330
+ "nonce": 103,
331
+ "after_block": 13230369,
332
+ "from_token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
333
+ "from_amount": "1100000000000000000",
334
+ "from_decimals": 18,
335
+ "to_token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
336
+ "to_amount": "1000000000000000000",
337
+ "to_decimals": 18,
338
+ "fee_amount": "100000000000000000"
339
+ }
340
+ ```
341
+
342
+ Once the payment has been submitted by the widget, it will call the configured endpoint again.
343
+
344
+ This is where the payment tracking starts:
321
345
 
322
346
  ```
323
347
  POST /track/payments