Skip to content
LogoLogo

Onchain Trigger

Create a trigger address for a beneficiary. When you send tokens to this address, BLOX converts the tokens and pays the beneficiary. The deposit starts the transfer and also supplies the money for it. Thus, your prefund balance stays available for the payouts that you create. For the procedure, refer to Pay a beneficiary from a deposit.

Two records show one flow of money. The deposit is the tokens that arrive on-chain. The transfer is the bank payment that the deposit starts. The deposit shows the transfer in result.withdrawal. The transfer has its own status.

The trigger address accepts a deposit only from an allowed sender. Before you give the trigger address to a sender, allow that sender.

A read request must have the blox-api-key header. A write request must have the API key and an HTTP message signature. Every error response has the format { "code": "…", "message": "…", "requestId": "…" }. Use code to identify the error. Do not use message.

MethodEndpointPurpose
POST/v1/payouts/beneficiaries/{beneficiaryId}/addressCreate a trigger address for a beneficiary
GET/v1/payouts/beneficiaries/{beneficiaryId}/address/whitelistList the allowed senders of a trigger address
POST/v1/payouts/beneficiaries/{beneficiaryId}/address/whitelistAllow a sender
PATCH/v1/payouts/beneficiaries/{beneficiaryId}/address/whitelist/{senderId}Disable or enable an allowed sender and keep it in the list
DELETE/v1/payouts/beneficiaries/{beneficiaryId}/address/whitelist/{senderId}Remove an allowed sender
GET/v1/payouts/deposits/{id}Get a deposit and the transfer that it started
POST/v1/payouts/deposits/check-missedTell BLOX to examine a transaction that BLOX did not detect
POST/v1/payouts/deposits/{id}/redriveRetry a deposit that did not start a transfer

Create a deposit trigger address

POST/v1/payouts/beneficiaries/{beneficiaryId}/addressAPI key + signature

Creates the trigger address for a beneficiary. The beneficiary must be active. A beneficiary has one trigger address for its lifetime. If you send this request again, BLOX returns the same address. Thus, an Idempotency-Key is not necessary.

The limit is 20 requests each minute. When you delete the beneficiary, BLOX deactivates its trigger address.

Success response (201)

{
  "address": "0x7c1a3e889d2b4f618a441f0b6d3c9a5588ab01cd",
  "network": "EVM",
  "destination": {
    "type": "BENEFICIARY",
    "id": "7c1a3e88-9d2b-4f61-8a44-1f0b6d3c9a55"
  }
}
FieldTypeDescription
addressstringThe trigger address. Send supported tokens to this address
networkstringEVM
destination.typestringBENEFICIARY
destination.idstring (UUID)The beneficiary that BLOX pays

The trigger address does not accept a deposit until you allow at least one sender. The same value is in autoWithdrawalAddress on the Beneficiary object.

Expected errors
StatuscodeWhen
403FEATURE_DISABLEDThe feature to pay a beneficiary from a deposit is not enabled on your account
404NOT_FOUNDThe beneficiary is unknown, belongs to a different account, or is not active
429RATE_LIMITEDMore than 20 requests in the last minute

List allowed senders

GET/v1/payouts/beneficiaries/{beneficiaryId}/address/whitelistAPI key

Returns the allowed senders of the beneficiary's trigger address. The oldest sender is first.

Success response (200)

[
  {
    "id": "3f8c1d02-5b47-4a6e-91cd-77e2b0a4f915",
    "address": "0x9a3f7c21b8e04d6f5a19c2e70b48d3f61a5e9d02",
    "label": "Treasury wallet",
    "active": true,
    "createdAt": "2026-08-07T09:31:05.000Z"
  }
]
FieldTypeDescription
idstring (UUID)Use this value to disable or remove the sender
addressstringThe sender address in lowercase
labelstring | nullYour note for the sender
activebooleanBLOX accepts deposits only from active senders. Refer to disable
createdAtstring (ISO 8601)The time that you created the allowed sender

The list also contains disabled senders. Disabled senders count toward the limit of 50 senders until you remove them.

If the beneficiary does not have a trigger address, BLOX returns 404 NOT_FOUND.

Allow a sender

POST/v1/payouts/beneficiaries/{beneficiaryId}/address/whitelistAPI key + signature

Allows one sender address to start transfers to this beneficiary. A trigger address can have a maximum of 50 allowed senders.

