This method formats a given amount of points for presentational purposes using the loyalty program’s points currency name/label and localization preferences.
This method requires points settings to be preloaded before use. Call Smile.preload() with pointsSettings before calling this method, or — if you initialize the JavaScript SDK yourself — include pointsSettings in the preload array during initialization.
Parameters
integer
required
An integer representing the amount of points to format.
object
Show properties
boolean
default:"true"
A boolean value specifying whether the loyalty program’s points label should be included in the returned string.
string
default:""
A string that will be included before the loyalty program’s points label in the returned string.
Returns
This method returns a String.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Smile.io Developer Documentation","description":"Documentation and guides for using Smile's full-stack developer tooling, including the REST API and JavaScript SDK.","colors":{"primary":"#FFC419","light":"#FFC419","dark":"#1E38FB"},"logo":{"light":"https://mintcdn.com/smileio/VRZup3pt_A0wJgq4/images/logo-light.svg?fit=max\u0026auto=format\u0026n=VRZup3pt_A0wJgq4\u0026q=85\u0026s=2ece8527648f4f7eeb076ce9a821f04e","dark":"https://mintcdn.com/smileio/VRZup3pt_A0wJgq4/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=VRZup3pt_A0wJgq4\u0026q=85\u0026s=a0220ce60be88afca90042a3b8b3071a"},"favicon":"https://mintcdn.com/smileio/MiB8uy9lSdXlgs7f/images/favicon.png?fit=max\u0026auto=format\u0026n=MiB8uy9lSdXlgs7f\u0026q=85\u0026s=579525865d082a1a8c53c139ad14ae11","api":{"playground":{"proxy":false},"examples":{"languages":["bash","go","java","node","php","powershell","python","ruby"]}},"navbar":{"links":[{"href":"/changelog","label":"Changelog"}],"primary":{"type":"button","label":"Install Smile","href":"https://apps.shopify.com/smile-io"}},"footer":{"socials":{"website":"https://smile.io","linkedin":"https://www.linkedin.com/company/smile.io","youtube":"https://www.youtube.com/c/smilerewards"},"links":[{"header":"Guides","items":[{"label":"Fundamentals","href":"/guides/fundamentals"},{"label":"Common use cases","href":"/guides/use-cases/common"},{"label":"How to integrate","href":"/guides/apps/integrate"}]},{"header":"Documentation","items":[{"label":"API Reference","href":"/api/introduction"},{"label":"JavaScript SDK","href":"/js/introduction"},{"label":"Smile UI","href":"/ui/introduction"}]},{"header":"Company","items":[{"label":"Careers","href":"https://smile.io/careers"},{"label":"Partners","href":"https://smile.io/partners"},{"label":"Contact us","href":"https://smile.io/contact-us"}]},{"header":"Resources","items":[{"label":"Changelog","href":"/changelog"},{"label":"Help docs","href":"https://help.smile.io"},{"label":"Status page","href":"https://status.smile.io"}]}]},"seo":{"metatags":{"canonical":"https://dev.smile.io"}},"fonts":{"family":"Inter"},"styling":{"latex":false},"integrations":{"posthog":{"apiKey":"phc_bmeJEeepMfRdoeOXjeD5LQ1XaCMdFUdn3tNB830NPvG","apiHost":"https://p.smile.io","sessionRecording":false}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"smileio","hasAudioNarration":false,"actualSubdomain":"smileio","customDomains":["dev.smile.io"],"gitSource":{"type":"github","owner":"smile-io","repo":"dev-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":false,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b00bc0ac22458f7d13dca27","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"default","tag":"Libraries \u0026 SDKs","count":80},{"language":"default","tag":"JavaScript SDK","count":52},{"language":"default","tag":"Guides","count":42},{"language":"default","tag":"SDK resources","count":38},{"language":"default","tag":"API Reference","count":35},{"language":"default","tag":"Deprecated","count":35},{"language":"default","tag":"API resources","count":29},{"language":"default","tag":"Smile UI","count":28},{"language":"default","tag":"Apps \u0026 integrations","count":13},{"language":"default","tag":"Custom platform","count":12}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@media (max-width: 640px){#home-cards .card-group{grid-template-columns:1fr!important}}@media (min-width: 641px) and (max-width: 1023px){#home-cards .card-group{grid-template-columns:repeat(2, 1fr)!important}}@media (max-width: 640px){:not(#home-cards)>.card-group{grid-template-columns:1fr!important}}@media (min-width: 641px) and (max-width: 1280px){:not(#home-cards)>.card-group{grid-template-columns:repeat(2, 1fr)!important}}ul.contains-task-list{list-style:none;padding-left:0!important}li.task-list-item{list-style:none;padding-left:0!important}li.task-list-item::before{content:none!important}li.task-list-item>input[type=\"checkbox\"]{margin-right:0.5em!important}"}]}
{"page":{"pagePath":"js/smile/format-points","slug":"/js/smile/format-points","pageMetadata":{"title":"Format points","description":"`Smile.formatPoints(pointsAmount, options?)`","href":"/js/smile/format-points"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: _jsx(_components.code, {\n children: \"Smile.formatPoints(pointsAmount, options?)\"\n })\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,Warning}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This method formats a given amount of points for presentational purposes using the loyalty program’s points currency name/label and localization preferences.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This method requires points settings to be preloaded before use. Call `,_jsx(_components.a,{href:`/js/smile/preload`,children:_jsx(_components.code,{children:`Smile.preload()`})}),` with `,_jsx(_components.code,{children:`pointsSettings`}),` before calling this method, or — if you initialize the JavaScript SDK yourself — include `,_jsx(_components.code,{children:`pointsSettings`}),` in the `,_jsx(_components.code,{children:`preload`}),` array during `,_jsx(_components.a,{href:`/js/smile/initialize`,children:`initialization`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsx(ParamField,{path:`pointsAmount`,type:`integer`,required:true,id:`param-points-amount`,children:_jsx(_components.p,{children:`An integer representing the amount of points to format.`})}),`\n`,_jsx(ParamField,{path:`options`,type:`object`,id:`param-options`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{path:`showPointsLabel`,type:`boolean`,default:`true`,id:`param-show-points-label`,children:_jsx(_components.p,{children:`A boolean value specifying whether the loyalty program’s points label should be included in the returned string.`})}),_jsx(ParamField,{path:`pointsLabelPrefix`,type:`string`,default:``,id:`param-points-label-prefix`,children:_jsx(_components.p,{children:`A string that will be included before the loyalty program’s points label in the returned string.`})})]})}),`\n`,_jsx(Heading,{level:`2`,id:`returns`,children:`Returns`}),`\n`,_jsxs(_components.p,{children:[`This method returns a `,_jsx(_components.code,{children:`String`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Format points","description":"`Smile.formatPoints(pointsAmount, options?)`","href":"/js/smile/format-points"}}},"mdxSourceWithNoJs":null},"panelMdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);return _jsx(CodeBlock,{filename:`JavaScript`,lines:`true`,numberOfLines:`14`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Smile.formatPoints(1);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Returns \"1 Point\"`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Smile.formatPoints(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 2400,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { showPointsLabel: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Returns \"2,400\"`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Smile.formatPoints(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 5000,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { pointsLabelPrefix: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bonus '`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Returns \"5,000 Bonus Points\"`})}),`\n`]})})})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Format points","description":"`Smile.formatPoints(pointsAmount, options?)`","href":"/js/smile/format-points"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Returns","slug":"returns","depth":2,"children":[]}],"panel":{"content":"```javascript JavaScript lines theme={null}\nSmile.formatPoints(1);\n// Returns \"1 Point\"\n\nSmile.formatPoints(\n 2400,\n { showPointsLabel: false }\n);\n// Returns \"2,400\"\n\nSmile.formatPoints(\n 5000,\n { pointsLabelPrefix: 'Bonus ' }\n);\n// Returns \"5,000 Bonus Points\"\n```\n"},"codeExamples":{}},"jsLinks":[],"subdomain":"smileio","siteName":"Smile.io Developer Documentation","title":"Format points - Smile.io Developer Documentation","contextualStarterQuestions":[{"_id":"6a73b1e4043e2a737619a76a","deploymentId":"6963e7ff1f9d23b4780f9c32","questionText":"How do I format points?","status":"active","generatedBy":"contextual","path":"js/smile/format-points","createdAt":"2026-08-05T21:57:56.335Z","updatedAt":"2026-08-05T21:57:56.335Z","__v":0},{"_id":"6a73b1e4043e2a737619a76b","deploymentId":"6963e7ff1f9d23b4780f9c32","questionText":"What options can I customize?","status":"active","generatedBy":"contextual","path":"js/smile/format-points","createdAt":"2026-08-05T21:57:56.335Z","updatedAt":"2026-08-05T21:57:56.335Z","__v":0},{"_id":"6a73b1e4043e2a737619a76c","deploymentId":"6963e7ff1f9d23b4780f9c32","questionText":"Do I need to preload settings?","status":"active","generatedBy":"contextual","path":"js/smile/format-points","createdAt":"2026-08-05T21:57:56.335Z","updatedAt":"2026-08-05T21:57:56.335Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-05T21:57:44.141Z","originalFileLocation":"js/smile/format-points.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Smile.formatPoints(pointsAmount, options?)\">\u003cmeta data-mint-head name=\"application-name\" content=\"Smile.io Developer Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Format points - Smile.io Developer Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Smile.formatPoints(pointsAmount, options?)\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Smile.io Developer Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://dev.smile.io/js/smile/format-points\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://smileio.mintlify.site/_mintlify/api/og/v2?division=Smile+object\u0026amp;title=Format+points\u0026amp;description=%60Smile.formatPoints%28pointsAmount%2C+options%3F%29%60\u0026amp;theme=c0af2dc7dea91c14e86ca35a\u0026amp;signature=4279d74342a35ee56b89df7f52c0242575c9215273818035e39f45af58842a12\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Format points - Smile.io Developer Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Smile.formatPoints(pointsAmount, options?)\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://smileio.mintlify.site/_mintlify/api/og/v2?division=Smile+object\u0026amp;title=Format+points\u0026amp;description=%60Smile.formatPoints%28pointsAmount%2C+options%3F%29%60\u0026amp;theme=c0af2dc7dea91c14e86ca35a\u0026amp;signature=4279d74342a35ee56b89df7f52c0242575c9215273818035e39f45af58842a12\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/smileio/27Cg0i9-pzMj8uaL/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Smile.io Developer Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FFC419\">\u003clink data-mint-head rel=\"canonical\" href=\"https://dev.smile.io/js/smile/format-points\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/js/smile/format-points.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://dev.smile.io/#organization\",\"name\":\"Smile.io Developer Documentation\",\"url\":\"https://dev.smile.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/smileio/VRZup3pt_A0wJgq4/images/logo-light.svg?fit=max\u0026auto=format\u0026n=VRZup3pt_A0wJgq4\u0026q=85\u0026s=2ece8527648f4f7eeb076ce9a821f04e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://dev.smile.io#website\",\"name\":\"Smile.io Developer Documentation\",\"url\":\"https://dev.smile.io\",\"publisher\":{\"@id\":\"https://dev.smile.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://dev.smile.io/js/smile/format-points#webpage\",\"url\":\"https://dev.smile.io/js/smile/format-points\",\"name\":\"Format points\",\"description\":\"Smile.formatPoints(pointsAmount, options?)\",\"dateModified\":\"2026-08-05T21:57:44.141Z\",\"isPartOf\":{\"@id\":\"https://dev.smile.io#website\"},\"breadcrumb\":{\"@id\":\"https://dev.smile.io/js/smile/format-points#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://dev.smile.io/js/smile/format-points#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Smile object\",\"item\":\"https://dev.smile.io/js/smile/initialize\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Format points\",\"item\":\"https://dev.smile.io/js/smile/format-points\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://dev.smile.io/js/smile/format-points#article\",\"headline\":\"Format points\",\"name\":\"Format points\",\"description\":\"Smile.formatPoints(pointsAmount, options?)\",\"url\":\"https://dev.smile.io/js/smile/format-points\",\"mainEntityOfPage\":{\"@id\":\"https://dev.smile.io/js/smile/format-points#webpage\"},\"dateModified\":\"2026-08-05T21:57:44.141Z\",\"publisher\":{\"@id\":\"https://dev.smile.io/#organization\"},\"isPartOf\":{\"@id\":\"https://dev.smile.io#website\"}}]}\u003c/script>","agentPointerHref":"/js/smile/format-points.md","siteName":"Smile.io Developer Documentation","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/introduction"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api/introduction"}]},{"tab":"Libraries \u0026 SDKs","dropdowns":[{"dropdown":"JavaScript SDK","icon":"display-code","pages":[{"title":"Introduction","mode":"wide","href":"/js/introduction"},{"title":"Including Smile.js","href":"/js/including"},{"group":"Key concepts","icon":"book","pages":[{"title":"Customer tokens","href":"/js/concepts/customer-tokens"},{"group":"Error management","pages":[{"title":"Error handling","href":"/js/concepts/error-handling"},{"title":"ApiError object","href":"/js/concepts/error-object"}]},{"group":"Lifecycle events","pages":[{"title":"Lifecycle events","href":"/js/concepts/lifecycle-events"},{"title":"Initialized event","href":"/js/concepts/initialized-event"},{"title":"Loaded event","href":"/js/concepts/loaded-event"}]},{"title":"Preloading resources","href":"/js/concepts/preloading"},{"title":"Versioning","href":"/js/concepts/versioning"}]},{"group":"Smile object","icon":"file-code","pages":[{"title":"Initialize the SDK","description":"`Smile.initialize(options)`","href":"/js/smile/initialize"},{"title":"Format points","href":"/js/smile/format-points"},{"title":"Preload resources","description":"`Smile.preload(resources)`","href":"/js/smile/preload"},{"title":"Reset the SDK","href":"/js/smile/reset"}]},{"group":"SDK resources","icon":"cubes","pages":[{"group":"Activities","pages":[{"title":"Activity object","href":"/js/resources/activities/object"},{"title":"Create an activity","href":"/js/resources/activities/create"}]},{"group":"Customer","pages":[{"title":"Customer object","href":"/js/resources/customer/object"},{"title":"Get current customer","href":"/js/resources/customer/current"},{"title":"Login the customer","href":"/js/resources/customer/login"},{"title":"Logout the customer","href":"/js/resources/customer/logout"}]},{"group":"Customer Points Products","pages":[{"title":"Customer Points Product object","href":"/js/resources/customer-points-products/object"},{"title":"Get customer points products","href":"/js/resources/customer-points-products/get"},{"title":"Preloaded customer points products","href":"/js/resources/customer-points-products/preloaded"}]},{"group":"Customer Points Wallet","pages":[{"title":"Customer Points Wallet object","href":"/js/resources/customer-points-wallet/object"},{"title":"Get customer points wallet","href":"/js/resources/customer-points-wallet/get"},{"title":"Preloaded customer points wallet","href":"/js/resources/customer-points-wallet/preloaded"}]},{"group":"Customer VIP Status","pages":[{"title":"Customer VIP Status object","href":"/js/resources/customer-vip-status/object"},{"title":"Get customer VIP status","href":"/js/resources/customer-vip-status/get"},{"title":"Preloaded customer VIP status","href":"/js/resources/customer-vip-status/preloaded"}]},{"group":"Earning Rules","pages":[{"title":"Earning Rule object","href":"/js/resources/earning-rules/object"},{"title":"Get earning rules","href":"/js/resources/earning-rules/get"},{"title":"Preloaded earning rules","href":"/js/resources/earning-rules/preloaded"}]},{"group":"Points Products","pages":[{"title":"Points Product object","href":"/js/resources/points-products/object"},{"title":"Get a points product","href":"/js/resources/points-products/get-by-id"},{"title":"Get points products","href":"/js/resources/points-products/get"},{"title":"Preloaded points products","href":"/js/resources/points-products/preloaded"},{"title":"Purchase a points product","href":"/js/resources/points-products/purchase"}]},{"group":"Points Purchases","pages":[{"title":"Points Purchase object","href":"/js/resources/points-purchases/object"}]},{"group":"Points Settings","pages":[{"title":"Points Settings object","href":"/js/resources/points-settings/object"},{"title":"Get points settings","href":"/js/resources/points-settings/get"},{"title":"Preloaded points settings","href":"/js/resources/points-settings/preloaded"}]},{"group":"Referral Settings","pages":[{"title":"Referral Settings object","href":"/js/resources/referral-settings/object"},{"title":"Get referral settings","href":"/js/resources/referral-settings/get"},{"title":"Preloaded referral settings","href":"/js/resources/referral-settings/preloaded"}]},{"group":"Rewards","pages":[{"title":"Reward object","href":"/js/resources/rewards/object"}]},{"group":"Reward Fulfillments","pages":[{"title":"Reward Fulfillment object","href":"/js/resources/reward-fulfillments/object"},{"title":"Get reward fulfillments","href":"/js/resources/reward-fulfillments/get"},{"title":"Preloaded reward fulfillments","href":"/js/resources/reward-fulfillments/preloaded"}]},{"group":"VIP Tiers","pages":[{"title":"VIP Tier object","href":"/js/resources/vip-tiers/object"},{"title":"Get a VIP tier","href":"/js/resources/vip-tiers/get-by-id"},{"title":"Get VIP tiers","href":"/js/resources/vip-tiers/get"},{"title":"Preloaded VIP tiers","href":"/js/resources/vip-tiers/preloaded"}]}]}]},{"dropdown":"Smile UI","icon":"browsers","pages":[{"title":"Introduction","mode":"wide","href":"/ui/introduction"},{"title":"Including Smile UI","href":"/ui/including"},{"title":"Initializing Smile UI","href":"/ui/initializing"},{"title":"Customer tokens","href":"/ui/customer-tokens"},{"group":"Panel actions","icon":"hand-pointer","pages":[{"title":"Open panel","href":"/ui/panel/open"},{"title":"Close panel","href":"/ui/panel/close"},{"title":"Deep links","href":"/ui/panel/deep-links"}]},{"group":"Panel events","icon":"square-bolt","pages":[{"title":"Loaded event","href":"/ui/events/ui-loaded"},{"title":"Ready method","href":"/ui/events/ui-ready"}]},{"group":"Deprecated","icon":"exclamation-triangle","pages":[{"title":"Customer ready method","href":"/ui/events/customer-ready"},{"group":"Smile methods","pages":[{"title":"Create an activity","href":"/ui/smile/create-activity"},{"title":"Customer ready","href":"/ui/smile/customer-ready"},{"title":"Format points","href":"/ui/smile/format-points"},{"title":"Load all customer points products","href":"/ui/smile/fetch-all-customer-points-products"},{"title":"Load a points product","href":"/ui/smile/fetch-points-product"},{"title":"Load all points products","href":"/ui/smile/fetch-all-points-products"},{"title":"Load all reward fulfillments","href":"/ui/smile/fetch-all-reward-fulfillments"},{"title":"Purchase a points product","href":"/ui/smile/purchase-points-product"},{"title":"Reload the customer","href":"/ui/smile/fetch-customer"},{"title":"Ready method","href":"/ui/smile/ready"}]},{"group":"Object references","pages":[{"title":"Activity object","href":"/ui/objects/activity"},{"title":"Customer object","href":"/ui/objects/customer"},{"title":"Customer points product object","href":"/ui/objects/customer-points-product"},{"title":"Points product object","href":"/ui/objects/points-product"},{"title":"Points purchase object","href":"/ui/objects/points-purchase"},{"title":"Reward fulfillment object","href":"/ui/objects/reward-fulfillment"},{"title":"Reward object","href":"/ui/objects/reward"},{"title":"VIP Tier object","href":"/ui/objects/vip-tier"}]}]}]}]},{"tab":"Changelog","hidden":true,"pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Format points - Smile.io Developer Documentation","deploymentId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","buildId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","dynamics":[],"chunks":[]}