{"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":["Закрытие карты — асинхронная операция: вы отправляете запрос, карта"," ","переходит в статус ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closing"]},", а после завершения — в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closed"]},". Остаток"," ","средств на карте на момент закрытия за вычетом комиссии за закрытие"," ","возвращается на баланс компании."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"запрос","__idx":1},"children":["Запрос"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /cards/{id}/retire\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"пример","__idx":2},"children":["Пример"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST 'https://b2b.lumowallet.io/cards/8c7f1823-.../retire' \\\n  -H 'X-API-Key: YOUR_API_KEY'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ответ","__idx":3},"children":["Ответ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Возвращается карта в статусе ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closing"]}," (или сразу ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closed"]},", если закрытие"," ","прошло мгновенно — например, в тестовом режиме)."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"8c7f1823-...\",\n  \"status\": \"closing\",\n  \"maskedPan\": \"4466 ** ** 1234\",\n  \"expiry\": \"03/29\",\n  \"assignedAt\": \"2026-04-23T12:00:00Z\",\n  \"createdAt\": \"2026-04-23T11:59:00Z\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"что-происходит-дальше","__idx":4},"children":["Что происходит дальше"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Карта переходит в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closing"]}," — пополнения по ней запрещены"," ","(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cards/recharge"]}," вернёт ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CARD_RETIRED"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Закрытие обрабатывается на нашей стороне (может занять некоторое время)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["После завершения карта переходит в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closed"]},", а ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["остаток на карте за"," ","вычетом ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardClosureFeeUsdt"]}]}," зачисляется на баланс компании."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Приходит webhook ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/cards/webhooks"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.closed"]}]}," с итоговыми"," ","суммами."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"event\": \"card.closed\",\n  \"data\": {\n    \"cardId\": \"8c7f1823-...\",\n    \"closingBalance\": 24.5,\n    \"feeUsdt\": 1,\n    \"refundUsdt\": 23.5\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closingBalance"]}," — остаток на карте на момент закрытия."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeUsdt"]}," — комиссия за закрытие (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardClosureFeeUsdt"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refundUsdt"]}," — сумма, возвращённая на баланс компании"," ","(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closingBalance − feeUsdt"]},", не меньше 0)."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"важно","__idx":5},"children":["Важно"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Идемпотентность."]}," Повторный ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cards/{id}/retire"]}," для карты,"," ","которая уже ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closing"]}," или ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closed"]},", безопасен и не запускает повторное"," ","закрытие/возврат."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Возврат один раз."]}," Средства возвращаются ровно один раз — в момент"," ","перехода в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closed"]},". Ориентируйтесь на webhook ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.closed"]}," и статус"," ","карты, а не на ответ исходного запроса."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","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":"Heading","attributes":{"level":2,"id":"тестовый-режим","__idx":6},"children":["Тестовый режим"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["При ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardsTestMode = true"]}," закрытие происходит мгновенно: карта сразу"," ","получает статус ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["closed"]},", возврат зачисляется на баланс, и webhook"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.closed"]}," отправляется без задержки."]}]},"headings":[{"value":"Закрытие карты","id":"закрытие-карты","depth":1},{"value":"Запрос","id":"запрос","depth":2},{"value":"Пример","id":"пример","depth":3},{"value":"Ответ","id":"ответ","depth":3},{"value":"Что происходит дальше","id":"что-происходит-дальше","depth":2},{"value":"Важно","id":"важно","depth":2},{"value":"Тестовый режим","id":"тестовый-режим","depth":2}],"frontmatter":{"seo":{"title":"Закрытие карты"}},"lastModified":"2026-07-04T23:14:23.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/cards/close-card","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}