Watch a Bitcoin Address with Webhook Callback
SUBTC can monitor a wallet address and trigger a webhook when a payment arrives.<br>This allows servers to receive real-time payment notifications.
Start watching an address:<br>
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\"}"<br>Example response:<br>{
"ok": true,
"request_id": "41530f6bbb90466c",
"result": {
"address": "tb1qj3xzdyr6fdhzh37w4avm4l5dnm53cmvf6p27rf",
"callback_url": "https://yourserver.com/webhook",
"expected_sat": 20000,
"status": "watching",
"wallet_id": "w_cf21a601a3f461a92699e5b5dac80ad6d9d66de4592d"
}
}<br>What happened:
The gateway started monitoring the address.<br>Once the address receives at least 20,000 SAT, SUBTC will send a POST request to the webhook URL.
This pattern enables automated payment processing for services, games, or marketplaces.
API Base:<br>https://subtc.net/api