### GET /api/v3/shop/product/{id} Source: https://docs.easydonate.ru/shop/product Retrieves detailed information about a specific product, including its name, price, commands, and associated servers. ```APIDOC ## GET /api/v3/shop/product/{id} ### Description Retrieves detailed information about a specific product using its unique identifier. ### Method GET ### Endpoint `/api/v3/shop/product/{id}` ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the product. #### Query Parameters None #### Headers - **Shop-Key** (string) - Required - Your unique shop key for authentication. ### Request Example None (GET request, no body) ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (object) - Contains the product details. - **id** (integer) - Product ID. - **name** (string) - Product name. - **price** (number) - Product price. - **old_price** (null) - Previous price, if applicable. - **type** (string) - Product type. - **number** (integer) - Product quantity. - **commands** (array of strings) - Commands to execute when the product is purchased. - **withdraw_commands** (null) - Commands for withdrawing the product, if applicable. - **withdraw_commands_days** (null) - Days for withdrawing the product, if applicable. - **additional_fields** (null) - Additional fields, if any. - **description** (null) - Product description. - **image** (string) - URL of the product image. - **first_delete** (integer) - Flag for first deletion. - **shop_id** (integer) - The ID of the shop the product belongs to. - **created_at** (string) - Timestamp of creation. - **updated_at** (string) - Timestamp of last update. - **sort_index** (integer) - Sorting index. - **servers** (array of objects) - List of servers associated with the product. - **id** (integer) - Server ID. - **name** (string) - Server name. - **ip** (string) - Server IP address. - **port** (string) - Server port. - **version** (string) - Server version. - **is_port_hidden** (integer) - Flag indicating if the port is hidden. - **hide_ip** (integer) - Flag indicating if the IP is hidden. - **is_hidden** (integer) - Flag indicating if the server is hidden. - **shop_id** (integer) - The ID of the shop the server belongs to. - **created_at** (string) - Timestamp of creation. - **updated_at** (string) - Timestamp of last update. #### Error Response (404) - **success** (boolean) - Indicates if the request was successful (false in case of error). - **response** (string) - Error message: "Товар не найден." - **error_code** (integer) - Error code (2 in this case). ``` -------------------------------- ### Successful Response Example (JSON) Source: https://docs.easydonate.ru/shop/coupons Example of a successful response when retrieving shop coupons. It includes coupon details such as name, sale percentage, expiration, and associated product information. ```json { "success": true, "response": [ { "id": 4407, "name": "SALE10", "code": "SALE10", "sale": 10, "limit": null, "expires_at": "2021-11-30 20:20:00", "shop_id": 4370, "created_at": "2021-09-26 16:11:44", "updated_at": "2021-10-04 20:19:08", "products": [ { "id": 48986, "name": "Алмазный меч2", "price": 3000, "old_price": null, "type": "case", "number": 5, "is_hidden": 0, "commands":[ "give {user} minecraft:diamondsword {amount}" ], "withdraw_commands": null, "withdraw_commands_days": null, "additional_fields": null, "description": null, "category_id": null, "image": "http://cp.easydonate.ru/storage/app/media/Diamond%20Sword-min.png", "first_delete": 0, "shop_id": 4370, "created_at": "2021-08-13 16:41:28", "updated_at": "2021-09-23 13:26:57", "sort_index": 0 } ] } ] } ``` -------------------------------- ### GET /api/v3/shop/products Source: https://docs.easydonate.ru/shop/products Retrieves a list of all products available in a shop. Requires a server ID and a Shop-Key for authentication. ```APIDOC ## GET /api/v3/shop/products ### Description Retrieves a list of all products available in a shop. Requires a server ID and a Shop-Key for authentication. ### Method GET ### Endpoint https://easydonate.ru/api/v3/shop/products ### Parameters #### Query Parameters - **server_id** (integer) - Required - Идентификатор сервера #### Headers - **Shop-Key** (string) - Required - Уникальный ключ магазина ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (array) - An array of product objects. - **id** (integer) - The unique identifier of the product. - **name** (string) - The name of the product. - **price** (integer) - The price of the product. - **old_price** (null) - The previous price of the product, if applicable. - **type** (string) - The type of the product (e.g., 'item'). - **number** (integer) - The quantity of the product. - **commands** (array) - An array of commands to be executed when the product is purchased. - **withdraw_commands** (null) - Commands for withdrawing the product, if applicable. - **withdraw_commands_days** (null) - The number of days before withdrawal commands are active. - **additional_fields** (null) - Additional fields for the product. - **description** (null) - A description of the product. - **image** (string) - The URL of the product image. - **first_delete** (integer) - A flag indicating if this is the first deletion. - **shop_id** (integer) - The identifier of the shop. - **created_at** (string) - The timestamp when the product was created. - **updated_at** (string) - The timestamp when the product was last updated. - **sort_index** (integer) - The sorting index of the product. - **servers** (array) - An array of server objects associated with the product. - **id** (integer) - The unique identifier of the server. - **name** (string) - The name of the server. - **ip** (string) - The IP address of the server. - **port** (string) - The port of the server. - **version** (string) - The version of the server. - **is_port_hidden** (integer) - Flag indicating if the port is hidden. - **hide_ip** (integer) - Flag indicating if the IP is hidden. - **is_hidden** (integer) - Flag indicating if the server is hidden. - **shop_id** (integer) - The identifier of the shop. - **created_at** (string) - The timestamp when the server was created. - **updated_at** (string) - The timestamp when the server was last updated. #### Error Response (404) - **success** (boolean) - Indicates if the request was successful (will be false). - **response** (string) - An error message (e.g., 'Магазин не найден.'). - **error_code** (integer) - The error code (e.g., 1). ### Request Example ```json { "server_id": 965, "Shop-Key": "your_shop_key" } ``` ### Response Example (200 OK) ```json { "success": true, "response": [ { "id": 6074, "name": "Алмазный меч", "price": 49, "old_price": null, "type": "item", "number": 1, "commands": [ "give {user} 276 {amount}" ], "withdraw_commands": null, "withdraw_commands_days": null, "additional_fields": null, "description": null, "image": "http://cp.easydonate.ru/storage/app/media/Diamond%20Sword-min.png", "first_delete": 0, "shop_id": 531, "created_at": "2021-02-24 18:02:40", "updated_at": "2021-03-26 13:48:13", "sort_index": 0, "servers":[ { "id": 965, "name": "Выживание", "ip": "alcor.mcstudio.pro", "port": "25641", "version": "", "is_port_hidden": 0, "hide_ip": 0, "is_hidden": 0, "shop_id": 531, "created_at": "2021-02-22 17:44:47", "updated_at": "2021-03-05 22:39:44" } ] } ] } ``` ### Response Example (404 Not Found) ```json { "success": false, "response": "Магазин не найден.", "error_code": 1 } ``` ``` -------------------------------- ### Retrieve Shop Products via GET Request Source: https://docs.easydonate.ru/shop/products Fetches a list of all products for a specific server. Requires the 'Shop-Key' header and 'server_id' query parameter to authenticate and filter the request. ```json { "success": true, "response": [ { "id": 6074, "name": "Алмазный меч", "price": 49, "old_price": null, "type": "item", "number": 1, "commands": [ "give {user} 276 {amount}" ], "withdraw_commands": null, "withdraw_commands_days": null, "additional_fields": null, "description": null, "image": "http://cp.easydonate.ru/storage/app/media/Diamond%20Sword-min.png", "first_delete": 0, "shop_id": 531, "created_at": "2021-02-24 18:02:40", "updated_at": "2021-03-26 13:48:13", "sort_index": 0, "servers":[ { "id": 965, "name": "Выживание", "ip": "alcor.mcstudio.pro", "port": "25641", "version": "", "is_port_hidden": 0, "hide_ip": 0, "is_hidden": 0, "shop_id": 531, "created_at": "2021-02-22 17:44:47", "updated_at": "2021-03-05 22:39:44" } ] } ] } ``` ```json { "success": false, "response": "Магазин не найден.", "error_code": 1 } ``` -------------------------------- ### Get Shop Servers List - API Request Source: https://docs.easydonate.ru/shop/servers This snippet demonstrates how to make a GET request to the EasyDonate API to retrieve a list of shop servers and their associated products. It requires a 'Shop-Key' header for authentication. The response includes server details and product information. ```http GET https://easydonate.ru/api/v3/shop/servers Headers: Shop-Key: YOUR_SHOP_KEY ``` -------------------------------- ### Error Response Example (JSON) Source: https://docs.easydonate.ru/shop/coupons Example of an error response when the shop is not found. Indicates a failure in the request processing and provides an error message. ```json { "success": false, "response": "Магазин не найден.", "error_code": 1 } ``` -------------------------------- ### GET /api/v3/plugin/Vkontakte.News/getSettings Source: https://docs.easydonate.ru/plugin/vkontakte.widget Retrieves the current configuration settings for the VKontakte News plugin. ```APIDOC ## GET /api/v3/plugin/Vkontakte.News/getSettings ### Description Returns the configuration settings for the VKontakte News plugin, including the community domain and the number of records to display. ### Method GET ### Endpoint https://easydonate.ru/api/v3/plugin/Vkontakte.News/getSettings ### Parameters #### Headers - **Shop-Key** (string) - Required - Unique shop key for authentication. ### Request Example N/A (GET request) ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (object) - Contains plugin settings (enabled, domain, count). #### Response Example { "success": true, "response": { "enabled": true, "domain": "https://vk.com/easydonateru", "count": "8" } } ``` -------------------------------- ### GET /api/v3/plugin/Yandex.Metrika/getSettings Source: https://docs.easydonate.ru/plugin/yandex.metrika Retrieves the current configuration settings for the Yandex.Metrika plugin. ```APIDOC ## GET /api/v3/plugin/Yandex.Metrika/getSettings ### Description Returns the current settings of the Yandex.Metrika plugin, including its active status and metric ID. ### Method GET ### Endpoint https://easydonate.ru/api/v3/plugin/Yandex.Metrika/getSettings ### Parameters #### Headers - **Shop-Key** (string) - Required - Unique shop key. ### Request Example N/A ### Response #### Success Response (200) - **success** (boolean) - Status of the request - **response** (object) - Plugin settings object #### Response Example { "success": true, "response": { "enabled": true, "id": "70560952" } } ``` -------------------------------- ### Error Response Example (JSON) Source: https://docs.easydonate.ru/shop/payments An example of a JSON response when an error occurs, such as the shop not being found. It indicates failure with 'success: false' and provides an error message and code. ```json { "success" : false, "response" : "Магазин не найден.", "error_code": 1 } ``` -------------------------------- ### Retrieve Product Information via GET Request Source: https://docs.easydonate.ru/shop/product Fetches product details from the EasyDonate API. Requires the product ID as a path parameter and the Shop-Key in the request headers. ```json { "success": true, "response": { "id": 6074, "name": "Алмазный меч", "price": 49, "old_price": null, "type": "item", "number": 1, "commands": [ "give {user} 276 {amount}" ], "withdraw_commands": null, "withdraw_commands_days": null, "additional_fields": null, "description": null, "image": "http://cp.easydonate.ru/storage/app/media/Diamond%20Sword-min.png", "first_delete": 0, "shop_id": 531, "created_at": "2021-02-24 18:02:40", "updated_at": "2021-03-26 13:52:39", "sort_index": 0, "servers": [ { "id": 965, "name": "Выживание", "ip": "alcor.mcstudio.pro", "port": "25641", "version": "", "is_port_hidden": 0, "hide_ip": 0, "is_hidden": 0, "shop_id": 531, "created_at": "2021-02-22 17:44:47", "updated_at": "2021-03-26 13:51:42" } ] } } ``` ```json { "success": false, "response": "Товар не найден.", "error_code": 2 } ``` -------------------------------- ### Store API Key Configuration in PHP Source: https://docs.easydonate.ru/start Demonstrates how to securely store the unique EasyDonate API key within a PHP configuration file. This file should be kept private to prevent unauthorized access to the store's API. ```php 'd8578edf8458ce06fbc5bb76a58c5ca4' ]; ``` -------------------------------- ### GET /api/v3/plugin/EasyDonate.LastPayments/getSettings Source: https://docs.easydonate.ru/plugin/easydonate.lastpayments Retrieves the current settings for the EasyDonate LastPayments plugin. ```APIDOC ## GET /api/v3/plugin/EasyDonate.LastPayments/getSettings ### Description Retrieves the current settings for the EasyDonate LastPayments plugin. ### Method GET ### Endpoint https://easydonate.ru/api/v3/plugin/EasyDonate.LastPayments/getSettings ### Parameters #### Headers - **Shop-Key** (string) - Required - Уникальный ключ магазина ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (object) - Contains the plugin settings. - **enabled** (boolean) - Whether the plugin is enabled. - **items** (integer) - Number of items to display. - **limit** (integer) - Limit for displayed items. - **autoplay** (boolean) - Whether autoplay is enabled. - **show_date** (boolean) - Whether to show the date. #### Response Example (200) ```json { "success": true, "response": { "enabled": true, "items": 6, "limit": 8, "autoplay": false, "show_date": false } } ``` #### Error Response (400) - **success** (boolean) - Indicates if the request was successful. - **error_code** (integer) - The error code. - **response** (string) - Error message. #### Response Example (400) ```json { "success": false, "error_code": 5, "response": "Плагин неактивен." } ``` ``` -------------------------------- ### Successful Payments Response Example (JSON) Source: https://docs.easydonate.ru/shop/payments An example of the JSON response when successfully retrieving a list of payments. It includes details for each payment, such as ID, customer, amount, payment system, and associated products and server information. ```json { "success": true, "response": [ { "id": 25572, "customer": "DontFollow", "email": null, "shop_id": 531, "server_id": 965, "status": 2, // 2 - оплачен "enrolled": 49, // сумма, начисленная на баланс "payment_system": "test", // Qiwi, Interkassa "payment_type": "test", // test, qiwi, card, mc, webmoney, yandex "sent_commands": [ { "command": "give DontFollow1 276 10", "response": "Gave DontFollow1 some 276 (DIAMOND_SWORD)" } ], "error": null, "created_at": "2021-02-23 10:35:38", "updated_at": "2021-02-23 10:35:38", "products":[ { "id": 6074, "name": "Алмазный меч", "price": 49, "old_price": null, "type": "item", "number": 1, "commands": [ "give {user} 276 {amount}" ], "withdraw_commands": null, "withdraw_commands_days": null, "additional_fields": null, "description": null, "image": "http://cp.easydonate.ru/storage/app/media/Diamond%20Sword-min.png", "first_delete": 0, "shop_id": 531, "created_at": "2021-02-24 18:02:40", "updated_at": "2021-03-26 13:52:39", "sort_index": 0 } ], "server": { "id": 965, "name": "Выживание", "ip": "alcor.mcstudio.pro", "port": "25641", "version": "", "is_port_hidden": 0, "hide_ip": 0, "is_hidden": 0, "shop_id": 531, "created_at": "2021-02-22 17:44:47", "updated_at": "2021-03-26 13:51:42" } } ] } ``` -------------------------------- ### GET /api/v3/shop/payment/{id} Source: https://docs.easydonate.ru/shop/payment Retrieves comprehensive information about a specific payment, including customer details, status, products, and server information. ```APIDOC ## GET /api/v3/shop/payment/{id} ### Description Fetches details for a specific payment by its ID. Requires a valid Shop-Key in the headers. ### Method GET ### Endpoint https://easydonate.ru/api/v3/shop/payment/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the payment. #### Headers - **Shop-Key** (string) - Required - Unique store authentication key. ### Request Example GET /api/v3/shop/payment/25572 Headers: { "Shop-Key": "your_shop_key" } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (object) - The payment details object. #### Response Example { "success": true, "response": { "id": 25572, "customer": "DontFollow", "status": 2, "enrolled": 49, "created_at": "2021-02-23 10:35:38" } } ``` -------------------------------- ### Get VKontakte News Plugin Settings Source: https://docs.easydonate.ru/plugin/vkontakte.widget Retrieves the current configuration for the VKontakte News plugin, including the community domain and the number of posts to display. Requires the Shop-Key header for authentication. ```json { "success": true, "response": { "enabled": true, "domain": "https://vk.com/easydonateru", "count": "8" } } ``` -------------------------------- ### GET /api/v3/shop/server/{id} Source: https://docs.easydonate.ru/shop/server Retrieves detailed information about a specific server, including its connection details and a list of products configured for that server. ```APIDOC ## GET /api/v3/shop/server/{id} ### Description Fetches server details and associated products by the server's unique ID. ### Method GET ### Endpoint https://easydonate.ru/api/v3/shop/server/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the server. #### Headers - **Shop-Key** (string) - Required - The unique API key for the shop. ### Request Example GET https://easydonate.ru/api/v3/shop/server/965 Headers: {"Shop-Key": "your_shop_key"} ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (object) - Contains server details (id, name, ip, port, products, etc.). #### Response Example { "success": true, "response": { "id": 965, "name": "Выживание", "ip": "alcor.mcstudio.pro", "port": "25641", "products": [ { "id": 6074, "name": "Алмазный меч", "price": 49 } ] } } ``` -------------------------------- ### GET /api/v3/shop/coupons - Get Shop Coupons Source: https://docs.easydonate.ru/shop/coupons Retrieves a list of coupons for a specific shop. The response includes coupon details and any products associated with them. ```APIDOC ## GET /api/v3/shop/coupons ### Description Retrieves a list of coupons for a specific shop, including associated products. ### Method GET ### Endpoint `https://easydonate.ru/api/v3/shop/coupons` ### Parameters #### Query Parameters - **where_active** (boolean) - Optional - If `true`, returns only active coupons; if `false`, returns only inactive coupons. If omitted, all coupons are returned. #### Headers - **Shop-Key** (string) - Required - Unique shop key. ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (array) - An array of coupon objects, each containing: - **id** (integer) - The coupon's unique identifier. - **name** (string) - The name of the coupon. - **code** (string) - The coupon code. - **sale** (integer) - The discount percentage offered by the coupon. - **limit** (null) - Placeholder for potential future use (currently null). - **expires_at** (string) - The expiration date and time of the coupon. - **shop_id** (integer) - The ID of the shop the coupon belongs to. - **created_at** (string) - The timestamp when the coupon was created. - **updated_at** (string) - The timestamp when the coupon was last updated. - **products** (array) - An array of product objects associated with the coupon: - **id** (integer) - The product's unique identifier. - **name** (string) - The name of the product. - **price** (integer) - The price of the product. - **old_price** (null) - Placeholder for the old price (currently null). - **type** (string) - The type of the product. - **number** (integer) - The quantity of the product. - **is_hidden** (integer) - Indicates if the product is hidden (0 for visible, 1 for hidden). - **commands** (array) - An array of commands to be executed when the product is purchased. - **withdraw_commands** (null) - Placeholder for withdrawal commands (currently null). - **withdraw_commands_days** (null) - Placeholder for withdrawal command days (currently null). - **additional_fields** (null) - Placeholder for additional fields (currently null). - **description** (null) - Description of the product (currently null). - **category_id** (null) - The category ID of the product (currently null). - **image** (string) - URL of the product image. - **first_delete** (integer) - Indicates if this is the first deletion of the product. - **shop_id** (integer) - The ID of the shop the product belongs to. - **created_at** (string) - The timestamp when the product was created. - **updated_at** (string) - The timestamp when the product was last updated. - **sort_index** (integer) - The sorting index of the product. #### Error Response (404) - **success** (boolean) - Indicates if the request was successful (will be false). - **response** (string) - An error message (e.g., "Магазин не найден."). - **error_code** (integer) - An error code (e.g., 1 for shop not found). #### Response Example (200 OK) ```json { "success": true, "response": [ { "id": 4407, "name": "SALE10", "code": "SALE10", "sale": 10, "limit": null, "expires_at": "2021-11-30 20:20:00", "shop_id": 4370, "created_at": "2021-09-26 16:11:44", "updated_at": "2021-10-04 20:19:08", "products": [ { "id": 48986, "name": "Алмазный меч2", "price": 3000, "old_price": null, "type": "case", "number": 5, "is_hidden": 0, "commands":[ "give {user} minecraft:diamondsword {amount}" ], "withdraw_commands": null, "withdraw_commands_days": null, "additional_fields": null, "description": null, "category_id": null, "image": "http://cp.easydonate.ru/storage/app/media/Diamond%20Sword-min.png", "first_delete": 0, "shop_id": 4370, "created_at": "2021-08-13 16:41:28", "updated_at": "2021-09-23 13:26:57", "sort_index": 0 } ] } ] } ``` #### Response Example (404 Not Found) ```json { "success": false, "response": "Магазин не найден.", "error_code": 1 } ``` ``` -------------------------------- ### GET /api/v3/shop Source: https://docs.easydonate.ru/shop/shop Retrieves comprehensive information about the shop associated with the provided Shop-Key. ```APIDOC ## GET /api/v3/shop ### Description Retrieves the configuration and details of the shop associated with the provided API key. ### Method GET ### Endpoint https://easydonate.ru/api/v3/shop ### Parameters #### Headers - **Shop-Key** (string) - Required - Unique shop key for authentication. ### Request Example GET /api/v3/shop Headers: { "Shop-Key": "your_shop_key_here" } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (object) - Contains shop details including id, name, domain, and theme settings. #### Response Example { "success": true, "response": { "id": 531, "name": "EasyDonate", "domain": "easydonate.ru", "key": "4d1762cf28c4be48f8a4d63e196a3024" } } ``` -------------------------------- ### GET /api/v3/shop/servers Source: https://docs.easydonate.ru/shop/servers Retrieves a comprehensive list of servers associated with a shop, including their connection details and the list of products available for each server. ```APIDOC ## GET /api/v3/shop/servers ### Description Returns a list of servers for the specified shop, including all linked products and their configurations. ### Method GET ### Endpoint https://easydonate.ru/api/v3/shop/servers ### Parameters #### Headers - **Shop-Key** (string) - Required - Unique shop identification key. ### Request Example GET /api/v3/shop/servers Headers: {"Shop-Key": "your_shop_key"} ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (array) - List of server objects containing id, name, ip, port, and products array. #### Response Example { "success": true, "response": [ { "id": 965, "name": "Выживание", "ip": "alcor.mcstudio.pro", "port": "25641", "products": [ { "id": 6074, "name": "Алмазный меч", "price": 49 } ] } ] } ``` -------------------------------- ### GET /api/v3/plugin/Discord.Widget/getSettings Source: https://docs.easydonate.ru/plugin/discord.widget Retrieves the current configuration settings for the Discord widget plugin, including channel ID, dimensions, and theme. ```APIDOC ## GET /api/v3/plugin/Discord.Widget/getSettings ### Description Retrieves the current configuration settings for the Discord widget plugin. ### Method GET ### Endpoint https://easydonate.ru/api/v3/plugin/Discord.Widget/getSettings ### Parameters #### Headers - **Shop-Key** (string) - Required - Unique shop key ### Response #### Success Response (200) - **success** (boolean) - Status of the request - **response** (object) - Plugin settings object (enabled, channelId, width, height, theme) #### Response Example { "success": true, "response": { "enabled": true, "channelId": "479214992730751008", "width": "100%", "height": "300px", "theme": "dark" } } ``` -------------------------------- ### GET /api/v3/plugin/Vkontakte.News/getNews Source: https://docs.easydonate.ru/plugin/vkontakte.widget Fetches the latest news posts from the configured VKontakte community. ```APIDOC ## GET /api/v3/plugin/Vkontakte.News/getNews ### Description Retrieves a list of the latest news posts from the VKontakte community associated with the plugin. ### Method GET ### Endpoint https://easydonate.ru/api/v3/plugin/Vkontakte.News/getNews ### Parameters #### Headers - **Shop-Key** (string) - Required - Unique shop key for authentication. ### Request Example N/A (GET request) ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (array) - List of news items from the community wall. #### Response Example { "success": true, "error_code": -1, "response": [] } ``` -------------------------------- ### Retrieve Payment Details via GET Request Source: https://docs.easydonate.ru/shop/payment Fetches payment data by ID. Requires a Shop-Key header for authentication and returns a JSON object containing payment status, user information, and associated products. ```JSON { "success": true, "response": { "id": 25572, "customer": "DontFollow", "email": null, "shop_id": 531, "server_id": 965, "status": 2, "enrolled": 49, "payment_system": "test", "payment_type": "test", "sent_commands": [ { "command": "give DontFollow1 276 10", "response": "Gave DontFollow1 some 276 (DIAMOND_SWORD)" } ], "error": null, "created_at": "2021-02-23 10:35:38", "updated_at": "2021-02-23 10:35:38", "products": [ { "id": 6074, "name": "Алмазный меч", "price": 49, "old_price": null, "type": "item", "number": 1, "commands": [ "give {user} 276 {amount}" ], "withdraw_commands": null, "withdraw_commands_days": null, "additional_fields": null, "description": null, "image": "http://cp.easydonate.ru/storage/app/media/Diamond%20Sword-min.png", "first_delete": 0, "shop_id": 531, "created_at": "2021-02-24 18:02:40", "updated_at": "2021-03-26 13:52:39", "sort_index": 0 } ], "server": { "id": 965, "name": "Выживание", "ip": "alcor.mcstudio.pro", "port": "25641", "version": "", "is_port_hidden": 0, "hide_ip": 0, "is_hidden": 0, "shop_id": 531, "created_at": "2021-02-22 17:44:47", "updated_at": "2021-03-26 13:51:42" } } } ``` ```JSON { "success": false, "response": "Платеж не найден.", "error_code": 2 } ``` -------------------------------- ### Get Discord Widget Settings Source: https://docs.easydonate.ru/plugin/discord.widget Retrieves the current configuration settings for the Discord Widget plugin. Requires a valid 'Shop-Key' header. Returns plugin status, channel ID, dimensions, and theme. ```HTTP GET https://easydonate.ru/api/v3/plugin/Discord.Widget/getSettings Headers: Shop-Key: ``` ```JSON { "success": true, "response": { "enabled": true, "channelId": "479214992730751008", "width": "100%", "height": "300px", "theme": "dark" } } ``` ```JSON { "success": false, "error_code": 5, "response": "Плагин неактивен." } ``` -------------------------------- ### Get Shop Coupons List (API) Source: https://docs.easydonate.ru/shop/coupons Retrieves a list of coupons for a shop, along with the products linked to them. Requires a 'Shop-Key' header. Supports filtering by active or inactive coupons via the 'where_active' query parameter. ```HTTP GET https://easydonate.ru/api/v3/shop/coupons Query Parameters: where_active (boolean, optional): true for active coupons, false for inactive. Headers: Shop-Key (string, required): Unique shop identifier. ``` -------------------------------- ### Get Yandex.Metrika Widget HTML (API) Source: https://docs.easydonate.ru/plugin/yandex.metrika Generates and returns an HTML widget for Yandex.Metrika integration based on the plugin's settings. Requires a 'Shop-Key' header. The response contains a 'success' status and the 'response' field holds the HTML script. ```http GET https://easydonate.ru/api/v3/plugin/Yandex.Metrika/getEmbed Headers: Shop-Key: ``` ```json { "success": true, "response": " " } ``` ```json { "success": false, "error_code": 5, "response": "Плагин неактивен." } ``` -------------------------------- ### POST /api/v3/shop/payment/create Source: https://docs.easydonate.ru/shop/payment-create This endpoint allows you to create a payment link for products. After a customer completes a purchase action, you send a request to this endpoint to generate a payment link. You then redirect the user to this link to complete the payment. EasyDonate will handle the payment processing, product delivery, and balance updates. ```APIDOC ## GET /api/v3/shop/payment/create ### Description Generates a payment link for products. After a customer initiates a purchase, this endpoint creates a link that the user is redirected to for payment. The system then handles product delivery and balance updates. ### Method GET ### Endpoint `https://easydonate.ru/api/v3/shop/payment/create` ### Parameters #### Query Parameters - **customer** (string) - Required - Nickname of the buyer. - **server_id** (integer) - Required - The server identifier. Found in the shop settings under 'Servers'. - **products** (object) - Required - A JSON object in the format `{"23": 3, "24": 1}`, where the key is the product ID and the value is the quantity. - **email** (string) - Required - Email address of the buyer. - **coupon** (string) - Optional - A discount coupon. Configured in the shop settings under 'Coupons'. - **success_url** (string) - Optional - The URL to redirect the client to after a successful payment. #### Headers - **Shop-Key** (string) - Required - The unique shop key. ### Request Example (No request body example provided for GET request) ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **response** (object) - Contains the payment details and the generated URL. - **url** (string) - The payment link. - **payment** (object) - Details about the created payment. - **id** (integer) - Payment ID. - **customer** (string) - Buyer's nickname. - **email** (string|null) - Buyer's email. - **server_id** (integer) - Server ID. - **payment_type** (boolean) - Payment type. - **shop_id** (integer) - Shop ID. - **updated_at** (string) - Timestamp of the last update. - **created_at** (string) - Timestamp of creation. - **enrolled** (float) - Enrolled amount. - **cost** (integer) - Payment cost. - **server** (object) - Server details. - **products** (array) - List of products included in the payment. #### Response Example ```json { "success": true, "response": { "url": "https://pay.easydonate.ru/EFgesFE", "payment": { "id": 118305, "customer": "DontFollow", "email": null, "server_id": 64336, "payment_type": false, "shop_id": 531, "updated_at": "2021-04-20 23:24:12", "created_at": "2021-04-20 23:24:12", "enrolled": 0.97, "cost": 1, "server": { "id": 64336, "name": "Выживание", "ip": "127.0.0.1", "port": "25565", "version": "", "is_port_hidden": 0, "hide_ip": 0, "is_hidden": 0, "shop_id": 531, "created_at": "2021-02-22 17:44:47", "updated_at": "2021-04-20 23:19:31" }, "products": [ { "id": 121620, "product_id": 6074, "name": "Алмазный меч", "price": 1, "old_price": null, "type": "item", "number": 1, "commands": [ "give {user} 276 {amount}" ], "additional_fields": null, "description": null, "payment_id": 118305, "amount": 1, "image": "http://cp.easydonate.ru/storage/app/media/Diamond%20Sword-min.png", "first_delete": 0, "created_at": "2021-04-20 23:24:12", "updated_at": "2021-04-20 23:24:12" } ] } } } ``` #### Error Response (404) - **success** (boolean) - Indicates if the request was successful. - **response** (string) - Error message. - **error_code** (integer) - Error code. #### Error Response Example ```json { "success": false, "response": "Товар с ID 6074 не найден в магазине.", "error_code": 2 } ``` ```