### Get Balance Source: https://plisio.net/documentation/index Example of how to retrieve account balance information from the Plisio API. ```APIDOC ## GET /balance ### Description This endpoint retrieves the current balance for a specific currency. ### Method GET ### Endpoint `https://api.plisio.net/api/v1/balance` ### Query Parameters - **api_key** (string) - Required - Your SECRET_KEY for authentication. - **currency** (string) - Optional - The currency for which to retrieve the balance (e.g., 'BTC'). If not provided, it might return a default or all balances. ### Request Example ```bash curl -v -X GET https://api.plisio.net/api/v1/balance?api_key=¤cy=BTC ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request ('success' or 'error'). - **data** (object) - Contains the balance information. - **currency** (string) - The currency code. - **balance** (string) - The available balance. #### Response Example ```json { "status": "success", "data": { "currency": "BTC", "balance": "0.03351057" } } ``` ``` -------------------------------- ### Example GET API Request with Parameters (curl) Source: https://plisio.net/documentation/getting-started/introduction This example demonstrates how to make a GET request to the Plisio API to list transactions or invoices. It includes the API key for authentication and optional parameters for pagination (page and page_size). The '-H "Content-Type: application/json"' header ensures the request is properly formatted. ```curl curl -v -X GET https://api.plisio.net/api/v1/operations\ ?api_key=\ &page=3\ &page_size=4 \ -H "Content-Type: application/json" ``` -------------------------------- ### Create Invoice via cURL Request Source: https://plisio.net/documentation/endpoints/create-an-invoice Example of creating an invoice using a GET request with cURL. This request includes various parameters to define the invoice details such as currency, amount, order information, callback URLs, and the essential API key. ```bash curl --location --request GET https://api.plisio.net/api/v1/invoices/new \ ?source_currency=USD \ &source_amount=2 \ &order_number=1 \ ¤cy=BTC \ &email=customer@plisio.net \ &order_name=btc1 \ &callback_url=http://test.com/callback \ &api_key=SECRET_KEY ``` -------------------------------- ### Get Specific Crypto Coin Rate (cURL) Source: https://plisio.net/documentation/endpoints/crypto-coins This example shows how to query the Plisio API for specific cryptocurrency details, such as the USD rate for Bitcoin. It utilizes the cURL command to send a GET request with the desired currency code appended to the endpoint. The API returns a JSON object with the requested coin's information. ```bash curl --location --request GET "https://api.plisio.net/api/v1/currencies/USD?api_key=SECRET_KEY" ``` -------------------------------- ### Deposit Callback Payload Example (JSON) Source: https://plisio.net/documentation/endpoints/create-a-deposit An example of the JSON payload received when a 'pay_in' event occurs. This data is sent via POST to the configured Status URL and Success URL, optionally in JSON format if the URL includes `json=true`. ```json { "amount": "2.000000", "comment": "Invoice details: https://plisio.net/account/transactions/68da2...", "confirmations": "37", "currency": "USDT_TRX", "deposit_sum": "1.978000", "deposit_uid": "test8", "invoice_commission": "0.022000", "invoice_sum": "1.978000", "invoice_total_sum": "2.000000", "ipn_type": "pay_in", "merchant": "Test shop", "merchant_id": "5d09...", "pending_amount": "0.000000", "psys_cid": "USDT_TRX", "qr_code": "****", "source_amount": "1.978000", "source_currency": "USD", "source_rate": "0.999920", "status": "completed", "tx_urls": [ "https://tronscan.org/#/transaction/571a...", "https://tronscan.org/#/transaction/e4f3..." ], "txn_id": "68da23e93ee47b52a808af13", "wallet_hash": "TH3q...", "verify_hash": "f935032c5f78dfc93fcd36866657ec99907e83b8" } ``` -------------------------------- ### List Transactions/Invoices Source: https://plisio.net/documentation/index Example of how to list transactions or invoices using the Plisio API, including pagination parameters. ```APIDOC ## GET /operations ### Description This endpoint retrieves a list of transactions or invoices. It supports query parameters for pagination. ### Method GET ### Endpoint `https://api.plisio.net/api/v1/operations` ### Query Parameters - **api_key** (string) - Required - Your SECRET_KEY for authentication. - **page** (integer) - Optional - The page number to retrieve. - **page_size** (integer) - Optional - The number of items to return per page. ### Request Example ```bash curl -v -X GET https://api.plisio.net/api/v1/operations \ ?api_key= \ &page=3 \ &page_size=4 \ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request ('success' or 'error'). - **data** (object) - Contains the list of transactions/invoices. #### Response Example ```json { "status": "success", "data": [ { "invoice_id": "inv_123", "amount": "10.50", "currency": "USD", "status": "paid" } // ... more items ] } ``` ``` -------------------------------- ### Error Response Example from Plisio API Source: https://plisio.net/documentation/endpoints/fee-plans This example illustrates an error response from the Plisio API, typically occurring when an unsupported currency attribute is provided. It includes the error status, name, a descriptive message, and an error code. ```json { "status": "error", "data": { "name": "Unprocessable entity", "message": "Unsupported currency attribute value: {\"currency\":\"BTCX\"}", "code": 105 } } ``` -------------------------------- ### Example API Balance Response (JSON) Source: https://plisio.net/documentation/getting-started/introduction This is a sample JSON response from the Plisio API, illustrating the structure for a balance inquiry. It includes a 'status' field indicating success or error, and a 'data' field containing the requested information, such as currency and balance. ```json { "status": "success", "data": { "currency": "BTC", "balance": "0.03351057" } } ``` -------------------------------- ### Plisio API Error Response Examples (JSON) Source: https://plisio.net/documentation/endpoints/create-a-deposit Examples of JSON error responses from the Plisio API. These demonstrate different error scenarios, including disabled white-label processing, resource not found, and validation errors with specific error codes. ```json { "status": "error", "data": { "message": "White-label payment processing is disabled for this shop. Please enable White-label payment processing in your shop settings to activate this feature.", "code": 400 } } ``` ```json { "status": "error", "data": { "message": "The specified resource does not exist", "code": 401 } } ``` ```json { "status": "error", "data": { "message": "{\"uid\":\"Missing required attribute\"}", "code": 103 } } ``` -------------------------------- ### Success Response Example for ETH Fee Plan Source: https://plisio.net/documentation/endpoints/fee-plans This is a successful response from the Plisio API when requesting the fee plan for Ethereum (ETH). It includes 'normal' and 'priority' fee details, specifying gasLimit, gasPrice, and the transaction value. ```json { "status": "success", "data": { "normal": { "gasLimit": "21000", "gasPrice": "44000000000" "value": "0.000924000000000000" }, "priority": { "gasLimit": "21000", "gasPrice": "44000000000" "value": "0.000924000000000000" } } } ``` -------------------------------- ### GET /api/v1/balances/{psys_cid} Source: https://plisio.net/documentation/endpoints/balance Retrieves the cryptocurrency balance for a specified currency ID. Requires your secret API key for authentication. ```APIDOC ## GET /api/v1/balances/{psys_cid} ### Description Retrieves the cryptocurrency balance for a specified currency ID. Requires your secret API key for authentication. ### Method GET ### Endpoint https://api.plisio.net/api/v1/balances/ ### Parameters #### Path Parameters - **psys_cid** (string) - Required - ID of the cryptocurrency for which to retrieve the balance. #### Query Parameters - **api_key** (string) - Required - Your secret API key. ### Request Example ```bash curl --location --request GET 'https://api.plisio.net/api/v1/balances/BTC?api_key=SECRET_KEY' ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request, should be 'success'. - **data** (object) - Contains the balance information. - **psys_cid** (string) - The currency ID. - **currency** (string) - The currency symbol. - **balance** (string) - The available balance for the currency. #### Response Example ```json { "status": "success", "data": { "psys_cid": "BTC", "currency": "BTC", "balance": "0.00110995" } } ``` #### Error Response (422, 500) - **status** (string) - Indicates the status of the request, should be 'error'. - **data** (object) - Contains error details. - **name** (string) - The name of the error. - **message** (string) - A description of the error. - **code** (integer) - An error code. #### Error Response Example ```json { "status": "error", "data": { "name": "Unprocessable entity", "message": "Unsupported currency attribute value: {\"currency\":\"BTCX\"}", "code": 105 } } ``` ``` -------------------------------- ### Get Cryptocurrency Balance with cURL Source: https://plisio.net/documentation/endpoints/balance This snippet demonstrates how to retrieve the cryptocurrency balance for a specified currency using a GET request with cURL. It requires your secret API key and the currency's Plisio system ID (psys_cid). Ensure your request IP is configured for correct operation. ```bash curl --location --request GET "https://api.plisio.net/api/v1/balances/BTC?api_key=SECRET_KEY" ``` -------------------------------- ### GET /operations - List Transactions/Invoices Source: https://plisio.net/documentation/getting-started/introduction Retrieves a list of transactions or invoices, with options to paginate and filter the results. ```APIDOC ## GET /operations - List Transactions/Invoices ### Description This endpoint allows you to retrieve a list of transactions or invoices. You can use query parameters to control pagination and sorting of the results. ### Method GET ### Endpoint `https://api.plisio.net/api/v1/operations` ### Query Parameters - **api_key** (string) - Required - Your secret API key. - **page** (integer) - Optional - The page number for pagination. - **page_size** (integer) - Optional - The number of items to return per page. ### Request Example ```bash curl -v -X GET https://api.plisio.net/api/v1/operations \ ?api_key= \ &page=3 \ &page_size=4 \ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **status** (string) - The status of the request ('success' or 'error'). - **data** (object) - Contains the list of transactions/invoices. #### Response Example ```json { "status": "success", "data": [ { "id": "inv_123", "amount": "100.00", "currency": "USD", "status": "paid" } ] } ``` ``` -------------------------------- ### Success Response Example for BTC Fee Plan Source: https://plisio.net/documentation/endpoints/fee-plans This is a successful response from the Plisio API when requesting the fee plan for a cryptocurrency like Bitcoin (BTC). It details the 'normal' and 'priority' fee values, represented as a numerical value. ```json { "status": "success", "data": { "normal": { "conf_target": 0, "value": 0.000222 }, "priority": { "conf_target": 2, "value": 0.000444 } } } ``` -------------------------------- ### Estimate Fee using cURL Source: https://plisio.net/documentation/endpoints/fee-estimation Example cURL request to estimate transaction fees for a specific cryptocurrency. Requires currency, wallet address, amount, and your secret API key. The fee plan can also be specified. ```bash curl --location --request GET https://api.plisio.net/api/v1/operations/fee/BTC \ --data-urlencode "addresses=2N2m6XRwR8shANBwFTgCGwYtkkf6uFi6XJW" \ --data-urlencode "amounts=0.002" \ --data-urlencode "api_key=SECRET_KEY" ``` -------------------------------- ### GET /api/v1/currencies/{currency_code} Source: https://plisio.net/documentation/endpoints/crypto-coins Retrieve specific cryptocurrency rates in USD by providing the currency code. ```APIDOC ## GET /api/v1/currencies/{currency_code} ### Description Retrieve specific cryptocurrency rates in USD by providing the currency code. For correct service operation, it is necessary to set the Request IP. ### Method GET ### Endpoint `https://api.plisio.net/api/v1/currencies/USD?api_key=SECRET_KEY` ### Path Parameters - **currency_code** (string) - Required - The currency code for which to retrieve rates (e.g., 'USD'). ### Query Parameters - **api_key** (string) - Required - Your Plisio API key. ### Request Example ```json { "api_key": "SECRET_KEY" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation ('success' or 'error'). - **data** (array) - An array of currency objects matching the provided currency code. - **name** (string) - Currency name. - **cid** (string) - ID of the cryptocurrency. - **currency** (string) - Currency symbol. - **icon** (string) - URL of the currency icon. - **rate_usd** (string) - Exchange rate in USD. - **price_usd** (string) - Price in USD. - **precision** (string) - The number of decimal places for the currency. - **fiat** (string) - Fiat currency name. - **fiat_rate** (string) - Exchange rate in fiat currency. - **min_sum_in** (string) - Minimum input sum. - **invoice_commission_percentage** (string) - Commission percentage for invoices. - **hidden** (integer) - Indicates if the currency is hidden (0 or 1). - **maintenance** (boolean) - Indicates if the currency is under maintenance. #### Response Example ```json { "status": "success", "data": [ { "name": "Ethereum", "cid": "ETH", "currency": "ETH", "icon": "https://plisio.net/img/psys-icon/ETH.svg", "rate_usd": "0.001510773470747854", "price_usd": "661.91", "precision": "18", "fiat": "USD", "fiat_rate": "0.001512062377264748", "min_sum_in": "0.007", "invoice_commission_percentage": "1", "hidden": 0, "maintenance": false } ] } ``` #### Error Response (500) - **status** (string) - Indicates the error status ('error'). - **data** (object) - Contains error details. - **message** (string) - Error explanation. - **code** (integer) - Error code. #### Error Response Example ```json { "status": "error", "data": { "message": "Internal server error. Please contact Plisio support", "code": 108 } } ``` ``` -------------------------------- ### Plisio API: Single Withdrawal cURL Example Source: https://plisio.net/documentation/endpoints/withdrawal-mass-withdrawal This cURL command demonstrates how to initiate a single cryptocurrency withdrawal using the Plisio API. It requires specifying the currency, type (cash_out), destination wallet address, amount, and your secret API key. ```bash curl --location --request GET "https://api.plisio.net/api/v1/operations/withdraw" --data-urlencode "currency=BTC" --data-urlencode "type=cash_out" --data-urlencode "to=2N3cD7vQxBqmHFVFrgK2o7HonHnVoFxxDVB" --data-urlencode "amount=0.002" --data-urlencode "api_key=SECRET_KEY" ``` -------------------------------- ### GET /api/v1/currencies Source: https://plisio.net/documentation/endpoints/crypto-coins Retrieve a list of all supported cryptocurrency coins and their details, including rates in USD. ```APIDOC ## GET /api/v1/currencies ### Description Retrieve a list of all supported cryptocurrency coins and their details, including rates in USD. For correct service operation, it is necessary to set the Request IP. ### Method GET ### Endpoint `https://api.plisio.net/api/v1/currencies?api_key=SECRET_KEY` ### Query Parameters - **api_key** (string) - Required - Your Plisio API key. ### Request Example ```json { "api_key": "SECRET_KEY" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation ('success' or 'error'). - **data** (array) - An array of currency objects. - **name** (string) - Currency name. - **cid** (string) - ID of the cryptocurrency. - **currency** (string) - Currency symbol. - **icon** (string) - URL of the currency icon. - **rate_usd** (string) - Exchange rate in USD. - **price_usd** (string) - Price in USD. - **precision** (string) - The number of decimal places for the currency. - **fiat** (string) - Fiat currency name. - **fiat_rate** (string) - Exchange rate in fiat currency. - **min_sum_in** (string) - Minimum input sum. - **invoice_commission_percentage** (string) - Commission percentage for invoices. - **hidden** (integer) - Indicates if the currency is hidden (0 or 1). - **maintenance** (boolean) - Indicates if the currency is under maintenance. #### Response Example ```json { "status": "success", "data": [ { "name": "Ethereum", "cid": "ETH", "currency": "ETH", "icon": "https://plisio.net/img/psys-icon/ETH.svg", "rate_usd": "0.001510773470747854", "price_usd": "661.91", "precision": "18", "fiat": "USD", "fiat_rate": "0.001512062377264748", "min_sum_in": "0.007", "invoice_commission_percentage": "1", "hidden": 0, "maintenance": false }, { "name": "Bitcoin", "cid": "BTC", "currency": "BTC", "icon": "https://plisio.net/img/psys-icon/BTC.svg", "rate_usd": "0.00004404", "price_usd": "22701.97", "precision": "8", "fiat": "USD", "fiat_rate": "0.00004399", "min_sum_in": "0.0000001", "invoice_commission_percentage": "1", "hidden": 0, "maintenance": false } ] } ``` #### Error Response (500) - **status** (string) - Indicates the error status ('error'). - **data** (object) - Contains error details. - **message** (string) - Error explanation. - **code** (integer) - Error code. #### Error Response Example ```json { "status": "error", "data": { "message": "Internal server error. Please contact Plisio support", "code": 108 } } ``` ``` -------------------------------- ### Success Fee Estimation Response Source: https://plisio.net/documentation/endpoints/fee-estimation Example of a successful response when estimating transaction fees. It includes the calculated fee, the cryptocurrency, and the fee plan used. ```json { "status": "success", "data": { "fee": "0.00000775", "psys_cid": "BTC", "currency": "BTC", "plan": "normal" } } ``` -------------------------------- ### GET /api/v1/operations/fee-plan/{psys_cid} Source: https://plisio.net/documentation/endpoints/fee-plans Fetches the fee plan details for a given cryptocurrency ID. The response structure may vary based on the cryptocurrency type (e.g., Bitcoin vs. Ethereum). ```APIDOC ## GET /api/v1/operations/fee-plan/{psys_cid} ### Description Returns the model with fee plans by selected cryptocurrency. Also this model has additional fields according to the fee plan. Note: for the correct work of the service it is necessary to set Request IP. ### Method GET ### Endpoint `https://api.plisio.net/api/v1/operations/fee-plan/` ### Parameters #### Query Parameters - **api_key** (string) - Required - "Secret key" value from your API ยป Api settings page #### Path Parameters - **psys_cid** (string) - Required - ID of the cryptocurrency from the list of supported cryptocurrencies by Plisio ### Request Example ```json { "request": "curl --location --request GET \"https://api.plisio.net/api/v1/operations/fee-plan/BTC?api_key=SECRET_KEY\"" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the operation ('success' or 'error'). - **data** (object) - Contains the fee plan details. The structure of this object varies depending on the cryptocurrency. - **normal** (object) - Fee details for normal priority transactions. - **conf_target** (integer) - Target confirmation blocks (for some currencies). - **value** (string) - The fee value for the transaction. - **gasLimit** (string) - Gas limit for the transaction (for some currencies). - **gasPrice** (string) - Gas price for the transaction (for some currencies). - **priority** (object) - Fee details for priority transactions. - **conf_target** (integer) - Target confirmation blocks (for some currencies). - **value** (string) - The fee value for the transaction. - **gasLimit** (string) - Gas limit for the transaction (for some currencies). - **gasPrice** (string) - Gas price for the transaction (for some currencies). #### Response Example (BTC) ```json { "status": "success", "data": { "normal": { "conf_target": 0, "value": "0.000222" }, "priority": { "conf_target": 2, "value": "0.000444" } } } ``` #### Response Example (ETH) ```json { "status": "success", "data": { "normal": { "gasLimit": "21000", "gasPrice": "44000000000", "value": "0.000924000000000000" }, "priority": { "gasLimit": "21000", "gasPrice": "44000000000", "value": "0.000924000000000000" } } } ``` #### Error Response Example ```json { "status": "error", "data": { "name": "Unprocessable entity", "message": "Unsupported currency attribute value: {\"currency\":\"BTCX\"}", "code": 105 } } ``` #### Error Response Fields - **status** (string) - 'error' - **data.name** (string) - The name of the error. - **data.message** (string) - A detailed explanation of the error. - **data.code** (integer) - The error code. ``` -------------------------------- ### Plisio API Error Response Example Source: https://plisio.net/documentation/endpoints/transaction-details This snippet demonstrates a typical JSON error response from the Plisio API. It includes a status indicating an error and a data object containing specific error details such as the error name, a descriptive message, and a numerical error code. This structure helps in identifying and handling API errors programmatically. ```json { "status": "error", "data": { "name": "Not Found", "message": "The specified resource does not exist", "code": 111 } } ``` -------------------------------- ### Plisio API - General Information Source: https://plisio.net/documentation/getting-started/introduction Information about how to use the Plisio API, including the base URL, authentication requirements, and general request/response structure. ```APIDOC ## Plisio API - General Information ### Description This section provides general information about interacting with the Plisio API. All requests are made using the HTTP GET method and responses are returned in JSON format. You need to obtain a "SECRET_KEY" from your account settings to authenticate all API calls. ### Base URL `https://api.plisio.net/api/v1` ### Authentication All API requests require an `api_key` parameter with your "SECRET_KEY". ### Request Format Simple API calls follow this pattern: `https://api.plisio.net/api/v1/?api_key=` ### Query Parameters Optional query parameters can be used to filter, limit, and sort data in GET requests. ### Response Format API responses include an HTTP status code and a JSON body. The JSON body contains a `status` field ('success' or 'error'), a `data` field with the requested information, and potentially HATEOAS links. Sample balance response: ```json { "status": "success", "data": { "currency": "BTC", "balance": "0.03351057" } } ``` ``` -------------------------------- ### Plisio API Overview Source: https://plisio.net/documentation/index Information on how to interact with the Plisio API, including the base URL, authentication method, and request structure. ```APIDOC ## Plisio API General Information ### Description The Plisio API uses only the HTTP GET method and returns JSON format. All requests require a SECRET_KEY for authentication. ### Base URL `https://api.plisio.net/api/v1` ### Authentication Requests are authenticated using an `api_key` query parameter with your personal SECRET_KEY. ### Request Structure `https://api.plisio.net/api/v1/?api_key=` ### Query Parameters Optionally, you can include query parameters on GET calls to filter, limit, and sort data. ### API Response API calls return HTTP status codes and a JSON response body. The JSON body contains a `status` field (success or error) and a `data` field with the requested information. HATEOAS links may also be included for further navigation. ``` -------------------------------- ### GET /api/v1/operations/{id} Source: https://plisio.net/documentation/endpoints/transaction-details Retrieve details for a specific transaction using its unique ID. ```APIDOC ## GET /api/v1/operations/{id} ### Description This endpoint retrieves detailed information about a specific transaction using its unique identifier. ### Method GET ### Endpoint `https://api.plisio.net/api/v1/operations/` ### Parameters #### Query Parameters - **api_key** (string) - Required - Your unique "Secret key" obtained from your Plisio account. ### Request Example ```bash curl --location --request GET 'https://api.plisio.net/api/v1/operations/5ee210133f5a5e30771f0283?api_key=SECRET_KEY' ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the operation (e.g., "success"). - **data** (object) - Contains the transaction details. - **type** (string) - The type of transaction (e.g., "mass_cash_out", "cash_in"). - **status** (string) - The current status of the transaction (e.g., "completed", "pending"). - **confirmations** (integer) - Number of confirmations for the transaction. - **pending_sum** (number) - The sum of pending amounts. - **psys_cid** (string) - The payment system currency identifier. - **currency** (string) - The transaction currency. - **source_currency** (string) - The original currency of the transaction. - **source_rate** (string) - The exchange rate from the source currency. - **fee** (string) - The transaction fee. - **commissionPayment** (integer) - The commission payment value. - **commis_percent** (string) - The commission percentage. - **commis_sum** (string) - The total commission sum. - **status_code** (integer) - A numerical code representing the transaction status. - **memo** (string) - A descriptive memo for the transaction. - **sendmany** (object) - Details for 'sendmany' type transactions. - **params** (object) - Additional parameters for the transaction. - **fee** (object) - Fee-related parameters. - **conf_target** (integer) - Confirmation target for the fee. - **plan** (string) - The fee plan used. - **value** (string) - The fee value. - **tx** (array) - An array of transaction objects. - **txid** (string) - The transaction ID. - **value** (string) - The transaction value. - **block** (null) - Block information (currently null). - **processed** (boolean) - Indicates if the transaction has been processed. - **expire_at_utc** (null) - Expiration time in UTC (currently null). - **created_at_utc** (integer) - Timestamp when the transaction was created. - **amount** (string) - The transaction amount. - **tx_url** (string) - A URL to view the transaction on a block explorer. - **finished_at_utc** (null) - Timestamp when the transaction was finished (currently null). - **id** (string) - The unique ID of the operation. #### Response Example ```json { "status": "success", "data": { "type": "mass_cash_out", "status": "completed", "confirmations": 0, "pending_sum": 0, "psys_cid": "BTC", "currency": "BTC", "source_currency": "USD", "source_rate": "0.00010203", "fee": "0.00000288", "commissionPayment": 2, "commis_percent": "1", "commis_sum": "0.00000402", "status_code": 3, "memo": "mass_cash_out 0.00040690 with commission 1% (0.00000402) including normal fee plan (0.00000288)", "sendmany": { "2NAAdn1BiHuXgckPKmREfVc8WTX3U3N7Qo4": "0.00020000", "2N7cy1atVsNZhH6EuKE7HPseMSW5QbEEC6g": "0.00020000" }, "params": { "fee": { "conf_target": 3, "plan": "normal", "value": "0.00000288" } }, "tx": [ { "txid": "86b5ec4404d98b9bccaaa39630e01d49f6e5e76a97664bf18a4e0da800b9f949", "value": "0.00040000", "block": null, "processed": true } ], "expire_at_utc": null, "created_at_utc": 1591873548, "amount": "0.00040000", "tx_url": "https://sochain.com/resolver?query=86b5ec4404d98b9bccaaa39630e01d49f6e5e76a97664bf18a4e0da800b9f949", "finished_at_utc": null, "id": "5ee210133f5a5e30771f0283" } } ``` ``` -------------------------------- ### Get Transaction Details using cURL Source: https://plisio.net/documentation/endpoints/transaction-details This snippet demonstrates how to retrieve transaction details by sending a GET request to the Plisio API. It requires your unique SECRET_KEY and the transaction ID. Ensure the Request IP is correctly set for the service to function. ```shell curl --location --request GET 'https://api.plisio.net/api/v1/operations/5ee210133f5a5e30771f0283?api_key=SECRET_KEY' ``` -------------------------------- ### Verify Plisio Callback Data (PHP - Plisio Library) Source: https://plisio.net/documentation/endpoints/create-an-invoice This PHP code snippet demonstrates how to verify Plisio callback data using the official plisio/plisio-api-php Composer package. It initializes the Plisio client with your secret key and uses the `verifyCallbackData` method for validation. This is the recommended approach for its simplicity and robustness. ```php composer require plisio/plisio-api-php function verifyCallbackData () { $plisio = new PlisioClientAPI($secretKey); return $plisio->verifyCallbackData($_POST, $secretKey); } ``` -------------------------------- ### Success Response Example (JSON) Source: https://plisio.net/documentation/endpoints/crypto-coins This is a sample JSON response from the Plisio API when a request to retrieve cryptocurrency data is successful. It includes a 'status' field set to 'success' and a 'data' array containing objects for each supported cryptocurrency, detailing their name, ID, icons, rates, and other relevant information. ```json { "status": "success", "data": [ { "name": "Ethereum", "cid": "ETH", "currency": "ETH", "icon": "https://plisio.net/img/psys-icon/ETH.svg", "rate_usd": "0.001510773470747854", "price_usd": "661.91", "precision": "18", "fiat": "USD", "fiat_rate": "0.001512062377264748", "min_sum_in": "0.007", "invoice_commission_percentage": "1", "hidden": 0, "maintenance": false }, { "name": "Bitcoin", "cid": "BTC", "currency": "BTC", "icon": "https://plisio.net/img/psys-icon/BTC.svg", "rate_usd": "0.00004404", "price_usd": "22701.97", "precision": "8", "fiat": "USD", "fiat_rate": "0.00004399", "min_sum_in": "0.0000001", "invoice_commission_percentage": "1", "hidden": 0, "maintenance": false } ] } ``` -------------------------------- ### Get Supported Crypto Coins (cURL) Source: https://plisio.net/documentation/endpoints/crypto-coins This snippet demonstrates how to make a GET request to the Plisio API to retrieve a list of supported cryptocurrencies and their USD exchange rates. Ensure your Request IP is correctly set for the service to function. The response is a JSON object containing coin details. ```bash curl --location --request GET "https://api.plisio.net/api/v1/currencies?api_key=SECRET_KEY" ``` -------------------------------- ### GET /api/v1/operations/ Source: https://plisio.net/documentation/endpoints/transactions Retrieve a list of transactions with various filtering options. Requires an API key for authentication. ```APIDOC ## GET /api/v1/operations/ ### Description Retrieves a list of transactions. You can filter the results by various parameters to narrow down your search. ### Method GET ### Endpoint https://api.plisio.net/api/v1/operations/ ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number for pagination. - **limit** (integer) - Optional - Number of elements to display per page. - **shop_id** (string) - Optional - Filter operations by a specific shop ID. - **type** (string) - Optional - Filter by transaction type. Available values: `cash_in`, `cash_out`, `mass_cash_out`, `invoice`. - **status** (string) - Optional - Filter by transaction status. Available values: `new`, `pending`, `pending internal`, `expired`, `completed`, `mismatch`, `error`, `cancelled`. - **currency** (string) - Optional - Filter by currency. Use the ID of supported cryptocurrencies. - **search** (string) - Optional - Text search by transaction ID (`txid`), invoice order number, or customer email. - **api_key** (string) - Required - Your secret key obtained from Plisio API settings. ### Request Example ```json { "example": "curl --location --request GET 'https://api.plisio.net/api/v1/operations?api_key=SECRET_KEY&limit=10&status=completed'" } ``` ### Response #### Success Response (200) - **status** (string) - API response status. - **message** (string) - Message describing the result of the operation. - **data** (object) - Contains the list of transactions and pagination details. - **items** (array) - List of transaction objects. - **id** (string) - Transaction ID. - **order_id** (string) - Order ID associated with the transaction. - **type** (string) - Type of transaction. - **status** (string) - Current status of the transaction. - **amount** (number) - Amount of the transaction. - **currency** (string) - Currency of the transaction. - **created_at** (string) - Timestamp when the transaction was created. - **updated_at** (string) - Timestamp when the transaction was last updated. - **total** (integer) - Total number of transactions matching the query. - **limit** (integer) - The limit set for the number of items per page. - **page** (integer) - The current page number. - **pages** (integer) - Total number of pages available. #### Response Example ```json { "example": { "status": "success", "message": "", "data": { "items": [ { "id": "txn_abc123xyz", "order_id": "ORD-456", "type": "cash_in", "status": "completed", "amount": 100.50, "currency": "USD", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:05:00Z" } ], "total": 1, "limit": 10, "page": 1, "pages": 1 } } } ``` ```