Update static wallet
Update a static wallet's accepted-asset allow-list, metadata, or webhook URL. Only the fields present in the body are changed.
PATCH
/v1/static-wallets/{staticWalletId}API keyPath parameters
| Field | Type | Description |
|---|---|---|
staticWalletIdrequired | string | Static wallet ID |
Request body
| Field | Type | Description |
|---|---|---|
allowedAssetsoptional | AssetID[] | New accepted-asset allow-list, as asset id-strings (see GET /v1/assets). When empty or omitted the current list is left unchanged. |
| ||
metadataoptional | object | Replacement key/value metadata for the static wallet. |
webhookUrloptional | string | Replacement webhook URL for this wallet's deposit events. |
Response
200 OK
| Field | Type | Description |
|---|---|---|
addressoptional | string | Reusable on-chain deposit address of this static wallet. Customers may send accepted assets to it repeatedly; each incoming transfer becomes a deposit. |
allowedAssetsoptional | AssetID[] | Accepted-asset allow-list, as asset id-strings (see GET /v1/assets). Deposits of assets outside this list are ignored and not credited. |
| ||
createdAtoptional | integer | Unix-milliseconds timestamp when the static wallet was created. |
externalIdoptional | string | Your own identifier for this static wallet, echoed from creation. Null when none was provided. |
idoptional | string | Unique Suward identifier of the static wallet. |
metadataoptional | object | Arbitrary key/value data attached by the merchant, echoed back unchanged. |
projectIdoptional | string | Identifier of the project that owns this static wallet. |
updatedAtoptional | integer | Unix-milliseconds timestamp when the static wallet was last updated. |
webhookUrloptional | string | Webhook URL that receives this wallet's deposit events. Null when the project default webhook is used. |
Errors
400 Bad Request— each returns { errorCode, message, args? }. Codes, retries and limits: Errors & limits
Request
curl -X PATCH https://api.suward.com/v1/static-wallets/<static_wallet_id> \ -H "X-Api-Key: $SUWARD_API_KEY" \ -H "Content-Type: application/json" \ -d '{"webhookUrl":"https://example.com/webhook"}'const response = await fetch('https://api.suward.com/v1/static-wallets/<static_wallet_id>', { method: 'PATCH', headers: { 'X-Api-Key': process.env.SUWARD_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ "webhookUrl": "https://example.com/webhook" }),});const data = await response.json();package main import ( "bytes" "fmt" "io" "net/http" "os") func main() { payload := []byte(`{"webhookUrl":"https://example.com/webhook"}`) req, _ := http.NewRequest("PATCH", "https://api.suward.com/v1/static-wallets/<static_wallet_id>", bytes.NewReader(payload)) req.Header.Set("X-Api-Key", os.Getenv("SUWARD_API_KEY")) req.Header.Set("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}import requests, os payload = { "webhookUrl": "https://example.com/webhook"} response = requests.patch( 'https://api.suward.com/v1/static-wallets/<static_wallet_id>', headers={'X-Api-Key': os.environ['SUWARD_API_KEY']}, json=payload,)data = response.json()Response · 200 OK
{ "address": "0xabc…def", "allowedAssets": [ "USDT_ETHEREUM" ], "createdAt": 0, "externalId": "order_abc123", "id": "obj_abc123", "metadata": {}, "projectId": "obj_abc123", "updatedAt": 0, "webhookUrl": "https://example.com/webhook"}Illustrative values. Every field, type and status on this page is generated from the OpenAPI specification.
Something unclear? payments@suward.com — we treat every integration question as a documentation defect.