{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/orders/:order_id/refunds","auth":"required","settings":"5adcc50db719b20003516400","results":{"codes":[{"name":"","code":"{\n\t\"id\": 129,\n\t\"request_amount\": \"50.0\",\n\t\"refund_amount\": \"0.0012965\",\n\t\"address\": \"tb1qparagdh9h884lptjmlt20ugc05xrvhu32qa05z6\",\n\t\"status\": \"pending\",\n\t\"memo\": null,\n\t\"created_at\": \"2022-05-06T10:59:34+00:00\",\n\t\"order\": {\n\t\t\"id\": 568\n\t},\n\t\"refund_currency\": {\n\t\t\"id\": 1,\n\t\t\"title\": \"Bitcoin\",\n\t\t\"symbol\": \"BTC\",\n\t\t\"platform\": {\n\t\t\t\"id\": 5,\n\t\t\t\"title\": \"Bitcoin\"\n\t\t}\n\t},\n\t\"transactions\": [],\n\t\"ledger_account\": {\n\t\t\"id\": \"01G130Q2T06NYKC9F3STKANAD1\",\n\t\t\"currency\": {\n\t\t\t\"id\": 1,\n\t\t\t\"title\": \"Bitcoin\",\n\t\t\t\"symbol\": \"BTC\"\n\t\t}\n\t}\n}","language":"json","status":200},{"name":"","code":"{\n\t\"message\": \"Refund is not valid\",\n\t\"reason\": \"RefundIsNotValid\",\n\t\"errors\": [\n\t\t\"Request amount can't be blank\",\n\t\t\"Request amount must be higher than 1.0 EUR\",\n\t\t\"Request amount is not a number\",\n\t\t\"Refund amount can't be blank\",\n\t\t\"Refund amount is not a number\",\n\t\t\"Balance debit amount can't be blank\",\n\t\t\"Balance debit amount is not a number\"\n\t]\n}","language":"json","status":422}]},"params":[{"name":"amount","type":"double","default":"","desc":"Requesting amount in order price currency to refund","required":true,"in":"body","ref":"","_id":"62389bad5e9421026f99facc"},{"name":"address","type":"string","default":"","desc":"Cryptocurrency address to which the refund will be sent","required":true,"in":"body","ref":"","_id":"62389bad5e9421026f99facd"},{"name":"address_memo","type":"string","default":"","desc":"","required":false,"in":"body","ref":"","_id":"6238ac612abb6a0036b7eef4"},{"name":"currency_id","type":"int","default":"","desc":"ID of the currency in which the refund will be issued","required":true,"in":"body","ref":"","_id":"62389bad5e9421026f99face"},{"name":"platform_id","type":"int","default":"","desc":"Platform ID of the currency in which the refund will be issued","required":true,"in":"body","ref":"","_id":"62389bad5e9421026f99facf"},{"name":"order_id","type":"int","default":"","desc":"ID of the order to be refunded","required":true,"in":"path","ref":"","_id":"6239b22eaeac9a03ac22550d"},{"name":"reason","type":"string","default":"","desc":"Reason for issuing the refund","required":true,"in":"body","ref":"","_id":"62445e5652cdc4003a7f9214"},{"name":"email","type":"string","default":"","desc":"Customer will receive updates on refund status to this email","required":true,"in":"body","ref":"","_id":"6246feb2f5c3820052220303"},{"name":"ledger_account_id","type":"string","default":"","desc":"ID of the trader balance associated with the currency in which the refund will be issued","required":true,"in":"body","ref":"","_id":"626a85f91db3ae087e8ec291"}],"examples":{"codes":[{"code":"{\n\t\"amount\": 50,\n\t\"address\": \"tb1qparagdh9h884lptjmlt20ugc05xrvhu32qa05z6\",\n\t\"currency_id\": 1,\n\t\"platform_id\": 5,\n\t\"reason\": \"Reason\",\n\t\"email\": \"example:::at:::example.com\",\n\t\"ledger_account_id\": \"01G130Q2T06NYKC9F3STKANAD1\"\n}","language":"json"}]},"method":"post"},"next":{"description":"","pages":[]},"title":"Create Order Refund","type":"endpoint","slug":"create-refund","excerpt":"Creates a refund for an order.\n\nBefore making a <b>POST Create Order Refund</b> request, a [POST Create Order](doc:create-order) request should be made. \n\nAfter an order is created, you will get the order ID which will be used in the <b>POST Create Order Refund</b> request.\n\nPlatform ID can be found by making a [GET Currencies](doc:currencies) request and finding the currency in which the refund will be issued. \n\nLedger account ID can be found by making a [GET List Accounts](doc:accounts) request and finding the ledger account ID associated with the currency in which the refund will be issued. \n\n❗To create requests within the CoinGate system the user should have an authentication token. To get it, please follow the instructions <a href=\"https://developer.coingate.com/docs/api-authentication\" target=\"_blank\">here</a>.","body":"","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"62389bad5e9421026f99facb","createdAt":"2022-03-21T15:37:17.145Z","user":"5530bf7457cea10d00a3aa3a","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Refunds","slug":"refunds","order":3,"from_sync":false,"reference":false,"_id":"627511250a8fbb052a794d80","createdAt":"2022-05-06T12:14:29.357Z","version":"5adcc1185cd1890003da8165","project":"5530bfac57cea10d00a3aa3b","__v":0},"version":{"version":"2","version_clean":"2.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5adcc1185cd1890003da8166","5adcc1185cd1890003da8167","5adcf4b3ce4b3f00035317e9","5adfb8e9452bd900036d115b","5e7b51281ac49702d745882c","5e7b526560c6cc004f25ca3e","61c47c8dc69d6b000f961812","62289a8cb831c9003650b36c","62615ded4828c0003015b8a2","627511250a8fbb052a794d80","62b43cee767dd2003ad59e14"],"_id":"5adcc1185cd1890003da8165","project":"5530bfac57cea10d00a3aa3b","createdAt":"2018-04-22T17:06:32.152Z","releaseDate":"2018-04-22T17:06:32.152Z","__v":10},"project":"5530bfac57cea10d00a3aa3b","__v":37,"parentDoc":null}

postCreate Order Refund

Creates a refund for an order. Before making a <b>POST Create Order Refund</b> request, a [POST Create Order](doc:create-order) request should be made. After an order is created, you will get the order ID which will be used in the <b>POST Create Order Refund</b> request. Platform ID can be found by making a [GET Currencies](doc:currencies) request and finding the currency in which the refund will be issued. Ledger account ID can be found by making a [GET List Accounts](doc:accounts) request and finding the ledger account ID associated with the currency in which the refund will be issued. ❗To create requests within the CoinGate system the user should have an authentication token. To get it, please follow the instructions <a href="https://developer.coingate.com/docs/api-authentication" target="_blank">here</a>.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

order_id:
required
integer
ID of the order to be refunded

Body Params

amount:
required
double
Requesting amount in order price currency to refund
address:
required
string
Cryptocurrency address to which the refund will be sent
address_memo:
string
currency_id:
required
integer
ID of the currency in which the refund will be issued
platform_id:
required
integer
Platform ID of the currency in which the refund will be issued
reason:
required
string
Reason for issuing the refund
email:
required
string
Customer will receive updates on refund status to this email
ledger_account_id:
required
string
ID of the trader balance associated with the currency in which the refund will be issued

Examples


Result Format