☎️Webhooks

How webhooks behave and can be utilized on Stelo

Any wallet which is NOT a user's primary wallet can have a singular webhook set on it. If a wallet has a webhook set when any transaction comes in, Stelo will first hit the webhook with the transaction data, and if a 200 is returned then the assets will be accepted. Therefore, webhooks shouldn't be primarily seen as a way to record transactions, but rather approve or decline them into a wallet.

Updating or Removing Webhooks

Please refer to the Webhook routes in Wallet Routes for documentation on how to add/update or remove a webhook from a wallet.

Webhook POST Example

Your server (specified by the URL you've set) will be sent a POST request with a body such as the following:

{
    "wallet_id": 87120480172,
    "memo": "This is a test memo",
    "assets": {
        "stelo": 71290,
        "stone": 47,
        "dirt": 13
    }
}

Best Practices

Respond Fast

Stelo locks the sending wallet, and your receiving wallet until your server returns a response. As such, it's best to return a response right away, and put any additional work on another background worker or process

Server Location

The Stelo API is currently located in the Ashburn Virginia USA area. If you wish to reduce latency as much as possible, deploy any servers in that region. In the future, the goal is to run the API on a few different continents, but currently, the database prevents this.

Last updated