{"info":{"_postman_id":"d9dcd98d-0ccb-4a18-8aba-425efcc92aee","name":"Pocket REST API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Webhook Events","item":[{"name":"exchange.executed","id":"ea88a2fb-2fd4-4e52-9bf3-115567125f21","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"exchange.executed\",\n  \"payload\": {\n    \"exchange_id\": \"a2d75998-5ee5-4501-a4cf-4e3788732b7a\",\n    \"order_id\": \"64decab6-4129-4fe7-9f6e-1db68283f5ce\",\n    \"fee_rate\": 0.015,\n    \"pair\": \"btc/chf\",\n    \"type\": \"buy\",\n    \"cost\": 100.00,\n    \"executed_on\": \"2021-09-15T14:35:10.122Z\",\n    \"amount\": 0.00197000,\n    \"rate\": 50000.00,\n    \"fee\": 1.50,\n    \"welcomeReward\": null,\n    \"action\": null,\n    \"reason\": null,\n    \"payout\": null\n  }\n}","options":{"raw":{"language":"json"}}},"url":"{{webhook_url}}"},"response":[]},{"name":"exchange.interrupted","id":"8526e2e8-a7ce-4ffa-af23-2abfa97a9a4d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"exchange.interrupted\",\n  \"payload\": {\n    \"exchange_id\": \"a2d75998-5ee5-4501-a4cf-4e3788732b7a\",\n    \"order_id\": \"64decab6-4129-4fe7-9f6e-1db68283f5ce\",\n    \"fee_rate\": 0.015,\n    \"pair\": \"btc/chf\",\n    \"type\": \"buy\",\n    \"cost\": 100.00,\n    \"executed_on\": null,\n    \"amount\": null,\n    \"rate\": null,\n    \"fee\": null,\n\t\t\"welcomeReward\": null,\n    \"action\": {\n      \"code\": \"identify\",\n      \"url\": \"https://portal.pocketbitcoin.com/de/onboarding\"\n    },\n    \"reason\": {\n      \"code\":\"identification_required\"\n    },\n    \"payout\": null\n  }\n}","options":{"raw":{"language":"json"}}},"url":"{{webhook_url}}"},"response":[]},{"name":"exchange.refunded","id":"99bbeaaf-2cfc-4a0e-8a21-356fa255ece8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"exchange.refunded\",\n  \"payload\": {\n    \"exchange_id\": \"a2d75998-5ee5-4501-a4cf-4e3788732b7a\",\n    \"order_id\": \"64decab6-4129-4fe7-9f6e-1db68283f5ce\",\n    \"fee_rate\": 0.015,\n    \"pair\": \"btc/chf\",\n    \"type\": \"buy\",\n    \"cost\": 100.00,\n    \"executed_on\": null,\n    \"amount\": null,\n    \"rate\": null,\n    \"fee\": null,\n\t\t\"welcomeReward\": null,\n    \"action\": null,\n    \"reason\": {\n      \"code\": \"threshold_exceeded\"\n    },\n    \"payout\": null\n  }\n}\n","options":{"raw":{"language":"json"}}},"url":"{{webhook_url}}"},"response":[]},{"name":"exchange.settled","id":"6c7bff00-9442-4711-a26e-d1b11a26078e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"exchange.settled\",\n  \"payload\": {\n    \"exchange_id\": \"a2d75998-5ee5-4501-a4cf-4e3788732b7a\",\n    \"order_id\": \"64decab6-4129-4fe7-9f6e-1db68283f5ce\",\n    \"fee_rate\": 0.015,\n    \"pair\": \"btc/chf\",\n    \"type\": \"buy\",\n    \"cost\": 100.00,\n    \"executed_on\": \"2021-09-15T14:35:10.122Z\",\n    \"amount\": 0.00197000,\n    \"rate\": 50000.00,\n    \"fee\": 1.50,\n    \"welcomeReward\": null,\n    \"action\": null,\n    \"reason\": null,\n    \"payout\": {\n      \"type\": \"coin\",\n      \"txid\": \"c01c7a0fd270aa3876119098c0e2d51687a795efab99787e214d8a93ab9f8342\",\n      \"outpoint\": 1,\n      \"bitcoin_address\": \"bc1q5vvayqt3n4alhjaxy6ql4w2fs6r0y83rmvh3tg\",\n      \"derivation_path\": null,\n      \"block_height\": null,\n      \"confirmations\": 0,\n      \"fee\": 0.00000190,\n      \"amount\": 0.0019681\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"{{webhook_url}}"},"response":[]}],"id":"7da604b3-ac9f-44f0-bb39-35219dccd099"},{"name":"REST v1","item":[{"name":"/v1/orders (by use case)","item":[{"name":"buy on-chain","id":"43704feb-093b-4c84-942a-5378ebe7630a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"type\": \"buy\",\n    \"active\": true,\n    \"fee_rate\": 0.015,\n    \"payment_method\": {\n        \"currency\": \"chf\",\n        \"debitor_iban\": \"DE75512108001245126199\"\n    },\n    \"payout_method\": {\n        \"bitcoin_address\": \"1JdqqnLf2pwe9rFfypXLnvM3HHnzXvX6Ff\",\n        \"message\": \"I confirm my bitcoin wallet. [0ujxLZKL]\",\n        \"signature\": \"H2nRx8bDDJkRnItM2eGM+E16hScjzYEityz/h/kPalIyVZAerBgqOWbDJRL6hoyepyDok37Z61rCAsRywB11DZ0=\",\n        \"extended_public_key\": \"xpub6DCExyUSpY4ik5XY2qYyHEKjtw9fizbqRT13gYxibJw7ngLpNeukXef1fjUC2qnrHqcZbM112Wj4xwCKraSx9KJui23rP5GfBTySrQQGyT9\",\n        \"derivation_path\": \"0/1\",\n        \"gap_limit\": null\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/orders"},"response":[]},{"name":"buy lightning","id":"ba38eac4-83da-46e7-9b7d-f097bafee5ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"type\": \"buy\",\n    \"active\": true,\n    \"fee_rate\": 0.015,\n    \"payment_method\": {\n        \"currency\": \"chf\",\n        \"debitor_iban\": \"DE75512108001245126199\"\n    },\n    \"payout_method\": {\n        \"node_pubkey\": \"0261fa99864bc68ac97b0f9d69009a75bf0bacca18c363b82b638d5d95e9eede6b\",\n        \"message\": \"W8YBdaGe\",\n        \"signature\": \"rb9wda6asg5n7qq4duqs1pi41x484uaginun47idw414rs9kugrck88ue9onhmbpeeyo5s6mhp5jz83mjybdwm6fiky4ar8ychs3fead\",\n        \"lightning_address\": \"optinal@getalby.com\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/orders"},"response":[]},{"name":"sell on-chain","id":"c2da0efc-7c17-400a-a541-f5294f772ca3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"type\": \"sell\",\n    \"active\": true,\n    \"fee_rate\": 0.015,\n    \"payment_method\": {\n        \"type\": \"bitcoin\"\n    },\n    \"payout_method\": {\n        \"currency\": \"chf\",\n        \"iban\": \"DE75512108001245126199\",\n        \"beneficiary\": {\n            \"type\": \"individual\",\n            \"first_names\": \"Satoshi\",\n            \"last_names\": \"Nakamoto\",\n            \"address\": {\n                \"street\": \"Mempool 21\",\n                \"town\": \"Lugano\",\n                \"postal_code\": \"6900\",\n                \"country\": \"CH\"\n            }\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/orders"},"response":[]},{"name":"sell lightning","id":"9340fb14-8259-437c-8800-60470a163513","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"type\": \"sell\",\n    \"active\": true,\n    \"fee_rate\": 0.015,\n    \"payment_method\": {\n        \"type\": \"lightning\"\n    },\n    \"payout_method\": {\n        \"currency\": \"chf\",\n        \"iban\": \"DE75512108001245126199\",\n        \"beneficiary\": {\n            \"type\": \"individual\",\n            \"first_names\": \"Satoshi\",\n            \"last_names\": \"Nakamoto\",\n            \"address\": {\n                \"street\": \"Mempool 21\",\n                \"town\": \"Lugano\",\n                \"postal_code\": \"6900\",\n                \"country\": \"CH\"\n            }\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/orders"},"response":[]}],"id":"3cf18fd6-6d29-439b-ad8c-e2e05ed6a991"},{"name":"/","id":"f8f6304d-d6f8-4081-a45d-9c818d30c4a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"url":"{{url}}/"},"response":[]},{"name":"/v1/challenges","id":"f5964dc2-9d34-419d-9fb2-50ed253b83d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/challenges"},"response":[]},{"name":"/v1/challenges/:id","id":"251b93aa-f2e2-467a-b331-34ff7b7d9a5f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"url":{"raw":"{{url}}/v1/challenges/:id","host":["{{url}}"],"path":["v1","challenges",":id"],"variable":[{"id":"e268e63d-82d1-431b-878c-70cb714f4d11","key":"id","value":"cd79cb50-4e83-49f9-a621-4cfc977b6229"}]}},"response":[]},{"name":"/v1/orders","id":"70408458-f02b-47be-99b1-b1a03584f7df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"type\": \"buy\",\n    \"active\": true,\n    \"fee_rate\": 0.015,\n    \"payment_method\": {\n        \"currency\": \"chf\",\n        \"debitor_iban\": \"DE75512108001245126199\"\n    },\n    \"payout_method\": {\n        \"bitcoin_address\": \"1JdqqnLf2pwe9rFfypXLnvM3HHnzXvX6Ff\",\n        \"message\": \"I confirm my bitcoin wallet. [0ujxLZKL]\",\n        \"signature\": \"H2nRx8bDDJkRnItM2eGM+E16hScjzYEityz/h/kPalIyVZAerBgqOWbDJRL6hoyepyDok37Z61rCAsRywB11DZ0=\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/orders"},"response":[]},{"name":"/v1/orders/:id","id":"94c87b5b-ced5-4703-879c-3745f6e49061","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"active\": false,\n    \"fee_rate\": 0.025\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/v1/orders/:id","host":["{{url}}"],"path":["v1","orders",":id"],"variable":[{"id":"c2685382-3095-4680-8d8f-d2b460b825d5","key":"id","value":"1bac0a15-f968-4e3c-80f0-0871ef971cd8"}]}},"response":[]},{"name":"/v1/orders/:id","id":"e756da29-5172-4a0d-b9c9-1f8f2846e9b0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"url":{"raw":"{{url}}/v1/orders/:id","host":["{{url}}"],"path":["v1","orders",":id"],"variable":[{"id":"d12a60a2-ce20-4530-b1ee-bd5b3d0c8b71","key":"id","value":"1bac0a15-f968-4e3c-80f0-0871ef971cd8"}]}},"response":[]},{"name":"/v1/exchanges/:id","id":"255d34a4-c40a-48d9-aab1-4c29e77b716e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"url":{"raw":"{{url}}/v1/exchanges/:id","host":["{{url}}"],"path":["v1","exchanges",":id"],"variable":[{"id":"30f82c11-1833-458a-be6f-9a64a3a27b67","key":"id","value":"2224e84f-662d-40ce-a988-6a8c4d92727e"}]}},"response":[]},{"name":"/v1/exchanges/:id","id":"5fbc2ed9-e867-4279-b683-6790b4d98a60","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"client_id {{client_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"payout\": {\n        \"type\": \"invoice\",\n        \"invoice\": \"lnbc10n1p37yl4dpp5mngevlcyv9npse7xxz469qylwg5khu8szykfv3fqkue3n6efuqrsdq5g9kxy7fqd9h8vmmfvdjscqzpgxqyz5vqsp58v2sk4llwasyxhe6scggvjf9934z6889dst7x9eamzt5dymf4w2q9qyyssqtfu22nvzwy4s49x9djq8wad3ldejh0cfeqmedy7t947lma0v7d9jkvvrjd237rka5qlra6x49tjh3896thdf0karzxvcwkxlgpr5p2gptwere3\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/v1/exchanges/:id","host":["{{url}}"],"path":["v1","exchanges",":id"],"variable":[{"key":"id","value":"1bac0a15-f968-4e3c-80f0-0871ef971cd8"}]}},"response":[]}],"id":"ffc16b5f-4d34-430a-8b70-401c51a6c74f"}],"event":[{"listen":"prerequest","script":{"id":"db389e08-c5c0-4047-b317-ac51cfb65b76","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2021ee44-bc91-4d8c-ad50-dbc90f913fc7","type":"text/javascript","exec":[""]}}],"variable":[{"key":"url","value":"https://api.pocketbitcoin.com"},{"key":"client_id","value":"[CONTACT POCKET]"},{"key":"webhook_url","value":"http://localhost:8000/webhook"}]}