{"_id":"56326ea0df556c0d00cd08ed","editedParams":true,"editedParams2":true,"category":{"_id":"56326e9ddf556c0d00cd08d0","__v":2,"pages":["56326ea0df556c0d00cd08ec","56326ea0df556c0d00cd08ed","56e92b441996862200fd7f2e"],"project":"544fc17e698ab40800b4f891","version":"56326e9cdf556c0d00cd08ca","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-01T05:42:12.353Z","from_sync":false,"order":5,"slug":"cash-out","title":"Cash Out"},"project":"544fc17e698ab40800b4f891","version":{"_id":"56326e9cdf556c0d00cd08ca","project":"544fc17e698ab40800b4f891","__v":2,"createdAt":"2015-10-29T19:08:12.724Z","releaseDate":"2015-10-29T19:08:12.724Z","categories":["56326e9ddf556c0d00cd08cb","56326e9ddf556c0d00cd08cc","56326e9ddf556c0d00cd08cd","56326e9ddf556c0d00cd08ce","56326e9ddf556c0d00cd08cf","56326e9ddf556c0d00cd08d0","56326e9ddf556c0d00cd08d1","56326e9ddf556c0d00cd08d2","56326e9ddf556c0d00cd08d3","56326e9ddf556c0d00cd08d4","56d942ac337fd11300d6a251"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"collector","version_clean":"2.1.0","version":"2.1"},"__v":2,"user":"544fc065698ab40800b4f888","parentDoc":null,"updates":["564499a87a8cb50d00a3ea54"],"next":{"pages":[],"description":""},"createdAt":"2015-05-01T07:48:26.510Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"python","code":"import requests\n\nTOKEN = 'YOUR TOKEN'\nurl = 'https://coins.ph/api/v2/sellorder'\n\nheaders = {\n    'Authorization': 'Bearer {}'.format(TOKEN),\n    'Accept': 'application/json'\n}\n\nrequests.get(url, headers=headers)","name":""}]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"{\n    \"order\": {\n        \"btc_amount\": \"0.025\",\n        \"btc_pending\": \"0\",\n        \"btc_received\": \"0.025\",\n        \"confirmation_code\": \"94d21\",\n        \"created_at\": \"1409206264\",\n        \"currency\": \"PHP\",\n        \"currency_amount\": \"2000\",\n        \"currency_fees\": \"0\",\n        \"currency_settled\": \"0\",\n        \"expires_epoch\": \"1409209864\",\n        \"fields\": {\n            \"bank_account_name\": \"User Name\",\n            \"bank_account_number\": \"1234\"\n        },\n        \"id\": \"1o2r3d4e5r\",\n        \"payment_outlet_id\": \"bdo\",\n        \"qr_img_uri\": \"https://example.com/chart?chl=bitcoin%x%3Famount%3D0.02500000&chs=400x400&cht=qr&choe=UTF-8&chld=L%7C0\",\n        \"status\": \"success\",\n        \"user_uri\": \"https://coins.ph/sellorder/1o2r3d4e5r\",\n        \"wallet_address\": \"13545sXfTsd\",\n        \"settlement_detail\": {\n            \"confirmation_code\": \"1f235a2\",\n            \"actual_deposit_amount\": 2000,\n            \"notes\": \"\", \n            \"type\": \"\",\n            \"delivered_by\": \"John Doe\"\n        },\n        \"settlements\": [{\n            \"currency\": \"PHP\", \n            \"amount\": \"2000\",\n            \"id\": \"53a22b3d6ffc40f6b3ca2df5676b5a78\",\n            \"settled_at\": \"1454401942\"\n        }],\n        \"payments\": [],\n        \"is_refunded\": false\n    },\n    \"success\": true\n}\n","name":""}]},"settings":"","auth":"required","params":[{"_id":"55432fca795b590d001dc871","ref":"","in":"path","required":false,"desc":"ID of a particular sell order to retrieve. Optional.","default":"","type":"string","name":"sell_order_id"}],"url":"/api/v2/sellorder/:sell_order_id"},"isReference":false,"order":1,"body":"A sellorder represents a cashout, wherein users can send their details and their preferred cashout option.\n\n## Lifecycle of a cash out\n\nA cash out undergoes several phases before cash is delivered to the recipient. The first stage is sending funds to coins. At this stage, a sender sends funds to coins to fund the cash out. Once the funds are received by coins, the cash out will proceed to a delivery stage. Finally, a cash out may either have a successful delivery or a failed delivery. In the event of a failed delivery, funds will be refunded back to the sender.\n\n### Sending funds to Coins\n\nA cash out can be paid for by the sender by using either one of these methods\n\n* BTC transfer - A sender is allowed to use an external BTC wallet to pay for a cash out. Doing so requires at least 2 confirmations from the blockchain before the payment is marked as successfully received.\n* Coins wallet - A sender that has a coins account may opt to pay for the cash out using one of their available wallets. Currently, coins.ph users have both PHP and BTC wallets, while coins.co.th users have BTC wallets. All coins wallets are supported for paying for a cash out.\n\nThe `status` property of a cash out shows whether the funds from the sender are already received by coins. It may have one of the three following values:\n\n* **pending** - The payment is yet to be received from the sender.\n* **success** - Payment for the cash out was successfully received by coins.\n* **failed** - The maximum allowed time window to pay for the cash out has been reached. A cash out with a `failed` status is already expired and any funds sent to pay for the cash out will no longer transition the payment status.\n\nAside from `status`, the received payments can also be seen in the `payments` property, which is an array of all the payments received for the cash out. A payment has the following properties:\n\n* **transaction_type** - Indicates whether the payment was from an external `blockchain` transaction, or an `internal` Coins transaction. Examples of `blockchain` payments are those settled with an external service, while examples of `internal` transactions are those settled with a Coins wallet.\n* **transaction_ref** - Contains the transaction ID for `blockchain` payments. For `internal` payments, it contains the [payment ID](doc:crypto-payments).\n\n### Delivery\n\nA successfully delivered cash out may have claiming details in order for the recipient to receive the funds. For example, pawnshops require the recipient to present a claiming number, and the name of the person who delivered the funds. This information can be found at the `settlement_detail` of a cash out. Additionally, settlement history can be found at the `settlements` array of a cash out. Settlements are representations of payment/s made by coins to the recipient of a cash out.\n\n#### settlement_detail\n\nCash out options that require claiming details will have this property filled up. For cash out options that do not require claiming details (ie. `bank`), this will usually be empty.\n\n* **actual_deposit_amount** - The amount that the recipient will receive with fees already deducted, if any.\n* **confirmation_code** -  A claiming code which the recipient needs to present to the pick up option in order to claim funds from the cash out.\n* **delivered_by** - Name of the person who delivered the cash out to a pick up option. This is usually required by pawnshops.\n*  **notes** - Additional notes that a recipient may need to know in order to claim funds from the cash out.\n\n#### settlements\n\nThis array contains the history of settlements made by coins to the recipient. A settlement object has the following properties:\n\n* **currency** - ISO 4217 currency code of the settlement's amount.\n* **amount** - The amount delivered by coins for the recipient.\n* **id** - The settlement's unique identifier.\n* **settled_at** - Date when the payment has been delivered in unix epoch.\n\n### Refund\n\nIt is possible that a cash out may fail delivery. For example, a pick up outlet may reject a cash out if the provided details are incorrect (ie. the given recipient address does not match the recipient's ID, etc.). Payment made for these cash outs will then be refunded back to the sender. Our operations and support team will then contact the sender to tell them the reason why the cash out needed to be refunded.\n\n* **is_refunded** - A property of the cash out which denotes whether the cash out has been refunded or not.","excerpt":"Retrieve an existing sellorder","slug":"retrieve-sellorder","type":"endpoint","title":"sellorder"}

