Edit Spend Accounts

Overview

Each cash balance account has it's own nickname so user could easily distinguish between them, if there are a few of them.

Edit User Cash Balance Account

Sample request

You can update a user cash balance account with the updateUserCashBalance mutation. This mutation allows you edit spend account's nickname to help organize your funds. The query takes a UpdateUserCashBalanceInput input object.

mutation updateUserCashBalance($input: UpdateUserCashBalanceInput!) {
    updateUserCashBalance(input: $input) {
        userCashBalanceId
        totalCashBalance
        availableCashBalance
        lifetimeCashBalance
        nickname
        status
        createdAt
    }
}

This mutation requires the UpdateUserCashBalanceInput input type. Any field marked with an exclamation mark (!) in the schema is mandatory and must be included in the request.

Field nameTypeDescription
userCashBalanceIdUUID!An unique identifier for the cash balance account.
nicknameString!A custom name for the cash balance account. This helps identify the purpose of the account. Has to be at least 2 characters long, but no longer than 100.

UpdateUserCashBalanceInput

{
  "userCashBalanceId": "f8a3c9e1-7b2d-4f5e-9c8a-1d2e3f4g5h6i",
  "nickname": "New Team Travel"
}

Sample response

The response from the updateUserCashBalance mutation will include the newly created cash balance account details, including its unique identifier and initial balance information.

{
  "data": {
    "updateUserCashBalance": {
      "userCashBalanceId": "f8a3c9e1-7b2d-4f5e-9c8a-1d2e3f4g5h6i",
      "totalCashBalance": "0",
      "availableCashBalance": "0",
      "lifetimeCashBalance": "0",
      "nickname": "New Team Travel",
      "status": "ACTIVE",
      "createdAt": "2025-01-15T10:30:00.000Z"
    }
  }
}

Response Fields

Field nameTypeDescription
userCashBalanceIdUUID!Unique identifier for the cash balance account
totalCashBalanceString!Total cash balance in the account (starts at 0)
availableCashBalanceString!Available cash balance for immediate use (starts at 0)
lifetimeCashBalanceString!Cumulative total of all funds ever deposited (starts at 0)
nicknameStringThe custom name assigned to the account
statusUserCashBalanceStatus!Current status of the account (ACTIVE, CLOSED, or SUSPENDED)
createdAtDateTime!Timestamp when the account was created
❗️

Authorization required

This mutation requires the MANAGE_PAYMENT scope. Ensure your access token has been granted this scope before attempting to create a cash balance account.