{"_id":"55e5f22bd101191900f30c8a","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"},"parentDoc":null,"user":"55dd080d0efd5821000d53b3","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"},"githubsync":"","project":"55dd0853d2d97337001800e2","__v":19,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-01T18:44:59.029Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"post","results":{"codes":[{"language":"text","code":""}]},"settings":"5693eae65f1c951900644c21","auth":"required","params":[],"url":"/payments/:id/refunds"},"isReference":true,"order":2,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Refund amount\",\n  \"body\": \"The refund amount must be a positive amount and must not exceed the remaining available balance on a payment. Note that transaction fees will still apply and will not be refunded.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Remaining available payment balance\",\n  \"body\": \"The remaining available balance for a payment is determined by taking into account the amounts already refunded as well as any current or past disputes.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"amount\",\n    \"0-1\": \"Required\",\n    \"1-0\": \"currency\",\n    \"2-0\": \"description\",\n    \"3-0\": \"meta\",\n    \"1-1\": \"Required\",\n    \"2-1\": \"Optional\",\n    \"3-1\": \"Optional\",\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Authorization\\\": \\\"Bearer 8xwEjewopIwfzWp28ai6VnqNJEEr2Gow\\\",\\n  \\\"X-CUSTOMER-ID\\\": \\\"1ad07cc4c00941648eae30\\\",\\n  \\\"Accept\\\": \\\"application/json\\\",\\n  \\\"Content-Type\\\": \\\"application/json\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Headers\"\n    }\n  ],\n  \"sidebar\": true\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    \\\"clientRefundId\\\": \\\"06b3c1ebdced4a69be755771\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"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    \\\"clientRefundId\\\": \\\"06b3c1ebdced4a69be755771\\\"\\n  },\\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\": \"Response\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"Create a Refund","slug":"create-refund","type":"endpoint","title":"Create a refund"}

postCreate a refund

Create a Refund

Definition

{{ api_url }}{{ page_api_url }}

Documentation

[block:callout] { "type": "warning", "title": "Refund amount", "body": "The refund amount must be a positive amount and must not exceed the remaining available balance on a payment. Note that transaction fees will still apply and will not be refunded." } [/block] [block:callout] { "type": "info", "title": "Remaining available payment balance", "body": "The remaining available balance for a payment is determined by taking into account the amounts already refunded as well as any current or past disputes." } [/block] [block:parameters] { "data": { "0-0": "amount", "0-1": "Required", "1-0": "currency", "2-0": "description", "3-0": "meta", "1-1": "Required", "2-1": "Optional", "3-1": "Optional", "h-0": "Parameter", "h-1": "Required" }, "cols": 2, "rows": 4 } [/block] [block:code] { "codes": [ { "code": "{\n \"Authorization\": \"Bearer 8xwEjewopIwfzWp28ai6VnqNJEEr2Gow\",\n \"X-CUSTOMER-ID\": \"1ad07cc4c00941648eae30\",\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\"\n}", "language": "json", "name": "Headers" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"amount\": \"20.10\",\n \"currency\": \"USD\",\n \"description\": \"Refund description\",\n \"meta\": {\n \"clientRefundId\": \"06b3c1ebdced4a69be755771\"\n }\n}", "language": "json", "name": "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 \"clientRefundId\": \"06b3c1ebdced4a69be755771\"\n },\n \"status\":\"paid\",\n \"created\":\"2015-10-28T22:55:28.000Z\",\n \"lastUpdated\":\"2015-10-28T22:55:30.000Z\"\n}", "language": "json", "name": "Response" } ], "sidebar": true } [/block]