FieldTypeRequiredConstraintsDescription
addressstringYes0x and 40 hex charactersThe address that you send tokens from. Letter case is not important
labelstringNo1–120 charactersYour note for the sender. BLOX returns it in read responses

Success response (201)

Returns the new allowed sender in the same format as List allowed senders.

Expected errors
StatuscodeWhen
400VALIDATION_FAILEDaddress is not a valid address, or label is longer than 120 characters
400CONFLICTThe address is already an allowed sender of this trigger address
403LIMIT_EXCEEDEDThe trigger address already has 50 allowed senders
404NOT_FOUNDThe beneficiary does not have a trigger address, or belongs to a different account

Disable or re-enable a sender

PATCH/v1/payouts/beneficiaries/{beneficiaryId}/address/whitelist/{senderId}API key + signature

Disables or enables an allowed sender. The sender stays in the list and keeps its label. A disabled sender does not start transfers. This change has an immediate effect. You can enable a disabled sender again.

Use this endpoint for a wallet that you will send from again. If you will not send from a wallet again, remove the sender. Only removal makes the place of the sender available in the limit of 50 senders.

Request body

FieldTypeDescription
activebooleanSet false to disable the sender. Set true to enable it again

Success response (200)

Returns the allowed sender in the same format as List allowed senders.

Expected errors
StatuscodeWhen
400VALIDATION_FAILEDactive is missing or is not a boolean
403ACCOUNT_FROZENThe account is frozen. You can still remove a sender
403ACCOUNT_PENDING_VERIFICATIONThe account is pending verification
404NOT_FOUNDThe sender id is unknown or belongs to a different trigger address

Remove an allowed sender

DELETE/v1/payouts/beneficiaries/{beneficiaryId}/address/whitelist/{senderId}API key + signature

Removes the allowed sender. BLOX stops accepting deposits from that sender. The place of the sender in the limit of 50 senders becomes available. This change does not affect deposits that the sender sent before the removal. Sign only @method and @path. A Content-Digest header is not necessary.

Success response (200)

{ "success": true }

If the sender id is unknown or belongs to a different trigger address, BLOX returns 404 NOT_FOUND.

Get a deposit

GET/v1/payouts/deposits/{id}API key

Returns a deposit to a trigger address and the transfer that the deposit started. The deposit webhook event sends the same payload.

Use the endpoint of the channel that received the deposit. To get a deposit that BLOX paid into your own bank account, use GET /v1/wallet/deposits/{id}.

Success response (200)

{
  "id": "5e9d0273-8a41-4c62-b0f7-1d3e8c95a460",
  "txHash": "0x5d5355...103ee3",
  "logIndex": 12,
  "chainId": 1,
  "tokenId": "a71c4e08-2f96-4b3d-85ae-6c0f7d21b943",
  "amount": "100000",
  "from": "0x9a3f7c21b8e04d6f5a19c2e70b48d3f61a5e9d02",
  "status": "COMPLETED",
  "confirmations": 24,
  "triggerAddress": "0x7c1a3e889d2b4f618a441f0b6d3c9a5588ab01cd",
  "destination": {
    "type": "BENEFICIARY",
    "id": "7c1a3e88-9d2b-4f61-8a44-1f0b6d3c9a55",
    "name": "ADA LOVELACE"
  },
  "result": {
    "status": "COMPLETED",
    "statusReason": null,
    "withdrawal": {
      "id": "c4a80f13-6d29-4e75-83b1-9f0c2a7e5d68",
      "amount": "100000",
      "status": "COMPLETED",
      "refId": "FW-20260807-0001",
      "reference": "Invoice 4471",
      "createdAt": "2026-08-07T09:31:05.000Z",
      "updatedAt": "2026-08-07T09:34:22.000Z"
    }
  },
  "createdAt": "2026-08-07T09:30:44.000Z",
  "updatedAt": "2026-08-07T09:34:22.000Z"
}
FieldTypeDescription
idstring (UUID)The deposit id
txHashstringThe hash of the transaction that sent the deposit
logIndexintegerThe log position of the deposit in the transaction
chainIdintegerThe chain of the deposit
tokenIdstring (UUID)The token of the deposit
amountstringThe deposit amount in the smallest unit of the token
fromstringThe address that sent the tokens
statusstringPENDING: the transaction is not confirmed. PROCESSING: the transaction is confirmed and the tokens are not credited. COMPLETED: the tokens are credited. FAILED: BLOX did not credit the tokens
confirmationsintegerThe number of confirmations at this time
triggerAddressstringThe trigger address that received the deposit
destinationobjectThe beneficiary that BLOX pays
resultobject | nullThe result of the transfer
result.statusstringPENDING, PROCESSING, COMPLETED, or FAILED
result.statusReasonstring | nullThe reason for the failure. Refer to Deposit status reason values
result.withdrawalobject | nullThe transfer. null until BLOX creates the transfer

