Token Exchange WebhookWebhook

Webhook event notification request.

event_name value: token-exchange-completed

This request is sent to registered webhook event handlers after
Execute token conversion completes successfully

The Request body described below is the message property in the event notification request data. For more information about event notification requests, visit Webhooks.

Securitytilia_auth
Request
Request Body schema: application/json
account_id
string <= 36 characters

Account ID of the creator of this token exchange instance.

amount_usd
integer

The equivalent value in US dollars of the amount, displayed in cents

created
string

Timestamp when this was created. The format is RFC 3339 (2006-01-02T15:04:05Z07:00).

destination_wallet_id
string <= 36 characters

The wallet ID that will receive funds as a result of this transaction. The owner of this wallet may or may not be the account ID of the creator.

direction
string

Defines whether this token exchange instance is a purchase or conversion. Possible values: token_purchase or token_convert

exchange_rate
number

The rate to convert between virtual currency and USD. See exchange_rate_direction for more information.

exchange_rate_direction
string

The direction that the exchange_rate value is applied.

Possible values:

Value Description
usd_to_virtual amount_usd x exchange_rate = virtual_amount
virtual_to_usd virtual_amount x exchange_rate = amount_usd
fee_amount
integer

The total fee amount associated with this transaction.

fee_currency
string

The currency that the Tilia fee is priced in.

integrator_fee_amount
integer

The integrator fee amount associated with this transaction.

invoice_id
string <= 36 characters

The underlying invoice ID associated with this transaction.

status
string

The current status of this transaction.

tilia_fee_amount
integer

The Tilia fee amount associated with this transaction.

token_exchange_id
string <= 36 characters

The id for this token exchange instance.

updated
string

Timestamp when this was updated. The format is RFC 3339 (2006-01-02T15:04:05Z07:00).

user_paid_amount
integer

The amount in fiat or virtual currency the user paid for the token exchange.

user_paid_currency
string

The currency of the paid amount.

user_received_amount
integer

The amount in fiat or virtual currency the user received after the token exchange.

user_received_currency
string

The currency of the received amount.

virtual_amount
integer

The value in the virtual currency of the amount

virtual_currency
string

The virtual currency represented in the virtual_amount property

Responses
2XX

Return a 2XX status to indicate that the data was received successfully

Request samples
application/json
{
  • "account_id": "acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b",
  • "amount_usd": 1000,
  • "created": "2024-02-27T22:19:53.600222Z",
  • "destination_wallet_id": "wal_2V2cKKqYoaj018K0EXBauwcurbd",
  • "direction": "token_convert",
  • "exchange_rate": 0.01,
  • "exchange_rate_direction": "virtual_to_usd",
  • "fee_amount": 0,
  • "fee_currency": "VCD",
  • "integrator_fee_amount": 0,
  • "invoice_id": "inv_2V2XDLW6zogChdShdFh8WKOhHii",
  • "status": "SUCCESS",
  • "tilia_fee_amount": 0,
  • "token_exchange_id": "vtok_2V2WX4AZZiE6eDoGb6coN0RuxIR",
  • "updated": "2024-02-27T22:19:53.600222Z",
  • "user_paid_amount": 100000,
  • "user_paid_currency": "TIL",
  • "user_received_amount": 1000,
  • "user_received_currency": "USD",
  • "virtual_amount": 100000,
  • "virtual_currency": "TIL"
}