βEvents
Transaction success event
When a user has reached the end of a buy/swap/sell process, you can listen for the following postMessage event:
{ type: 'paymentSubmitted', data: { paymentType, paymentId } }
paymentType: bankTransfer|card|cryptoThis can be used to trigger a navigation to the desired post-transaction screen or page.
Documentation: https://developer.mozilla.org/en-US/docs/Web/API/Window/message_event
Order creation event
This event is emitted when a new order is created in our system. It includes all the relevant information needed to display or process the order on your side.
{ "type": "orderCreated", "data": Order }Depending on the order type (βbuyβ, βsellβ, or βswapβ), the Order payload may include different fields. Below are examples for each case.
Buy order example
{
"id": "123456789",
"expirationDate": "2025-06-30T12:38:32.887Z",
"cryptoAddress": "bc1qlβ¦..",
"currencyIn": "CHF",
"currencyOut": "BTC",
"marketRate": "85854.9",
"network": "bitcoin_mainnet",
"paymentMode": "bank",
"type": "buy",
"valueIn": "100",
"valueOut": "0.001165"
}Sell order (Lightning) example
Swap order example
Last updated