{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/en/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Refunds","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":"refunds","__idx":0},"children":["Refunds"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SimPay system allows for easy and automated refunding of funds to customers (e.g., in case of withdrawal from a contract, complaint, or order cancellation). You can initiate this process directly from our API, without the need to manually order bank transfers from the Billing Panel."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"formal-and-technical-requirements","__idx":1},"children":["Formal and Technical Requirements"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before initiating a refund, make sure the given transaction meets all of the following conditions. If any of them are not met, the API will return an error."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Transaction status:"]}," The transaction must be fully paid (have the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_paid"]}," status)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Available balance:"]}," Your account (SimPay balance) must have sufficient funds to cover the refund being ordered."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Maximum amount:"]}," The sum of all previous refunds for a given transaction cannot exceed its original value."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Transaction age:"]}," A refund can only be ordered for transactions that are no older than ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["30 days"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No tests:"]}," Refunds can only be made for real (production) transactions. You cannot order a refund for a test transaction."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No duplicates:"]}," At any given time, a transaction cannot have another pending refund order (status ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refund_new"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refund_pending"]},"). You must wait for the previous order to finish processing."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"full-and-partial-refunds","__idx":2},"children":["Full and Partial Refunds"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Depending on your needs, SimPay allows two types of refunds:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Partial refund"]}," – you return only part of the amount to the customer (e.g., when they return only one of several ordered products). To perform it, pass the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]}," parameter with the appropriate amount in the request body."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Full refund (100%)"]}," – you return the entire paid amount. You have two options here: you can omit the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]}," parameter in the request (the system will then refund the full transaction value by default) or explicitly provide the original order amount."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"creating-a-refund-api-examples","__idx":3},"children":["Creating a Refund (API Examples)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To generate a refund, send a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," request to the endpoint:"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/payment/{serviceId}/transactions/{transactionId}/refunds"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-partial-refund-eg-for-2550-pln","__idx":4},"children":["Example: Partial Refund (e.g., for 25.50 PLN)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.simpay.pl/payment/{serviceId}/transactions/{transactionId}/refunds\" \\\n  -H \"Authorization: Bearer YOUR_API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json\" \\\n  -d '{\n    \"amount\": \"25.50\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-full-refund-omitting-the-amount-parameter","__idx":5},"children":["Example: Full Refund (omitting the amount parameter)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.simpay.pl/payment/{serviceId}/transactions/{transactionId}/refunds\" \\\n  -H \"Authorization: Bearer YOUR_API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json\" \\\n  -d '{}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"api-response-and-refundid-identifier","__idx":6},"children":["API Response and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refundId"]}," Identifier"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After sending a valid request, the operation will be queued and will receive an initial status of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refund_new"]},". In the response from our API, you will receive an object containing a unique identifier for this order – ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refundId"]}]},"."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Important:"]}," Remember to save the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refundId"]}," value in your database alongside the transaction identifier! It will be essential for correctly matching and handling future IPN notifications (webhooks) with status changes for this specific refund."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"refund-lifecycle","__idx":7},"children":["Refund Lifecycle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ordering a refund does not mean that the money will immediately appear in the customer's account. This process is subject to specific stages and system statuses."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["👉 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/payment/statuses#statusGroup=Refund+Statuses"},"children":["Go to: Refund Statuses"]}]},", to check the full lifecycle, transition diagrams, and instructions on how we notify your application about the successful completion of a refund operation."]}]},"headings":[{"value":"Refunds","id":"refunds","depth":1},{"value":"Formal and Technical Requirements","id":"formal-and-technical-requirements","depth":2},{"value":"Full and Partial Refunds","id":"full-and-partial-refunds","depth":2},{"value":"Creating a Refund (API Examples)","id":"creating-a-refund-api-examples","depth":2},{"value":"Example: Partial Refund (e.g., for 25.50 PLN)","id":"example-partial-refund-eg-for-2550-pln","depth":3},{"value":"Example: Full Refund (omitting the amount parameter)","id":"example-full-refund-omitting-the-amount-parameter","depth":3},{"value":"API Response and refundId Identifier","id":"api-response-and-refundid-identifier","depth":3},{"value":"Refund Lifecycle","id":"refund-lifecycle","depth":2}],"frontmatter":{"seo":{"title":"Refunds"}},"lastModified":"2026-05-13T09:55:40.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/en/payment/refunds","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}