Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.proof.community/llms.txt

Use this file to discover all available pages before exploring further.

Pass callback functions to proofWidget.run({...}) to react to widget lifecycle and transaction events.
Callbacks fire in the browser and can be lost if the user closes the tab. Never use them as the authoritative source for business logic. Use polling, WebSocket, or the outbound webhook on your backend for state you depend on.

onStatusChange

Fired each time the transaction status changes inside the widget.
proofWidget.run({
  // ...
  onStatusChange: (data) => console.log(data)
});

Payload

{
  "amount": "0.01336",
  "currency": "BTC",
  "network": "BITCOIN",
  "fiat_amount": "100",
  "fiat_currency": "EUR",
  "merchant_transaction_id": "03b22d25d523a5285",
  "status": "paid",
  "payment_method": "card"
}
FieldTypeDescription
amountstringCrypto amount
currencystringCrypto currency ticker
networkstringBlockchain network
fiat_amountstringFiat amount
fiat_currencystringFiat currency code
merchant_transaction_idstringYour transaction identifier
statusstringWidget-level status (not the same as the normalized API enum)
payment_methodstringPayment method used (e.g. "card")

onLoad

Fired when the widget starts loading.
proofWidget.run({
  // ...
  onLoad: () => console.log("widget is loading")
});
No payload.

onReady

Fired when the widget has finished loading and is visible to the user.
proofWidget.run({
  // ...
  onReady: () => console.log("widget is loaded")
});
No payload.

onPaymentFinished

Fired in on-ramp when the fiat payment and KYC check (if required) have both completed, regardless of outcome.
proofWidget.run({
  // ...
  onPaymentFinished: (data) => console.log(data)
});

Payload

{
  "payment_method": "card"
}
FieldTypeDescription
payment_methodstringPayment method that was used (e.g. "card")

onSellTransferEnabled

Fired in off-ramp when the user selects the sell flow and a QR code is displayed for the crypto transfer.
proofWidget.run({
  // ...
  onSellTransferEnabled: (data) => console.log(data)
});

Payload

{
  "amount": "0.01336",
  "currency": "BTC",
  "network": "BITCOIN",
  "address": "04d3911f3b6de0843",
  "id": "03b22d25d523a5285",
  "flow_id": "payout"
}
FieldTypeDescription
amountstringCrypto amount the user must send
currencystringCrypto currency ticker
networkstringBlockchain network
addressstringDestination address for the transfer
idstringTransaction identifier
flow_idstringAlways "payout" for off-ramp