getsellorder

Retrieve an existing sellorder

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

sell_order_id:
string
ID of a particular sell order to retrieve. Optional.

Examples


Result Format


Documentation

A sellorder represents a cashout, wherein users can send their details and their preferred cashout option. ## Lifecycle of a cash out A cash out undergoes several phases before cash is delivered to the recipient. The first stage is sending funds to coins. At this stage, a sender sends funds to coins to fund the cash out. Once the funds are received by coins, the cash out will proceed to a delivery stage. Finally, a cash out may either have a successful delivery or a failed delivery. In the event of a failed delivery, funds will be refunded back to the sender. ### Sending funds to Coins A cash out can be paid for by the sender by using either one of these methods * BTC transfer - A sender is allowed to use an external BTC wallet to pay for a cash out. Doing so requires at least 2 confirmations from the blockchain before the payment is marked as successfully received. * Coins wallet - A sender that has a coins account may opt to pay for the cash out using one of their available wallets. Currently, coins.ph users have both PHP and BTC wallets, while coins.co.th users have BTC wallets. All coins wallets are supported for paying for a cash out. The `status` property of a cash out shows whether the funds from the sender are already received by coins. It may have one of the three following values: * **pending** - The payment is yet to be received from the sender. * **success** - Payment for the cash out was successfully received by coins. * **failed** - The maximum allowed time window to pay for the cash out has been reached. A cash out with a `failed` status is already expired and any funds sent to pay for the cash out will no longer transition the payment status. Aside from `status`, the received payments can also be seen in the `payments` property, which is an array of all the payments received for the cash out. A payment has the following properties: * **transaction_type** - Indicates whether the payment was from an external `blockchain` transaction, or an `internal` Coins transaction. Examples of `blockchain` payments are those settled with an external service, while examples of `internal` transactions are those settled with a Coins wallet. * **transaction_ref** - Contains the transaction ID for `blockchain` payments. For `internal` payments, it contains the [payment ID](doc:crypto-payments). ### Delivery A successfully delivered cash out may have claiming details in order for the recipient to receive the funds. For example, pawnshops require the recipient to present a claiming number, and the name of the person who delivered the funds. This information can be found at the `settlement_detail` of a cash out. Additionally, settlement history can be found at the `settlements` array of a cash out. Settlements are representations of payment/s made by coins to the recipient of a cash out. #### settlement_detail Cash out options that require claiming details will have this property filled up. For cash out options that do not require claiming details (ie. `bank`), this will usually be empty. * **actual_deposit_amount** - The amount that the recipient will receive with fees already deducted, if any. * **confirmation_code** - A claiming code which the recipient needs to present to the pick up option in order to claim funds from the cash out. * **delivered_by** - Name of the person who delivered the cash out to a pick up option. This is usually required by pawnshops. * **notes** - Additional notes that a recipient may need to know in order to claim funds from the cash out. #### settlements This array contains the history of settlements made by coins to the recipient. A settlement object has the following properties: * **currency** - ISO 4217 currency code of the settlement's amount. * **amount** - The amount delivered by coins for the recipient. * **id** - The settlement's unique identifier. * **settled_at** - Date when the payment has been delivered in unix epoch. ### Refund It is possible that a cash out may fail delivery. For example, a pick up outlet may reject a cash out if the provided details are incorrect (ie. the given recipient address does not match the recipient's ID, etc.). Payment made for these cash outs will then be refunded back to the sender. Our operations and support team will then contact the sender to tell them the reason why the cash out needed to be refunded. * **is_refunded** - A property of the cash out which denotes whether the cash out has been refunded or not.