{"_id":"565cb197687b0d0d004101ba","project":"55dd0853d2d97337001800e2","category":{"_id":"55e4e0b140cda60d003bad6b","__v":7,"version":"55de36ec9067202b00de0015","pages":["55e5f22bd101191900f30c8a","55e9ff5dc584fb2300291dd2","55e9ffa5b44f7b1700e4527d","55e9fffdc584fb2300291dd4","55ea12ebb44f7b1700e45296","565cb197687b0d0d004101ba","565e0b3477f0090d00581a0f"],"project":"55dd0853d2d97337001800e2","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-08-31T23:18:09.062Z","from_sync":false,"order":14,"slug":"refunds","title":"Refunds"},"githubsync":"","user":"55f8467359eace0d0087db7e","__v":14,"parentDoc":null,"version":{"_id":"55de36ec9067202b00de0015","__v":33,"project":"55dd0853d2d97337001800e2","createdAt":"2015-08-26T22:00:12.384Z","releaseDate":"2015-08-26T22:00:12.383Z","categories":["55de36ed9067202b00de0016","55de36ed9067202b00de0017","55de36ed9067202b00de0018","55df7dcd437b3f0d004ba204","55e4e014177b6e0d00333141","55e4e01fe252ac0d00303a99","55e4e05240cda60d003bad67","55e4e070177b6e0d00333142","55e4e0753325e60d007fbee6","55e4e0803325e60d007fbee7","55e4e086177b6e0d00333143","55e4e0a1177b6e0d00333144","55e4e0aa3325e60d007fbee8","55e4e0b140cda60d003bad6b","55e4e0bae252ac0d00303a9d","55e4e0c5177b6e0d00333145","55e4e0ee3325e60d007fbeea","55e4e0fae252ac0d00303a9e","55e4e100177b6e0d00333147","55f85c8ba3271b0d00498d55","56092e1ac5cff70d007d0131","564b64a3ee12850d0095866e","564b64b5791099170071e9ea","565cd0bfd18ae50d007183d8","565f5f5d6bafd40d0030a063","565f790d6bafd40d0030a09f","56611c464851190d003f9f5d","56637d5b7988ab0d00d0522e","56637d687988ab0d00d0522f","567835df6928b40d009dd650","56e59c043c29b117008dae5b","5704013559c5190e000ab646","572be252de40590e00026934","58af1bf6ebd7370f0078ba09","5cdad81d912ece0039e9a939"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-30T20:29:11.364Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":0,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Refunding payments\",\n  \"body\": \"Refunds can be created on Card and Bank payments for the entire value of the payment or for a partial amount. Note that transaction fees will still apply and will not be refunded.\"\n}\n[/block]\n## Request\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Amount\",\n  \"body\": \"The amount cannot exceed the remaining payment amount after previous refunds and disputes are taken into account.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"amount\",\n    \"1-0\": \"currency\",\n    \"2-0\": \"description\",\n    \"3-0\": \"meta\",\n    \"h-0\": \"Parameter\",\n    \"h-2\": \"Description\",\n    \"h-1\": \"Specification\",\n    \"0-1\": \"**Type**: String\\n**Format**: Positive Decimal String\\n**Example**: \\\"10.20\\\"\\n**Description**: The requested refund amount as a decimal string.\",\n    \"1-1\": \"**Type**: String\\n**Format**: ISO4217 Currency Code\\n**Example**: \\\"USD\\\"\\n**Description**: The currency for the refund amount.\",\n    \"2-1\": \"**Type**: String\\n**Length**: 0-512 characters\\n**Description**: An optional short description that describes the reason for the refund.\",\n    \"3-1\": \"**Type**: JSON Object\\n**Format**: [Meta](doc:meta) \\n**Description**: An optional object to store custom data for the Payment.\",\n    \"0-2\": \"\",\n    \"1-2\": \"\",\n    \"2-2\": \"\",\n    \"3-2\": \"\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n## Response\n\nAll of the Request parameters are returned in the Response object. In addition, the following parameters are also included in the response:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"1-0\": \"object\",\n    \"2-0\": \"paymentId\",\n    \"3-0\": \"status\",\n    \"4-0\": \"created\",\n    \"4-1\": \"The date the refund was created.\",\n    \"5-0\": \"lastUpdated\",\n    \"0-1\": \"The unique identifier for the refund.\",\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"1-1\": \"Will have value \\\"refund\\\" indicating that the object is a refund response.\",\n    \"5-1\": \"The date the refund was last updated.\",\n    \"2-1\": \"The id of the payment associated with the refund\",\n    \"3-1\": \"The current status of the refund. One of: \\\"created\\\", \\\"processing\\\", \\\"paid\\\", \\\"failed\\\".\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"amount\\\": \\\"20.10\\\",\\n  \\\"currency\\\": \\\"USD\\\",\\n  \\\"description\\\": \\\"Refund description\\\",\\n  \\\"meta\\\": {..}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Refund Request\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"object\\\":\\\"refund\\\",\\n  \\\"id\\\":\\\"r5asl6ygfew3k47ixztdfka1\\\",\\n  \\\"paymentId\\\":\\\"e26pqmpubmlsmqak7d93vpnc\\\",\\n  \\\"amount\\\":\\\"20.10\\\",\\n  \\\"currency\\\":\\\"USD\\\",\\n  \\\"description\\\":\\\"Refund description\\\",\\n  \\\"meta\\\": {..},\\n  \\\"status\\\":\\\"paid\\\",\\n  \\\"created\\\":\\\"2015-10-28T22:55:28.000Z\\\",\\n  \\\"lastUpdated\\\":\\\"2015-10-28T22:55:30.000Z\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Refund Response\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"refund-resource","type":"basic","title":"Refund resource"}
[block:callout] { "type": "success", "title": "Refunding payments", "body": "Refunds can be created on Card and Bank payments for the entire value of the payment or for a partial amount. Note that transaction fees will still apply and will not be refunded." } [/block] ## Request [block:callout] { "type": "warning", "title": "Amount", "body": "The amount cannot exceed the remaining payment amount after previous refunds and disputes are taken into account." } [/block] [block:parameters] { "data": { "0-0": "amount", "1-0": "currency", "2-0": "description", "3-0": "meta", "h-0": "Parameter", "h-2": "Description", "h-1": "Specification", "0-1": "**Type**: String\n**Format**: Positive Decimal String\n**Example**: \"10.20\"\n**Description**: The requested refund amount as a decimal string.", "1-1": "**Type**: String\n**Format**: ISO4217 Currency Code\n**Example**: \"USD\"\n**Description**: The currency for the refund amount.", "2-1": "**Type**: String\n**Length**: 0-512 characters\n**Description**: An optional short description that describes the reason for the refund.", "3-1": "**Type**: JSON Object\n**Format**: [Meta](doc:meta) \n**Description**: An optional object to store custom data for the Payment.", "0-2": "", "1-2": "", "2-2": "", "3-2": "" }, "cols": 2, "rows": 4 } [/block] ## Response All of the Request parameters are returned in the Response object. In addition, the following parameters are also included in the response: [block:parameters] { "data": { "0-0": "id", "1-0": "object", "2-0": "paymentId", "3-0": "status", "4-0": "created", "4-1": "The date the refund was created.", "5-0": "lastUpdated", "0-1": "The unique identifier for the refund.", "h-0": "Parameter", "h-1": "Description", "1-1": "Will have value \"refund\" indicating that the object is a refund response.", "5-1": "The date the refund was last updated.", "2-1": "The id of the payment associated with the refund", "3-1": "The current status of the refund. One of: \"created\", \"processing\", \"paid\", \"failed\"." }, "cols": 2, "rows": 6 } [/block] [block:code] { "codes": [ { "code": "{\n \"amount\": \"20.10\",\n \"currency\": \"USD\",\n \"description\": \"Refund description\",\n \"meta\": {..}\n}", "language": "json", "name": "Refund Request" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"object\":\"refund\",\n \"id\":\"r5asl6ygfew3k47ixztdfka1\",\n \"paymentId\":\"e26pqmpubmlsmqak7d93vpnc\",\n \"amount\":\"20.10\",\n \"currency\":\"USD\",\n \"description\":\"Refund description\",\n \"meta\": {..},\n \"status\":\"paid\",\n \"created\":\"2015-10-28T22:55:28.000Z\",\n \"lastUpdated\":\"2015-10-28T22:55:30.000Z\"\n}", "language": "json", "name": "Refund Response" } ], "sidebar": true } [/block]