amount and result.withdrawal.amount use different units. amount is in the smallest unit of the token. result.withdrawal.amount is in sen. Read each value from its own field.

A transfer is not in the GET /v1/payouts response. A transfer does not use your prefund balance.

If the deposit id is unknown, belongs to a different account, or identifies a deposit that BLOX paid into your own bank account, BLOX returns 404 NOT_FOUND.

Deposit status reason values

If result.status is not FAILED, result.statusReason is null. These values are different from the payout status reason values. The payout values apply to a payout that you create.

ValueMeaning
sender_not_allowedThe deposit is from an address that is not an allowed sender
inactive_destinationThe beneficiary is deleted or not active
missing_destination_bank_detailsThe beneficiary does not have bank account details
feature_disabledThe feature to pay a beneficiary from a deposit is not enabled on your account
account_frozen, account_suspended, account_terminatedThe status of your account stopped the transfer
withdrawal_amount_out_of_rangeThe amount is less than the minimum or more than the maximum for your account
daily_fiat_withdrawal_limit_exceededYour account reached its daily limit
monthly_fiat_withdrawal_limit_exceededYour account reached its monthly limit
fiat_withdrawal_rejected, fiat_withdrawal_failed, fiat_withdrawal_cancelledThe transfer to the bank account did not complete
proxy_destination_not_supportedThe beneficiary has a DuitNow proxy. A transfer from a deposit can go only to a bank account. Use a beneficiary that has a bank account, or pay the proxy with Create payout
provider_errorThe payment network reported a different error. Contact BLOX and give the deposit id

Older deposits can show inactive_beneficiary or missing_beneficiary_bank_details. These are the old names for inactive_destination and missing_destination_bank_details.

In all cases, the tokens stay credited to your wallet. If you can correct the cause, correct it and retry the deposit.

Check for a missed deposit

POST/v1/payouts/deposits/check-missedAPI key + signature

Tells BLOX to examine a transaction that BLOX did not detect. Use this endpoint if you sent tokens to a trigger address and you did not get a payout.deposit.updated webhook event.

This is the only endpoint that accepts a transaction hash. If BLOX already detected the transaction, the response contains the deposit ids. Use these ids with Get a deposit and Retry a deposit. The limit is 30 requests each minute.

FieldTypeRequiredConstraintsDescription
txHashstringYes0x and 64 hex charactersThe hash of the transaction that sent the deposit
chainIdintegerYesAn active BLOX networkThe chain of the transaction

Success response (201)

{
  "status": "ALREADY_DETECTED",
  "depositIds": ["5e9d0273-8a41-4c62-b0f7-1d3e8c95a460"]
}
FieldTypeDescription
statusstringQUEUED: BLOX accepted the transaction for processing. Wait for the webhook event. ALREADY_DETECTED: BLOX detected the transaction before this request
depositIdsstring[]The ids of the deposits in the transaction. The array has values on ALREADY_DETECTED and is empty on QUEUED

Read status before you read depositIds. On QUEUED, an empty array means that the deposits do not exist yet. It does not mean that BLOX found no deposits. One transaction can pay more than one beneficiary. On QUEUED, wait for the webhook event. Do not send the request again.

Expected errors
StatuscodeWhen
400VALIDATION_FAILEDtxHash is not a valid hash, or chainId is not a positive integer
403FEATURE_DISABLEDThe feature to pay a beneficiary from a deposit is not enabled on your account
404NOT_FOUNDchainId does not match an active BLOX network
429RATE_LIMITEDMore than 30 requests in the last minute

Retry a deposit

POST/v1/payouts/deposits/{id}/redriveAPI key + signature

Tries again to start a transfer for a credited deposit that did not start a transfer. Use this endpoint after you correct the cause. For example, allow the sender, activate the beneficiary again, or wait until the limit period resets.

