{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Баланс карты","description":"Крипто-платежи для бизнеса. Принимайте USDT, платите через СБП QR. AML-проверки включены.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"баланс-карты","__idx":0},"children":["Баланс карты"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Live-баланс по карте напрямую от эквайера."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"endpoint","__idx":1},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /cards/:id/balance\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Доступно только для карт в статусе ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assigned"]},". Для ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requested"]},","," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["retired"]}," — endpoint вернёт ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"пример","__idx":2},"children":["Пример"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl 'https://b2b.lumowallet.io/cards/8c7f1823-0d43-4618-86ee-fa0c77643cb2/balance' \\\n  -H 'X-API-Key: YOUR_API_KEY'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ответ","__idx":3},"children":["Ответ"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"balance\": \"42.17\",\n  \"currency\": \"USD\",\n  \"fetchedAt\": \"2026-05-01T12:34:56Z\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"поля","__idx":4},"children":["Поля"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Поле"},"children":["Поле"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Тип"},"children":["Тип"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Описание"},"children":["Описание"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["balance"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Баланс в виде десятичной строки от эквайера"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currency"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 4217 (обычно ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USD"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fetchedAt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["datetime"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Когда мост получил (или закэшировал) это значение"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"кэширование","__idx":5},"children":["Кэширование"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Бэкенд проксирует запрос напрямую в upay-bridge. На стороне моста значение"," ","кэшируется на ~60 секунд, чтобы не нагружать эквайер. Если за этот период"," ","вы вызовете ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/balance"]}," несколько раз — получите один и тот же ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fetchedAt"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"тестовый-режим","__idx":6},"children":["Тестовый режим"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Если у компании включен ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardsTestMode"]},", endpoint возвращает синтетический"," ","ответ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{\"balance\":\"123.45\",\"currency\":\"USD\"}"]}," без обращения к мосту."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ошибки","__idx":7},"children":["Ошибки"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Код"},"children":["Код"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Ошибка"},"children":["Ошибка"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Описание"},"children":["Описание"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CARD_NOT_ACTIVE: card status is <status>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Карта не в статусе ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assigned"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["401"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Unauthorized"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Неверный API-ключ"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["404"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Card not found"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Карта не принадлежит компании или её нет"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Card is not yet active"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Карта собрана, но ещё не привязана к мосту"]}]}]}]}]}]},"headings":[{"value":"Баланс карты","id":"баланс-карты","depth":1},{"value":"Endpoint","id":"endpoint","depth":2},{"value":"Пример","id":"пример","depth":2},{"value":"Ответ","id":"ответ","depth":2},{"value":"Поля","id":"поля","depth":2},{"value":"Кэширование","id":"кэширование","depth":2},{"value":"Тестовый режим","id":"тестовый-режим","depth":2},{"value":"Ошибки","id":"ошибки","depth":2}],"frontmatter":{"seo":{"title":"Баланс карты"}},"lastModified":"2026-05-01T14:34:14.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/cards/balance","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}