Moolah Payments API
Tokenize Nonce
once you retrieve a nonce using the client side api, the following server end point is available to exchange the nonce for a payment token payment tokens can be stored for later use, or used directly to authorize or capture transactions { "tab" "examples", "url" "https //process moolahpay cc/api/token/tokenize", "name" "tokenize nonce", "method" "post", "request" { "pathparameters" \[], "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" "required", "name" "nonce", "type" "string", "description" "the nonce received from the credit card collection component" } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "nbela7ezuxyotowisxqzo", "code" "{\n \\"card\\" {\n \\"type\\" \\"visa\\",\n \\"status\\" \\"active\\",\n \\"expirationmonth\\" 0,\n \\"expirationyear\\" 00,\n \\"id\\" 000000,\n \\"numberfirst6\\" \\"000000\\",\n \\"numberlast4\\" \\"0000\\",\n \\"numbermasked\\" \\"000000 0000\\",\n \\"numberhashed\\" \\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\",\n \\"cardid\\" \\"11111111 1234 1234 12345789012\\"\n },\n \\"applicationid\\" \\"urn\ aid 12345678 1234 1234 12345789012\\",\n \\"token\\" \\"\<token>\\",\n \\"avsresponse\\" {\n \\"addressresult\\" \\"match\\",\n \\"postalcoderesult\\" \\"match\\"\n },\n \\"cvvresponse\\" \\"match\\",\n \\"status\\" \\"active\\"\n}\n ", "language" "202", "customlabel" "" }, { "id" "3n28nisxww9efbub4rili", "code" "{\\"code\\" 0,\\"message\\" \\"you must send a key\\",\\"error\\" {}}", "language" "500", "customlabel" "" } ], "selectedlanguageid" "nbela7ezuxyotowisxqzo" }, "examples" { "languages" \[ { "id" "5om bdspu7qjm7tbjcmj2", "code" "curl location request post 'https //process moolahpay cc/api/token/tokenize' \\\\\n header 'accept application/json' \\\\\n header 'authorization string' \\\\\n data raw '{\\"nonce\\" \\"string\\"}'", "language" "curl", "customlabel" "" }, { "id" "1ur8hkyxhcokmtcutnw0l", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //process moolahpay cc/api/token/tokenize',\n 'headers' {\n 'accept' 'application/json',\n 'authorization' 'string'\n },\n body '{\\"nonce\\" \\"string\\"}'\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" "h8qggjjvdyeo6pd1iamhl", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"authorization\\", \\"string\\");\n\nvar raw = \\"{\\\\\\"nonce\\\\\\" \\\\\\"string\\\\\\"}\\";\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //process moolahpay cc/api/token/tokenize\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "language" "javascript", "customlabel" "" }, { "id" "lpfoegu 9z2 tegyxnzug", "code" "import requests\n\nurl = \\"https //process moolahpay cc/api/token/tokenize\\"\n\npayload = \\"{\\\\\\"nonce\\\\\\" \\\\\\"string\\\\\\"}\\"\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" "xnad9uhj6vgwtajb5j5mz", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //process moolahpay cc/api/token/tokenize\\")\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 = \\"{\\\\\\"nonce\\\\\\" \\\\\\"string\\\\\\"}\\"\n\nresponse = https request(request)\nputs response read body\n", "language" "ruby", "customlabel" "" } ], "selectedlanguageid" "5om bdspu7qjm7tbjcmj2" }, "description" "gets a token from a nonce collected in the credit card collection process", "currentnewparameter" { "label" "header parameter", "value" "headerparameters" } } once you have a token from the token parameter in the response you can docid\ taissvah6ckvdxllazcvx using the token, for later capture docid\ ha8laftrc1zxnokhohx4h the credit card using the token