{"_id":"5769f3f22e98532200832823","editedParams2":true,"project":"544fc17e698ab40800b4f891","category":{"_id":"56d942ac337fd11300d6a251","__v":2,"pages":["56d942c607ae190b000044af","56d942da6fcdd00b0002cad4"],"project":"544fc17e698ab40800b4f891","version":"56326e9cdf556c0d00cd08ca","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-04T08:09:16.560Z","from_sync":false,"order":7,"slug":"payment-requests","title":"Payment Requests"},"user":"544fc065698ab40800b4f888","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,"parentDoc":null,"editedParams":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-22T02:12:02.469Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","examples":{"codes":[{"code":"import json\nimport requests\n\nurl = \"https://coins.ph/api/v3/payment-requests/\"\n\nTOKEN = 'YOUR TOKEN'\nheaders = {\n    'Authorization': 'Bearer {}'.format(TOKEN),\n    'Accept': 'application/json'\n}\n\nrequests.delete(url, headers=headers)\nprint(response.text)","language":"python"}]},"method":"delete","results":{"codes":[{"name":"Canceled","code":"{\n    \"payment-request\": {\n        \"id\": \"5edc263fac7f4f61b87632cb5710050f\",\n        \"invoice\": \"5713e3ab76e74e6b85194deaf0f14cel\",\n        \"payer_contact_info\": \"example:::at:::example.com\",\n        \"payer_contact_info_type\": \"email\",\n        \"payer_email\": \"example@example.com\",\n        \"amount\": \"20.00000000\",\n        \"currency\": \"PHP\",\n        \"message\": \"Thanks for all the fish!\",\n        \"message_scope\": \"private\",\n        \"status\": \"canceled\",\n        \"receiving_account\": \"5411c4604c9b45b8b74837c84daa0f4c\",\n        \"payment_url\": \"https://coins.ph/payment/request/5edc263fac7f4f61b87632cb5710050f\",\n        \"created_at\": \"2016-03-04T07:12:00.352338Z\",\n        \"updated_at\": \"2016-03-04T07:12:00.474500Z\",\n        \"expires_at\":\"2017-03-04T07:11:59.942484Z\"\n    }\n}","language":"json","status":200},{"language":"json","status":200,"name":"Declined","code":"{\n    \"payment-request\": {\n        \"id\": \"5edc263fac7f4f61b87632cb5710050f\",\n        \"invoice\": \"5713e3ab76e74e6b85194deaf0f14cel\",\n        \"payer_contact_info\": \"example@example.com\",\n        \"payer_contact_info_type\": \"email\",\n        \"payer_email\": \"example@example.com\",\n        \"amount\": \"20.00000000\",\n        \"currency\": \"PHP\",\n        \"message\": \"Thanks for all the fish!\",\n        \"message_scope\": \"private\",\n        \"status\": \"declined\",\n        \"receiving_account\": \"5411c4604c9b45b8b74837c84daa0f4c\",\n        \"payment_url\": \"https://coins.ph/payment/request/5edc263fac7f4f61b87632cb5710050f\",\n        \"created_at\": \"2016-03-04T07:12:00.352338Z\",\n        \"updated_at\": \"2016-03-04T07:12:00.474500Z\",\n        \"expires_at\":\"2017-03-04T07:11:59.942484Z\"\n    }\n}"}]},"auth":"required","params":[{"_id":"5769f48447693a0e00002d1a","ref":"","in":"path","required":false,"desc":"ID of the payment request to cancel","default":"","type":"string","name":"id"}],"url":"/api/v3/payment-requests/:id"},"isReference":false,"order":3,"body":"An owner of a payment request may opt to cancel their existing payment request. Similarly, a payer may decline a payment request sent to them. This endpoint automatically determines which party is executing the request, and sets the `status` of the payment request accordingly.","excerpt":"Cancel or decline an existing payment request","slug":"payment-request-cancel","type":"endpoint","title":"payment-requests"}