Events
What the sell widget tells your page when the crypto has to be sent.
Listen on window; the data is in event.detail:
window.addEventListener('EVENT_NAME', (event) => {
console.log(event.detail);
});Order requested
The customer confirmed the sale. detail is everything your app needs to send
the crypto.
Event name: btcdirect-embeddable-coin-to-fiat-order-requested
// event.detail
{
currency: 'BTC',
amount: 0.1,
walletAddress: 'bc1q…',
destinationTag: '',
orderId: '3f2b8c1e-…',
userWalletAddress: 'bc1q…',
userWalletIdentifier: '123456789'
}currency
string
The coin’s ticker.
amount
number
How much to send.
walletAddress
string
Our address: where to send it.
destinationTag
string
The memo or destination tag that must travel with the transfer, for coins that use one. Empty otherwise.
orderId
string
The order. Quote it back in transaction-id-confirmation.
userWalletAddress
string
The customer’s wallet the crypto comes from, when you passed wallet addresses. Empty otherwise.
userWalletIdentifier
string
The id you gave that wallet. Empty otherwise.
The customer’s wallet fields are filled when you passed wallet addresses.
Then send the transfer and report its transaction id: transaction confirmation.
The account events are sent here too.