{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/en/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"API request format","description":"Документация API 1Payment — приём платежей и выплаты.","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":"api-request-format","__idx":0},"children":["API request format"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Interaction with the 1Payment API uses ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP requests"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.1payment.com/<method_name>"]},". The exact URL and field set are on each operation page in the payment acceptance and payout sections."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Successful and error responses are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JSON"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"parameter-delivery-methods","__idx":1},"children":["Parameter delivery methods"]},{"$$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":"Method"},"children":["Method"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"How to send"},"children":["How to send"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Headers"},"children":["Headers"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GET"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Parameters in the query string. Used in examples by default."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Body ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/x-www-form-urlencoded"]}," with the same fields as GET query."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type: application/x-www-form-urlencoded"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POST JSON"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Body ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]}," with the same field set."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type: application/json"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Documentation often shows parameters for ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GET"]},", but for the same method you may use ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GET"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POST"]},", or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POST JSON"]}," — choose what fits your server."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"request-signature--sign-","__idx":2},"children":["Request signature (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sign"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Protected methods require the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sign"]}," parameter — MD5, lowercase (hex) of the string:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"<method_name> + <parameters_without_sign_in_A-Z_order_joined_by_&> + <API_KEY>\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example"]}," (method ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["init_form"]},"; the project key value is appended at the end):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"init_formamount=100.00&partner_id=123&project_id=456&shop_url=myshop.ru&user_data=order_777secret_key\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Only ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["actually sent"]}," fields are included in the signature, except ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sign"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["API_KEY"]}," is the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["project"]}," key (not the partner global key)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The method prefix (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["init_form"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["init_payment"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status_payment"]},", etc.) matches the operation documentation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Parameter values in the signature string are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["as sent"]},", without URL encoding. In PHP, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["do not"]}," use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http_build_query()"]}," to build the signature string (it encodes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":"]}," and other characters); ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http_build_query()"]}," is fine separately for the HTTP body or query string when sending the request."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Method pages include a signature verification widget. Signature verification failure — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_code"]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]},"; see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/en/pages/error-codes-api"},"children":["Error codes (API)"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"callbacks-notifications","__idx":3},"children":["Callbacks (notifications)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["1Payment sends the final payment status as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POST"]}," JSON to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notify_url"]},". Callback signature ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["without"]}," the method name prefix: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["md5(<parameters_in_A-Z_order_joined_by_&> + <API_KEY>)"]},". Your server must respond with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP 200 OK"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The full callback field list and method-specific details are on operation pages in the \"Status notifications (callbacks)\" sections."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-sections","__idx":4},"children":["Related sections"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/en/pages/error-codes-api"},"children":["Error codes (API)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/en/pages/payment-types"},"children":["Payment types"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/en/pages/payout-types"},"children":["Payout types"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/en/pages/transaction-statuses"},"children":["Transaction statuses"]}]}]}]},"headings":[{"value":"API request format","id":"api-request-format","depth":1},{"value":"Parameter delivery methods","id":"parameter-delivery-methods","depth":2},{"value":"Request signature ( sign )","id":"request-signature--sign-","depth":2},{"value":"Callbacks (notifications)","id":"callbacks-notifications","depth":2},{"value":"Related sections","id":"related-sections","depth":2}],"frontmatter":{"seo":{"title":"API request format"}},"lastModified":"2026-07-09T09:48:51.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/en/pages/init-request","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}