---
updatedAt: 2026-05-27T07:59:37.000Z
agentTools:
  siteIndex: https://developer.eagleeye.com/llms.txt
  projectIndex: https://developer.eagleeye.com/eagleeye-developer/llms.txt
---

# Debit a Customer's Tier Membership Balances

This API allows a calling application to decrease the Tier Membership Balances for a customer. This  API completes a negative movement of balances only. The values passed in the balances of the request are validated to always be positive integers.

# OpenAPI definition

```json
{
  "x-explorer-enabled": false,
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "https://wallet.sandbox.uk.eagleeye.com/2.0",
      "description": "Sandbox UK"
    },
    {
      "url": "https://wallet.uk.eagleeye.com/2.0",
      "description": "UK Production"
    },
    {
      "url": "https://wallet.au.eagleeye.com/2.0",
      "description": "AU Production"
    },
    {
      "url": "https://wallet.us2.eagleeye.com/2.0",
      "description": "US2 Production"
    },
    {
      "url": "https://wallet.us.eagleeye.com/2.0",
      "description": "US Production"
    }
  ],
  "info": {
    "title": "Tiers API",
    "description": "These APIs are used for managing customer Tier Memberships in the Eagle Eye  Air platform. These APIs allow a customer to be placed in a Tier, to update their Tier Membership Balances, to manually move them into another Tier as well as retrieving their current Tier Membership Balances and Tier Membership Transaction history.",
    "version": "1.1.0",
    "contact": {
      "name": "Eagle Eye Solutions",
      "url": "https://www.eagleeye.com/"
    }
  },
  "tags": [
    {
      "name": "Tier Membership Transaction",
      "description": "API endpoints for completing Transactions against a Tier Membership"
    }
  ],
  "paths": {
    "/tier/membership/{tierMembershipId}/debit": {
      "patch": {
        "summary": "Debit a Customer's Tier Membership Balances",
        "operationId": "debitTierMembershipBalances",
        "deprecated": true,
        "description": "This API allows a calling application to decrease the Tier Membership Balances for a customer. This  API completes a negative movement of balances only. The values passed in the balances of the request are validated to always be positive integers.",
        "tags": [
          "Tier Membership Transaction"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/tierMembershipId"
          },
          {
            "$ref": "#/components/parameters/eesAuthenticationClientId"
          },
          {
            "$ref": "#/components/parameters/eesAuthenticationRequestHash"
          },
          {
            "$ref": "#/components/parameters/httpAcceptEncoding"
          },
          {
            "$ref": "#/components/parameters/eesMessageId"
          },
          {
            "$ref": "#/components/parameters/eesMessageRetry"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tierMembershipTransactionRequestEntity"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "An object displaying the details of a Tier Membership Transaction against a customer's Tier Membership.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "membership",
                    "transactions"
                  ],
                  "properties": {
                    "membership": {
                      "$ref": "#/components/schemas/tierMembershipEntity"
                    },
                    "transactions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/tierMembershipTransactionEntity"
                      }
                    }
                  }
                }
              }
            },
            "x-eventNotifications": {
              "events": [
                {
                  "eventName": "TIER.MEMBERSHIP.DEBIT",
                  "atomicOperations": [
                    {
                      "schema": {
                        "$ref": "#/components/schemas/tierMembershipEntity"
                      },
                      "operationType": "UPDATE"
                    },
                    {
                      "schema": {
                        "$ref": "#/components/schemas/tierMembershipTransactionEntity"
                      },
                      "operationType": "CREATE"
                    }
                  ]
                }
              ]
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "415": {
            "$ref": "#/components/responses/unsupportedMediaType"
          },
          "429": {
            "$ref": "#/components/responses/tooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/serverError"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "eesAuthenticationClientId": {
        "name": "X-EES-AUTH-CLIENT-ID",
        "in": "header",
        "description": "Client ID, This will be provided by EES and is unique to the company calling the API.",
        "required": true,
        "schema": {
          "type": "string",
          "format": "string"
        }
      },
      "eesAuthenticationRequestHash": {
        "name": "X-EES-AUTH-HASH",
        "in": "header",
        "description": "Request Security Hash, calculated using SHA-256 function from concatenated full Request URI Path with Query String(s), Payload and Client Secret.",
        "required": true,
        "schema": {
          "type": "string",
          "format": "string"
        }
      },
      "eesMessageId": {
        "name": "X-EES-TRANSACTION-ID",
        "in": "header",
        "description": "Unique Reference for the API transaction within the calling company.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "string"
        }
      },
      "eesMessageRetry": {
        "name": "X-EES-RETRY",
        "in": "header",
        "description": "This flag denotes the number of attempts that have been made for this request.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "string"
        }
      },
      "httpAcceptEncoding": {
        "name": "Accept-Encoding",
        "in": "header",
        "required": false,
        "description": "This request HTTP header advertises which content encoding (usually a compression algorithm) the calling application is able to understand. The server selects one of the proposals, use it and informs the client of its choice with the Content-Encoding response header. Currently supported `gzip` and `deflate`, if request header not present no compression will be used.\n",
        "schema": {
          "type": "string",
          "enum": [
            "",
            "gzip",
            "deflate",
            "gzip,deflate"
          ],
          "default": ""
        }
      },
      "tierMembershipId": {
        "name": "tierMembershipId",
        "in": "path",
        "required": true,
        "description": "The ID of the Tier Membership for a given customer",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "badRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/defaultErrorEntity"
            }
          }
        }
      },
      "unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/defaultErrorEntity"
            },
            "example": {
              "errorCode": "AF",
              "errorMessage": "Authentication Failure, Please check if required AUTH headers are present in your Request and if AUTH Hash is calculated correctly"
            }
          }
        }
      },
      "forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorCode": "P",
                "errorMessage": "You don't have appropriate Privileges to perform this operation"
              }
            }
          }
        }
      },
      "notFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorMessage": "Not Found",
                "errorCode": "NF"
              }
            }
          }
        }
      },
      "unsupportedMediaType": {
        "description": "Unsupported Media Type",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorMessage": "Unsupported media type - Check the content type of your request",
                "errorCode": "MP"
              }
            }
          }
        }
      },
      "tooManyRequests": {
        "description": "Too Many Requests",
        "headers": {
          "Retry-after": {
            "description": "The number of seconds after which to retry the request",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "errorCode": {
                  "type": "string",
                  "description": "The error code",
                  "enum": [
                    "CE"
                  ]
                },
                "errorMessage": {
                  "type": "string",
                  "description": "The error message for this error",
                  "enum": [
                    "This request has been throttled. Please try again later."
                  ]
                }
              }
            }
          }
        }
      },
      "serverError": {
        "description": "Server Error",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorMessage": "Internal Server Error"
              }
            }
          }
        }
      }
    },
    "schemas": {
      "tierMembershipTransactionRequestEntity": {
        "type": "object",
        "required": [
          "balances"
        ],
        "properties": {
          "walletTransactionId": {
            "type": "string",
            "description": "The ID of a Wallet Transaction to associate to this Tier Membership Transaction."
          },
          "balances": {
            "type": "object",
            "properties": {
              "points": {
                "type": "integer",
                "description": "The number of Tier Membership Points to alter in the customer's Tier Membership Balance. One or many  Tier Membership Balance Types can be passed together."
              },
              "transactions": {
                "type": "integer",
                "description": "The number of Tier Membership Transactions to alter against the customer's Tier Membership Balance.  One or many Tier Membership Balance Types can be passed together."
              },
              "spend": {
                "type": "integer",
                "description": "The amount of Tier Membership Spend to alter against the customer's Tier Membership Balance. One or  many tier Tier Membership Balance Types can be passed together."
              }
            }
          }
        }
      },
      "tierMembershipBalancesEntity": {
        "type": "object",
        "properties": {
          "transactions": {
            "type": "integer",
            "description": "The value representing the Tier Membership Balance for a customer's Tier Membership relating to the  number of Tier Membership Transactions completed."
          },
          "spend": {
            "type": "integer",
            "description": "The value representing the Tier Membership Balance for a customer's Tier Membership relating to the  Tier Membership Spend amount completed."
          },
          "points": {
            "type": "integer",
            "description": "The value representing the Tier Membership Balance for a customer's Tier Membership showing the Tier Membership Points earned."
          }
        }
      },
      "tierMembershipEntity": {
        "type": "object",
        "required": [
          "tierMembershipId",
          "tierId",
          "status",
          "balances",
          "expiryDate",
          "tierBalancesResetDate",
          "dateCreated",
          "lastUpdated",
          "accountIds"
        ],
        "properties": {
          "tierMembershipId": {
            "type": "string",
            "description": "The unique ID for this Tier Membership. This will be a numeric string value of variable length."
          },
          "tierId": {
            "type": "string",
            "description": "The ID for the Tier Membership to which the customer belongs. This will be a numeric string  value of variable length."
          },
          "status": {
            "type": "string",
            "description": "The status of this Tier Membership.",
            "enum": [
              "ACTIVE"
            ]
          },
          "accountIds": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "description": "The IDs of the Accounts to which the Tier Membership is linked. These are numeric strings of variable length."
            }
          },
          "balances": {
            "$ref": "#/components/schemas/tierMembershipBalancesEntity"
          },
          "expiryDate": {
            "$ref": "#/components/schemas/dateTimeEntity",
            "nullable": true
          },
          "tierBalancesResetDate": {
            "$ref": "#/components/schemas/dateTimeEntity",
            "nullable": true
          },
          "dateCreated": {
            "$ref": "#/components/schemas/dateTimeEntity"
          },
          "lastUpdated": {
            "$ref": "#/components/schemas/dateTimeEntity"
          }
        }
      },
      "tierMembershipTransactionEntity": {
        "description": "An object displaying the details of a Tier Membership Transaction against a customer's Tier Membership. It holds links back to the Wallet Transactions associated with this Tier Membership Transaction. The Tier Membership Transaction can hold one or many Tier Membership Transaction Actions such as incrementing two Tier  Membership Balances and moving a Tier Membership to the Tier above.",
        "type": "object",
        "required": [
          "tierMembershipTransactionId",
          "tierMembershipId",
          "transactionType",
          "parentTierMembershipTransactionId",
          "walletTransactionId",
          "dateCreated",
          "lastUpdated",
          "actions"
        ],
        "properties": {
          "tierMembershipTransactionId": {
            "type": "string",
            "description": "The unique ID for this Tier Membership Transaction."
          },
          "tierMembershipId": {
            "type": "string",
            "description": "The ID of the Tier Membership."
          },
          "transactionType": {
            "type": "string",
            "enum": [
              "CREDIT",
              "DEBIT",
              "ADJUSTMENT",
              "MOVE",
              "RESET"
            ]
          },
          "parentTierMembershipTransactionId": {
            "type": "string",
            "nullable": true,
            "description": "The parent Tier Membership Transaction ID."
          },
          "walletTransactionId": {
            "nullable": true,
            "type": "string",
            "description": "The Wallet Transaction to which this Tier Membership Transaction is linked."
          },
          "dateCreated": {
            "$ref": "#/components/schemas/dateTimeEntity"
          },
          "lastUpdated": {
            "$ref": "#/components/schemas/dateTimeEntity"
          },
          "actions": {
            "type": "array",
            "minItems": 1,
            "description": "An array that displays the actions taken within this Tier Membership Transaction. These could be actions that adjust multiple Tier Membership Balances. The `amount` key will contain a positive integer if  the Tier Membership Balance increased or a negative integer if the Tier Membership Balance was decreased.",
            "items": {
              "type": "object",
              "properties": {
                "balanceType": {
                  "type": "string",
                  "enum": [
                    "transactions",
                    "spend",
                    "points"
                  ]
                },
                "amount": {
                  "type": "integer",
                  "description": "The value of the action taken against the Tier Membership Balance. This can only be positive for  credit or negative for debit."
                },
                "balanceBefore": {
                  "type": "integer",
                  "description": "The value of the Tier Membership Balance before the transaction."
                },
                "balanceAfter": {
                  "type": "integer",
                  "description": "The value of the Tier Membership Balance after the transaction. This value will be equal to:  `balanceBefore + amount`."
                }
              }
            }
          }
        }
      },
      "dateTimeEntity": {
        "type": "string",
        "pattern": "/\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\\d|3[0-1])T[0-2]\\d:[0-5]\\d:[0-5]\\d[+-][0-2]\\d:[0-5]\\d/",
        "example": "2024-03-11T16:33:00+00:00",
        "description": "DateTime in ATOM format."
      },
      "defaultErrorEntity": {
        "type": "object",
        "required": [
          "errorCode",
          "errorMessage"
        ],
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "Internal Error Code.",
            "enum": [
              "AA",
              "AF",
              "CE",
              "CI",
              "CLPPR",
              "CILR",
              "CU",
              "CX",
              "IP",
              "IPR",
              "IR",
              "ITID",
              "MNA",
              "MPA",
              "NF",
              "P",
              "U"
            ]
          },
          "errorMessage": {
            "type": "string",
            "description": "Human Friendly Error Message."
          }
        },
        "x-enum": [
          {
            "errorCode": "AA",
            "errorMessage": "Invalid Access to API Method"
          },
          {
            "errorCode": "AF",
            "errorMessage": "Authorisation Failed"
          },
          {
            "errorCode": "CE",
            "errorMessage": "Configuration Error"
          },
          {
            "errorCode": "CI",
            "errorMessage": "Campaign Inactive"
          },
          {
            "errorCode": "CILR",
            "errorMessage": "Campaign Issuance Limit Reached"
          },
          {
            "errorCode": "CLPPR",
            "errorMessage": "Campaign Limit Per Period Reached"
          },
          {
            "errorCode": "CU",
            "errorMessage": "Campaign Unknown"
          },
          {
            "errorCode": "CX",
            "errorMessage": "Campaign Expired"
          },
          {
            "errorCode": "IP",
            "errorMessage": "Invalid Parameter"
          },
          {
            "errorCode": "IPR",
            "errorMessage": "IP Address Rejected"
          },
          {
            "errorCode": "IR",
            "errorMessage": "Invalid Request"
          },
          {
            "errorCode": "ITID",
            "errorMessage": "Invalid Transaction ID"
          },
          {
            "errorCode": "MNA",
            "errorMessage": "Method Not Allowed"
          },
          {
            "errorCode": "MPA",
            "errorMessage": "Missing Parameter"
          },
          {
            "errorCode": "NF",
            "errorMessage": "Not Found"
          },
          {
            "errorCode": "P",
            "errorMessage": "Privileges"
          },
          {
            "errorCode": "U",
            "errorMessage": "Unknown Error"
          }
        ]
      }
    }
  }
}
```