{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v1/buyorder/:id","auth":"required","apiSetting":"5d1d8bb82d46d1004a02581d","examples":{"codes":[{"language":"python","code":"import requests\n\nTOKEN = 'YOUR TOKEN'\nurl = 'https://api.coins.asia/v1/buyorder/'\n\nheaders = {\n    'Authorization': 'Bearer {}'.format(TOKEN),\n    'Accept': 'application/json'\n}\n\nbody = json.dumps({\n    'payment_confirmation_code': '889143375651'\n})\n\nrequests.put(url, headers=headers, data=body)"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"order\": {\n        \"btc_amount\": \"0.025\",\n        \"btc_released\": \"0\",\n        \"canceled_time\": null,\n        \"created_at\": \"1409207466\",\n        \"currency_amount\": \"624\",\n        \"expiration_time\": \"1409211066\",\n        \"id\": \"1o2r3d4e5r\",\n        \"instructions\": \"Deposit to our BDO bank account for your cash-in\",\n        \"marked_paid_time\": 1409210044,\n        \"payment_method\": \"bdo_deposit\",\n        \"rate\": \"24489\",\n        \"status\": \"pending_payment\",\n        \"wallet_address\": \"kfkffh32432\"\n    },\n    \"success\": true\n}","name":""}]},"params":[{"name":"id","type":"string","default":"","desc":"Required. ID of the buy order to mark as paid.","required":false,"in":"path","ref":"","_id":"5d1d8dcaedba7200521425bb"},{"name":"payment_confirmation_code","type":"string","default":"","desc":"Optional. Update the buy order with the confirmation code from an outlet","required":false,"in":"body","ref":"","_id":"5d1d8dcaedba7200521425ba"}],"method":"put","settings":"5d2c16e9ab606a0056359c3c"},"next":{"description":"","pages":[]},"title":"buyorder","type":"endpoint","slug":"buyorder-put","excerpt":"Mark a buy order as paid","body":"## Properties\n\n* **btc_amount** - The amount of BTC transaction.\n* **btc_released** - If the buyorder is already processed, specifies the BTC amount released to the target account or address.\n* **canceled_time** - If the buyorder is canceled, specifies the time when it was cancelled.\n* **created_at** - Gives the time when the buyorder was created\n* **currency_amount** - The equivalent amount of the `btc_amount` in fiat, based on the rate when the order was created.\n* **expiration_time** - Gives the time the buyorder will be canceled if unpaid.\n* **id** - A unique identifier for the buyorder.\n* **instructions** - Information on how to pay the buyorder.\n* **marked_paid_time** - Specifies the time when the user marked the buyorder as paid.\n* **payment_method** - The [payin-outlet](doc:payin-outlets) used to pay for the buyorder.\n* **rate** - BTC->Fiat exchange rate at the time when the buyorder was created.\n* **status** - Specifies whether the order is `released`, `payment_received`, `canceled`, or `escrow_expired`.\n* **wallet_address** - The BTC wallet address where the funds will be `released` after the buyorder is fulfille\n\nThis endpoint notifies the service that the cash in is already paid for. It is required that buy orders are marked as paid if they are actually paid before the expiration time. Once a buy order is already expired, it cannot be marked as paid.\n\nPaid buy orders that are not marked as paid will not be processed. Sometimes, a buy order is paid by a customer, and then the customer forgets to mark the cash in as paid. We can still process the order by sending a support request at the regional support channels.\n\nA `PUT` to the `buyorder` endpoint will mark the buy order as paid. The request body should be empty.","updates":[],"order":2,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5d1d8dcaedba7200521425b9","version":{"version":"2.1","version_clean":"2.1.0","codename":"collector","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["56326e9ddf556c0d00cd08cb","56326e9ddf556c0d00cd08cc","56326e9ddf556c0d00cd08cd","56326e9ddf556c0d00cd08ce","56326e9ddf556c0d00cd08cf","56326e9ddf556c0d00cd08d0","56326e9ddf556c0d00cd08d1","56326e9ddf556c0d00cd08d2","56326e9ddf556c0d00cd08d3","56326e9ddf556c0d00cd08d4","56d942ac337fd11300d6a251","5ab2fcf66a1d77001230b47e","5afc2943bd2ef4000330bca7","5d1d87419a969a00141c6b4c","5d1d8948ef26b2002c6468d1","5d1d8afe7b2b24005bec7de0","5d1d8b24f5cfcb00201490bb","5d1d8bb82d46d1004a02581f","5d1d8de1e4edb0019ed63acd","5d1d8f6b613fb90050d0d3e0","5d1d934ed377870191039d28","5d1d99810b2e4600500eb5ff","5d1da14e613fb90050d0d491","5d229a846cf323005a7fa998","5d229a8c8abf65001cc4768d","5d229a9494b856002e26b6e1","5d229a9bf77bb900507ccb04","5d229aa88abf65001cc4768e","5d24310a9ca8c80054786177","5d24359101cc3a00508e7482","5d24418fa791b20050733b32"],"_id":"56326e9cdf556c0d00cd08ca","project":"544fc17e698ab40800b4f891","releaseDate":"2015-10-29T19:08:12.724Z","__v":22,"createdAt":"2015-10-29T19:08:12.724Z"},"updatedAt":"2019-07-04T07:56:23.224Z","createdAt":"2019-07-04T05:25:30.118Z","project":"544fc17e698ab40800b4f891","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Cash In","slug":"cash-in-1","order":5,"from_sync":false,"reference":true,"_id":"5d1d8bb82d46d1004a02581f","project":"544fc17e698ab40800b4f891","version":"56326e9cdf556c0d00cd08ca","apiSetting":"5d1d8bb82d46d1004a02581d","isAPI":true,"createdAt":"2019-07-04T05:16:40.670Z","__v":0},"user":"5d19a189b4596f0072f571d4","__v":6,"parentDoc":null}

putbuyorder

Mark a buy order as paid

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
string
Required. ID of the buy order to mark as paid.

Body Params

payment_confirmation_code:
string
Optional. Update the buy order with the confirmation code from an outlet

Examples


Result Format


Documentation

## Properties * **btc_amount** - The amount of BTC transaction. * **btc_released** - If the buyorder is already processed, specifies the BTC amount released to the target account or address. * **canceled_time** - If the buyorder is canceled, specifies the time when it was cancelled. * **created_at** - Gives the time when the buyorder was created * **currency_amount** - The equivalent amount of the `btc_amount` in fiat, based on the rate when the order was created. * **expiration_time** - Gives the time the buyorder will be canceled if unpaid. * **id** - A unique identifier for the buyorder. * **instructions** - Information on how to pay the buyorder. * **marked_paid_time** - Specifies the time when the user marked the buyorder as paid. * **payment_method** - The [payin-outlet](doc:payin-outlets) used to pay for the buyorder. * **rate** - BTC->Fiat exchange rate at the time when the buyorder was created. * **status** - Specifies whether the order is `released`, `payment_received`, `canceled`, or `escrow_expired`. * **wallet_address** - The BTC wallet address where the funds will be `released` after the buyorder is fulfille This endpoint notifies the service that the cash in is already paid for. It is required that buy orders are marked as paid if they are actually paid before the expiration time. Once a buy order is already expired, it cannot be marked as paid. Paid buy orders that are not marked as paid will not be processed. Sometimes, a buy order is paid by a customer, and then the customer forgets to mark the cash in as paid. We can still process the order by sending a support request at the regional support channels. A `PUT` to the `buyorder` endpoint will mark the buy order as paid. The request body should be empty.