{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/en/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Introduction - Online Payments","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":"introduction---online-payments","__idx":0},"children":["Introduction - Online Payments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Welcome to the Online Payments module! This guide will walk you through the most important steps needed to start"," ","accepting payments using our API. In just a few minutes, you'll generate your first transaction."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-prerequisites","__idx":1},"children":["1. Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before sending your first API request, you need to prepare two things in the SimPay Client Panel:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Service registration:"]}," Go to the Client Panel and add a new service for Online Payments. After creating it,"," ","you will receive a unique service identifier (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["e65c7519"]},"), which will be required when generating each transaction ("," ","you will provide it in the URL)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Key (Bearer Token):"]}," Authentication in our API is done using tokens. You can find your API key"," ","after logging into the panel, under the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["My Account > API Keys"]}," tab."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Test mode"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To test payments without using real money and actually charging accounts, simply ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["enable \"Test"," ","mode\""]}," in the settings of your specific service in the Client Panel."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-api-communication-basics","__idx":2},"children":["2. API Communication Basics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Our API is designed in the REST spirit and communicates exclusively in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JSON"]}," format."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every request sent to SimPay servers must absolutely include security in the form of a token and appropriate"," ","HTTP headers. Missing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}," header may result in request rejection."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"Authorization: Bearer YOUR_API_KEY\nAccept: application/json\nContent-Type: application/json\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-generating-your-first-transaction","__idx":3},"children":["3. Generating Your First Transaction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create a new payment transaction and generate a link for the customer, send a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," request to the endpoint"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/payment/{serviceId}/transactions"]},", replacing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{serviceId}"]}," with your service identifier."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request","__idx":4},"children":["Example Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Below is the simplest possible request. According to the specification, the only absolutely required field in the request"," ","body is the amount (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]},")."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /payment/e65c7519/transactions HTTP/1.1\nHost: api.simpay.pl\nAuthorization: Bearer YOUR_API_KEY\nAccept: application/json\nContent-Type: application/json\n\n{\n  \"amount\": 100.00,\n  \"currency\": \"PLN\"\n}\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Want to send more data?"]}," You can optionally provide the customer's email address, restrict available payment channels,"," ","or force a specific gateway language. The full list and structure of all supported parameters can be found in our"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis"},"children":["API Reference"]}]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-response","__idx":5},"children":["Example Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Upon successful transaction creation, the server will return an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP 200 OK"]}," status and a JSON object containing"," ","the transaction identifier and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirectUrl"]}," – the address to which you should redirect the buyer."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": true,\n  \"data\": {\n    \"transactionId\": \"1d87a1b3-18f8-4146-bcb1-c0c9f293b04f\",\n    \"redirectUrl\": \"https://pay.simpay.pl/1d87a1b3-18f8-4146-bcb1-c0c9f293b04f\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["What now?"]}," Redirect your customer's browser to the address provided in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirectUrl"]}," field. The customer will pay for the order"," ","on our gateway, and we'll take care of the rest!"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"4-whats-next","__idx":6},"children":["4. What's Next?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You've successfully generated your first transaction! To build a complete and fully automated e-commerce integration,"," ","explore the following topics:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["👉 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/notifications/payment"},"children":["IPN Notifications (Webhooks)"]}]}," – an absolute must! Learn how your server should"," ","automatically find out that the customer has actually paid for the order, so you can deliver the goods."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["👉 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/payment/directchannel"},"children":["Payments bypassing the gateway (directChannel)"]}]}," – learn how to implement"," ","White-Label Checkout and increase conversion in your store."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["👉 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/payment/statuses"},"children":["Transaction status list"]}]}," – learn the full payment lifecycle."]}]},"headings":[{"value":"Introduction - Online Payments","id":"introduction---online-payments","depth":1},{"value":"1. Prerequisites","id":"1-prerequisites","depth":2},{"value":"2. API Communication Basics","id":"2-api-communication-basics","depth":2},{"value":"3. Generating Your First Transaction","id":"3-generating-your-first-transaction","depth":2},{"value":"Example Request","id":"example-request","depth":3},{"value":"Example Response","id":"example-response","depth":3},{"value":"4. What's Next?","id":"4-whats-next","depth":2}],"frontmatter":{"seo":{"title":"Introduction - Online Payments"}},"lastModified":"2026-05-13T09:55:40.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/en/payment","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}