Skip to content

Request access

Tell us about your processing, and we'll reply by email.

API reference

Webhook events

How to verify and handle deliveries, with code: Webhooks.

Each event goes to your webhook URL as a POST with a JSON body. Events are recorded only while a webhook is set.

  • Delivery is at least once: handle each event id once, and apply each item of a transaction event once. Order is not guaranteed: rely on the status in data, not on the order of events. A final status (swept, failed, rejected, revoked) never changes: an event that comes later with processing or queued for it is older news.
  • Store the event, then respond: transaction events carry up to 200 items, so accept bodies of up to 256 KiB.
  • Verify every delivery: v1 in Portuna-Signature is the HMAC-SHA256, in hex, of the string <t>.<body> with your webhook secret as the key, where <body> is the raw request body. Accept t only within 5 minutes of your clock. Each attempt is signed anew.
  • Respond with any 2xx within 10 seconds. Any other response, a redirect included, or no response in time is a failed attempt: the event is tried again after 10 s, 20 s, 40 s and so on, up to an hour between attempts, 12 attempts in all.
  • New event types may come: accept and ignore the ones you do not handle.
NameTypeDescription
Portuna-Signature requiredstringt=<unix seconds>,v1=<signature>: the time of this attempt and the HMAC-SHA256 of <t>.<body> with your webhook secret, in hex. Example: t=1791634982,v1=6e735f32a0…
Portuna-Event requiredstringThe event type, as in type in the body. Example: transaction.mined
Portuna-Delivery requiredstring (uuid)The event’s id, as in the body. It is the same in every attempt.
User-AgentstringIdentifies the sender. Verify deliveries by their signature, not by this header. Example: portuna-webhooks/1

The body is an Event object.

The body of a webhook delivery. type tells what happened and what data is.

  • Sweeps and revocations that ride a transaction: a transaction event, one per transaction rather than one per sweep. transaction.sent comes when the transaction is sent and again for every replacement at a higher fee; transaction.mined once it is mined and confirmed, with each sweep’s outcome; transaction.reverted or transaction.dropped if it failed as a whole, with what became of each sweep. data is the transaction and its items as they were at the event.
  • Sweeps and revocations that ended before any transaction carried them: sweep.rejected, sweep.failed, revocation.rejected, revocation.failed, with the sweep as in GET /v1/sweeps/{id} or the revocation as in GET /v1/revocations/{id}.
  • A hot wallet as in GET /v1/hot-wallets, a delegate as in GET /v1/delegates, a token as in GET /v1/tokens, a change of your tariff, a low balance alert, a payout as in GET /v1/payouts.

Every sweep’s outcome comes in exactly one event. Hot wallets, delegates, tokens, sweeps and revocations are shown as they are when the event is delivered (the status of a sweep or revocation in its event is final, so that is how it was); transactions and payouts as they were when the event happened.