You can send this request more than one time. If the deposit already has a transfer, the response contains that transfer. BLOX does not create a second transfer. The limit is 60 requests each minute.

Do not send a request body. Sign only @method and @path.

Success response (201)

Returns the deposit in the same format as Get a deposit. The response shows the deposit after the retry.

Expected errors
StatuscodeWhen
400INVALID_REQUESTThe deposit status is not COMPLETED. BLOX cannot retry the deposit
403FEATURE_DISABLEDThe feature to pay a beneficiary from a deposit is not enabled on your account
404NOT_FOUNDThe deposit is unknown, belongs to a different account, or did not go to a trigger address
429RATE_LIMITEDMore than 60 requests in the last minute

Webhook events

BLOX sends two webhook events about this flow to your PAYOUT webhook endpoint. A deposit starts the transfer. These webhook events tell you about each deposit and its transfer. The payout.created and payout.updated webhook events are for the payouts that you create with POST /v1/payouts.

EventSent when
payout.deposit.updatedA deposit to a trigger address is confirmed on chain, is credited, or is retried
payout.withdrawal.updatedA transfer from a deposit changes status

For the envelope, signature verification, retries, and URL rules, refer to Payout Webhook Events and Webhooks.

payout.deposit.updated

{
  "id": "5e9d0273-...",
  "txHash": "0x5d5355...103ee3",
  "logIndex": 12,
  "chainId": 1,
  "tokenId": "a71c4e08-...",
  "amount": "100000",
  "from": "0x9a3f7c21b8e04d6f5a19c2e70b48d3f61a5e9d02",
  "status": "COMPLETED",
  "confirmations": 24,
  "triggerAddress": "0x7c1a3e889d2b4f618a441f0b6d3c9a5588ab01cd",
  "destination": { "type": "BENEFICIARY", "id": "7c1a3e88-...", "name": "ADA LOVELACE" },
  "result": { "status": "FAILED", "statusReason": "sender_not_allowed", "withdrawal": null },
  "createdAt": "2026-08-07T09:30:44.000Z",
  "updatedAt": "2026-08-07T09:34:22.000Z"
}

The fields are the same as in the REST response. For the full table, refer to GET /v1/payouts/deposits/{id}. For the reason values, refer to deposit status reason values.

BLOX sends this webhook event two times for each deposit. The status in the payload identifies the event:

statusWhenresult
PROCESSINGThe deposit transaction is confirmed on chain. The tokens are not in your balance.null
COMPLETEDThe tokens are credited to your wallet. BLOX decided the result of the transfer.The result of the transfer, or null if the deposit did not start a transfer

Only COMPLETED means that the tokens are in your wallet. BLOX usually credits the tokens a few minutes after confirmation. On Ethereum, this takes longer when network fees are high.

A retry can send a PROCESSING event after the COMPLETED event for the same deposit. If your record of a deposit is COMPLETED, do not change it to a different status.

If BLOX refuses a deposit for a reason that you can correct, the COMPLETED event shows the reason. You can retry that deposit. BLOX also sends this webhook event for deposits on Solana. For Solana, txHash is the transaction signature (base58), and chainId is 101.

payout.withdrawal.updated

{
  "withdrawalId": "c4a80f13-...",
  "status": "COMPLETED",
  "statusReason": null,
  "amount": "100000",
  "refId": "FW-20260807-0001",
  "reference": "Invoice 4471",
  "destination": { "type": "BENEFICIARY", "id": "7c1a3e88-...", "name": "ADA LOVELACE" },
  "depositId": "5e9d0273-...",
  "createdAt": "2026-08-07T09:31:05.000Z",
  "updatedAt": "2026-08-07T09:34:22.000Z"
}
FieldDescription
withdrawalIdThe id of the transfer
statusPENDING, PROCESSING, COMPLETED, REJECTED, FAILED, or CANCELLED
statusReasonHas a value only on REJECTED, FAILED, and CANCELLED
amountThe amount in sen, as a string
refIdThe bank reference
referenceYour reference, if you set one
destinationThe beneficiary that BLOX pays
depositIdThe id of the deposit that started the transfer. Use this value to connect the two webhook events

These transfers are different from payouts. A withdrawalId is not a payoutId. If you use a withdrawalId with GET /v1/payouts/{id}, BLOX returns 404.