Watch BTC Mainnet Payment with Webhook Callback

permalink SUBTC
#btc#mainnet#payment#watch#webhook

SUBTC can monitor a Bitcoin address and notify your server when a payment arrives.
This is done using wallet_wait_event with a webhook callback URL.

Command:

curl -sS -X POST "https://api.subtc.net/v1/btc?mode=wallet_wait_event" \
  -H "X-SUBTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d "{\"wallet_id\":\"$WID\",\"address\":\"$ADDR\",\"expected_sat\":20000,\"timeout_sec\":600,\"callback_url\":\"https://yourserver.com/webhook\"}"

Example response:
{
 "ok": true,
 "request_id": "0de3314b4c45a4c5",
 "result": {
  "address": "bc1q59ct7xwn0qa7kl722vdedaa2ajzkmmu78gm9jl",
  "callback_url": "https://yourserver.com/webhook",
  "expected_sat": 20000,
  "status": "watching",
  "wallet_id": "w_87d2a561cdd665948c1d756106f7b2179327927c3b8c"
 }
}

What happened:

The gateway started monitoring the address for a payment of at least **20,000 SAT**.

If the payment arrives within **600 seconds**, the SUBTC gateway will send a POST request to the webhook URL with the payment result.

This pattern allows fully automated payment notifications for services, APIs, and backend systems.

API Base:
https://subtc.net/api