Callbacks
Summary
Callbacks (also known as webhooks) are a means to provide asynchronous responses to you. Callbacks are event based. The available callback events are documented below. To receive callbacks you must register a subscription for the events of interest to you.
Register for Callbacks
Dynamic registration and callback management will be coming shortly, in the mean time contact us via slack or at support@layer2financial.com to enable a subscription.
Callback Structure
Our callbacks share the same basic structure.
- event_id : a unique idempotent UUID. In the event of an event replay, this ID will remain the same.
- event_Type : the type of event with subsequent details specific to the event
Our call back events are purposefully lightweight. They contain only critical information for decision making. Should you need an extended information set, perform an enrichment by calling the approiate GET
endpoint using the IDs provided in the callback.
{
"event_id": "<unique_uuid>",
"event_type": "<event_type>",
"event_data":{
<event_data_here>
}
}
Available Callbacks
Applications
Event Type | Description |
---|---|
APPLICATION_READY_FOR_SUBMISSION | Generated when an application status changes to "ready_for_submission" |
APPLICATION_SUBMITTED | Generated when an application status changes to "submitted" |
APPLICATION_PROCESSING | Generated when an application status changes to "processing" |
APPLICATION_CHANGE_REQUESTED | Generated when an application status changes to "changes_requested" |
APPLICATION_REJECTED | Generated when an application status changes to "rejected" |
APPLICATION_APPROVED | Generated when an application status changes to "approved" |
Payments
Event Type | Description |
---|---|
PAYMENT_CONFIRMED | Generated when an incoming payment has arrived and been confirmed, but has not yet been exchanged |
PAYMENT_EXCHANGE_EXECUTED | Generated when the auto-trade on a payment transaction has been successfully executed but is still waiting on settlement. This typically means incoming funds are now held and the transaction can be treated as settled. |
Call Back Details
APPLICATION_READY_FOR_SUBMISSION
{
"event_id": "00000000-0000-0000-0000-000000000000",
"event_type": "APPLICATION_READY_FOR_SUBMISSION",
"event_data":{
"application": {
"application_id": "10000000-1000-1000-1000-100000000000",
"status": "READY_FOR_SUBMISSION"
}
}
}
APPLICATION_SUBMITTED
{
"event_id": "00000000-0000-0000-0000-000000000000",
"event_type": "APPLICATION_SUBMITTED",
"event_data":{
"application": {
"application_id": "10000000-1000-1000-1000-100000000000",
"status": "SUBMITTED"
}
}
}
APPLICATION_PROCESSING
{
"event_id": "00000000-0000-0000-0000-000000000000",
"event_type": "APPLICATION_PROCESSING",
"event_data":{
"application": {
"application_id": "10000000-1000-1000-1000-100000000000",
"status": "PROCESSING"
}
}
}
APPLICATION_CHANGE_REQUESTED
{
"event_id": "00000000-0000-0000-0000-000000000000",
"event_type": "APPLICATION_CHANGE_REQUESTED",
"event_data":{
"application": {
"application_id": "10000000-1000-1000-1000-100000000000",
"status": "CHANGES_REQUESTED"
}
}
}
APPLICATION_REJECTED
{
"event_id": "00000000-0000-0000-0000-000000000000",
"event_type": "APPLICATION_REJECTED",
"event_data":{
"application": {
"application_id": "10000000-1000-1000-1000-100000000000",
"status": "REJECTED"
}
}
}
APPLICATION_APPROVED
{
"event_id": "00000000-0000-0000-0000-000000000000",
"event_type": "APPLICATION_APPROVED",
"event_data":{
"application": {
"application_id": "10000000-1000-1000-1000-100000000000",
"status": "APPROVED"
}
}
}
PAYMENT_EXCHANGE_EXECUTED
{
"event_id": "00000000-0000-0000-0000-000000000000",
"event_type": "PAYMENT_EXCHANGE_EXECUTED",
"event_data": {
"network": {
"asset_type_id": "ETHEREUM_GOERLI_USDC",
"external_transaction_id": "0xcf005e341c5c2b061da03dd32ce96d4e9b1c5bcb4ce7b3b19278a83b18654890",
"sending_address": "0xc6667bce5762bc5da75d703c1c09d0155e6e81ae",
"receiving_address": "0x6C53F0fF29c9fC8e0AA4cC76328a923F2576c1Cc"
},
"payment": {
"payment_amount_requested": 1.1,
"payor_id": "0000-0006",
"payment_reference_id": "INV-2023-93"
},
"receiving_account": {
"customer_id": "CUST098324234",
"account_id": "ACC2342342",
"asset_type_id": "ETHEREUM_GOERLI_USDC"
},
"receiving_account_transaction": {
"transaction_id": "0xcf005e341c5c2b061da03dd32ce96d4e9b1c5bcb4ce7b3b19278a83b18654890",
"transaction_status": "CONFIRMED",
"transaction_date": "2022-11-08T19:49:40",
"amount_received": 0.01,
"asset_type_id": "ETHEREUM_GOERLI_USDC"
},
"exchange": {
"action": "SELL",
"receiving_account_transaction": {
"transaction_id": "0xcf005e341c5c2b061da03dd32ce96d4e9b1c5bcb4ce7b3b19278a83b18654890",
"transaction_status": "CONFIRMED",
"transaction_date": "2022-11-08T19:49:40",
"amount_received": 0.01,
"asset_type_id": "ETHEREUM_GOERLI_USDC"
},
"destination_account_transaction": {
"transaction_id": "ae6b8259-11ea-4e2b-9c50-76d34789373e",
"transaction_status": "PENDING",
"transaction_date": "2022-11-08T19:53:09",
"amount_received": 0.01,
"asset_type_id": "FIAT_TESTNET_USD"
}
}
}
}
PAYMENT_CONFIRMED
{
"event_id": "00000000-0000-0000-0000-000000000000",
"event_type": "PAYMENT_CONFIRMED",
"event_data":{
"network": {
"asset_type_id": "ETHEREUM_GOERLI_USDC",
"external_transaction_id": "0xc648eb4a661f90ad5c58112f236eabe8d6f0243e5e1b386c56593252684ce407",
"sending_address": "0xc6667bce5762bc5da75d703c1c09d0155e6e81ae",
"receiving_address": "0x6C53F0fF29c9fC8e0AA4cC76328a923F2576c1Cc"
},
"payment": {
"payment_amount_requested": 1.1,
"payor_id": "0000-0006",
"payment_reference_id": "INV-2023-93"
},
"receiving_account": {
"customer_id": "CUST098324234",
"account_id": "ACC2342342",
"asset_type_id": "ETHEREUM_GOERLI_USDC"
},
"transaction": {
"transaction_id": "0xc648eb4a661f90ad5c58112f236eabe8d6f0243e5e1b386c56593252684ce407",
"transaction_status": "CONFIRMED",
"transaction_date": "2019-08-24T14:15:22Z",
"amount_received": 0.25,
"asset_type_id": "ETHEREUM_GOERLI_USDC"
}
}
}