js icon indicating copy to clipboard operation
js copied to clipboard

Checkout widget transaction hash

Open Yash094 opened this issue 2 weeks ago • 6 comments

[Dashboard/Portal] Feature: Return transaction hash in Checkout Widget iframe events

Notes for the reviewer

  • The checkout widget iframe now includes a transactions array in both success and error postMessage events.
  • This array contains { chainId, transactionHash } objects for all relevant on-chain transactions.
  • For error events, the transactions array may contain partial data if the error occurred mid-flow.
  • Documentation for the iframe integration has been updated to reflect these changes.
  • A new example HTML file (TRANSACTION_HASH_EXAMPLE.html) is included for easy testing.

How to test

  1. Open apps/dashboard/src/app/bridge/checkout-widget/TRANSACTION_HASH_EXAMPLE.html in a browser.
  2. Perform a successful checkout and observe the transactions array in the success event log on the right.
  3. Trigger an error (e.g., by using an invalid payment method or insufficient funds) and observe the transactions array (if any) in the error event log.

Slack Thread

Open in Cursor Open in Web


PR-Codex overview

This PR adds transaction hash information to the checkout widget iframe's success and error events, enabling developers to track on-chain transactions associated with payments made through the widget.

Detailed summary

  • Updated onSuccess and onError handlers in CheckoutWidgetEmbed.client.tsx to include transaction hashes.
  • Enhanced documentation in page.mdx with examples for success and error events.
  • Created TRANSACTION_HASH_EXAMPLE.html to demonstrate event logging.
  • Added changeset in .changeset/checkout-widget-transaction-hash.md for release notes.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Yash094 avatar Dec 26 '25 08:12 Yash094