Wallet Webhooks
Use webhooks to receive information about events such as card, or wallets transactions, as they occur.
The Webhooks API allows you to subscribe to be notified about events that happen in your Juice USDC wallet and its associated wallets. Rather than making an API
call when an event happens in a connected wallet, Juice can send an HTTP request to an endpoint you configure.
Soon to come: You'll be able to configure your webhooks from the Juice dashboard, where a user interface will be provided for you to register and test your webhook endpoints.
Webhooks Type
You'll be able to get updates on your wallet in these events:
- When an address on your wallet receives a credit transaction.
- When an address on your wallet sends out a transaction.
Setting Up Webhooks
During registration, Please enter a URL
you would like to receive notifications on. The webhook url associated to the integrator account would be used to propagate these events
As seen above, the webhook payload has an event
property that identifies what the event is about, and the data
attribute contains the event data.
Currently, we propagate three different event types related to activities carried out on the wallet USDC_DEPOSIT_NOTIFICATION
, PAYOUT_WIRE_NOTIFICATION
,
Sample webhook payloads for the scenarios described above are shown below
{
event: "USDC_DEPOSIT_NOTIFICATION",
checksum: "32762AE880695AE7343A649CB9C36CA6FF83AA258A139804AEF7D73B421DE097",
data: {
"amount": {
"amount": "3.14",
"currency": "USD"
},
"create_date": "2021-11-12T16:35:01.294Z",
"destination": {
"address": "TR8ZFozJ3PZR4eM8NDksNG7xse6CDhTFwo",
"chain": "TRX",
"type": "blockchain"
},
"id": "064f09f5-ccb4-4a1d-a8d8-4ad68d1a1b07",
"source": {
"id": "1e5f275e-d365-4605-9e77-9705a8ba0241",
"type": "blockchain"
},
"status": "complete",
"transaction_hash": "8650be7c-5853-40a4-a05a-63fc6b25c0ed",
"type": "credit"
}
}
{
"checksum": "32762AE880695AE7343A649CB9C36CA6FF83AA258A139804AEF7D73B421DE097",
event: "PAYOUT_WIRE_NOTIFICATION",
data: {
“amount”: {
“amount”: “1.00",
“currency”: “USD”
},
“create_date”: “2022-01-24T11:27:10.439Z”,
“destination”: {
“account_no”: “8310697692”,
“bank_address”: {
“bankName”: “Community Federal Savings Bank”,
“city”: “Woodhaven”,
“country”: “US”,
“district”: “NY”,
“line1”: “89-16 Jamaica Ave”,
“line2”: “11421"
},
“billing_details”: {
“city”: “New York”,
“country”: “US”,
“district”: “NY”,
“line1": “19 W 24th Street”,
“line2": “Suite 1”,
“name”: “Wire Recipient”,
“postalCode”: “10010”
},
“name”: “COMMUNITY FEDERAL SAVINGS BANK ****7692”,
“routing_no”: “026073008”,
“type”: “wire”
},
“id”: “86cd9a1f-dd30-4dfb-a400-66c488d71de3”,
“source”: {
“id”: “0f220c15-7f22-4a39-9fbb-ab40497b5998",
“type”: “address”
},
“status”: “complete”,
“transaction_hash”: null,
“type”: “debit”
}
}
{
"checksum": "32762AE880695AE7343A649CB9C36CA6FF83AA258A139804AEF7D73B421DE097",
event: "PAYOUT_CHAIN_NOTIFICATION",
data: {
"amount": {
"amount": "3.14",
"currency": "USD"
},
"create_date": "2021-11-12T16:35:01.294Z",
"destination": {
"address": "TR8ZFozJ3PZR4eM8NDksNG7xse6CDhTFwo",
"chain": "TRX",
"type": "blockchain"
},
"id": "064f09f5-ccb4-4a1d-a8d8-4ad68d1a1b07",
"source": {
"id": "1e5f275e-d365-4605-9e77-9705a8ba0241",
"type": "address"
},
"status": "complete",
"transaction_hash": "8650be7c-5853-40a4-a05a-63fc6b25c0ed",
"type": "debit"
}
}
Updated about 3 years ago