Orchestration API
Refunds
Create a refund
code examples curl location '/api/refunds' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "paymentid" "" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "paymentid" "" }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("/api/refunds", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("/api/refunds") http = net http new(url host, url port); request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "paymentid" "" }) response = http request(request) puts response read body import requests import json url = "/api/refunds" payload = json dumps({ "paymentid" "" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // refund created { "id" "", "amount" 1357, "currency" "gbp", "status" "succeeded", "reason" "duplicate", "errormessage" "refund amount is more than the payment amount", "createdat" "2025 07 14t12 34 56 000z" }// bad request // unauthorized // not found