{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Котировка и заказ","description":"Котировка (POST /sbp/quotes) и заказ с QR СБП (POST /sbp/orders): окончательная сумма USDT, Idempotency-Key, статусы, отмена, зачисление на карту, ошибки.","siteUrl":"https://b2b-app.lumowallet.io","lang":"ru-RU","keywords":"Lumo B2B, платёжный API, крипто-платежи, USDT, TRC-20, СБП QR, виртуальные карты VISA, выплаты в рублях","image":"https://b2b-app.lumowallet.io/og-cover.png","meta":[{"name":"twitter:card","content":"summary_large_image"},{"name":"og:type","content":"website"},{"name":"og:site_name","content":"Lumo B2B"},{"name":"og:locale","content":"ru_RU"}],"jsonLd":{"@context":"https://schema.org","@type":"Organization","name":"Lumo B2B","url":"https://b2b-app.lumowallet.io","logo":"https://b2b-app.lumowallet.io/apple-touch-icon.png","description":"Крипто-платежи для бизнеса: приём по QR СБП, депозиты USDT, виртуальные VISA-карты и выплаты в рублях.","sameAs":["https://t.me/LumoB2B"]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"котировка-и-заказ","__idx":0},"children":["Котировка и заказ"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"котировка","__idx":1},"children":["Котировка"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /sbp/quotes\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Окончательная цена до выпуска QR. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountUsdt"]}," показывает, сколько получит"," ","клиент (на карту ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardId"]}," или на баланс компании) за вычетом всех комиссий"," ","и вашей наценки."," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rate"]}," — сколько рублей стоит 1 полученный USDT. Покажите это клиенту и"," ","создайте заказ по ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["quoteId"]},", пока котировка не истекла (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expiresAt"]},", около"," ","двух минут). Клиент должен быть верифицирован."]},{"$$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":"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":["customerId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ваш идентификатор клиента"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountRub"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Сколько рублей клиент отправит по QR: десятичная строка, до 2 знаков"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["см. ниже"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Карта компании, которую пополнить купленным"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partnerFeeBps"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["нет"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ваша наценка в базисных пунктах от суммы заказа (100 = 1%), от 0 до 9999, по умолчанию 0. См. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#%D0%B2%D0%B0%D1%88%D0%B0-%D0%BD%D0%B0%D1%86%D0%B5%D0%BD%D0%BA%D0%B0"},"children":["Ваша наценка"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["нет"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["topup"]}," (по умолчанию) — покупка USDT. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card_issue"]}," — оплата выпуска карты, см. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/sbp-buy/card-issue"},"children":["Выпуск карты за рубли"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardId"]}," обязателен, если покупки вашей компании зачисляются только на карту."," ","Без него в режиме «на карту или на баланс» USDT лягут на баланс компании."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST 'https://b2b.lumowallet.io/sbp/quotes' \\\n  -H 'X-API-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"customerId\": \"cust-8841\",\n    \"amountRub\": \"10000\",\n    \"cardId\": \"3f1d2a4b-8c7e-4f61-9a0b-5d2e1c3b4a59\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"quoteId\": \"b7a3c1e2-9d4f-4a8b-8e6c-1f2d3a4b5c6d\",\n  \"customerId\": \"cust-8841\",\n  \"target\": \"card\",\n  \"cardId\": \"3f1d2a4b-8c7e-4f61-9a0b-5d2e1c3b4a59\",\n  \"amountRub\": \"10000.00\",\n  \"amountUsdt\": \"117.42\",\n  \"partnerFeeUsdt\": \"0.00000000\",\n  \"rate\": \"85.164367\",\n  \"expiresAt\": \"2026-10-24T10:17:02.000Z\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["При зачислении на карту ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountUsdt"]}," — сумма пополнения карты с точностью до"," ","цента, комиссия пополнения уже вычтена. Если после округления остаётся"," ","меньше цента, этот остаток ложится на баланс компании. Сумма меньше"," ","минимального пополнения карты — ответ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400 SBP_AMOUNT_OUT_OF_RANGE"]}," ещё до"," ","выпуска QR."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ваша-наценка","__idx":2},"children":["Ваша наценка"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Чтобы зарабатывать на покупках, передайте в котировке ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partnerFeeBps"]},": свою"," ","наценку в базисных пунктах от суммы заказа (100 = 1%). Размер выбираете сами"," ","и можете менять от котировки к котировке. Нужна фиксированная сумма в рублях —"," ","пересчитайте её в bps от ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountRub"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Наценка удерживается из купленного так же, как наша комиссия: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountUsdt"]}," ","и ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rate"]}," уже её учитывают, а сама она приходит отдельным полем"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partnerFeeUsdt"]},". После оплаты мы зачисляем на баланс компании всю покупку,"," ","пополняем карту на ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountUsdt"]},", а ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partnerFeeUsdt"]}," остаётся у вас на балансе."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST 'https://b2b.lumowallet.io/sbp/quotes' \\\n  -H 'X-API-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"customerId\": \"cust-8841\",\n    \"amountRub\": \"10000\",\n    \"cardId\": \"3f1d2a4b-8c7e-4f61-9a0b-5d2e1c3b4a59\",\n    \"partnerFeeBps\": 200\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"quoteId\": \"c8b4d2f3-0e5a-4b9c-9f7d-2a3e4b5c6d7e\",\n  \"customerId\": \"cust-8841\",\n  \"target\": \"card\",\n  \"cardId\": \"3f1d2a4b-8c7e-4f61-9a0b-5d2e1c3b4a59\",\n  \"amountRub\": \"10000.00\",\n  \"amountUsdt\": \"111.61\",\n  \"partnerFeeUsdt\": \"2.37107291\",\n  \"rate\": \"89.597706\",\n  \"expiresAt\": \"2026-10-24T10:17:02.000Z\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Здесь клиент заплатит 10 000 ₽, на карту ляжет 111,61 USD, а 2,37 USDT"," ","останутся на балансе компании. Если наценка не оставляет клиенту ничего или"," ","сумма пополнения выходит меньше минимальной, котировка ответит"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400 SBP_AMOUNT_OUT_OF_RANGE"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"заказ","__idx":3},"children":["Заказ"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /sbp/orders\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Выпускает QR СБП по котировке. Сумма и курс заказа берутся ровно из неё."," ","Нужен заголовок ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Idempotency-Key"]},"."]},{"$$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":"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":["quoteId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["quoteId"]}," из ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /sbp/quotes"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["нет"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ваш идентификатор заказа"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST 'https://b2b.lumowallet.io/sbp/orders' \\\n  -H 'X-API-Key: YOUR_API_KEY' \\\n  -H 'Idempotency-Key: 2c9e7f1a-5b3d-4e8a-9c6f-0a1b2c3d4e5f' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"quoteId\": \"b7a3c1e2-9d4f-4a8b-8e6c-1f2d3a4b5c6d\",\n    \"externalId\": \"buy-5531\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"e4d2c1b0-7a6f-4e5d-8c3b-2a1f0e9d8c7b\",\n  \"externalId\": \"buy-5531\",\n  \"customerId\": \"cust-8841\",\n  \"quoteId\": \"b7a3c1e2-9d4f-4a8b-8e6c-1f2d3a4b5c6d\",\n  \"status\": \"awaiting_payment\",\n  \"target\": \"card\",\n  \"cardId\": \"3f1d2a4b-8c7e-4f61-9a0b-5d2e1c3b4a59\",\n  \"amountRub\": \"10000.00\",\n  \"amountUsdt\": \"117.42\",\n  \"partnerFeeUsdt\": \"0.00000000\",\n  \"rate\": \"85.164367\",\n  \"cardRechargeId\": null,\n  \"cardRechargeStatus\": null,\n  \"qrUrl\": \"https://qr.nspk.ru/…\",\n  \"qrPngBase64\": \"iVBORw0KGgoAAAANSUhEUgAA…\",\n  \"payerPhoneMasked\": \"+7 999 ***-**-67\",\n  \"failureReason\": null,\n  \"expiresAt\": \"2026-10-24T11:15:10.000Z\",\n  \"completedAt\": null,\n  \"createdAt\": \"2026-10-24T10:15:10.402Z\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Как показать QR клиенту:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["на телефоне"]}," отдайте ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["qrUrl"]}," операционной системе: она предложит"," ","открыть приложение банка;"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["на компьютере"]}," покажите картинку из ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["qrPngBase64"]},", клиент отсканирует"," ","её телефоном."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payerPhoneMasked"]}," — номер, с которого банк ждёт оплату. Покажите его"," ","клиенту рядом с QR. QR живёт до ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expiresAt"]},", около часа. У клиента может"," ","быть только один активный заказ."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"коды-ответа-и-idempotency-key","__idx":4},"children":["Коды ответа и Idempotency-Key"]},{"$$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":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["201"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Заказ создан, QR в ответе"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Повтор с тем же ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Idempotency-Key"]},": тот же заказ. Картинки QR в ответе нет, берите её из ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /sbp/orders/{id}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status: creating"]},", банк ещё не подтвердил выпуск QR"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202 creating"]},": не создавайте новый заказ."]}," QR мог выпуститься, мы"," ","уточним это сами. Перечитайте заказ через несколько секунд"," ","(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /sbp/orders/{id}"]},"): он станет ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["awaiting_payment"]}," или ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]},"."," ","Повтор с тем же ключом безопасен. С новым ключом по той же котировке"," ","получите ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409 SBP_QUOTE_USED"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Тот же ключ с другим ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["quoteId"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409 IDEMPOTENCY_KEY_REUSED"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"статусы-заказа","__idx":5},"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":"status"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}]},{"$$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":["creating"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Выпускаем QR у банка"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["awaiting_payment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["QR выпущен, ждём оплату"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["completed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Оплачено, USDT зачислены"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expired"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["QR истёк без оплаты"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancelled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Заказ отменён"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Не удалось выпустить QR или провести оплату, причина в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failureReason"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Каждая смена статуса приходит вебхуком ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sbp.order.status_changed"]},". Если"," ","оплата всё-таки придёт после ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expired"]}," или ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]},", заказ станет"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["completed"]}," и USDT будут зачислены."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"зачисление-на-карту","__idx":6},"children":["Зачисление на карту"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["При ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target: card"]}," после оплаты мы сначала зачисляем USDT на баланс компании,"," ","а затем пополняем карту ровно на ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountUsdt"]},". Ваша наценка ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partnerFeeUsdt"]}," ","на карту не идёт и остаётся на балансе. Ход пополнения виден"," ","в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardRechargeStatus"]},", а ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardRechargeId"]}," связывает заказ с событиями"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.recharge.*"]}," (см. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/cards/webhooks"},"children":["Webhooks по картам"]},")."]},{"$$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":"cardRechargeStatus"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardRechargeStatus"]}]},{"$$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":["null"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Пополнение ещё не запущено. При сбое связи мы повторим его сами"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["succeeded"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in_progress_manual"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refunded"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Статус пополнения на момент запуска, как в ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/cards/recharge"},"children":["Пополнении карты"]},". Дальше следите за ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.recharge.*"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Если пополнение отклонено (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardRechargeStatus: failed"]},"), купленные USDT"," ","остаются на балансе компании. Пополнить карту можно обычным"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cards/recharge"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"заказы-клиента","__idx":7},"children":["Заказы клиента"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /sbp/orders/{id}\nGET /sbp/orders?customerId=cust-8841&status=awaiting_payment,completed&limit=50&offset=0\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Пока заказ в статусе ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["awaiting_payment"]},", ответ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /sbp/orders/{id}"]}," содержит"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["qrUrl"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["qrPngBase64"]}," и ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payerPhoneMasked"]},". Список возвращает"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ \"items\": [...], \"total\": 12 }"]},", новые заказы идут первыми, картинки QR"," ","в нём нет."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"отмена","__idx":8},"children":["Отмена"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /sbp/orders/{id}/cancel\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Отменяет неоплаченный заказ. Отменяйте брошенные заказы сразу: каждый"," ","неоплаченный QR приближает блокировку клиента в банке. Если заказ уже оплачен"," ","или завершён, ответ — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409 SBP_ORDER_NOT_CANCELABLE"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ошибки","__idx":9},"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":"errorCode"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorCode"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"HTTP"},"children":["HTTP"]},{"$$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":["SBP_BUY_NOT_ENABLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Покупка не подключена вашей компании"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_CUSTOMER_NOT_FOUND"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["404"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Клиент не зарегистрирован, сначала ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /sbp/customers"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_CUSTOMER_INVALID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Банку нужен российский мобильный номер плательщика: обновите ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phone"]}," через ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /sbp/customers"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_CUSTOMER_NOT_VERIFIED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["412"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Клиент не верифицирован, статус в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_CARD_REQUIRED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Покупки компании идут только на карту, нужен ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardId"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_AMOUNT_OUT_OF_RANGE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Сумма вне границ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /sbp/rate"]},", меньше минимального пополнения карты или наценка не оставляет клиенту ничего"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["QUOTE_NOT_FOUND"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["QUOTE_EXPIRED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["404 / 400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Котировки нет или она истекла, запросите новую"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_QUOTE_USED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["409"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["По котировке уже создан заказ"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IDEMPOTENCY_KEY_REQUIRED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Нет заголовка ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Idempotency-Key"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IDEMPOTENCY_KEY_REUSED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["409"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ключ уже использован для другой котировки"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_ACTIVE_ORDER_EXISTS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["409"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["У клиента уже есть неоплаченный заказ"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_LIMIT_EXCEEDED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["429"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Превышен лимит банка на клиента, причина в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details.providerCode"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_ORDER_NOT_FOUND"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["404"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Заказа нет"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_ORDER_NOT_CANCELABLE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["409"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Заказ уже не отменить"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_PROVIDER_REJECTED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Банк отклонил запрос, код в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details.providerCode"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_PROVIDER_UNAVAILABLE"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_BUY_UNAVAILABLE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["503"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Сервис временно недоступен, повторите позже"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SBP_KYC_UNAVAILABLE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["503"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Верификация временно недоступна"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"отказы-банка","__idx":10},"children":["Отказы банка"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["У ошибок от банка в ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details"]}," есть ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerCode"]},", а иногда ещё и"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerDetails"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"errorCode\": \"SBP_LIMIT_EXCEEDED\",\n  \"message\": \"…\",\n  \"details\": {\n    \"providerCode\": \"sbp_buy_fiat_daily_limit\",\n    \"providerDetails\": {\n      \"code\": \"ProviderDailyQrlimitReached\",\n      \"limit\": \"100000\",\n      \"remaining\": \"0\",\n      \"resets_at\": \"2026-10-25T09:00:00Z\"\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerDetails.code"]}," приходит, когда банк однозначно отказал этому клиенту."," ","Покажите по нему понятный клиенту текст."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remaining"]}," и ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resets_at"]}," приходят у лимитов в рублях: сколько"," ","клиенту доступно и когда лимит обновится."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Значения ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerCode"]},", которые стоит обработать отдельно:"]},{"$$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":"providerCode"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerCode"]}]},{"$$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":["sbp_buy_daily_qr_limit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["На сегодня лимит покупок исчерпан, попробуйте завтра"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sbp_buy_daily_paid_qr_limit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Лимит оплаченных покупок на сегодня, попробуйте через час"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sbp_buy_pending_qr_limit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Слишком много неоплаченных QR. Ожидание не поможет, нужна поддержка"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sbp_buy_fiat_daily_limit"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sbp_buy_fiat_monthly_limit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Превышен лимит суммы за сутки или за месяц, см. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resets_at"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sbp_buy_amount_unavailable"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Банк не может принять эту сумму, другая может пройти"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sbp_buy_blocked"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Покупка для клиента недоступна, нужна поддержка"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sbp_buy_bank_not_found"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sbp_buy_bank_unsupported"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Банк клиента не поддерживается"]}]}]}]}]}]},"headings":[{"value":"Котировка и заказ","id":"котировка-и-заказ","depth":1},{"value":"Котировка","id":"котировка","depth":2},{"value":"Ваша наценка","id":"ваша-наценка","depth":3},{"value":"Заказ","id":"заказ","depth":2},{"value":"Коды ответа и Idempotency-Key","id":"коды-ответа-и-idempotency-key","depth":3},{"value":"Статусы заказа","id":"статусы-заказа","depth":2},{"value":"Зачисление на карту","id":"зачисление-на-карту","depth":3},{"value":"Заказы клиента","id":"заказы-клиента","depth":2},{"value":"Отмена","id":"отмена","depth":2},{"value":"Ошибки","id":"ошибки","depth":2},{"value":"Отказы банка","id":"отказы-банка","depth":3}],"frontmatter":{"seo":{"description":"Котировка (POST /sbp/quotes) и заказ с QR СБП (POST /sbp/orders): окончательная сумма USDT, Idempotency-Key, статусы, отмена, зачисление на карту, ошибки.","title":"Котировка и заказ"}},"lastModified":"2026-11-02T17:44:54.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/sbp-buy/orders","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}