### Successful Payin Order Creation Response Example (YAML) Source: https://lotrien.apidog.io/create-payin-order-22317425e0 An example of a successful response when a payin order is created. It includes details about the order such as its ID, sums, exchange rate, status, and payment requisites. ```yaml id: 9417631c-036d-4eea-a3af-8b8267ccdecb customId: merchant-given-id fiatSum: '1740.50' cryptoSum: '17.405' exchangeRate: '100.00' feeCoefficient: '0.10' userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 createdAt: '2025-01-01T00:00:00' updatedAt: '2025-01-01T00:00:00' expireAt: '2025-01-01T00:15:00' status: IN_PROGRESS fiatCurrencyCode: RUB cryptoCurrencyCode: USDT type: PAYIN paymentMethods: - SBP - BANK_CARD - BANK_ACCOUNT paymentMethod: BANK_CARD requisites: id: 84b2639b-2f70-46e0-be6d-de38207007f8 phoneNumber: '' cardNumber: '1234567812345678' bankAccountNumber: '' bank: Bank of Example fullName: Ivan Petrov country: RU bankBic: DEUTDEFF payUrl: https://example.com/pay/123456 requisitesFull: 1234567812345678, Bank of Example, Ivan Petrov ``` -------------------------------- ### Create Payin Order Request Example (YAML) Source: https://lotrien.apidog.io/create-payin-order-22317425e0 An example of a request body for creating a payin order using the OpenAPI specification. It demonstrates the required fields such as customId, fiatSum, fiatCurrencyCode, cryptoCurrencyCode, and optional fields like paymentMethods. ```yaml customId: merchant-given-id fiatSum: '1750.50' isUniqueSum: false isWaitResults: true fiatCurrencyCode: RUB cryptoCurrencyCode: USDT paymentMethods: - SBP - BANK_CARD - BANK_ACCOUNT ``` -------------------------------- ### GET /wallet/list Source: https://lotrien.apidog.io/get-wallets-22317427e0 Retrieves a list of wallets. Currently, only USDT is supported. Supports pagination and filtering by digital asset code. ```APIDOC ## GET /wallet/list ### Description Retrieves a list of wallets. Currently, only USDT is supported. Supports pagination and filtering by digital asset code. ### Method GET ### Endpoint /wallet/list ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number (starting from 1). Default: 1 - **limit** (integer) - Optional - Number of records per page (maximum 100). Default: 10 - **crypto_currency_code** (string) - Optional - Digital asset code ### Request Example ```json { "example": "GET /wallet/list?page=1&limit=10&crypto_currency_code=USDT" } ``` ### Response #### Success Response (200) - **totalCount** (integer) - Total number of records - **totalPages** (integer) - Number of pages - **currentPage** (integer) - Current page - **limit** (integer) - Number of records per page - **entries** (array) - Wallet records collection - **walletId** (string) - Wallet record ID - **userId** (string) - Merchant account ID - **cryptoCurrencyCode** (string) - Digital asset code - **balance** (string) - Available platform funds - **address** (string) - Deposit address - **updatedAt** (string) - Latest balance update timestamp (UTC) - **whitelists** (array) - Approved destination addresses #### Response Example ```json { "example": { "totalCount": 1, "totalPages": 1, "currentPage": 1, "limit": 10, "entries": [ { "walletId": "6679ef9e-9634-4de6-ac0f-19bacf3d584e", "userId": "e5112004-e548-460b-ae63-95c8b5ecf7a6", "cryptoCurrencyCode": "USDT", "balance": "1337.00", "address": "TN9GzkhfZq49frfAFzB91vCzRfrz4ZL9zN", "updatedAt": "2025-01-01T00:00:00", "whitelists": [] } ] } } ``` ``` -------------------------------- ### Get Wallets Source: https://context7_llms Retrieve information about available wallets. Currently, only `USDT` is supported as a cryptocurrency. ```APIDOC ## GET /wallets ### Description Retrieves a list of available wallets. Currently, `USDT` is the only supported cryptocurrency. ### Method GET ### Endpoint /wallets ### Parameters None ### Request Example ``` GET /wallets ``` ### Response #### Success Response (200) - **supported_cryptocurrencies** (array) - A list of supported cryptocurrency symbols. #### Response Example ```json { "supported_cryptocurrencies": ["USDT"] } ``` ``` -------------------------------- ### Order Data Structure Example (YAML) Source: https://lotrien.apidog.io/order-event-webhooks-22317430e0 This snippet demonstrates a typical order data structure in YAML format. It includes timestamps, currency codes, order type, status, and payment method details. It also shows nested structures for payment requisites. ```yaml createdAt: '2025-01-01T00:00:00' updatedAt: '2025-01-01T00:00:00' expireAt: '2025-01-01T00:15:00' fiatCurrencyCode: RUB cryptoCurrencyCode: USDT type: PAYIN status: SUCCESS paymentMethod: BANK_CARD paymentMethods: - SBP - BANK_CARD - BANK_ACCOUNT requisites: id: 84b2639b-2f70-46e0-be6d-de38207007f8 phoneNumber: '' cardNumber: '1234567812345678' bankAccountNumber: '' bank: Bank of Example country: RU bankBic: DEUTDEFF payUrl: https://example.com/pay/123456 fullName: Ivan Petrov requisitesFull: 1234567812345678, Bank of Example, Ivan Petrov status: SUCCESS paymentRequisites: 1234567812345678, Bank of Example, Ivan Petrov ``` -------------------------------- ### OpenAPI Specification for Order Event Webhooks Source: https://lotrien.apidog.io/order-event-webhooks-22317430e0 This OpenAPI 3.1.0 specification defines the structure for order event webhooks. It details the POST request for configuring webhook URLs and the JSON responses for different order statuses, including CREATED, IN_PROGRESS, and SUCCESS. The specification includes examples of the payload for each status. ```yaml openapi: 3.1.0 info: title: '' description: '' version: 1.0.0 paths: {} webhooks: '': post: summary: Order event webhooks deprecated: false description: >- Configure webhook URLs in your Settings panel to receive real-time notifications. POST callbacks are triggered for `ORDER` events in these scenarios: - Order created - Order unissued (failed to match) - Requisites have been assigned - Order processing finished - Order expired - Order under appeal review During `IN_PROGRESS` status, requisites are delivered both as unstructured text in `paymentRequisites` and as structured data within `order.requisites`. Upon `SUCCESS` completion, confirmed amounts appear in `finalFiatSum` and `finalCryptoSum` attributes. Fiat amounts may be adjusted for uniqueness during requisites generation. After entering processing stage, you may receive an updated `fiatSum` value. Transfer exactly this adjusted amount - payment validation depends on it. operationId: order_callback_view_post tags: - External API/Webhooks - Webhooks parameters: [] responses: '200': description: Order event notification content: application/json: schema: $ref: '#/components/schemas/OrderWebhookNotificationModel' examples: CREATED: summary: Order initialized value: userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 type: ORDER order: id: 9417631c-036d-4eea-a3af-8b8267ccdecb customId: merchant-given-id fiatSum: '1750.50' feeCoefficient: '0.10' userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 createdAt: '2025-01-01T00:00:00' updatedAt: '2025-01-01T00:00:00' expireAt: '2025-01-01T00:00:10' fiatCurrencyCode: RUB cryptoCurrencyCode: USDT type: PAYIN status: CREATED paymentMethods: - SBP - BANK_CARD - BANK_ACCOUNT status: CREATED IN_PROGRESS: summary: Requisites issued value: userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 type: ORDER order: id: 9417631c-036d-4eea-a3af-8b8267ccdecb customId: merchant-given-id fiatSum: '1740.50' cryptoSum: '17.405' exchangeRate: '100.00' feeCoefficient: '0.10' userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 createdAt: '2025-01-01T00:00:00' updatedAt: '2025-01-01T00:00:00' expireAt: '2025-01-01T00:15:00' fiatCurrencyCode: RUB cryptoCurrencyCode: USDT type: PAYIN status: IN_PROGRESS paymentMethod: BANK_CARD paymentMethods: - SBP - BANK_CARD - BANK_ACCOUNT requisites: id: 84b2639b-2f70-46e0-be6d-de38207007f8 phoneNumber: '' cardNumber: '1234567812345678' bankAccountNumber: '' bank: Bank of Example country: RU bankBic: DEUTDEFF payUrl: https://example.com/pay/123456 fullName: Ivan Petrov requisitesFull: 1234567812345678, Bank of Example, Ivan Petrov status: IN_PROGRESS paymentRequisites: 1234567812345678, Bank of Example, Ivan Petrov SUCCESS: summary: Order completed value: userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 type: ORDER order: id: 9417631c-036d-4eea-a3af-8b8267ccdecb customId: merchant-given-id fiatSum: '1740.50' finalFiatSum: '1740.50' cryptoSum: '17.405' finalCryptoSum: '17.405' exchangeRate: '100.00' feeCoefficient: '0.10' userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 ``` -------------------------------- ### Get Order Details Source: https://context7_llms Fetch details for a specific order. You can retrieve an order using either its `orderId` or `customId` parameter. ```APIDOC ## GET /orders ### Description Fetches individual order details using either the `orderId` or `customId` parameter. ### Method GET ### Endpoint /orders ### Parameters #### Query Parameters - **orderId** (string) - Optional - The unique identifier for the order. - **customId** (string) - Optional - The custom identifier for the order. ### Request Example ``` GET /orders?orderId=ord_abcdef123456 ``` ### Response #### Success Response (200) - **orderId** (string) - The unique identifier for the order. - **customId** (string) - The custom identifier for the order. - **amount** (number) - The amount of the transaction. - **currency** (string) - The currency of the transaction. - **status** (string) - The current status of the order. #### Response Example ```json { "orderId": "ord_abcdef123456", "customId": "order_12345", "amount": 100.50, "currency": "USD", "status": "COMPLETED" } ``` ``` -------------------------------- ### Get Order Details - OpenAPI 3.0.1 Source: https://lotrien.apidog.io/get-order-details-22317426e0 Defines the GET endpoint for retrieving order details using either 'orderId' or 'customId'. It specifies parameters, response schemas, and example payloads, including status-dependent attributes for orders in 'IN_PROGRESS' and 'SUCCESS' states. Authentication is handled via an API key. ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /order: get: summary: Get order details deprecated: false description: |- Fetch individual order using `orderId` or `customId` parameter. Status-dependent attributes become available: - `IN_PROGRESS` - `requisites` - payment requisites - `paymentMethod` - matched payment method - `cryptoSum` - cryptocurrency amount to be credited - `exchangeRate` - applied conversion rate - `expireAt` - order expiration deadline - `SUCCESS` - `finalFiatSum` - confirmed fiat payment - `finalCryptoSum` - confirmed cryptocurrency credit operationId: api_get_order_me_view_order_get tags: - External API/Orders - Orders parameters: - name: order_id in: query description: Order ID required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Order Id description: Order ID - name: custom_id in: query description: Merchant-assigned ID required: false schema: anyOf: - type: string - type: 'null' title: Custom Id description: Merchant-assigned ID responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/definitions/8662032' - type: 'null' title: Response Api Get Order Me View Order Get $ref: '#/components/schemas/OrderMeModel' example: id: 9417631c-036d-4eea-a3af-8b8267ccdecb customId: merchant-given-id fiatSum: '1740.50' cryptoSum: '17.405' exchangeRate: '100.00' feeCoefficient: '0.10' userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 createdAt: '2025-01-01T00:00:00' updatedAt: '2025-01-01T00:00:00' expireAt: '2025-01-01T00:15:00' status: IN_PROGRESS fiatCurrencyCode: RUB cryptoCurrencyCode: USDT type: PAYIN paymentMethods: - SBP - BANK_CARD - BANK_ACCOUNT paymentMethod: BANK_CARD requisites: id: 84b2639b-2f70-46e0-be6d-de38207007f8 phoneNumber: '' cardNumber: '1234567812345678' bankAccountNumber: '' bank: Bank of Example fullName: Ivan Petrov country: RU bankBic: DEUTDEFF payUrl: https://example.com/pay/123456 requisitesFull: 1234567812345678, Bank of Example, Ivan Petrov history: - status: CREATED createdAt: '2025-01-01T00:00:00' - status: IN_PROGRESS createdAt: '2025-01-01T00:00:05' headers: {} x-apidog-name: OK security: - APIKeyHeader: [] x-apidog: schemeGroups: - id: 5105sRTiyw2vyxyvTQhPi schemeIds: - APIKeyHeader required: true use: id: 5105sRTiyw2vyxyvTQhPi scopes: 5105sRTiyw2vyxyvTQhPi: APIKeyHeader: [] x-apidog-folder: External API/Orders x-apidog-status: released x-run-in-apidog: https://app.apidog.com/web/project/956244/apis/api-22317426-run components: schemas: OrderMeModel: properties: id: type: string format: uuid title: '' description: Order unique ID customId: anyOf: - type: string - type: 'null' title: '' description: Merchant-assigned ID fiatSum: $ref: '#/components/schemas/MinTwoDecimal' title: '' description: Fiat amount finalFiatSum: anyOf: - $ref: '#/components/schemas/MinTwoDecimal' - type: 'null' title: '' description: Final fiat amount cryptoSum: anyOf: - $ref: '#/components/schemas/MinTwoDecimal' - type: 'null' title: '' description: Crypto amount finalCryptoSum: anyOf: - $ref: '#/components/schemas/MinTwoDecimal' - type: 'null' title: '' description: Final crypto amount exchangeRate: anyOf: - $ref: '#/components/schemas/MinTwoDecimal' - type: 'null' title: '' description: Rate with fee feeCoefficient: anyOf: ``` -------------------------------- ### GET /order Source: https://lotrien.apidog.io/get-order-details-22317426e0 Fetches individual order details using either `orderId` or `customId`. The response includes status-dependent attributes. ```APIDOC ## GET /order ### Description Fetch individual order using `orderId` or `customId` parameter. Status-dependent attributes become available. ### Method GET ### Endpoint /order ### Parameters #### Query Parameters - **order_id** (string) - Optional - Order ID - **custom_id** (string) - Optional - Merchant-assigned ID ### Request Example ```json { "order_id": "9417631c-036d-4eea-a3af-8b8267ccdecb" } ``` ### Response #### Success Response (200) - **id** (string) - Order unique ID - **customId** (string) - Merchant-assigned ID - **fiatSum** (string) - Fiat amount - **finalFiatSum** (string) - Final fiat amount - **cryptoSum** (string) - Crypto amount - **finalCryptoSum** (string) - Final crypto amount - **exchangeRate** (string) - Rate with fee - **feeCoefficient** (string) - Fee coefficient - **userId** (string) - User ID - **createdAt** (string) - Order creation timestamp - **updatedAt** (string) - Order update timestamp - **expireAt** (string) - Order expiration deadline - **status** (string) - Current order status (e.g., IN_PROGRESS, SUCCESS) - **fiatCurrencyCode** (string) - Fiat currency code - **cryptoCurrencyCode** (string) - Cryptocurrency code - **type** (string) - Order type (e.g., PAYIN) - **paymentMethods** (array) - Available payment methods - **paymentMethod** (string) - Selected payment method - **requisites** (object) - Payment requisites details - **history** (array) - Order status history #### Response Example ```json { "id": "9417631c-036d-4eea-a3af-8b8267ccdecb", "customId": "merchant-given-id", "fiatSum": "1740.50", "cryptoSum": "17.405", "exchangeRate": "100.00", "feeCoefficient": "0.10", "userId": "e5112004-e548-460b-ae63-95c8b5ecf7a6", "createdAt": "2025-01-01T00:00:00", "updatedAt": "2025-01-01T00:00:00", "expireAt": "2025-01-01T00:15:00", "status": "IN_PROGRESS", "fiatCurrencyCode": "RUB", "cryptoCurrencyCode": "USDT", "type": "PAYIN", "paymentMethods": [ "SBP", "BANK_CARD", "BANK_ACCOUNT" ], "paymentMethod": "BANK_CARD", "requisites": { "id": "84b2639b-2f70-46e0-be6d-de38207007f8", "phoneNumber": "", "cardNumber": "1234567812345678", "bankAccountNumber": "", "bank": "Bank of Example", "fullName": "Ivan Petrov", "country": "RU", "bankBic": "DEUTDEFF", "payUrl": "https://example.com/pay/123456", "requisitesFull": "1234567812345678, Bank of Example, Ivan Petrov" }, "history": [ { "status": "CREATED", "createdAt": "2025-01-01T00:00:00" }, { "status": "IN_PROGRESS", "createdAt": "2025-01-01T00:00:05" } ] } ``` ``` -------------------------------- ### Conflict Response for Duplicate Custom ID (YAML) Source: https://lotrien.apidog.io/create-payin-order-22317425e0 An example response when attempting to create a payin order with a `customId` that already exists. This indicates a conflict, and the response includes details of the existing order. ```yaml detail: 'Failed to create order: duplicate entry custom_id.' order: id: 9417631c-036d-4eea-a3af-8b8267ccdecb customId: merchant-given-id fiatSum: '1740.50' cryptoSum: '17.405' exchangeRate: '100.00' feeCoefficient: '0.10' userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 createdAt: '2025-01-01T00:00:00' updatedAt: '2025-01-01T00:00:00' expireAt: '2025-01-01T00:15:00' status: IN_PROGRESS fiatCurrencyCode: RUB cryptoCurrencyCode: USDT type: PAYIN paymentMethods: - SBP - BANK_CARD - BANK_ACCOUNT paymentMethod: BANK_CARD requisites: id: 84b2639b-2f70-46e0-be6d-de38207007f8 phoneNumber: '' ``` -------------------------------- ### Get Order by ID Source: https://lotrien.apidog.io/create-payin-order-22317425e0 Retrieves details of an existing order using its unique ID. ```APIDOC ## GET /orders/{orderId} ### Description Retrieves the details of a specific order using its ID. ### Method GET ### Endpoint /orders/{orderId} ### Parameters #### Path Parameters - **orderId** (string) - Required - The unique identifier of the order. #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **detail** (string) - A message indicating the status or outcome. - **order** (CreateOrderResponse) - The order object containing all details. #### Response Example ```json { "detail": "Order found successfully.", "order": { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "customId": "ORD-12345", "fiatSum": 100.50, "finalFiatSum": 102.00, "cryptoSum": 0.0025, "finalCryptoSum": 0.00255, "exchangeRate": 40200.00, "feeCoefficient": 0.01, "userId": "user-123", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:05:00Z", "expireAt": "2023-10-27T11:00:00Z", "status": "CREATED", "fiatCurrencyCode": "USD", "cryptoCurrencyCode": "BTC", "type": "PAYIN", "paymentMethods": ["BankCard", "BankTransfer"], "paymentMethod": "BankCard", "bank": null, "requisites": { "id": "req-abcde-12345", "phoneNumber": "+1234567890", "cardNumber": "1234 **** **** 5678", "bankAccountNumber": "9876543210", "bank": "Example Bank", "fullName": "John Doe", "country": "US", "bankBic": "EXAMUS33", "payUrl": null, "requisitesFull": "Account: 9876543210, Bank: Example Bank, Name: John Doe" } } } ``` ``` -------------------------------- ### POST /webhooks/order Source: https://lotrien.apidog.io/order-event-webhooks-22317430e0 Configure webhook URLs to receive real-time notifications for ORDER events. This endpoint supports various scenarios such as order creation, unissuance, requisite assignment, processing completion, expiration, and appeal review. ```APIDOC ## POST /webhooks/order ### Description Configure webhook URLs in your Settings panel to receive real-time notifications for `ORDER` events. POST callbacks are triggered for `ORDER` events in scenarios like order creation, unissuance, requisite assignment, processing completion, expiration, and appeal review. During `IN_PROGRESS` status, requisites are delivered both as unstructured text in `paymentRequisites` and as structured data within `order.requisites`. Upon `SUCCESS` completion, confirmed amounts appear in `finalFiatSum` and `finalCryptoSum` attributes. Fiat amounts may be adjusted for uniqueness during requisites generation. After entering the processing stage, you may receive an updated `fiatSum` value. Transfer exactly this adjusted amount, as payment validation depends on it. ### Method POST ### Endpoint /webhooks/order ### Parameters #### Query Parameters None #### Request Body This endpoint does not expect a request body from the client. It is designed to receive POST requests from the server when an order event occurs. ### Request Example (Not applicable as this is a webhook endpoint receiving data from the server) ### Response #### Success Response (200) - **userId** (string) - The ID of the user associated with the event. - **type** (string) - The type of event, expected to be 'ORDER'. - **order** (object) - Details of the order. - **id** (string) - The unique identifier for the order. - **customId** (string) - Merchant-provided custom ID for the order. - **fiatSum** (string) - The initial or current fiat amount of the order. - **finalFiatSum** (string, optional) - The final confirmed fiat amount after completion. - **cryptoSum** (string, optional) - The crypto amount of the order. - **finalCryptoSum** (string, optional) - The final confirmed crypto amount after completion. - **exchangeRate** (string, optional) - The exchange rate used for the transaction. - **feeCoefficient** (string) - The fee coefficient applied to the order. - **userId** (string) - The ID of the user who placed the order. - **createdAt** (string) - Timestamp when the order was created. - **updatedAt** (string) - Timestamp when the order was last updated. - **expireAt** (string) - Timestamp when the order expires. - **fiatCurrencyCode** (string) - The currency code for the fiat amount (e.g., 'RUB'). - **cryptoCurrencyCode** (string) - The currency code for the crypto amount (e.g., 'USDT'). - **type** (string) - The type of order (e.g., 'PAYIN'). - **status** (string) - The current status of the order (e.g., 'CREATED', 'IN_PROGRESS', 'SUCCESS'). - **paymentMethod** (string, optional) - The specific payment method used. - **paymentMethods** (array, optional) - A list of available payment methods. - **requisites** (object, optional) - Structured payment requisites for the order. - **id** (string) - Requisite identifier. - **phoneNumber** (string) - Phone number for payment. - **cardNumber** (string) - Card number for payment. - **bankAccountNumber** (string) - Bank account number for payment. - **bank** (string) - Name of the bank. - **country** (string) - Country code for the bank. - **bankBic** (string) - Bank BIC code. - **payUrl** (string) - URL for direct payment. - **fullName** (string) - Full name of the recipient. - **requisitesFull** (string) - Combined string of all requisite details. - **status** (string) - The overall status of the webhook notification. - **paymentRequisites** (string, optional) - Unstructured payment requisites string. #### Response Example ```json { "userId": "e5112004-e548-460b-ae63-95c8b5ecf7a6", "type": "ORDER", "order": { "id": "9417631c-036d-4eea-a3af-8b8267ccdecb", "customId": "merchant-given-id", "fiatSum": "1750.50", "feeCoefficient": "0.10", "userId": "e5112004-e548-460b-ae63-95c8b5ecf7a6", "createdAt": "2025-01-01T00:00:00", "updatedAt": "2025-01-01T00:00:00", "expireAt": "2025-01-01T00:00:10", "fiatCurrencyCode": "RUB", "cryptoCurrencyCode": "USDT", "type": "PAYIN", "status": "CREATED", "paymentMethods": [ "SBP", "BANK_CARD", "BANK_ACCOUNT" ] }, "status": "CREATED" } ``` #### Error Handling (Specific error responses are not detailed in the provided OpenAPI spec, but standard HTTP error codes would apply for network issues or server errors.) ``` -------------------------------- ### Create Payin Order Source: https://context7_llms Create a new payin order. It is recommended to provide distinct `customId` values for each order to ensure uniqueness and easier tracking. ```APIDOC ## POST /orders/payin ### Description Creates a new payin order. Best practice: provide distinct `customId` values per order. ### Method POST ### Endpoint /orders/payin ### Parameters #### Request Body - **customId** (string) - Required - A unique identifier for the order. - **amount** (number) - Required - The amount of the transaction. - **currency** (string) - Required - The currency of the transaction (e.g., 'USD'). ### Request Example ```json { "customId": "order_12345", "amount": 100.50, "currency": "USD" } ``` ### Response #### Success Response (200) - **orderId** (string) - The unique identifier for the created order. - **status** (string) - The current status of the order. #### Response Example ```json { "orderId": "ord_abcdef123456", "status": "PENDING" } ``` ``` -------------------------------- ### GET /appeal Source: https://lotrien.apidog.io/get-appeal-22317429e0 Retrieve a single appeal by its appealId. This endpoint allows you to fetch detailed information about a specific appeal, including its status, associated order, and relevant timestamps. ```APIDOC ## GET /appeal ### Description Retrieve single appeal by `appealId`. ### Method GET ### Endpoint /appeal ### Parameters #### Query Parameters - **appeal_id** (string) - Required - Appeal identifier (UUID format) ### Request Example ```json { "appeal_id": "181cdba6-07f6-4592-b3ba-e54dd205dc05" } ``` ### Response #### Success Response (200) - **appealId** (string) - Appeal ID (UUID format) - **userId** (string) - Merchant ID (UUID format) - **createdAt** (string) - Creation timestamp (ISO 8601 format) - **orderId** (string) - Order ID (UUID format) - **fileId** (string or null) - Attachment ID (UUID format or null) - **message** (string or null) - Appeal message - **state** (string) - Appeal state - **finalFiatSum** (string or null) - Adjusted fiat amount (decimal format) #### Response Example ```json { "appealId": "181cdba6-07f6-4592-b3ba-e54dd205dc05", "userId": "e5112004-e548-460b-ae63-95c8b5ecf7a6", "createdAt": "2025-01-01T00:00:00", "orderId": "9417631c-036d-4eea-a3af-8b8267ccdecb", "fileId": "8ce5c3f6-8320-44cc-b8de-c53a48e120db", "message": "Invalid transaction sum", "state": "SUCCESS", "finalFiatSum": "1800.00" } ``` ``` -------------------------------- ### Create Order Source: https://lotrien.apidog.io/create-payin-order-22317425e0 This endpoint allows you to create a new order for a payment transaction. You can specify payment methods, currency, and other relevant details. ```APIDOC ## POST /orders ### Description Creates a new order for a payment transaction. ### Method POST ### Endpoint /orders ### Parameters #### Query Parameters None #### Request Body - **fiatSum** (number) - Required - The amount in fiat currency. - **fiatCurrencyCode** (string) - Required - The ISO 4217 currency code for the fiat amount. - **cryptoCurrencyCode** (string) - Required - The cryptocurrency code (e.g., BTC, ETH). - **type** (OrderTypeEnum) - Required - The type of order (PAYIN or PAYOUT). - **paymentMethods** (array of strings) - Required - Requested payment methods. - **paymentMethod** (string or null) - Optional - Selected payment method. - **bank** (string or null) - Optional - The bank for payment. ### Request Example ```json { "fiatSum": 100.50, "fiatCurrencyCode": "USD", "cryptoCurrencyCode": "BTC", "type": "PAYIN", "paymentMethods": ["BankCard", "BankTransfer"], "paymentMethod": "BankCard", "bank": null } ``` ### Response #### Success Response (200) - **id** (string) - Order ID. - **customId** (string) - Custom order identifier. - **fiatSum** (number) - Initial fiat amount. - **finalFiatSum** (number) - Final fiat amount after fees. - **cryptoSum** (number) - Initial crypto amount. - **finalCryptoSum** (number) - Final crypto amount after fees. - **exchangeRate** (number) - Exchange rate used. - **feeCoefficient** (number) - Fee coefficient. - **userId** (string) - User ID. - **createdAt** (string) - Order creation timestamp. - **updatedAt** (string) - Order last update timestamp. - **expireAt** (string) - Order expiration timestamp. - **status** (OrderStatusEnum) - Current order status. - **fiatCurrencyCode** (string) - Fiat currency code. - **cryptoCurrencyCode** (string) - Cryptocurrency code. - **type** (OrderTypeEnum) - Order type. - **paymentMethods** (array of strings) - Available payment methods. - **paymentMethod** (string or null) - Selected payment method. - **bank** (string or null) - Selected bank. - **requisites** (RequisitesResponse or null) - Payment requisites details. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "customId": "ORD-12345", "fiatSum": 100.50, "finalFiatSum": 102.00, "cryptoSum": 0.0025, "finalCryptoSum": 0.00255, "exchangeRate": 40200.00, "feeCoefficient": 0.01, "userId": "user-123", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:05:00Z", "expireAt": "2023-10-27T11:00:00Z", "status": "CREATED", "fiatCurrencyCode": "USD", "cryptoCurrencyCode": "BTC", "type": "PAYIN", "paymentMethods": ["BankCard", "BankTransfer"], "paymentMethod": "BankCard", "bank": null, "requisites": { "id": "req-abcde-12345", "phoneNumber": "+1234567890", "cardNumber": "1234 **** **** 5678", "bankAccountNumber": "9876543210", "bank": "Example Bank", "fullName": "John Doe", "country": "US", "bankBic": "EXAMUS33", "payUrl": null, "requisitesFull": "Account: 9876543210, Bank: Example Bank, Name: John Doe" } } ``` ``` -------------------------------- ### Appealed Order Data Structure (YAML) Source: https://lotrien.apidog.io/order-event-webhooks-22317430e0 This YAML structure defines an order that is currently under appeal. It includes order details, financial information, and payment method specifics, with the status set to 'APPEAL'. ```yaml APPEAL: summary: Order under appeal value: userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 type: ORDER order: id: 9417631c-036d-4eea-a3af-8b8267ccdecb customId: merchant-given-id fiatSum: '1740.50' cryptoSum: '17.405' exchangeRate: '100.00' feeCoefficient: '0.10' userId: e5112004-e548-460b-ae63-95c8b5ecf7a6 createdAt: '2025-01-01T00:00:00' updatedAt: '2025-01-01T00:00:00' expireAt: '2025-01-01T00:15:00' fiatCurrencyCode: RUB cryptoCurrencyCode: USDT type: PAYIN status: APPEAL paymentMethod: BANK_CARD paymentMethods: - SBP ``` -------------------------------- ### Authentication API Source: https://lotrien.apidog.io/get-wallets-22317427e0 Information on authentication methods supported by the API. ```APIDOC ## Authentication ### APIKeyHeader API key for authentication. Can be obtained from the settings page in the Lotrien Merchant dashboard. **Location:** Header **Name:** X-API-Key ### Bearer Token Standard Bearer token authentication. **Scheme:** bearer ```