Documentation
Checkout events
Modal checkout runs in an iframe and communicates with your page via postMessage. The pay button also emits DOM events.
postMessage (hosted checkout → parent)
{ source: "zap", type: "uc:paid" | "uc:close" | "uc:resize", … }| type | Meaning |
|---|---|
| uc:paid | Payment succeeded; includes receiptId and receiptUrl |
| uc:close | Modal closed |
| uc:resize | Content height changed (desktop modal) |
DOM events on <pay-button>
| Event | When |
|---|---|
| uc:paid | Same as postMessage paid |
| uc:closed | Modal closed; detail.paid is boolean |
| uc:error | Session creation failed |