Terminal Payments
Sending Transactions to the Terminal
{ "tab" "examples", "url" "https //process moolahpay cc/api/payments/\<deviceid>", "name" "process transactions", "method" "post", "request" { "pathparameters" \[ { "name" "deviceid", "kind" "required", "type" "string", "description" "device id of the terminal you would like to send the transaction to the id field in the device list ", "children" \[] } ], "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" \[ { "name" "amount", "kind" "required", "type" "number", "description" "the amount of the transaction in cents ", "children" \[] }, { "name" "receiptemailaddress", "kind" "required", "type" "string", "description" "the e mail address of where the receipt will be sent", "children" \[] }, { "name" "skipreceiptscreen", "kind" "optional", "type" "boolean", "description" "skip the receipt screen", "children" \[] }, { "name" "notes", "kind" "optional", "type" "string", "description" "any notes you would like attached to this transaction these notes will also be on the receipt sent to the customer ", "children" \[] }, { "name" "disabletip", "kind" "optional", "type" "boolean", "description" "disable tip request", "children" \[] }, { "name" "referenceid", "kind" "optional", "type" "string", "description" "a reference id that will be part of the stored transaction ", "children" \[] } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "wrn 6rccc4juamwi2xt5j", "code" "{\n \\" id\\" \\"35yrxy7qf3sh637bzwoo4kbfeipfvfaa\\",\n \\"business\\" \\"62d98fbd04ecab06f34e5a31\\",\n \\"status\\" \\"resolved\\",\n \\"timecreated\\" \\"2024 02 06t00 33 12 442588599z\\",\n \\"timeupdated\\" \\"2024 02 06t00 33 12 442588699z\\",\n \\"poynt\\" {\n \\"amount\\" 12500,\n \\"referenceid\\" \\"6ycm8jfyccgzojcwp2auj7epu\\",\n \\"status\\" \\"processed\\",\n \\"transactions\\" \[\n {\n \\"id\\" \\"7bd54f7a 018d 1000 5d31 d32653ac8b51\\",\n \\"action\\" \\"sale\\",\n \\"amounts\\" {\n \\"cashbackamount\\" 0,\n \\"currency\\" \\"usd\\",\n \\"customeroptednotip\\" false,\n \\"orderamount\\" 12500,\n \\"transactionamount\\" 12775,\n \\"tipamount\\" 0\n },\n \\"context\\" {\n \\"businesstype\\" \\"test merchant\\",\n \\"businessid\\" \\"826032a4 c513 4687 b025 1e71ddd3d3b9\\",\n \\"employeeuserid\\" 392988505,\n \\"mcc\\" \\"8021\\",\n \\"source\\" \\"instore\\",\n \\"storedeviceid\\" \\"\\",\n \\"storeid\\" \\"826032a4 c513 4687 b025 1e71ddd3d3b9\\",\n \\"sourceapp\\" \\"co poynt services\\",\n \\"transmissionatlocal\\" \\"\\"\n },\n \\"customeruserid\\" 539574663,\n \\"fundingsource\\" {\n \\"card\\" {\n \\"id\\" 538477177,\n \\"cardholderfirstname\\" \\"\\",\n \\"cardholderlastname\\" \\"\\",\n \\"cardholderfullname\\" \\"/\\",\n \\"expirationmonth\\" 1,\n \\"expirationyear\\" 2027,\n \\"numberfirst6\\" \\"534942\\",\n \\"numberlast4\\" \\"7711\\",\n \\"numbermasked\\" \\"534942 7711\\",\n \\"status\\" \\"\\",\n \\"type\\" \\"mastercard\\"\n },\n \\"cardtoken\\" \\"\\",\n \\"debit\\" false,\n \\"entrydetails\\" {\n \\"customerpresencestatus\\" \\"present\\",\n \\"entrymode\\" \\"contactless integrated circuit card\\"\n },\n \\"type\\" \\"credit debit\\"\n },\n \\"links\\" null,\n \\"notes\\" \\"payment receipt\\",\n \\"processorresponse\\" {\n \\"acquirer\\" \\"poynt\\",\n \\"approvedamount\\" 12775,\n \\"approvalcode\\" \\"419763\\",\n \\"processor\\" \\"mock\\",\n \\"retrievalrefnum\\" \\"7bd54f7a 018d 1000 5d31 d32653ac8b51\\",\n \\"status\\" \\"successful\\",\n \\"statuscode\\" \\"1\\",\n \\"statusmessage\\" \\"successful\\",\n \\"transactionid\\" \\"7bd54f7a 018d 1000 5d31 d32653ac8b51\\"\n },\n \\"receiptemailaddress\\" \\"\\",\n \\"references\\" \[\n {\n \\"id\\" \\"6ycm8jfyccgzojcwp2auj7epu\\",\n \\"customtype\\" \\"referenceid\\",\n \\"type\\" \\"custom\\"\n }\n ],\n \\"reversalvoid\\" false,\n \\"settled\\" false,\n \\"status\\" \\"captured\\",\n \\"voided\\" false,\n \\"createdat\\" \\"2024 02 06t00 33 10z\\",\n \\"updatedat\\" \\"2024 02 06t00 33 10z\\"\n }\n ]\n }\n}", "language" "200", "customlabel" "" }, { "id" "3n28nisxww9efbub4rili", "code" "{\\"code\\" 0,\\"message\\" \\"you must send a key\\",\\"error\\" {}}", "language" "500", "customlabel" "" } ], "selectedlanguageid" "wrn 6rccc4juamwi2xt5j" }, "examples" { "languages" \[ { "id" "vghnqbogp9bptzauodoy ", "language" "curl", "code" "curl location globoff request get 'https //process moolahpay cc/api/payments/\<deviceid>/{deviceid}' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\\"amount\\" \\"number\\",\\"receiptemailaddress\\" \\"string\\",\\"skipreceiptscreen\\" \\"boolean\\",\\"notes\\" \\"string\\",\\"disabletip\\" \\"boolean\\",\\"referenceid\\" \\"string\\"}'", "customlabel" "" }, { "id" "e3itmnkctqja6hcmhuye8", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"amount\\" \\"number\\",\n \\"receiptemailaddress\\" \\"string\\",\n \\"skipreceiptscreen\\" \\"boolean\\",\n \\"notes\\" \\"string\\",\n \\"disabletip\\" \\"boolean\\",\n \\"referenceid\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //process moolahpay cc/api/payments/\<deviceid>/{deviceid}\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "ibygq6no0vnffjrunzsju", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //process moolahpay cc/api/payments/\<deviceid>/{deviceid}\\"\n\npayload = json dumps({\n \\"amount\\" \\"number\\",\n \\"receiptemailaddress\\" \\"string\\",\n \\"skipreceiptscreen\\" \\"boolean\\",\n \\"notes\\" \\"string\\",\n \\"disabletip\\" \\"boolean\\",\n \\"referenceid\\" \\"string\\"\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "1a5zfsrr21rmqmtgh6gzw", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //process moolahpay cc/api/payments/\<deviceid>/{deviceid}\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http get new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"content type\\"] = \\"application/json\\"\nrequest body = json dump({\n \\"amount\\" \\"number\\",\n \\"receiptemailaddress\\" \\"string\\",\n \\"skipreceiptscreen\\" \\"boolean\\",\n \\"notes\\" \\"string\\",\n \\"disabletip\\" \\"boolean\\",\n \\"referenceid\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "hh9rrtby9la gtdypljbr", "language" "curl", "code" "curl location globoff 'https //process moolahpay cc/api/payments/\<deviceid>/{deviceid}' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\\"amount\\" \\"number\\",\\"receiptemailaddress\\" \\"string\\",\\"skipreceiptscreen\\" \\"boolean\\",\\"notes\\" \\"string\\",\\"disabletip\\" \\"boolean\\",\\"referenceid\\" \\"string\\"}'", "customlabel" "" }, { "id" "dkagivw z3cg3csh4uztj", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //process moolahpay cc/api/payments/\<deviceid>/{deviceid}',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"amount\\" \\"number\\",\n \\"receiptemailaddress\\" \\"string\\",\n \\"skipreceiptscreen\\" \\"boolean\\",\n \\"notes\\" \\"string\\",\n \\"disabletip\\" \\"boolean\\",\n \\"referenceid\\" \\"string\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "vewtjxigcx8u4n0bzfbpb", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"amount\\" \\"number\\",\n \\"receiptemailaddress\\" \\"string\\",\n \\"skipreceiptscreen\\" \\"boolean\\",\n \\"notes\\" \\"string\\",\n \\"disabletip\\" \\"boolean\\",\n \\"referenceid\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //process moolahpay cc/api/payments/\<deviceid>/{deviceid}\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "cjoemg4tuef aok9 3ca0", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //process moolahpay cc/api/payments/\<deviceid>/{deviceid}\\"\n\npayload = json dumps({\n \\"amount\\" \\"number\\",\n \\"receiptemailaddress\\" \\"string\\",\n \\"skipreceiptscreen\\" \\"boolean\\",\n \\"notes\\" \\"string\\",\n \\"disabletip\\" \\"boolean\\",\n \\"referenceid\\" \\"string\\"\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "g5xvd5f6pzs7usvqjehf3", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //process moolahpay cc/api/payments/\<deviceid>/{deviceid}\\")\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\[\\"content type\\"] = \\"application/json\\"\nrequest body = json dump({\n \\"amount\\" \\"number\\",\n \\"receiptemailaddress\\" \\"string\\",\n \\"skipreceiptscreen\\" \\"boolean\\",\n \\"notes\\" \\"string\\",\n \\"disabletip\\" \\"boolean\\",\n \\"referenceid\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "vghnqbogp9bptzauodoy " }, "description" "send a request to the terminal to process transaction(s) ", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } } poynt transactions are returned in an array, as multiple cards can be processed in a single request occasionally, a card may have a balance that is less than the total transaction amount in such instances, poynt seamlessly facilitates the processing of additional transactions to ensure the transaction is successfully completed successful transactions will return the following statuses poynt status = "processed" and poynt transactions\[] status = "captured" or poynt transactions\[] status = "authorized" declined transactions will return the following statuses poynt status = "processed" and poynt transactions\[] status = "declined" canceled transactions will return the following status poynt status = "canceled" voided transactions will return the following status poynt transactions\[] status = "voided"