Register a watch-only wallet
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.feitpay.com/v1/wallets"
payload := strings.NewReader("{ \"store_id\": \"example\", \"network_id\": \"example\", \"label\": \"example\", \"mode\": \"simulated\", \"xpub\": \"example\", \"gap_limit\": 20 }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("FeitPay-Environment", "test") req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.feitpay.com/v1/wallets';const options = { method: 'POST', headers: { 'FeitPay-Environment': 'test', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"store_id":"example","network_id":"example","label":"example","mode":"simulated","xpub":"example","gap_limit":20}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.feitpay.com/v1/wallets \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'FeitPay-Environment: test' \ --data '{ "store_id": "example", "network_id": "example", "label": "example", "mode": "simulated", "xpub": "example", "gap_limit": 20 }'Accepts an extended public key (xpub mode) — never a seed phrase or private key. Honors Idempotency-Key (replays return the original response for 24 h).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Active organization for dashboard sessions. Ignored for API keys (the key determines the organization).
test (default) or live for dashboard sessions. API keys determine the environment. Until the platform is in production, configuration (stores, webhook endpoints, payment links) is live and money movement answers payments_not_enabled.
Unique key per logical create operation (max 255 chars). Replays return the original response; reuse with a different body returns idempotency_error.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Extended PUBLIC key: a BIP84 account key (xpub/zpub) for Bitcoin, or the account-level key for EVM (m/44’/60’/0’) and TRON (m/44’/195’/0’). Never send private keys.
Responses
Section titled “Responses”Registered (watch-only).
object
object
Example
{ "object": "wallet", "mode": "simulated", "address_type": "p2wpkh", "status": "active", "ownership": { "status": "unverified" }}Missing or invalid credentials.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Feature not available for this account or deployment (feature_unavailable_error), e.g. payments_not_enabled (live payments have not started on the platform), live_mode_disabled, live_keys_disabled, test_mode_disabled, payment_method_unavailable.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}State conflict.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Validation failed.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Too many requests. See Retry-After.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}