Skip to main content
PUT
/
platform
/
admin
/
gas_station_admin
/
{walletTenantId}
/
update_wallet_gas_station
Update wallet gas station configuration
curl --request PUT \
  --url https://api.example.com/platform/admin/gas_station_admin/{walletTenantId}/update_wallet_gas_station \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Description

Updates the gas station configuration for a specific wallet tenant, controlling whether the wallet acts as a gas station and manages auto-refuel parameters.

Input

Expects a JSON body with the following fields:
  • id (long, required) — Identifier of the wallet tenant being configured.
  • isGasStation (bool, required) — Whether this wallet functions as a gas station.
  • autoRefuelIsEnabled (bool, required) — Enables automatic refueling when balance drops below threshold.
  • autoRefuelMinimumBalance (decimal, required) — Balance threshold that triggers auto-refuel (in native chain currency).
  • autoRefuelRefuelAmount (decimal, required) — Amount to add during each auto-refuel operation (in native chain currency).

Output

Returns a WalletGasStationConfigurationClientModel containing:
  • id (long) — Wallet tenant identifier.
  • isGasStation (bool) — Current gas station status.
  • autoRefuelIsEnabled (bool) — Current auto-refuel enabled state.
  • autoRefuelMinimumBalance (decimal) — Current minimum balance threshold.
  • autoRefuelRefuelAmount (decimal) — Current refuel amount.

Examples

Request
{
  "id": 1001,
  "isGasStation": true,
  "autoRefuelIsEnabled": true,
  "autoRefuelMinimumBalance": 0.25,
  "autoRefuelRefuelAmount": 1.5
}
Response (200 OK)
{
  "data": {
    "id": 1001,
    "isGasStation": true,
    "autoRefuelIsEnabled": true,
    "autoRefuelMinimumBalance": 0.25,
    "autoRefuelRefuelAmount": 1.5
  },
  "success": true
}

Errors

  • 400 Bad Request: Invalid payload, missing required fields, or negative balance/amount values.
  • 401 Unauthorized: Caller is not authenticated.
  • 403 Forbidden: Caller lacks permission to modify gas station configuration.
  • 404 Not Found: Wallet tenant with the specified ID does not exist.
  • 500 Internal Server Error: An unexpected server error occurred.

Notes

Requires platform administrator privileges. Auto-refuel minimum balance and refuel amount must be positive decimal values representing amounts in the blockchain’s native currency (e.g., ETH for Ethereum chains).

Path Parameters

walletTenantId
integer<int64>
required

Identifier of the wallet tenant to configure.

Query Parameters

api-version
string | null

Body

application/json

Gas station configuration settings including auto-refuel parameters.

Describes the configuration options for turning a wallet into a gas station or updating its refill behavior.

id
integer<int64>

Identifier of the wallet tenant being configured.

Example:

1001

isGasStation
boolean

Indicates whether the wallet functions as a gas station.

Example:

true

gasStationWalletCustodianId
integer<int64> | null

Identifier of the custodian managing the gas station wallet, when applicable.

Example:

7

autoRefuelIsEnabled
boolean

Indicates whether automatic refueling is enabled for this wallet.

Example:

true

autoRefuelMinimumBalance
number<decimal>

Minimum balance that triggers an automatic refuel.

Example:

0.25

autoRefuelRefuelAmount
number<decimal>

Amount of gas to add when an automatic refuel is executed.

Example:

1.5

autoRefuelSourceWalletTenantId
integer<int64> | null

Wallet tenant identifier to draw funds from during auto refuel operations.

Example:

2001

replaceAutoRefuelSourceWalletTenantId
integer<int64> | null

If gas station mode is disabled, represents the replacement wallet for nested auto refuel chains.

Example:

3001

Response

Gas station configuration successfully updated.

Wrapper for API operation results containing success status, error information, and return value.

isSuccess
boolean

True if the operation completed successfully, false otherwise.

Example:

true

isFailure
boolean

True if the operation failed, false otherwise.

Example:

false

error
object

Error information returned when the operation fails.

Example:
{
"code": "ValidationError",
"message": "The request parameters failed validation.",
"info": [
"The Name field is required.",
"The Id field must be greater than 0."
]
}
value
object

The result value returned when the operation is successful.

Example:
{
"walletTenantId": 1001,
"walletBalance": 12.34,
"walletNetwork": "Ethereum Sepolia",
"walletCoinName": "ETH",
"walletNetworkIcon": "iVBORw0KGgoAAAANSUhEUgAAAAUA",
"walletAddress": "0xAbCDEF0123456789abcdef0123456789AbCdEf0",
"walletName": "Treasury Wallet",
"walletId": 501,
"blockchainId": 42,
"isGasStation": true,
"gasStationWalletCustodianId": 7,
"autoRefuelIsEnabled": true,
"autoRefuelSourceWalletTenantId": 2001,
"autoRefuelMinimumBalance": 0.25,
"autoRefuelRefuelAmount": 1.5,
"connectedGasStationWalletsCount": 3,
"connectedGasStationWalletsWithNestedCount": 5
}