Transactions
1. Create your website and get the SECRET_KEY. Instruction can be found here.
2. Send the “GET” request to get transaction details.
Note: for the correct work of the service it is necessary to set Request IP
Endpoint:
https://api.plisio.net/api/v1/operations/cURL request example:
curl --location --request GET https://api.plisio.net/api/v1/operations?api_key=SECRET_KEYList of all supported request fields:
| Field | Description |
|---|---|
page | Page number |
limit | Number of elements on the page |
shop_id | Filter operation by shop |
type | Transaction type (Available values : cash_in, cash_out, mass_cash_out, invoice) |
status | new - initial invoice statuspending - some amount received and waiting for confirmationspending internal - moving invoice money to user wallet has been initiatedexpired - look for the “amount” field to verify payment. The full amount may not have been paid.completed - paid in fullmismatch - overpaiderror - some error has occurredcancelled - no payment received within 10 hours |
currency | one of the cryptocurrencies supported by Plisio (ID column from supported cryptocurrencies) |
search | text search by the transaction id (txid), invoice’s order number or customer email from invoice |
| api_key* | “Secret key” value from your API » Api settings page |
* - required
Success response example:
{ "status": "success", "data": { "operations": [ { "user_id": 1, "shop_id": "607sdw35f4ee4a2b7t", "type": "invoice", "status": "completed", "tx_url": [ "https://etherscan.io/tx/0x0000000000", "https://etherscan.io/tx/0x0000000000" ], "id": "1000000" }, { "user_id": 1, "shop_id": null, "type": "cash_in", "status": "completed", "pending_sum": "0.00000000", "psys_cid": "BTC", "currency": "BTC", "source_currency": "USD", "source_rate": "0.00010216", "fee": null, "wallet_hash": "0x0000000000", "sendmany": null, "params": { "value": "0.00225754", "currency": "BTC" }, "expire_at_utc": null, "created_at_utc": 1563529570, "amount": "0.00014243", "sum": 0.00014243, "commission": null, "tx_url": null, "tx_id": null, "id": "1000001" "actual_sum": 0.00014243, "actual_commission": null, "actual_fee": null, "actual_invoice_sum": null, "status_code": 3 }, { "user_id": 1, "shop_id": null, "type": "cash_out", "status": "completed", "pending_sum": "0.00000000", "psys_cid": "ETH-TESTNET", "currency": "TETH", "source_currency": "USD", "source_rate": "0.000216542551694120", "fee": "0.00952", "wallet_hash": "0x00000000001", "sendmany": null, "params": { "fee": { "gasLimit": "80000", "gasPrice": "119", "nonce": "", "dynamicField": "gasPrice", "plan": "normal", "unit": "Gwai", "value": "0.00952" }, "source_currency": "USD", "source_rate": "0.000216542551694120" }, "expire_at_utc": null, "created_at_utc": 1639734963, "amount": "0.017948510338824132", "sum": "0.027468510338824132", "commission": "0.000000000000000000", "tx_url": "https://ropsten.etherscan.io/tx/0x00000000001", "tx_id": [ "0x00000000001" ], "id": "100000000000000000000002" "actual_sum": "0.017948510338824132", "actual_commission": null, "actual_fee": 0, "actual_invoice_sum": null, "status_code": 3, "tx": [ { "url": "https://ropsten.etherscan.io/tx/0x00000000001", "wallet_hash": [ "0x00000000001" ] } ] }, ..... ], "_links": { "self": { "href": "https://api.plisio.net/api/v1/operations?api_key=...&page=1&per-page=10" }, "first": { "href": "https://plisio.net/api/v1/operations?api_key=...&page=1&per-page=10" }, "last": { "href": "https://plisio.net/api/v1/operations?api_key=...&page=157&per-page=10" }, "next": { "href": "https://plisio.net/api/v1/operations?api_key=...&page=2&per-page=10" } }, "_meta": { "totalCount": 156, "pageCount": 15, "currentPage": 1, "perPage": 10 } }}HTTP response status code: 200
Success response:
| Field | Description |
|---|---|
status | success |
user_id | Profile ID |
shop_id | Shop ID |
type | cash_in, cash_out, mass_cash_out, invoice |
status | pending, completed, error, new, expired, mismatch, cancelled |
tx_url | link to the cryptocurrency block explorer |
id | Operation ID |
White-label additional data:
A broader set of data fields will be returned in the response only after you activate the White-label functionality in your store.
| Field | Description |
|---|---|
pending_sum | Unconfirmed amount (mempool) |
psys_cid | ID column from supported cryptocurrencies |
currency | Code of the cryptocurrency (supported cryptocurrencies) |
source_currency | Fiat currency - USD by default or source_currency was set (See Code-column from supported fiat currencies) |
source_rate | Exchange rate from the "cryptocurrency"(psys_cid) to the "source_currency" at the moment of transfer |
fee | Transaction fee set in the transfer |
wallet_hash | Destination hash (type=cash_out) or invoice hash |
sendmany | Pairs of hashes and values (type=mass_cash_out) |
expire_at_utc | Timestamp in UTC timezone; it may need to be divided by 1000 |
created_at_utc | Timestamp in the UTC timezone; it may need to be divided by 1000 |
amount | Amount received/transferred by an operation (invoice, cash-in/cash-out) |
sum | - invoice: params.amount + Plisio commission (if customer pays commission) or params.amount (if merchant pays commission)- cash-out: transfer amount + network fee- cash-in: received amount |
commission | Plisio commission |
tx_id | Array of transaction ids |
parent_id | The ID of the original invoice |
child_ids | An array containing the IDs of all duplicate (child) invoices created from the original. |
| params | |
params.fee | “conf_target” - estimated fee parameter to confirm the transaction in the “conf_target” blocksplan - the Plisio’s fee plan namevalue - fee value (cash-out, mass-cash-out) |
params.order_number | Invoice order number. It must be unique in your store (invoice) |
params.order_name | Order name (invoice) |
params.description | Order description (invoice) |
params.source_amount | Invoice amount in fiat currency (invoice) |
params.source_currency | Fiat currency (See Code-column from supported fiat currencies) |
params.source_rate | Exchange rate from the "cryptocurrency"; to the "source_currency" at the moment of transfer |
params.currency | Name of the cryptocurrency (supported cryptocurrencies) |
params.amount | Invoice amount in selected cryptocurrency (invoice) |
Error response example:
{
"status": "error",
"data": {
"name": "Not Found",
"message": "The specified resource does not exist",
"code": 111
}
}HTTP error response status codes: 401, 500
Error response:
| Field | Description |
|---|---|
status | error |
data.name | error name |
data.message | error explanation |
data.code | error code |