Moolah Payments API
Void / Refund
provides the ability to void or refund a transaction if the amount is provided a refund will be processed if no amount is provided a void will be processed refunds must be processed if the transaction is past your settlement date/time voids must be processed if the transaction has not passed your settlement date/time if you would like to get the settlement status of the transaction via the api use the docid\ wovplumfli ggkvvaiv8y end point and use the settle property { "tab" "examples", "url" "https //process moolahpay cc/api/transactions/{id}/refund", "name" "refund", "method" "post", "request" { "pathparameters" \[ { "kind" "required", "name" "id", "type" "string", "children" \[], "description" "the transaction id you would like to void/refund" } ], "queryparameters" \[], "headerparameters" \[ { "kind" "required", "name" "authorization", "type" "string", "children" \[], "description" "every request to the server must include an authorization bearer header with your authorization token each business boarded at moolah will receive a token that is used to process the transaction this token should be pre pended with bearer \<token> " } ], "bodydataparameters" \[ { "kind" "optional", "name" "amount", "type" "number", "description" "the amount in cents to refund \n\nfor voided transaction the amount is omitted \n" } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "wrn 6rccc4juamwi2xt5j", "code" "{\n \\"signaturerequired\\"\ false,\n \\"signaturecaptured\\"\ false,\n \\"pincaptured\\"\ false,\n \\"adjusted\\"\ false,\n \\"amountsadjusted\\"\ false,\n \\"authonly\\"\ false,\n \\"partiallyapproved\\"\ false,\n \\"actionvoid\\"\ false,\n \\"voided\\"\ false,\n \\"settled\\"\ false,\n \\"reversalvoid\\"\ false,\n \\"createdat\\" \\"2023 02 09t22 38 44z\\",\n \\"updatedat\\" \\"2023 02 09t22 38 44z\\",\n \\"context\\" {\n \\"businesstype\\" \\"merchant\\",\n \\"transmissionatlocal\\" \\"2023 02 09t22 38 44z\\",\n \\"storedeviceid\\" \\"urn\ tid 871552c1 2bf8 305a b0a2 3e65454fff6f\\",\n \\"mcc\\" \\"8021\\",\n \\"source\\" \\"instore\\",\n \\"businessid\\" \\"a06cb821 68dd 4891 bd36 b689c8d2869f\\",\n \\"storeid\\" \\"a06cb821 68dd 4891 bd36 b689c8d2869f\\"\n },\n \\"fundingsource\\" {\n \\"debit\\"\ false,\n \\"card\\" {\n \\"cardbrand\\" {\n \\"createdat\\" \\"2020 05 27t16 14 32z\\",\n \\"scheme\\" \\"visa\\",\n \\"displayname\\" \\"visa\\",\n \\"id\\" \\"c74ab71f 9024 4de0 910d 54c6a9c2bbc5\\"\n },\n \\"type\\" \\"visa\\",\n \\"source\\" \\"direct\\",\n \\"status\\" \\"active\\",\n \\"expirationdate\\" 31,\n \\"expirationmonth\\" 7,\n \\"expirationyear\\" 2023,\n \\"id\\" 429559733,\n \\"numberfirst6\\" \\"424132\\",\n \\"numberlast4\\" \\"4767\\",\n \\"numbermasked\\" \\"424132 1111\\",\n \\"numberhashed\\" \\"3bf19a30f995d435a0e08d51eddc316ed34e58ab9e090654f3398160ebe9bc1d\\",\n \\"cardholderfirstname\\" \\"fname\\",\n \\"cardholderlastname\\" \\"lname\\",\n \\"cardholderfullname\\" \\"fname/lname\\",\n \\"servicecode\\" \\"121\\",\n \\"cardid\\" \\"d13adc5d ccbe 4be6 863c 7776e481d897\\"\n },\n \\"entrydetails\\" {\n \\"customerpresencestatus\\" \\"present\\",\n \\"entrymode\\" \\"track data from magstripe\\"\n },\n \\"type\\" \\"credit debit\\"\n },\n \\"links\\" \[\n {\n \\"href\\" \\"076069d8 0185 1000 ed9d cd5737e6259e\\",\n \\"rel\\" \\"sale\\",\n \\"method\\" \\"get\\"\n }\n ],\n \\"references\\" \[\n {\n \\"id\\" \\"q0zjwyoiiwboobvdenzcun6hm\\",\n \\"customtype\\" \\"referenceid\\",\n \\"type\\" \\"custom\\"\n }\n ],\n \\"customeruserid\\" 429249971,\n \\"processorresponse\\" {\n \\"emvtags\\" {\n \\"0x8a\\" \\"3030\\"\n },\n \\"processor\\" \\"elavon\\",\n \\"acquirer\\" \\"poynt\\",\n \\"status\\" \\"successful\\",\n \\"statuscode\\" \\"aa\\",\n \\"statusmessage\\" \\"approval\\",\n \\"transactionid\\" \\"209223845\\",\n \\"approvalcode\\" \\"032962\\",\n \\"batchid\\" \\"47\\",\n \\"retrievalrefnum\\" \\"0\\"\n },\n \\"customerlanguage\\" \\"en\\",\n \\"settlementstatus\\" \\"unsettled\\",\n \\"action\\" \\"refund\\",\n \\"amounts\\" {\n \\"customeroptednotip\\"\ false,\n \\"transactionamount\\" 4000,\n \\"orderamount\\" 4000,\n \\"tipamount\\" 0,\n \\"cashbackamount\\" 0,\n \\"currency\\" \\"usd\\"\n },\n \\"status\\" \\"refunded\\",\n \\"id\\" \\"cc04fce0 cbbb 40f1 a87c 6e74d9cf961e\\",\n \\"parentid\\" \\"076069d8 0185 1000 ed9d cd5737e6259e\\"\n}", "language" "202", "customlabel" "" }, { "id" "3n28nisxww9efbub4rili", "code" "{\\"code\\" 0,\\"message\\" \\"you must send a key\\",\\"error\\" {}}", "language" "500", "customlabel" "" } ], "selectedlanguageid" "wrn 6rccc4juamwi2xt5j" }, "examples" { "languages" \[ { "id" "um54wqcdejwzvbdfk0jtm", "code" "curl location g request post 'https //process moolahpay cc/api/transactions/{id}/refund' \\\\\n header 'accept application/json' \\\\\n header 'authorization string' \\\\\n data raw '{\\"amount\\" \\"number\\"}'", "language" "curl", "customlabel" "" }, { "id" "v taxmfjqcq4qxti olyn", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //process moolahpay cc/api/transactions/{id}/refund',\n 'headers' {\n 'accept' 'application/json',\n 'authorization' 'string'\n },\n body '{\\"amount\\" \\"number\\"}'\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "language" "nodejs", "customlabel" "" }, { "id" "qdhrhbv1koais2qlgyg8w", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"authorization\\", \\"string\\");\n\nvar raw = \\"{\\\\\\"amount\\\\\\" \\\\\\"number\\\\\\"}\\";\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //process moolahpay cc/api/transactions/{id}/refund\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "language" "javascript", "customlabel" "" }, { "id" "gbed 1ucvyur2kcync ej", "code" "import requests\n\nurl = \\"https //process moolahpay cc/api/transactions/{id}/refund\\"\n\npayload = \\"{\\\\\\"amount\\\\\\" \\\\\\"number\\\\\\"}\\"\nheaders = {\n 'accept' 'application/json',\n 'authorization' 'string'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "language" "python", "customlabel" "" }, { "id" "bocj4nise4tc6qyw4znsx", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //process moolahpay cc/api/transactions/{id}/refund\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"authorization\\"] = \\"string\\"\nrequest body = \\"{\\\\\\"amount\\\\\\" \\\\\\"number\\\\\\"}\\"\n\nresponse = https request(request)\nputs response read body\n", "language" "ruby", "customlabel" "" } ], "selectedlanguageid" "um54wqcdejwzvbdfk0jtm" }, "description" "process a void/refund for a given transaction id", "currentnewparameter" { "label" "path parameter", "value" "pathparameters" } } on a successful refund the status property will be refunded or refund depending on the processor (check for both) on a successful void the status property will be voided