proofWidget.run({...}) to react to widget lifecycle and transaction events.
onStatusChange
Fired each time the transaction status changes inside the widget.
Payload
| Field | Type | Description |
|---|---|---|
amount | string | Crypto amount |
currency | string | Crypto currency ticker |
network | string | Blockchain network |
fiat_amount | string | Fiat amount |
fiat_currency | string | Fiat currency code |
merchant_transaction_id | string | Your transaction identifier |
status | string | Widget-level status (not the same as the normalized API enum) |
payment_method | string | Payment method used (e.g. "card") |
onLoad
Fired when the widget starts loading.
onReady
Fired when the widget has finished loading and is visible to the user.
onPaymentFinished
Fired in on-ramp when the fiat payment and KYC check (if required) have both completed, regardless of outcome.
Payload
| Field | Type | Description |
|---|---|---|
payment_method | string | Payment method that was used (e.g. "card") |
onSellTransferEnabled
Fired in off-ramp when the user selects the sell flow and a address is displayed for the crypto transfer.
Payload
| Field | Type | Description |
|---|---|---|
amount | string | Crypto amount the user must send |
currency | string | Crypto currency ticker |
network | string | Blockchain network |
address | string | Destination address for the transfer |
id | string | Transaction identifier |
flow_id | string | Always "payout" for off-ramp |