Lithic · Example Payload
Lithic Getembedcard Example
FinTechBaaSCard IssuingPaymentsEmbedded Finance
Lithic Getembedcard Example is an example object payload from Lithic, with 6 top-level fields. It illustrates the shape of data this provider's APIs accept or return.
Top-level fields
operationIdmethodpathsummaryrequestExamplesresponseExamples
Example Payload
{
"operationId": "getEmbedCard",
"method": "GET",
"path": "/v1/embed/card",
"summary": "Embedded card UI",
"requestExamples": [],
"responseExamples": [
{
"status": "200",
"contentType": "text/html",
"name": "html",
"example": "<html>\n<head>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"https://demo.lithic.com/backend/embedded.css\">\n<style>\n #alert { display: none; }\n</style>\n<script type=\"text/javascript\">\n var timeout;\n\n function clearAlertDelay() {\n clearTimeout(timeout);\n var messageDiv = document.getElementById('alert');\n timeout = window.setTimeout(\n function() {\n messageDiv.className = \"empty\";\n messageDiv.innerText = \"\";\n },\n 1200\n );\n }\n\n function copySuccess(divId) {\n var messageDiv = document.getElementById('alert');\n messageDiv.innerText = divId + \" copied to clipboard\";\n messageDiv.className = \"success\";\n console.log('Copying to clipboard was successful!');\n clearAlertDelay();\n }\n\n function copyFailed(divId) {\n var messageDiv = document.getElementById('alert');\n messageDiv.innerText = \"error copying \" + divId;\n messageDiv.className = \"error\";\n console.error('Copying to clipboard failed');\n clearAlertDelay();\n }\n\n function copyToClip(divId) {\n var messageDiv = document.getElementById('alert');\n var copyEl = document.getElementById(divId);\n var copyText = copyEl.textContent;\n navigator.clipboard.writeText(copyText)\n .then(function () {\n copySuccess(divId);\n clearAlertDelay();\n })\n .catch(function(err) {\n try {\n var copied = false;\n if (document.createRange) {\n range = document.createRange();\n range.selectNode(copyEl)\n select = window.getSelection();\n select.removeAllRanges();\n select.addRange(range);\n copied = document.execCommand('copy');\n select.removeAllRanges();\n }\n else {\n range = document.body.createTextRange();\n range.moveToElementText(copyEl);\n range.select();\n copied = document.execCommand('copy');\n }\n\n if (copied) {\n copySuccess(divId);\n }\n else {\n copyFailed(divId);\n }\n }\n catch (err) {\n copyFailed(divId);\n }\n clearAlertDelay();\n })\n }\n</script>\n</head>\n<body>\n <div id=\"card\">\n <div id=\"pan\" onclick=\"copyToClip('pan')\">9999<span class='pan-separator'></span>9999<span class='pan-separator'></span>9999<span class='pan-separator'></span>9999</div>\n <div id=\"expiry\">\n <span id=\"month\" onclick=\"copyToClip('month')\">08</span>\n <span id=\"separator\">/</span>\n <span id=\"year\" onclick=\"copyToClip('year')\">27</span>\n </div>\n <div id=\"cvv\" onclick=\"copyToClip('cvv')\">574</div>\n <div id=\"alert\" class=\"empty\"></div>\n </div>\n</body>\n</html>\n"
}
]
}