FieldTypeDescription
id requiredstring (uuid)The event’s id, the same in every attempt.
type requiredstringThe event type. One of: transaction.sent, transaction.mined, transaction.reverted, transaction.dropped, sweep.failed, sweep.rejected, revocation.failed, revocation.rejected, hot_wallet.active, hot_wallet.failed, delegate.active, delegate.failed, token.refused, tariff.changed, balance.low, balance.payout.
created_at requiredstring (date-time)When the event happened.
data requiredTransactionEventData | Sweep | Revocation | HotWallet | Delegate | Token | TariffChange | BalanceLow | PayoutDepends on type: see below.
TypedataDescription
transaction.sent
transaction.mined
transaction.reverted
transaction.dropped
TransactionEventDataA transaction of sweeps or revocations was sent, or ended. transaction.sent: a version of it was signed and is being broadcast, the first or a replacement at a higher fee with a new hash; its items are processing. transaction.mined: it is mined and confirmed (3 blocks in Ethereum, 15 in BSC); each item is swept or failed (revoked or failed for revocations). transaction.reverted: it is mined but failed as a whole, its gas spent; transaction.dropped: another transaction took its nonce, nothing was spent. In both, each item is queued, to ride a new transaction with events of its own, or failed if its attempts ran out.
sweep.failed
sweep.rejected
SweepA sweep ended before any transaction carried it. sweep.rejected: a check before sending failed; sweep.failed: its attempts ran out before it was sent, for example the gas wallet could not pay. A sweep that rode a transaction ends in that transaction’s event instead.
revocation.failed
revocation.rejected
RevocationA revocation ended before any transaction carried it. revocation.rejected: it was never sent; revocation.failed: its attempts ran out before it was sent. A revocation that rode a transaction ends in that transaction’s event instead.
hot_wallet.active
hot_wallet.failed
HotWalletA hot wallet’s delegate deployment ended. hot_wallet.active: the delegate is deployed; hot_wallet.failed: the deployment failed.
delegate.active
delegate.failed
DelegateThe deployment of a delegate of a set ended. delegate.active: the delegate is deployed; delegate.failed: the deployment failed. A hot wallet’s own delegate reports with hot_wallet.* events instead.
token.refusedTokenA token you could sweep is refused now: its sweeps kept failing, it failed the checks again when the service started, or Portuna blocked it. Its sweeps that are still queued are rejected with token_disabled.
tariff.changedTariffChangeWhat you pay for a token changed, or will: a rate Portuna agreed with you was set, taken back, runs out within 7 days or ran out, or a token’s conventional cost changed. A rise of a conventional cost by more than 5% applies 7 days after this event; you are notified 7 days before an agreed rate runs out, and again when it does.
balance.lowBalanceLowYour gas wallet fell below a low balance threshold. One event each time it falls below; the alert re-arms once the balance recovers.
balance.payoutPayoutA payout of your available balance to one of your hot wallets was sent (status is sent, with its transaction), paid or failed. One event for each of these steps.
Content-Type: application/json
User-Agent: portuna-webhooks/1
Portuna-Event: transaction.mined
Portuna-Delivery: 7e2c9a41-3b5d-4f60-8c17-d9a0e4b2f816
Portuna-Signature: t=1793095272,v1=<hex HMAC-SHA256>
{
"id": "7e2c9a41-3b5d-4f60-8c17-d9a0e4b2f816",
"type": "transaction.mined",
"created_at": "2026-10-27T10:01:12Z",
"data": {
"transaction": {
"id": 48420,
"chain_id": 11155111,
"kind": "sweep",
"status": "mined",
"hash": "0x315137ae951da414629cf9481c89422639bd7e238873820559e0b0a2f8071457",
"block_number": 11987254,
"hot_wallets": [
"0x2Cd50979a8A33e8CA37DA85F8517fb148a67b769"
],
"sweeps": {
"total": 3,
"processing": 0,
"swept": 2,
"failed": 1,
"requeued": 0
},
"revocations": null,
"gas_used": 104220,
"gas_cost": "125064000000000",
"fees": "25278000000000",
"created_at": "2026-10-27T10:00:03Z",
"mined_at": "2026-10-27T10:01:12Z",
"list_id": null
},
"part": 1,
"parts": 1,
"items": [
{
"id": "c7d41a92-5b3e-4f08-9d21-6e8a0b3f5c71",
"external_id": "dep-81f0a2",
"batch_index": 0,
"account": "0x2c7536E3605D9C16a7a3D7b1898e529396a65c23",
"hot_wallet": "0x2Cd50979a8A33e8CA37DA85F8517fb148a67b769",
"token": "USDT",
"token_address": "0x3809a97a7a25C8bA577027c0AE2D81a09cdA1a2f",
"amount": null,
"status": "swept",
"swept_amount": "120000000",
"fee": "23358000000000",
"log_index": 211,
"transfer_log_index": 210
},
{
"id": "1e8b6f04-9a27-4c3d-b5e1-0f4a7d2c9e63",
"external_id": "dep-81f0a3",
"batch_index": 1,
"account": "0x4B506125a16ab3A70A2970e11B1cd9039b0b0D99",
"hot_wallet": "0x2Cd50979a8A33e8CA37DA85F8517fb148a67b769",
"token": "ETH",
"token_address": null,
"amount": null,
"status": "swept",
"swept_amount": "4180000000000000",
"fee": "1920000000000",
"log_index": 212
},
{
"id": "5f2a9c7e-0d14-4b86-a3f9-7c1e2b8d4a50",
"external_id": "dep-81f0a4",
"batch_index": 2,
"account": "0xa4c0D7FcDDd1e47925E354eB506Cc3C209C1787b",
"hot_wallet": "0x2Cd50979a8A33e8CA37DA85F8517fb148a67b769",
"token": "USDT",
"token_address": "0x3809a97a7a25C8bA577027c0AE2D81a09cdA1a2f",
"amount": "50000000",
"status": "failed",
"reason": "NothingToSweep",
"log_index": 213
}
]
}
}