{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-simpay-flow/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Finanse i wypłaty","description":"Znajdziesz tutaj wszystkie niezbędne informacje dotyczące integracji i obsługi systemu płatności SimPay.pl","siteUrl":"https://docs.simpay.pl","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":"finanse-i-wypłaty","__idx":0},"children":["Finanse i wypłaty"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Środki z transakcji submerchanta trafiają na jego ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["portfel"]}," w SimPay. Przez API SimPay Flow możesz pokazać submerchantowi saldo i historię operacji, skonfigurować wypłaty, zlecać je ręcznie oraz pobierać raporty i faktury."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"portfele","__idx":1},"children":["Portfele"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Submerchant może mieć kilka portfeli (np. w różnych walutach). Listę pobierzesz przez ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/flow/flowgetsubmerchantwallets"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET .../submerchants/{submerchantId}/finances"]}]},", a pojedynczy portfel przez ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/flow/flowgetsubmerchantwallet"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET .../finances/{walletId}"]}]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Najważniejsze pola portfela:"]},{"$$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":"Pole"},"children":["Pole"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Opis"},"children":["Opis"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID portfela (UUID) - używasz go w pozostałych endpointach finansowych"]}]},{"$$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":["Aktualne saldo"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currency.isoCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Waluta portfela"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["withdrawType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Typ wypłat (patrz niżej)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoiceLocale"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Język faktur prowizyjnych (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pl"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["en"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ustawienia-wypłat","__idx":2},"children":["Ustawienia wypłat"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Typ wypłat ustawiasz żądaniem ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/flow/flowupdatesubmerchantwallet"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH .../finances/{walletId}"]}]},"."]},{"$$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":"withdraw.type"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["withdraw.type"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Działanie"},"children":["Działanie"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Wymagane pola"},"children":["Wymagane pola"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["manual"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Wypłaty wyłącznie na żądanie - ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#zlecanie-wyp%C5%82aty"},"children":["zlecasz je przez API"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workdays"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Automatyczna wypłata w każdy dzień roboczy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["balance_greater_than"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Automatyczna wypłata, gdy saldo przekroczy ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["balanceToAutoPayout"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["balanceToAutoPayout"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["custom_days"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Automatyczna wypłata w wybrane dni tygodnia, gdy saldo przekroczy ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["balanceToAutoPayout"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["balanceToAutoPayout"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customDays"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dodatkowo dla wypłat automatycznych możesz ustawić ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["leftBalance"]}," - kwotę, która zawsze zostaje na portfelu."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X PATCH \"https://api.simpay.pl/flow/{flowServiceId}/submerchants/user-123/finances/{walletId}\" \\\n  -H \"Authorization: Bearer TWÓJ_TOKEN_API\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"withdraw\": {\n      \"type\": \"custom_days\",\n      \"customDays\": [1, 5],\n      \"balanceToAutoPayout\": 100.00,\n      \"leftBalance\": 10.00\n    }\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Ustawienia są nadpisywane w całości"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Każde przesłanie obiektu ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["withdraw"]}," zastępuje wszystkie dotychczasowe ustawienia wypłat. Pola, których nie przekażesz, zostaną wyczyszczone."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customDays"]}," to dni tygodnia: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," - poniedziałek, ..., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," - piątek."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"zlecanie-wypłaty","__idx":3},"children":["Zlecanie wypłaty"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Jeśli portfel ma typ wypłat ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["manual"]},", wypłatę zlecasz żądaniem ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/flow/flowcreatesubmerchantwithdraw"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST .../finances/{walletId}/withdraws"]}]},". Zlecenie wypłaty jest możliwe tylko dla aktywnego submerchanta."]},{"$$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":"Błąd"},"children":["Błąd"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Przyczyna"},"children":["Przyczyna"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ERR_MANUAL_WITHDRAWALS_DISABLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Portfel nie ma ustawionego typu wypłat ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["manual"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UBO_DOCUMENT_REVERIFICATION_REQUIRED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dokument tożsamości beneficjenta rzeczywistego wygasł - wypłaty są zablokowane do czasu zatwierdzenia nowego dokumentu."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ERR_WITHDRAW_ERROR"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Wypłata nie może zostać zrealizowana - szczegóły w polu ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Historię wypłat pobierzesz przez ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/flow/flowgetsubmerchantwithdraws"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET .../finances/{walletId}/withdraws"]}]}," (filtry: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["shortId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},"). Statusy wypłaty: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["new"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accepted"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["waiting"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["done"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rejected"]},". O każdej zmianie statusu poinformujemy ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/simpay-flow/webhooks"},"children":["webhookiem"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flow_submerchant_withdraw:status_changed"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"historia-operacji","__idx":4},"children":["Historia operacji"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/flow/flowgetsubmerchantwallettransactions"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET .../finances/{walletId}/transactions"]}]}," zwraca wszystkie operacje na portfelu:"]},{"$$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":"action"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["action"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operacja"},"children":["Operacja"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["service"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Wpłata z transakcji"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["commission"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prowizja od transakcji"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refund"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Zwrot transakcji (lub jego cofnięcie)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["withdraw"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Wypłata środków"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bank_fee"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Opłata banku za wypłatę"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fraud"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Operacja związana z transakcją oznaczoną jako fraud"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lista korzysta z paginacji kursorowej - kolejną stronę pobierzesz, przekazując wartość ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor.next.cursor"]}," w parametrze ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"raporty-csv","__idx":5},"children":["Raporty CSV"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/flow/flowsubmerchantwalletreport"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST .../finances/{walletId}/raport"]}]}," generuje raport CSV operacji portfela:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["za wybrany okres - ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{\"date\": {\"from\": \"2026-09-01\", \"to\": \"2026-09-30\"}}"]},","]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["dla wybranej wypłaty - ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{\"withdraw\": {\"shortId\": \"1f2b3c4d\"}}"]},". Raport obejmuje wtedy wszystkie operacje od poprzedniej wypłaty, czyli dokładnie to, z czego składa się dana wypłata."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"faktury-prowizyjne","__idx":6},"children":["Faktury prowizyjne"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/flow/flowgetsubmerchantinvoices"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET .../finances/invoices"]}]}," zwraca miesięczne faktury prowizyjne submerchanta wraz z linkiem do pobrania (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoiceUrl"]},"). Język faktur ustawisz polem ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoiceLocale"]}," portfela."]}]},"headings":[{"value":"Finanse i wypłaty","id":"finanse-i-wypłaty","depth":1},{"value":"Portfele","id":"portfele","depth":2},{"value":"Ustawienia wypłat","id":"ustawienia-wypłat","depth":2},{"value":"Zlecanie wypłaty","id":"zlecanie-wypłaty","depth":2},{"value":"Historia operacji","id":"historia-operacji","depth":2},{"value":"Raporty CSV","id":"raporty-csv","depth":2},{"value":"Faktury prowizyjne","id":"faktury-prowizyjne","depth":2}],"frontmatter":{"seo":{"title":"Finanse i wypłaty"}},"lastModified":"2026-10-01T15:18:54.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/simpay-flow/finances","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}