### Example Response for GetQrBankList Source: https://developer.tbank.ru/eacq/api/get-qr-bank-list This is an example of a successful response from the GetQrBankList endpoint, showing the structure of the returned bank list. ```json { "Success": true, "ErrorCode": "0", "Message": "dolor consequat mollit in", "BankList": [{ "BankId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "NspkBankId": "100000000004", "BankName": "Т-Банк", "BankLogo": "https://qr.nspk.ru/proxyapp/logo/bank100000000004.png", "BankOrder": 1 }, { "BankId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "NspkBankId": "100000000111", "BankName": "Сбербанк", "BankLogo": "https://qr.nspk.ru/proxyapp/logo/bank100000000111.png", "BankOrder": 2 }, { "BankId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "NspkBankId": "100000000005", "BankName": "Банк ВТБ", "BankLogo": "https://qr.nspk.ru/proxyapp/logo/bank100000000005.png", "BankOrder": 3 }] } ``` -------------------------------- ### GetQrState Response Example Source: https://developer.tbank.ru/eacq/api/get-qr-state This is an example of a successful response from the GetQrState API. It includes the status of the refund and other relevant details. ```json { "Success": true, "ErrorCode": "0", "Status": "CONFIRMED", "QrCancelCode": "I05043", "QrCancelMessage": "У покупателя нет расчетного счета в этом банке. Попробуйте вернуть деньги на счет этого покупателя в другом банке", "OrderId": "7830122", "Amount": 10000, "Message": "OK" } ``` -------------------------------- ### GetAccountQrList Request Example Source: https://developer.tbank.ru/eacq/api/get-account-qr-list This example demonstrates the structure of a request payload for the GetAccountQrList method. Ensure that the TerminalKey and Token are correctly provided. ```json { "TerminalKey": "TBankTest", "Token": "7241ac8307f349afb7bb9dda760717721bbb45950b97c67289f23d8c69cc7b96" } ``` -------------------------------- ### Get Card List Response Example Source: https://developer.tbank.ru/eacq/api/get-card-list This is an example of a successful 200 OK response from the GetCardList API. It includes details of a saved card. ```json { "CardId": "881900", "Pan": "518223******0036", "Status": "D", "RebillId'": "6155312073", "CardType": 0, "ExpDate": "1122" } ``` -------------------------------- ### GetQrState Go Request Example Source: https://developer.tbank.ru/eacq/api/get-qr-state Example of how to make a GetQrState request using Go. This snippet shows how to construct the request body and send it to the API. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://securepay.tinkoff.ru/v2/GetQrState" payload := map[string]string{ "TerminalKey": "TBankTest", "PaymentId": "700031849", "Token": "l43kb4hyi6lknb23bv4gdfskjn238fsllsdf8" } jsonPayload, err := json.Marshal(payload) if err != nil { fmt.Println("Error marshaling JSON:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonPayload)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) // You can read and process the response body here } ``` -------------------------------- ### GetQrState Python Request Example Source: https://developer.tbank.ru/eacq/api/get-qr-state Example of how to make a GetQrState request using Python. This snippet uses the 'requests' library to send the POST request. ```python import requests import json url = "https://securepay.tinkoff.ru/v2/GetQrState" payload = { "TerminalKey": "TBankTest", "PaymentId": "700031849", "Token": "l43kb4hyi6lknb23bv4gdfskjn238fsllsdf8" } headers = { "Content-Type": "application/json" } response = requests.post(url, data=json.dumps(payload), headers=headers) print(f"Status Code: {response.status_code}") print(f"Response: {response.json()}") ``` -------------------------------- ### Get DeepLink Response Example Source: https://developer.tbank.ru/eacq/api/get-deep-link This is an example of a successful response from the GetDeepLink API. It includes a Success status, ErrorCode, and the generated Deeplink. ```json { "Success": true, "ErrorCode": "0", "Deeplink": "mirpay://pay.mironline.ru/inapp/eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCIsImprdSI6Imh0dHBzOi8vc3AtbnNway5la2Fzc2lyLmNvbS9qd2tzL0IwMDAwMDAwMC1qd2tzLmp«Protocols MIRPAY EACQ»28zb24iLCJraWQiOiIxMDAwIn0.eyJpYXQiOjE2NjA1NTMwNzksImlzcyI6IjAwMDAwMDAwIiwib3JkZXJJZCI6IjEyMzQ1NiIsInN1bSI6MTAwMDAsImN1ciI6NjQzLCJtZWRpYSI6IkRMIiwicnVybCI6Imh0dHBzOi8vbWVyY2hhbnQvYXBpL3YxL2luYXBwL21lcmNoYW50cy8wMDAwMDAwMC9vcmRlcnMvMTIzNDU2In0.rk0LjOtx3RR9hboAiVQopZvKzIQpu0SGg2wlt6a1LJN1gQ7NEqcXY0NXfjmhqbPdv8BnDonhXMWLoi9GK4wT8-P_TOfRnqz5JfA4crvtVaD6yvmfkmdFMsFjTDDJfcsaMlqblVw2u5De3SU9oCNKWaWLUUg7i6gRtTCFdvPc1XDlB7WUd_doHLVEV4s5kP1jmArXMBxo1EpJk3pZ-KHmxFeKLjf47NQuNzRv0wZKTgkHk252lXX9QBCE_uTBvV477YZ6FTqAXh9vP1zGiSG6Elel3EKMVxUNkMAhHIACxwmOGRpGsPv0WFlw1T0y44Q7paV_t6st6vlHO3RXYfbA", "Message": "string", "Details": "string" } ``` -------------------------------- ### Get Add Card State Response Example Source: https://developer.tbank.ru/eacq/api/get-add-card-state This is an example of a successful response from the GetAddCardState API. It includes details about the card binding status and associated identifiers. ```json { "TerminalKey": "TBankTest", "RequestKey": "13021e10-a3ed-4f14-bcd1-823b5ac37390", "Status": "NEW", "Success": true, "CardId": "156516516", "RebillId": "134249124", "ErrorCode": "0", "Message": "Неверные параметры", "Details": "Данный RequestKey не найден.", "CustomerKey": "testCustomer1234" } ``` -------------------------------- ### Get Payment Status Request Example Source: https://developer.tbank.ru/eacq/api/get-state This JSON payload demonstrates the required fields for the GetState request, including TerminalKey, PaymentId, and Token. The IP address is optional. ```json { "TerminalKey": "TBankTest", "PaymentId": "13660", "Token": "7241ac8307f349afb7bb9dda760717721bbb45950b97c67289f23d8c69cc7b96", "IP": "192.168.0.52" } ``` -------------------------------- ### GetAccountQrList Response Example Source: https://developer.tbank.ru/eacq/api/get-account-qr-list This example shows a successful response from the GetAccountQrList method. It includes TerminalKey, Success status, ErrorCode, Message, and a list of AccountTokens with their associated details. ```json { "TerminalKey": "TBankTest", "Success": true, "ErrorCode": "0", "Message": "OK", "AccountTokens": [{ "RequestKey": "77520", "Status": "ACTIVE", "AccountToken": "0b67f2cae19b41809f85d5674de30a1a", "BankMemberId": "100000000004", "BankMemberName": "T-Банк" }, { "RequestKey": "77563", "Status": "ACTIVE", "AccountToken": "14ac4445811e8225db8ed312j4433a68", "BankMemberId": "100000000004", "BankMemberName": "T-Банк" }, { "RequestKey": "77644", "Status": "PROCCESING" } ] } ``` -------------------------------- ### Get Customer Request Example Source: https://developer.tbank.ru/eacq/api/get-customer This JSON payload is used to request customer data. Ensure all required fields like TerminalKey, CustomerKey, and Token are correctly populated. ```json { "TerminalKey": "TBankTest", "CustomerKey": "string", "Token": "30797e66108934dfa3d841b856fdad227c6b9c46d6a39296e02dc800d86d181e", "IP": "string" } ``` -------------------------------- ### GetQrState Java Request Example Source: https://developer.tbank.ru/eacq/api/get-qr-state Example of how to make a GetQrState request using Java. This snippet demonstrates using standard Java libraries to send the POST request. ```java import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets; public class GetQrStateExample { public static void main(String[] args) { try { URL url = new URL("https://securepay.tinkoff.ru/v2/GetQrState"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Content-Type", "application/json"); connection.setDoOutput(true); String jsonPayload = "{\"TerminalKey\":\"TBankTest\",\"PaymentId\":\"700031849\",\"Token\":\"l43kb4hyi6lknb23bv4gdfskjn238fsllsdf8\"}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonPayload.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } int responseCode = connection.getResponseCode(); System.out.println("Status Code: " + responseCode); // You can read and process the response body here } catch (Exception e) { e.printStackTrace(); } } } ``` -------------------------------- ### Get Payment Status Response Example Source: https://developer.tbank.ru/eacq/api/get-state This JSON response shows a successful retrieval of payment status. It includes Success, ErrorCode, Message, TerminalKey, Status, PaymentId, OrderId, Params, and Amount. ```json { "Success": true, "ErrorCode": "0", "Message": "OK", "TerminalKey": "TBankTest", "Status": "AUTHORIZED", "PaymentId": "13660", "OrderId": "21050", "Params": [{ "Key": "Route", "Value": "ACQ" }, { "Key": "Source", "Value": "cards" }, { "Key": "CreditAmount", "Value": "100000" } ], "Amount": 1230 } ``` -------------------------------- ### Get Customer Response Example Source: https://developer.tbank.ru/eacq/api/get-customer A successful response (200 OK) includes terminal and customer details, along with status information. An 'ErrorCode' of '0' indicates success, though a 'Message' might still be present for informational purposes. ```json { "TerminalKey": "TBankTest", "CustomerKey": "4264aa7b-08ab-4429-ab5a-2a171d841ced", "ErrorCode": "0", "Success": true, "Message": "Неверный статус покупателя", "Details": "Клиент не найден.", "Email": "a@test.ru", "Phone": "+79031234567" } ``` -------------------------------- ### Payment Response Example Source: https://developer.tbank.ru/eacq/api/init This is a successful response to a payment initiation request. It includes payment status and a URL for the payment form. ```json { "Success": true, "ErrorCode": "0", "TerminalKey": "TBankTest", "Status": "NEW", "PaymentId": "3093639567", "OrderId": "21090", "Amount": 140000, "PaymentURL": "https://pay.tbank.ru/new/fU1ppgqa" } ``` -------------------------------- ### 3DS v1.0 Response Example Source: https://developer.tbank.ru/eacq/api/attach-card Example of a successful 3DS v1.0 authentication response. This includes details like ACSUrl, MD, and PaReq required for further authentication steps. ```json { "TerminalKey": "TBankTest", "CustomerKey": "testCustomerKey", "RequestKey": "8de92934-26c9-474c-a4ce-424f2021d24d", "CardId": "5555", "Success": true, "ErrorCode": "0", "Status": "NEW", "RebillId": "130799909", "Message": "Неверные параметры", "Details": "string", "ACSUrl": "https://secure.tcsbank.ru/acs/auth/start.do", "MD": "ACQT-563587431", "PaReq": "eJxVUl1TwjAQ/CtM30s+KLTDHGHQwsiogFh09C2kp1RpC2nLh7/eBAtqnnYvN3ubvUD/kK4bO9RFkmc9hzWp08BM5XGSvfecRT RyA6cvIFppxPARVaVRwD0WhXzHRhL3HMUU73itwKVtyl1Pcs8Nli3pymUQK+z2Sww6joDZYI5bAfUgYeY0OZAzNYparWRWCpBqe zWeiDZnLe3BqSmkqMeh4PRy2p02BfJThkymKCIsSiAnCCqvslIfhXEG5Eyg0muxKstN0SVkv983yyT7zN/emroiQOwlkF8js8qiwogdk lg8rEfT5WK0jj6G7D4cepNo8TWNBmwSDXtAbAfEskTjkPk0oF6DeV3a6jLj8VQHmVoXglFTqTFs7IjBn4u/BTBZa7OK8yPODPCwyT M0HSbACwby6/f6xsaoSpNMMN89+uHdV/iUPz2nyat/uxrPXz5nuX/c2nBPTVYxMflwzthJ0hIgVobUeyP1yg469xW+AedOuuM=" } ``` -------------------------------- ### AddUserProp Example Source: https://developer.tbank.ru/eacq/api/confirm Example of AddUserProp for additional user-defined properties. Includes a name and its corresponding value. ```json { "Name": "CustomPropName", "Value": "CustomPropValue" } ``` -------------------------------- ### Initialize Payment Integration Configuration Source: https://developer.tbank.ru/eacq/intro/developer/setup_js/setup_speedpay Configure the initial settings for the SpeedPay payment integration, including terminal key and product type. ```javascript const initConfig = { terminalKey: 'myTerminalKey', // Значение TerminalKey из личного кабинета product: 'eacq', features: { payment: {} } } ``` -------------------------------- ### OperatingCheckProps Example Source: https://developer.tbank.ru/eacq/api/confirm Example of OperatingCheckProps for operational check details. Includes identifier, value, and timestamp of the operation. ```json { "Name": "OperationId", "Value": "OperationData", "Timestamp": "dd.mm.yyyy HH:MM:SS" } ``` -------------------------------- ### Add Account QR Request Example Source: https://developer.tbank.ru/eacq/api/add-account-qr This example demonstrates the structure of a request body for the AddAccountQr API. Ensure all required fields like TerminalKey, Description, and Token are correctly populated. The DataType can be set to PAYLOAD or IMAGE, and Data can include custom key-value pairs. ```json { "TerminalKey": "TBankTest", "Description": "string", "DataType": "PAYLOAD", "Data": { "property1": "string", "property2": "string" }, "RedirectDueDate": "2016-08-31T12:28:00+03:00", "Token": "871199b37f207f0c4f721a37cdcc71dfcea880b4a4b85e3cf852c5dc1e99a8d6" } ``` -------------------------------- ### Add Customer Request Example Source: https://developer.tbank.ru/eacq/api/add-customer This JSON payload demonstrates the required fields for registering a customer. Ensure all fields, including TerminalKey, CustomerKey, and Token, are correctly populated. ```json { "TerminalKey": "TBankTest", "CustomerKey": "4387c647-a693-449d-bc35-91faecfc50de", "Token": "30797e66108934dfa3d841b856fdad227c6b9c46d6a39296e02dc800d86d181e", "IP": "10.100.10.10", "Email": "username@test.ru", "Phone": "+79031234567" } ``` -------------------------------- ### Attach Card Response Example Source: https://developer.tbank.ru/eacq/api/attach-card Example of a successful response when attaching a card, including 3DS authentication details. ```APIDOC ## Attach Card Response Example ### Description This is an example of a successful response from the Attach Card API, which may include parameters for 3D Secure authentication. ### Response #### Success Response (200) - **TerminalKey** (string) - The terminal key associated with the transaction. - **CustomerKey** (string) - The unique key identifying the customer. - **RequestKey** (string) - The unique key for this request. - **CardId** (string) - The ID of the card. - **Success** (boolean) - Indicates if the operation was successful. - **ErrorCode** (string) - Error code, '0' for success. - **Status** (string) - The status of the transaction (e.g., 'NEW'). - **RebillId** (string) - The ID for recurring payments. - **Message** (string) - A message describing the result of the operation. - **Details** (string) - Additional details about the operation. - **ACSUrl** (string) - The URL for 3D Secure authentication (if required). - **MD** (string) - Merchant data for 3D Secure authentication. - **PaReq** (string) - The payment authentication request for 3D Secure. ### Response Example ```json { "TerminalKey": "TBankTest", "CustomerKey": "testCustomerKey", "RequestKey": "8de92934-26c9-474c-a4ce-424f2021d24d", "CardId": "5555", "Success": true, "ErrorCode": "0", "Status": "NEW", "RebillId": "130799909", "Message": "Неверные параметры", "Details": "string", "ACSUrl": "https://secure.tcsbank.ru/acs/auth/start.do", "MD": "ACQT-563587431", "PaReq": "eJxVUl1TwjAQ/CtM30s+KLTDHGHQwsiogFh09C2kp1RpC2nLh7/eBAtqnnYvN3ubvUD/kK4bO9RFkmc9hzWp08BM5XGSvfecRT RyA6cvIFppxPARVaVRwD0WhXzHRhL3HMUU73itwKVtyl1Pcs8Nli3pymUQK+z2Sww6joDZYI5bAfUgYeY0OZAzNYparWRWCpBqe zWeiDZnLe3BqSmkqMeh4PRy2p02BfJThkymKCIsSiAnCCqvslIfhXEG5Eyg0muxKstN0SVkv983yyT7zN/emroiQOwlkF8js8qiwogdk lg8rEfT5WK0jj6G7D4cepNo8TWNBmwSDXtAbAfEskTjkPk0oF6DeV3a6jLj8VQHmVoXglFTqTFs7IjBn4u/BTBZa7OK8yPODPCwyT M0HSbACwby6/f6xsaoSpNMMN89+uHdV/iUPz2nyat/uxrPXz5nuX/c2nBPTVYxMflwzthJ0hIgVobUeyP1yg469xW+AedOuuM=" } ``` ``` -------------------------------- ### Create a Payment Integration Instance Source: https://developer.tbank.ru/eacq/intro/developer/setup_js/setup_speedpay Create an instance of the payment integration. This block will contain payment buttons but does not display the payment methods themselves. ```javascript const MAIN_INTEGRATION_NAME = 'main-integration-name'; // Любое название для идентификации конкретной интеграции const MAIN_INTEGRATION_CONFIG = {}; // Интерфейс конфигурации. Подробное описание — в разделе «Конфигурация PaymentIntegrationConfig» const mainPaymentIntegration = await integration.payments.create(MAIN_INTEGRATION_NAME, MAIN_INTEGRATION_CONFIG); // Создание интеграции ``` -------------------------------- ### 3DS Method Response Example Source: https://developer.tbank.ru/eacq/api/3-ds-method This is an example of a successful 200 OK response from the 3DS Method API, containing the threeDSServerTransID. ```json { "threeDSServerTransID": "string" } ``` -------------------------------- ### Submit 3DS Authorization Response Example Source: https://developer.tbank.ru/eacq/api/submit-3-ds-authorization-v-2 This is an example of a successful response from the Submit3DSAuthorizationV2 endpoint, indicating the payment status and details. ```json { "OrderId": "21050", "TerminalKey": "TBankTest", "Status": "CONFIRMED", "PaymentId": "10063", "Success": true, "ErrorCode": "0", "Message": "string", "Details": "string" } ```