### Get Order Details Request Example Source: https://docs.ozon.ru/api/acquiring/index This example demonstrates the structure of a request payload to retrieve details of an order using the Ozon API. It requires either an 'accessKey' or 'extId' along with the order 'id' and a 'requestSign'. ```json { "accessKey": "string", "extId": "string", "id": "string", "requestSign": "string" } ``` -------------------------------- ### Ozon Acquiring Transaction Notification Example (SBP) Source: https://docs.ozon.ru/api/acquiring/index This JSON object is an example of an HTTP POST notification for a completed payment transaction using the SBP (Faster Payments System). It includes transaction-specific details like transaction UID, amount, currency, payment time, status, and payment method. ```json { "transactionUID": "ecd5dff6-236c-46e1-8726-30294446ca58", "amount": 1000, "currencyCode": "RUB", "paymentTime": "2025-10-03 07:57:17", "status": "Completed", "operationType": "Payment", "paymentMethod": "SBP", "requestSign": "18e716d3666b46aeec3cbd2069ee2dafd88af7c3f0415cf7137830094d3daf0b", "extTransactionID": "no-order-1310" } ``` -------------------------------- ### Get Order Details Response Example (200 OK) Source: https://docs.ozon.ru/api/acquiring/index This JSON structure represents a successful response (HTTP 200) when fetching order details from the Ozon API. It contains extensive information about the order, including items, pricing, and status, as well as optional extended data. ```json { "extData": { "property1": "string", "property2": "string" }, "item": { "expiresAt": "2019-08-24T14:15:22Z", "extId": "string", "fiscalizationType": "FISCAL_TYPE_UNSPECIFIED", "id": "string", "isTestMode": true, "items": [ { "attributes": { "property1": "string", "property2": "string" }, "extId": "string", "id": "string", "name": "string", "needMark": true, "positions": [ { "id": "string", "mark": "string", "markIsMissing": true, "price": { "currencyCode": "string", "value": "string" }, "refundType": "TYPE_UNSPECIFIED", "remainingAmount": { "currencyCode": "string", "value": "string" } } ], "price": { "currencyCode": "string", "value": "string" }, "quantity": 0, "type": "TYPE_UNSPECIFIED", "unitType": "UNIT_UNSPECIFIED", "vat": "VAT_UNSPECIFIED" } ], "mode": "MODE_UNSPECIFIED", "number": "string", "payLink": "string", "paymentAlgorithm": "PAY_ALGO_UNSPECIFIED", "remainingAmount": { "currencyCode": "string", "value": "string" }, "status": "STATUS_UNSPECIFIED" }, "operations": { "amount": { "currencyCode": "string", "value": "string" }, "extId": "string", "operationTime": "2019-08-24T14:15:22Z", "operationType": "OPERATION_TYPE_UNSPECIFIED", "paymentData": { "paymentType": "OPERATION_PAY_TYPE_UNSPECIFIED", "ozonCard": { "payerPhoneLast4": "string" }, "bankCard": { "cardNumberLast4": "string", "paySystem": "PAY_SYSTEM_UNSPECIFIED", "rrn": "string" }, "sbp": { "createdSubscriptionToken": "string", "memberId": "string", "nspkId": "string", "payerPhoneLast4": "string" } }, "status": "OPERATION_STATUS_UNSPECIFIED", "transactionUid": "string" } } ``` -------------------------------- ### Ozon Acquiring Transaction Notification Example (Bank Card) Source: https://docs.ozon.ru/api/acquiring/index This JSON object represents an example of an HTTP POST notification for a completed payment transaction made via bank card. It includes details such as order ID, amount, currency, payment time, status, and payment method. ```json { "orderID": "c12f345-1eb1-1dbe-111f-001a1111f11e", "extOrderID": "11", "transactionID": 302055, "transactionUid": "2f460e52-4a7a-4eaf-94fc-6699f7c91741", "amount": 1100, "currencyCode": "643", "paymentTime": "2025-02-14 12:26:01", "testMode": 0, "status": "Completed", "operationType": "Payment", "extData": null, "paymentMethod": "PAY_TYPE_BANK_CARD", "requestSign": "ebc11b1111ee11dd1111dbd0a11e1b711111fe11d111d0cd6c19fe111111dc" } ``` -------------------------------- ### Signature Calculation Algorithm (Python) Source: https://docs.ozon.ru/api/acquiring/index Python code example for calculating the API signature using SHA256. ```APIDOC ## Signature Calculation Algorithm (Python) ```python import hashlib accessKey = '1fac5a70-0ec4-4963-a33a-040ea301ea85' notificationSecretKey = '4qEzUJjBoCXwA6P5NMyrJJUdA6xsnvbV' data = lambda: None data.orderID = '69f37767-8a8b-4de1-a601-384387aea8c4' data.extOrderID = '' data.transactionID = 6981437 data.transactionUid = '2f460e52-4a7a-4eaf-94fc-6699f7c91741' # Used if transactionID is None data.amount = 52569 data.currencyCode = '643' digest = ( f"{accessKey}|" f"{data.orderID}|" f"{data.transactionID if data.transactionID != None else data.transactionUid}|" f"{data.extOrderID if data.orderID != None else data.extTransactionID}|" f"{data.amount}|" f"{data.currencyCode}|" f"{notificationSecretKey}" ) signature = hashlib.sha256(digest.encode('utf-8')).hexdigest() print(signature) # ae3c635dd72ec6b2c7833aa7458d57827895a57d4c35fba0e7dcb48f1d367d5f ``` ``` -------------------------------- ### Refund Payment API Request (JSON) Source: https://docs.ozon.ru/api/acquiring/index This JSON example demonstrates a request to the /v1/refundPayment endpoint for processing a refund. It requires an access key, the refund amount (with currency code), an external ID for the refund, and the payment ID. The requestSign is optional. ```json { "accessKey": "string", "amount": { "currencyCode": "string", "value": "string" }, "extId": "string", "paymentId": "string", "requestSign": "string" } ``` -------------------------------- ### Payment Processing Workflow Source: https://docs.ozon.ru/api/acquiring/index Guides for creating payment attempts and retrieving payment details. ```APIDOC ## Payment Workflow ### Create Payment Attempt (/v1/createPayment) To create a payment attempt, use the `/v1/createPayment` method. You can optionally provide user information in the `userInfo` parameter for the user for whom the payment link is being created. To link a payment attempt to an existing order, specify the order ID in the `orderId` parameter. To create an order along with a payment attempt, pass order details in the `order` parameter. Subsequently, use the order management methods to work with the order. To create a payment attempt without linking it to an order, you must specify: * `extId` - Payment identifier. * `payType` - Payment method. * `amount` - Payment amount. You can specify the lifespan of the payment link using `ttl`. The default is 10 minutes. ### Get Payment Details (/v1/getPaymentDetails) Retrieve payment details using the `/v1/getPaymentDetails` method. Specify the payment ID in the `id` parameter. You can obtain this ID from the `/v1/createPayment` method response in the `paymentDetails.paymentId` parameter. ``` -------------------------------- ### Signature Fields and Calculation Source: https://docs.ozon.ru/api/acquiring/index___rr=1 This section details the fields required for generating a signature and provides a Python example for calculating the signature using SHA256. ```APIDOC ## Signature Fields | Name | Example Value | |---|---| | `accessKey` | `1fac5a70-0ec4-4963-a33a-040ea301ea85` | | `orderID` | `69f37767-8a8b-4de1-a601-384387aea8c4` | | `transactionID` | `6981437` (Can be empty) | | `extOrderID` | — (Can be empty for order payment. Required for independent payments.) | | `extTransactionID` | `no-order-1310` (Required for independent payments.) | | `amount` | `52569` | | `currencyCode` | `643` | | `notificationSecretKey` | `4qEzUJjBoCXwA6P5NMyrJJUdA6xsnvbV` | ## Signature Calculation Algorithm (Python) ```python import hashlib accessKey = '1fac5a70-0ec4-4963-a33a-040ea301ea85' notificationSecretKey = '4qEzUJjBoCXwA6P5NMyrJJUdA6xsnvbV' data = lambda: None data.orderID = '69f37767-8a8b-4de1-a601-384387aea8c4' data.extOrderID = '' data.transactionID = 6981437 data.transactionUid = '2f460e52-4a7a-4eaf-94fc-6699f7c91741' data.amount = 52569 data.currencyCode = '643' digest = ( f"{accessKey}|" f"{data.orderID}|" f"{data.transactionID if data.transactionID != None else data.transactionUid}|" f"{data.extOrderID if data.orderID != None else data.extTransactionID}|" f"{data.amount}|" f"{data.currencyCode}|" f"{notificationSecretKey}" ) signature = hashlib.sha256(digest.encode('utf-8')).hexdigest() print(signature) # ae3c635dd72ec6b2c7833aa7458d57827895a57d4c35fba0e7dcb48f1d367d5f ``` ``` -------------------------------- ### Create Payment Response - 200 OK - JSON Source: https://docs.ozon.ru/api/acquiring/index This is an example of a successful response (200 OK) from the /v1/createPayment API endpoint. It contains order details and payment-specific information, including the `paymentId` required for subsequent operations like cancellation or refund. ```json { "order": { "extData": { "property1": "string", "property2": "string" }, "item": { "expiresAt": "2019-08-24T14:15:22Z", "extId": "string", "fiscalizationType": "FISCAL_TYPE_UNSPECIFIED", "id": "string", "isTestMode": true, "items": [ { "attributes": { "property1": "string", "property2": "string" }, "extId": "string", "id": "string", "name": "string", "needMark": true, "positions": [ { "id": "string", "mark": "string", "markIsMissing": true, "price": { "currencyCode": "string", "value": "string" }, "refundType": "TYPE_UNSPECIFIED", "remainingAmount": { "currencyCode": "string", "value": "string" } } ], "price": { "currencyCode": "string", "value": "string" }, "quantity": 0, "type": "TYPE_UNSPECIFIED", "unitType": "UNIT_UNSPECIFIED", "vat": "VAT_UNSPECIFIED" } ], "mode": "MODE_UNSPECIFIED", "number": "string", "payLink": "string", "paymentAlgorithm": "PAY_ALGO_UNSPECIFIED", "remainingAmount": { "currencyCode": "string", "value": "string" }, "status": "STATUS_UNSPECIFIED" } }, "paymentDetails": { "paymentId": "string", "sbp": { "payload": "string" }, "status": "OPERATION_STATUS_UNSPECIFIED", "type": "OPERATION_PAY_TYPE_UNSPECIFIED" } } ``` -------------------------------- ### Error Codes Source: https://docs.ozon.ru/api/acquiring/index___rr=1 This section provides a list of error codes, their corresponding HTTP status codes, descriptions, and examples for the Ozon Acquiring API. ```APIDOC ## Error Codes ### Description A comprehensive list of error codes encountered in Ozon Acquiring API requests. ### Error Details | Code | Error | HTTP Code | Description | Example | |---|---|---|---|---| | `2` | `Unknown` | `500` | Unknown error on Ozon's side. | Service is temporarily unavailable. | | `3` | `BadUserInput` | `400` | Request data validation error. | Order amount must be positive. | | `5` | `NotFound` | `404` | Entity could not be found. | Order not found. | | `7` | `PermissionDenied` | `403` | Insufficient permissions to perform the action. | Order confirmation: access denied. | | `9` | `FailedPrecondition` | `400` | Input data does not meet expected conditions. | Order cancellation is only available for orders in 'Awaiting Payment' status. | | `13` | `InternalServerError` | `500` | Internal server error on Ozon's side. | - | | `16` | `Unauthenticated` | `400` | User is not authenticated. | Invalid request signature. | ### Detailed Error Codes for Payment Attempts | Error Code | Description | |---|---| | `1` | Undefined error | | `2` | 3DS authentication error | | `3` | Card has expired | | `4` | Insufficient funds | | `5` | Suspected fraudulent transaction | | `6` | Invalid confirmation code | | `7` | Invalid request | | `8` | Limits exceeded | | `9` | Restricted operation | | `10` | Invalid card | | `11` | Provider timeout | | `12` | Forbidden country | | `13` | Authorization error | | `14` | 3DS timeout | | `15` | Resource not found | | `16` | Invalid authorization data | | `17` | Access denied | | `18` | Too many requests | | `19` | Internal server error | | `20` | Internal timeout | | `21` | Confirmation expired | | `22` | Payment form timeout | ``` -------------------------------- ### Ozon API Acquiring - Sample Request Payload for Get Payment Details Source: https://docs.ozon.ru/api/acquiring/index This JSON payload shows the required structure for retrieving payment details. The `id` parameter, which is the payment identifier obtained from the `/v1/createPayment` response, is mandatory. ```json { "id": "string" } ``` -------------------------------- ### GET /v1/getOrderStatus Source: https://docs.ozon.ru/api/acquiring/index Retrieves the current status of an order. ```APIDOC ## GET /v1/getOrderStatus ### Description Retrieves the current status of an order. You can query by the acquiring side's order identifier or the merchant's external identifier. ### Method GET ### Endpoint `/v1/getOrderStatus` ### Parameters #### Query Parameters - **id** (string) - Optional - The order identifier on the acquiring side. - **extId** (string) - Optional - The order identifier on the merchant's side. ### Response #### Success Response (200) - **status** (string) - The current status of the order (e.g., `STATUS_PAYMENT_PENDING`). #### Response Example ```json { "status": "STATUS_PAYMENT_PENDING" } ``` ``` -------------------------------- ### POST /v1/createOrder Source: https://docs.ozon.ru/api/acquiring/index___rr=1 Creates a new order. The description of parameters `items.vat` in the request and `order.items.vat` in the response have been updated. ```APIDOC ## POST /v1/createOrder ### Description Creates a new order. Parameter descriptions for `items.vat` (request) and `order.items.vat` (response) have been updated. ### Method POST ### Endpoint /v1/createOrder ### Parameters #### Request Body - **accessKey** (string) - Required - The access key for the API. - **amount** (object) - Required - The order amount. - **value** (string) - Required - The numerical value of the amount. - **currency** (string) - Required - The currency code. - **paymentAlgorithm** (string) - Required - The payment algorithm to use. - **items** (array) - Required - A list of items in the order. - **name** (string) - Required - The name of the item. - **price** (object) - Required - The price of the item. - **value** (string) - Required - The numerical value of the price. - **currency** (string) - Required - The currency code. - **quantity** (string) - Required - The quantity of the item. - **vat** (string) - Required - The VAT rate for the item. - **needMark** (boolean) - Optional - Indicates if the item requires marking. - **orderDescription** (string) - Optional - A description of the order. - **expiresAt** (string) - Optional - The expiration date of the order. - **failUrl** (string) - Optional - The URL to redirect to if the payment fails. - **successUrl** (string) - Optional - The URL to redirect to if the payment is successful. - **notificationUrl** (string) - Optional - The URL to send payment notifications to. - **extId** (string) - Optional - An external identifier for the order. ### Request Example ```json { "accessKey": "your_access_key", "amount": { "value": "100.00", "currency": "RUB" }, "paymentAlgorithm": "DEFAULT", "items": [ { "name": "Product A", "price": { "value": "50.00", "currency": "RUB" }, "quantity": "1", "vat": "VAT_20" } ], "orderDescription": "Order for Product A", "expiresAt": "2025-12-31T23:59:59Z", "failUrl": "https://example.com/fail", "successUrl": "https://example.com/success", "notificationUrl": "https://example.com/notify", "extId": "external_order_123" } ``` ### Response #### Success Response (200) - **order** (object) - Details of the created order. - **id** (string) - The unique identifier for the order. - **items** (array) - A list of items in the order. - **vat** (string) - The VAT rate for the item. - **needMark** (boolean) - Indicates if the item requires marking. - **positions** (array) - Positions of the item. - **id** (string) - The ID of the position. - **markIsMissing** (boolean) - Indicates if the mark is missing. - **refundType** (string) - The type of refund. - **quantity** (string) - The quantity of the position. - **unitType** (string) - The unit type of the position. #### Response Example ```json { "order": { "id": "ozon-order-id-12345", "items": [ { "vat": "VAT_20", "needMark": false, "positions": [] } ] } } ``` ``` -------------------------------- ### Ozon API Acquiring - Sample Request Payload for Payment Creation Source: https://docs.ozon.ru/api/acquiring/index This JSON payload demonstrates the structure for creating a payment. It allows for specifying user information, linking to an existing order, or creating a new order with the payment. Optional parameters like `ttl` for payment link lifetime are also included. ```json { "userInfo": { ... }, "orderId": "string", "order": { ... }, "extId": "string", "payType": "string", "amount": { "currencyCode": "string", "value": "string" }, "ttl": "string" } ``` -------------------------------- ### Get Order Status API Source: https://docs.ozon.ru/api/acquiring/index This endpoint retrieves the current status of a specific order. ```APIDOC ## POST /v1/getOrderStatus ### Description Retrieves the current status of a specific order. ### Method POST ### Endpoint /v1/getOrderStatus ### Parameters *Note: Request body schema and examples for this endpoint were not fully provided in the input text. The following is a placeholder based on typical order status requests.* #### Request Body - **orderId** (string) - Required - The unique identifier of the order. - **extOrderId** (string) - Optional - The external identifier of the order. ### Request Example ```json { "orderId": "string", "extOrderId": "string" } ``` ### Response #### Success Response (200) - **status** (string) - The current status of the order. - **lastUpdate** (string) - The timestamp of the last status update. #### Response Example ```json { "status": "string", "lastUpdate": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### POST /v1/createOrder Source: https://docs.ozon.ru/api/acquiring/index Creates a new order with specified payment and fiscalization types. It returns a list of positions with assigned identifiers for further interactions. ```APIDOC ## POST /v1/createOrder ### Description Creates a new order with specified payment and fiscalization types. It returns a list of positions with assigned identifiers for further interactions. ### Method POST ### Endpoint `/v1/createOrder` ### Parameters #### Request Body - **paymentAlgorithm** (string) - Required - Specifies the payment type. Options: `PAY_ALGO_SMS` (one-stage, no additional confirmation), `PAY_ALGO_DMS` (two-stage, with additional confirmation by positions). - **fiscalizationType** (string) - Required - Specifies the fiscalization type. Options: `FISCAL_TYPE_SINGLE` (single fiscalization, requires providing marking for items with `needMark = true`), `FISCAL_TYPE_DOUBLE` (double fiscalization). - **items** (array) - Optional - List of items in the order. If provided, should include `needMark` for fiscalization. ### Request Example ```json { "paymentAlgorithm": "PAY_ALGO_DMS", "fiscalizationType": "FISCAL_TYPE_DOUBLE", "items": [ { "name": "Sample Item", "price": 1000, "quantity": 1, "needMark": true } ] } ``` ### Response #### Success Response (200) - **order** (object) - Contains order details, including `order.items.positions` with assigned identifiers. #### Response Example ```json { "order": { "id": "generated_order_id", "items": { "positions": [ { "id": "position_identifier_1", "name": "Sample Item", "price": 1000, "quantity": 1 } ] } } } ``` ``` -------------------------------- ### GET /v1/getOrderStatus Source: https://docs.ozon.ru/api/acquiring/index___rr=1 Retrieves the status of a specific order. The `paymentScheme.paidWithBonuses` parameter has been removed from the response. ```APIDOC ## GET /v1/getOrderStatus ### Description Retrieves the status of a specific order. The `paymentScheme.paidWithBonuses` parameter has been removed from the response. ### Method GET ### Endpoint /v1/getOrderStatus ### Parameters #### Query Parameters - **orderId** (string) - Required - The ID of the order to retrieve the status for. ### Response #### Success Response (200) - **status** (string) - The current status of the order. #### Response Example ```json { "status": "PAID" } ``` ``` -------------------------------- ### POST /v1/createPayment Source: https://docs.ozon.ru/api/acquiring/index___rr=1 Initiates a payment for an order. New methods for payment operations have been added. ```APIDOC ## POST /v1/createPayment ### Description Initiates a payment for an order. New methods for payment operations have been added, and parameter descriptions have been updated. ### Method POST ### Endpoint /v1/createPayment ### Parameters #### Request Body - **orderId** (string) - Required - The ID of the order for which to create a payment. - **paymentType** (string) - Required - The type of payment. - **amount** (object) - Required - The payment amount. - **value** (string) - Required - The numerical value of the amount. - **currency** (string) - Required - The currency code. - **returnUrl** (string) - Required - The URL to return to after payment. - **items** (array) - Optional - A list of items for the payment. - **vat** (string) - Required - The VAT rate for the item. - **name** (string) - Required - The name of the item. - **price** (object) - Required - The price of the item. - **value** (string) - Required - The numerical value of the price. - **currency** (string) - Required - The currency code. - **quantity** (string) - Required - The quantity of the item. ### Request Example ```json { "orderId": "ozon-order-id-12345", "paymentType": "BANK_CARD", "amount": { "value": "100.00", "currency": "RUB" }, "returnUrl": "https://example.com/return", "items": [ { "vat": "VAT_20", "name": "Product A", "price": { "value": "50.00", "currency": "RUB" }, "quantity": "1" } ] } ``` ### Response #### Success Response (200) - **paymentId** (string) - The ID of the created payment. - **paymentUrl** (string) - The URL to complete the payment. #### Response Example ```json { "paymentId": "payment-id-67890", "paymentUrl": "https://pay.ozon.ru/checkout?paymentId=payment-id-67890" } ``` ``` -------------------------------- ### GET /v1/getOrderDetails Source: https://docs.ozon.ru/api/acquiring/index Retrieves detailed information about an order, including payment operation details for paid orders. ```APIDOC ## GET /v1/getOrderDetails ### Description Retrieves detailed information about an order. Payment operation details are returned only for paid orders. You can query by the acquiring side's order identifier or the merchant's external identifier. ### Method GET ### Endpoint `/v1/getOrderDetails` ### Parameters #### Query Parameters - **id** (string) - Optional - The order identifier on the acquiring side. - **extId** (string) - Optional - The order identifier on the merchant's side. ### Response #### Success Response (200) - **orderDetails** (object) - Contains detailed information about the order and payment operation (if applicable). #### Response Example ```json { "orderDetails": { "id": "generated_order_id", "status": "STATUS_PAID", "amount": 52569, "paymentDetails": { "transactionId": "6981437" } } } ``` ``` -------------------------------- ### POST /v1/createOrder Source: https://docs.ozon.ru/api/acquiring/index Creates a new order with specified items, amounts, and payment configurations. Supports fiscalization and custom order extensions. ```APIDOC ## POST /v1/createOrder ### Description Creates a new order with specified items, amounts, and payment configurations. Supports fiscalization and custom order extensions. ### Method POST ### Endpoint /v1/createOrder ### Parameters #### Request Body - **accessKey** (string) - Required - Integration key. - **amount** (object) - Required - Total amount. - **currencyCode** (string) - Required - Currency code. - **value** (string) - Required - Amount value. - **enableFiscalization** (boolean) - Optional - Indicates whether to use fiscalization (`true`), not use it (`false`), or use store default settings (`null`). - **expiresAt** (string) - Optional - Order expiration date in UTC Timestamp format. - **extData** (object) - Optional - User data. Can contain up to 10 values, each up to 300 characters. - **extId** (string) - Optional - Order identifier on the store's side. Each unique `extId` can be used to create an order only once. Subsequent calls with the same `extId` will return the previously created order. - **failUrl** (string) - Optional - URL for redirection in case of errors. Required if no default value is set in the integration token settings. - **fiscalizationPhone** (string) - Optional - Phone number for fiscalization. - **fiscalizationType** (string) - Optional - Fiscalization type. Defaults to "FISCAL_TYPE_UNSPECIFIED". Enum: "FISCAL_TYPE_UNSPECIFIED", "FISCAL_TYPE_SINGLE", "FISCAL_TYPE_DOUBLE". - **items** (Array of objects) - Optional - List of goods or services. Required for `mode = MODE_FULL` and `mode = MODE_UNSPECIFIED`. - **attributes** (object) - Optional - Item attributes. - **color** (string) - Optional - Item color. - **size** (string) - Optional - Item size. - **extId** (string) - Optional - External ID for the item. - **name** (string) - Optional - Item name. - **needMark** (boolean) - Optional - Indicates if marking is required for the item. - **positions** (Array of objects) - Optional - List of item positions. - **mark** (string) - Optional - Marking code for the position. - **price** (object) - Required - Item price. - **currencyCode** (string) - Required - Currency code. - **value** (string) - Required - Price value. - **quantity** (number) - Optional - Item quantity. - **type** (string) - Optional - Item type. Enum: "TYPE_UNSPECIFIED". - **unitType** (string) - Optional - Unit type. Enum: "UNIT_UNSPECIFIED". - **vat** (string) - Optional - VAT rate. Enum: "VAT_UNSPECIFIED". - **mode** (string) - Optional - Order mode. Defaults to "MODE_UNSPECIFIED". Enum: "MODE_UNSPECIFIED", "MODE_FULL", "MODE_SHORTENED". - **notificationUrl** (string) - Optional - URL for order status notifications. Required for OpenCart integration. - **paymentAlgorithm** (string) - Required - Payment algorithm. Defaults to "PAY_ALGO_UNSPECIFIED". Enum: "PAY_ALGO_UNSPECIFIED", "PAY_ALGO_SMS", "PAY_ALGO_DMS". - **receiptEmail** (string) - Optional - Default email address for receiving receipts. - **requestSign** (string) - Optional - Request signature. - **successUrl** (string) - Optional - URL for redirection after successful payment. Required if no default value is set in the integration token settings. ### Request Example ```json { "accessKey": "string", "amount": { "currencyCode": "string", "value": "string" }, "enableFiscalization": true, "expiresAt": "2025-12-31T23:59:59Z", "extData": { "property1": "string", "property2": "string" }, "extId": "string", "failUrl": "string", "fiscalizationPhone": "string", "fiscalizationType": "FISCAL_TYPE_UNSPECIFIED", "items": [ { "attributes": { "color": "string", "size": "string" }, "extId": "string", "name": "string", "needMark": true, "positions": [ { "mark": "string" } ], "price": { "currencyCode": "string", "value": "string" }, "quantity": 0, "type": "TYPE_UNSPECIFIED", "unitType": "UNIT_UNSPECIFIED", "vat": "VAT_UNSPECIFIED" } ], "mode": "MODE_UNSPECIFIED", "notificationUrl": "string", "paymentAlgorithm": "PAY_ALGO_UNSPECIFIED", "receiptEmail": "string", "requestSign": "string", "successUrl": "string" } ``` ### Response #### Success Response (200) - **extData** (object) - User data. Can contain up to 10 values, each up to 300 characters. - **order** (object) - Order information. #### Response Example ```json { "extData": { "property1": "string", "property2": "string" }, "order": { "externalId": "string", "id": "string", "status": "string" } } ``` ``` -------------------------------- ### GET /v1/getOrderDetails Source: https://docs.ozon.ru/api/acquiring/index___rr=1 Retrieves the details of a specific order. Updated response parameters include `operations` and `operations.paymentData.ozonCard`. ```APIDOC ## GET /v1/getOrderDetails ### Description Retrieves the details of a specific order. Response parameters have been updated, including the addition of `operations` and `operations.paymentData.ozonCard`. ### Method GET ### Endpoint /v1/getOrderDetails ### Parameters #### Query Parameters - **orderId** (string) - Required - The ID of the order to retrieve. ### Response #### Success Response (200) - **order** (object) - Details of the order. - **id** (string) - The unique identifier for the order. - **items** (array) - A list of items in the order. - **needMark** (boolean) - Indicates if the item requires marking. - **positions** (array) - Positions of the item. - **id** (string) - The ID of the position. - **markIsMissing** (boolean) - Indicates if the mark is missing. - **refundType** (string) - The type of refund. - **quantity** (string) - The quantity of the position. - **unitType** (string) - The unit type of the position. - **vat** (string) - The VAT rate for the item. - **operations** (array) - A list of operations related to the order. - **amount** (object) - The amount of the operation. - **value** (string) - The numerical value of the amount. - **currency** (string) - The currency code. - **sbp** (object) - SBP details. - **createdSubscriptionToken** (string) - The token for a created subscription. - **memberId** (string) - The member ID for SBP. - **nspkId** (string) - The NSPK ID for SBP. - **paymentData** (object) - Payment-specific data. - **paymentType** (string) - The type of payment. - **ozonCard** (object) - Details of Ozon Card payment. #### Response Example ```json { "order": { "id": "ozon-order-id-12345", "items": [ { "needMark": false, "positions": [ { "id": "pos-1", "markIsMissing": false, "refundType": "FULL", "quantity": "1", "unitType": " шт", "vat": "VAT_20" } ], "vat": "VAT_20" } ], "operations": [ { "amount": { "value": "100.00", "currency": "RUB" }, "sbp": { "createdSubscriptionToken": "sub-token-abc", "memberId": "member-123", "nspkId": "nspk-456" }, "paymentData": { "paymentType": "BANK_CARD", "ozonCard": { "cardNumber": "**** **** **** 1234" } } } ] } } ``` ``` -------------------------------- ### Get Payment Details Source: https://docs.ozon.ru/api/acquiring/index Retrieves detailed information about a specific payment, including transaction status, amount, and operation history. ```APIDOC ## POST /v1/getPaymentDetails ### Description Retrieves detailed information about a specific payment, including transaction status, amount, and operation history. ### Method POST ### Endpoint /v1/getPaymentDetails ### Parameters #### Request Body - **accessKey** (string) - Required - Integration key. - **id** (string) - Required - Payment identifier. Obtain from the `/v1/createPayment` method response in the `paymentDetails.paymentId` parameter. - **requestSign** (string) - Optional - Request signature. ### Request Example ```json { "accessKey": "string", "id": "string", "requestSign": "string" } ``` ### Response #### Success Response (200) - **items** (Array of objects) - Payment information. - **amount** (object) - Amount. - **currencyCode** (string) - Currency code. - **value** (string) - Amount value. - **extId** (string) - Operation identifier in the store. - **operationTime** (string) - Processing date. - **operationType** (string) - Operation type. Enum: "OPERATION_TYPE_UNSPECIFIED", "PAYMENT", "CANCEL", "REFUND", "CHARGEBACK", "REVERT_CHARGEBACK", "SBP_DISPUTE". - **paymentData** (object) - Payment details. - **status** (string) - Operation status. Enum: "OPERATION_STATUS_UNSPECIFIED", "PAYMENT_NEW", "PAYMENT_REJECTED", "PAYMENT_PROCESSING", "PAYMENT_AUTHORIZED", "PAYMENT_PARTIAL_CANCELED", "PAYMENT_CANCELED", "PAYMENT_CONFIRMED", "REFUND_SUCCESS", "REFUND_FAILED", "CHARGEBACK_SUCCESS", "REVERT_CHARGEBACK_SUCCESS", "SBP_DISPUTE_SUCCESS", "CANCEL_SUCCESS", "CANCEL_FAILED". - **transactionUid** (string) - Operation identifier in Acquiring. #### Response Example ```json { "items": [ { "amount": { "currencyCode": "string", "value": "string" }, "extId": "string", "operationTime": "2019-08-24T14:15:22Z", "operationType": "OPERATION_TYPE_UNSPECIFIED", "paymentData": { "sbp": { "createdSubscriptionToken": "string", "memberId": "string", "nspkId": "string", "payerPhoneLast4": "string" } }, "status": "OPERATION_STATUS_UNSPECIFIED", "transactionUid": "string" } ] } ``` ``` -------------------------------- ### POST /v1/createFinalReceipt Source: https://docs.ozon.ru/api/acquiring/index___rr=1 Creates a final receipt for an order. The `id` and `positions.id` parameters are now mandatory, and descriptions have been updated. ```APIDOC ## POST /v1/createFinalReceipt ### Description Creates a final receipt for an order. The `id` and `positions.id` parameters are now mandatory, and descriptions have been updated. ### Method POST ### Endpoint /v1/createFinalReceipt ### Parameters #### Request Body - **id** (string) - Required - The ID of the order for which to create a receipt. - **positions** (array) - Required - A list of positions for the receipt. - **id** (string) - Required - The ID of the position. - **mark** (string) - Optional - The mark associated with the position. ### Request Example ```json { "id": "ozon-order-id-12345", "positions": [ { "id": "pos-1", "mark": "receipt_mark" } ] } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the receipt creation request. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### POST /v1/refundOrder Source: https://docs.ozon.ru/api/acquiring/index___rr=1 Initiates a refund for an order. Several parameters are now mandatory, and descriptions have been updated. The method description has also been updated. ```APIDOC ## POST /v1/refundOrder ### Description Initiates a refund for an order. Several parameters are now mandatory, and descriptions have been updated. The method description has also been updated. ### Method POST ### Endpoint /v1/refundOrder ### Parameters #### Request Body - **id** (string) - Required - The ID of the order to refund. - **amount** (object) - Required - The refund amount. - **value** (string) - Required - The numerical value of the amount. - **currency** (string) - Required - The currency code. - **positions** (array) - Optional - A list of positions to refund. - **id** (string) - Required - The ID of the position. - **itemsWithoutMark** (array) - Optional - Items without a mark to refund. - **id** (string) - Required - The ID of the item without a mark. - **extId** (string) - Optional - An external identifier for the refund request. ### Request Example ```json { "id": "ozon-order-id-12345", "amount": { "value": "50.00", "currency": "RUB" }, "positions": [ { "id": "pos-1" } ], "extId": "refund-request-123" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the refund request. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Get Payment Details API Response (JSON) Source: https://docs.ozon.ru/api/acquiring/index This JSON structure details a successful response (200) from the /v1/getPaymentDetails endpoint, providing information about payment operations, including amount, operation type, status, and transaction details. ```json { "items": [ { "amount": { "currencyCode": "string", "value": "string" }, "extId": "string", "operationTime": "2019-08-24T14:15:22Z", "operationType": "OPERATION_TYPE_UNSPECIFIED", "paymentData": { "sbp": { "createdSubscriptionToken": "string", "memberId": "string", "nspkId": "string", "payerPhoneLast4": "string" } }, "status": "OPERATION_STATUS_UNSPECIFIED", "transactionUid": "string" } ] } ``` -------------------------------- ### POST /v1/createFinalReceipt Source: https://docs.ozon.ru/api/acquiring/index Generates a final receipt for an order with double fiscalization. ```APIDOC ## POST /v1/createFinalReceipt ### Description Generates a final receipt for an order that uses double fiscalization. ### Method POST ### Endpoint `/v1/createFinalReceipt` ### Parameters #### Request Body - **id** (string) - Required - The order identifier on the acquiring side. ### Request Example ```json { "id": "generated_order_id" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the receipt generation was successful. #### Response Example ```json { "success": true } ``` ```