Coinfat

Checkout SDK

Events

Lifecycle callbacks you can pass to checkout() (or to a button's checkout options) to react to the payment as it progresses.

Callbacks

All callbacks are optional. Each receives the current invoice object, except onError, which receives an Error. The Type column below is the argument each callback is called with.

PropertyTypeDescription
onReadyinvoiceThe invoice first loads.
onCoinSelectedinvoiceThe payer picks or switches a coin.
onPaymentDetectedinvoiceAn on-chain payment is detected and confirming.
onCompletedinvoiceThe invoice completes.
onExpiredinvoiceThe invoice expires.
onCanceledinvoiceThe invoice is canceled.
onErrorErrorA load, select, or requote fails. Receives a CheckoutApiError.