For marketplace-only scenarios, if the user pre-selected a partner to earn or redeem points on. When not passed, the user’s default loyalty partner will be used.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Benji","colors":{"primary":"#9900ff","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/logo/benji-docs-logo.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=60b7d848ffe4ab0c66efcfcbf573e3be","dark":"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/logo/benji-docs-logo.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=60b7d848ffe4ab0c66efcfcbf573e3be"},"favicon":"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/favicon.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=0d4db635c5349274277a1e3f4575d6c3","api":{"mdx":{"auth":{"method":"key","name":"x-api-key"},"server":["https://mintlify.com/api","https://mintlify.com/api2"]}},"appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"mailto:support@withbenji.com","label":"Support"}],"primary":{"type":"button","label":"Go to Pilot","href":"https://pilot-staging.withbenji.com/login"}},"footer":{"socials":{"website":"https://withbenji.com"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"benji","hasAudioNarration":false,"actualSubdomain":"benji","customDomains":["docs.withbenji.com"],"gitSource":{"type":"github","owner":"benji-money","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adfb18f141a85a6119e97a5","collectionId":"53e2ada7-bf75-43e6-a1bc-2eeadae0db09","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adfb18f141a85a6119e97a5"},"feedback":{"thumbs":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adfb18f141a85a6119e97a5","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Platform","count":13},{"language":"default","tag":"Benji Integrations","count":12},{"language":"default","tag":"Pilot","count":11},{"language":"default","tag":"API Reference","count":9},{"language":"default","tag":"Benji Connect","count":8},{"language":"default","tag":"Partnerships","count":5},{"language":"default","tag":"Benji Connect SDK","count":4},{"language":"default","tag":"Square","count":4},{"language":"default","tag":"Webhooks","count":3},{"language":"default","tag":"Getting Started","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","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":"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":"assistant-v5","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","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":"workos-signup","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":"workos-enabled","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":"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":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/transactions/authenticate","slug":"/api-reference/endpoint/transactions/authenticate","pageMetadata":{"title":"Create a transaction token","description":"Create a token to authenticate the transaction and use in the create transaction API","sidebarTitle":"Authenticate","api":"POST https://rewardservice-staging.withbenji.com/reward_transaction/auth","href":"/api-reference/endpoint/transactions/authenticate"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create a token to authenticate the transaction and use in the create transaction API\"\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`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(Note,{children:[`The `,_jsx(_components.code,{children:`x-api-key`}),` header value to be used on this API is a `,_jsx(_components.strong,{children:`user-based access token`}),`.`]}),`\n`,_jsx(ParamField,{body:`transaction_amount`,type:`integer`,required:true,id:`param-transaction-amount`,children:_jsx(_components.p,{children:`The total amount of the transaction.`})}),`\n`,_jsx(ParamField,{body:`external_transaction_id`,type:`string`,required:true,id:`param-external-transaction-id`,children:_jsx(_components.p,{children:`The unique identifier in your system of the order transaction.`})}),`\n`,_jsx(ParamField,{body:`campaign_id`,type:`integer`,id:`param-campaign-id`,children:_jsxs(_components.p,{children:[`The ID of the `,_jsx(_components.a,{href:`/api-reference/endpoint/campaigns/get`,children:`campaign`}),` associated with the transaction. Note that in cases of a single running campaign, this field is optional.`]})}),`\n`,_jsx(ParamField,{body:`partner_id`,type:`integer`,id:`param-partner-id`,children:_jsx(_components.p,{children:`For marketplace-only scenarios, if the user pre-selected a partner to earn or redeem points on. When not passed, the user’s default loyalty partner will be used.`})}),`\n`,_jsx(Heading,{level:`3`,id:`return-values`,children:`Return values`}),`\n`,_jsx(ResponseField,{name:`transaction_token`,type:`string`,required:true,id:`param-transaction-token`,children:_jsx(_components.p,{children:`The transaction token to use when calling the create transaction API`})}),`\n`,_jsxs(ResponseField,{name:`authentication_status`,type:`integer`,required:true,id:`param-authentication-status`,children:[_jsx(_components.p,{children:`Integer representing an enum of one of the following transaction authentication status values:`}),_jsx(Expandable,{title:`possible transaction authentication status values`,type:`enum`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`AUTHENTICATED (1)`}),` : Transaction is authenticated `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`INSUFFICIENT_REWARDS_AMOUNT (2)`}),` : Member does not have sufficient rewards for the transaction `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`MEMBER_NOT_EXISTS (3)`}),` : The user does not have a valid loyalty account with the partner currently `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`ERROR (4)`}),` : General error when authenticating the transaction`]}),`\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":"Create a transaction token","description":"Create a token to authenticate the transaction and use in the create transaction API","sidebarTitle":"Authenticate","api":"POST https://rewardservice-staging.withbenji.com/reward_transaction/auth","href":"/api-reference/endpoint/transactions/authenticate"}}},"mdxSourceWithNoJs":{"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`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(Note,{children:[`The `,_jsx(_components.code,{children:`x-api-key`}),` header value to be used on this API is a `,_jsx(_components.strong,{children:`user-based access token`}),`.`]}),`\n`,_jsx(ParamField,{body:`transaction_amount`,type:`integer`,required:true,id:`param-transaction-amount`,children:_jsx(_components.p,{children:`The total amount of the transaction.`})}),`\n`,_jsx(ParamField,{body:`external_transaction_id`,type:`string`,required:true,id:`param-external-transaction-id`,children:_jsx(_components.p,{children:`The unique identifier in your system of the order transaction.`})}),`\n`,_jsx(ParamField,{body:`campaign_id`,type:`integer`,id:`param-campaign-id`,children:_jsxs(_components.p,{children:[`The ID of the `,_jsx(_components.a,{href:`/api-reference/endpoint/campaigns/get`,children:`campaign`}),` associated with the transaction. Note that in cases of a single running campaign, this field is optional.`]})}),`\n`,_jsx(ParamField,{body:`partner_id`,type:`integer`,id:`param-partner-id`,children:_jsx(_components.p,{children:`For marketplace-only scenarios, if the user pre-selected a partner to earn or redeem points on. When not passed, the user’s default loyalty partner will be used.`})}),`\n`,_jsx(Heading,{level:`3`,id:`return-values`,children:`Return values`}),`\n`,_jsx(ResponseField,{name:`transaction_token`,type:`string`,required:true,id:`param-transaction-token`,children:_jsx(_components.p,{children:`The transaction token to use when calling the create transaction API`})}),`\n`,_jsxs(ResponseField,{name:`authentication_status`,type:`integer`,required:true,id:`param-authentication-status`,children:[_jsx(_components.p,{children:`Integer representing an enum of one of the following transaction authentication status values:`}),_jsx(Expandable,{title:`possible transaction authentication status values`,type:`enum`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`AUTHENTICATED (1)`}),` : Transaction is authenticated `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`INSUFFICIENT_REWARDS_AMOUNT (2)`}),` : Member does not have sufficient rewards for the transaction `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`MEMBER_NOT_EXISTS (3)`}),` : The user does not have a valid loyalty account with the partner currently `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`ERROR (4)`}),` : General error when authenticating the transaction`]}),`\n`]})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`7`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ok\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"authentication_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"016bb1f6-ab4e-11ef-a1a8-0a58a9feac02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"authentication_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`401`,numberOfLines:`4`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unauthorized_user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid key, or key is not authorized to make this call\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`500`,numberOfLines:`4`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unexpected_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An unexpected error has occurred\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\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":"Create a transaction token","description":"Create a token to authenticate the transaction and use in the create transaction API","sidebarTitle":"Authenticate","api":"POST https://rewardservice-staging.withbenji.com/reward_transaction/auth","href":"/api-reference/endpoint/transactions/authenticate"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Return values","slug":"return-values","depth":3,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ok\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"authentication_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"016bb1f6-ab4e-11ef-a1a8-0a58a9feac02\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"authentication_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"401","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"unauthorized_user\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid key, or key is not authorized to make this call\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"500","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"unexpected_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"An unexpected error has occurred\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create a transaction token","path":"/reward_transaction/auth","servers":[{"url":"https://rewardservice-staging.withbenji.com"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"x-api-key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"transaction_amount":[{"type":"integer","description":"The total amount of the transaction.","required":true}],"external_transaction_id":[{"type":"string","description":"The unique identifier in your system of the order transaction.","required":true}],"campaign_id":[{"type":"integer","description":"The ID of the campaign associated with the transaction. Note that in cases of a single running campaign, this field is optional."}],"partner_id":[{"type":"integer","description":"For marketplace-only scenarios, if the user pre-selected a partner to earn or redeem points on. When not passed, the user’s default loyalty partner will be used."}]}}],"examples":{"example":{"value":{"transaction_amount":123,"external_transaction_id":"\u003cstring>","campaign_id":123,"partner_id":123}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"transaction_token":[{"type":"string","description":"The transaction token to use when calling the create transaction API","required":true}],"authentication_status":[{"type":"integer","description":"Integer representing an enum of one of the following transaction authentication status values:","required":true}]}}],"examples":{"example":{"value":{"transaction_token":"\u003cstring>","authentication_status":123}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"benji","siteName":"Benji","title":"Create a transaction token - Benji","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-16T15:55:46.154Z","originalFileLocation":"api-reference/endpoint/transactions/authenticate.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"light\"}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=\"Create a token to authenticate the transaction and use in the create transaction API\">\u003cmeta data-mint-head name=\"application-name\" content=\"Benji\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a transaction token - Benji\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a token to authenticate the transaction and use in the create transaction API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Benji\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.withbenji.com/api-reference/endpoint/transactions/authenticate\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://benji.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Create+a+transaction+token\u0026amp;description=Create+a+token+to+authenticate+the+transaction+and+use+in+the+create+transaction+API\u0026amp;theme=d75e8db81db7659f3f1d6181\u0026amp;signature=e9fdd7436e867a4f7365e7e6386fd876725fa17966fb6ceeb1bbe67bde995f7e\">\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=\"Create a transaction token - Benji\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a token to authenticate the transaction and use in the create transaction API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://benji.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Create+a+transaction+token\u0026amp;description=Create+a+token+to+authenticate+the+transaction+and+use+in+the+create+transaction+API\u0026amp;theme=d75e8db81db7659f3f1d6181\u0026amp;signature=e9fdd7436e867a4f7365e7e6386fd876725fa17966fb6ceeb1bbe67bde995f7e\">\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/benji/dbMCKxLdMt2ho1P-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Benji\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9900ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.withbenji.com/api-reference/endpoint/transactions/authenticate\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/transactions/authenticate.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Benji\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Benji","nav":{"global":null,"tabs":[{"tab":"Platform","groups":[{"group":"Welcome","pages":[{"title":"The Benji Platform","sidebarTitle":"Overview","icon":"book-open","href":"/pilot/overview"},{"title":"Key Benji Concepts","sidebarTitle":"Key Concepts","icon":"puzzle","href":"/pilot/concepts"}]},{"group":"Pilot","pages":[{"title":"Pilot Dashboard Overview","sidebarTitle":"Dashboard","icon":"gauge","href":"/pilot/dashboard"},{"group":"Partnerships","icon":{"style":"light","name":"circles-overlap"},"pages":[{"title":"Partnerships Homepage","sidebarTitle":"Partnerships","icon":"circles-overlap","iconType":"light","href":"/pilot/partnerships"},{"title":"Campaigns Page","sidebarTitle":"Campaigns","icon":"rocket","href":"/pilot/campaigns"},{"title":"Campaign Settings Page","sidebarTitle":"Campaign Settings","icon":"sliders","href":"/pilot/campaign"}]},{"title":"Experiences","icon":{"name":"store","style":"regular","library":"fontawesome"},"href":"/experiences"},{"title":"Analytics Page","sidebarTitle":"Analytics","icon":"chart-line","href":"/pilot/analytics"},{"title":"Transactions","sidebarTitle":"Transactions","icon":"chart-column","href":"/pilot/customer_activity"},{"title":"Developer","icon":"display-code","href":"/pilot/developer"},{"title":"Users \u0026 Permissions Page","sidebarTitle":"Users \u0026 Permissions","icon":"user","href":"/pilot/users"},{"title":"Finance Page","sidebarTitle":"Finance","icon":"dollar-sign","href":"/pilot/finance"},{"title":"Partner Settings Page","sidebarTitle":"Settings","icon":"sliders","href":"/pilot/settings"}]}]},{"tab":"Benji Connect","groups":[{"group":"Getting Started","pages":[{"title":"Benji Connect Overview","sidebarTitle":"Overview","href":"/connect/overview"},{"title":"Connect modes","sidebarTitle":"Modes","href":"/connect/modes"},{"title":"Create a token to initialize the Benji Connect SDK","sidebarTitle":"Create Token","api":"POST https://api-staging.withbenji.com/auth/connect","href":"/connect/create_token"}]},{"group":"Benji Hosted Connect","pages":[{"title":"Introduction to Benji Hosted Connect","sidebarTitle":"Introduction","href":"/connect/hosted/introduction"}]},{"group":"Benji Connect SDK","pages":[{"title":"Introduction to the Benji Connect SDK","sidebarTitle":"Introduction","href":"/connect/introduction"},{"title":"Initialize the Benji Connect SDK","sidebarTitle":"Initialization","href":"/connect/initialization"},{"title":"Benji Connect SDK methods and events","sidebarTitle":"Methods \u0026 Events","href":"/connect/methods"},{"title":"Exchange the Connect Token","sidebarTitle":"Exchange Token","api":"POST https://authservice-staging.withbenji.com/access/token/exchange","href":"/connect/exchange_token"}]}]},{"tab":"Benji Integrations","groups":[{"group":"Benji Integrations","pages":[{"title":"Benji Integrations","sidebarTitle":"Introduction","href":"/integrations/introduction"},{"title":"Integration Overview","sidebarTitle":"Overview","href":"/integrations/overview"},{"group":"Square","pages":[{"title":"Integration Setup","sidebarTitle":"Setup","href":"/integrations/setup"},{"title":"Square Webhooks","sidebarTitle":"Webhooks","href":"/integrations/webhooks"},{"title":"API Usage","sidebarTitle":"API Usage","href":"/integrations/api_usage"},{"title":"Troubleshooting","sidebarTitle":"Troubleshooting","href":"/integrations/troubleshooting"}]}]}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"API Authentication","sidebarTitle":"Authentication","href":"/api-reference/authentication"}]},{"group":"Member API","pages":[{"title":"Get User","sidebarTitle":"Get User","api":"GET https://api-staging.withbenji.com/users/{id}","href":"/api-reference/endpoint/users/get"}]},{"group":"Reward API","pages":[{"title":"Get Reward Transaction","sidebarTitle":"Get Transaction","api":"GET https://api-staging.withbenji.com/transactions/{id}","href":"/api-reference/endpoint/transactions/get"}]},{"group":"Partnerships","pages":[{"title":"Get Partnership","sidebarTitle":"Get Partnership","api":"GET https://api-staging.withbenji.com/partnerships/{id}","href":"/api-reference/endpoint/partnerships/get"},{"title":"Send Trigger Event","sidebarTitle":"Send Trigger","api":"POST https://api-staging.withbenji.com/partnerships/{partnership_id}/triggers","href":"/api-reference/endpoint/triggers/send"}]},{"group":"Webhooks","pages":[{"title":"Benji Platform Webhooks Overview","sidebarTitle":"Overview","href":"/api-reference/webhooks/overview"},{"title":"Subscribe to a webhook event","sidebarTitle":"Subscribe","api":"POST https://notificationservice-staging.withbenji.com/webhooks/subscribe","href":"/api-reference/webhooks/subscribe"},{"title":"Update a webhook subscription","sidebarTitle":"Update","api":"PUT https://notificationservice-staging.withbenji.com/webhooks/subscribe","href":"/api-reference/webhooks/update"}]}]}]},"basePath":"","title":"Create a transaction token - Benji","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-Myd8dsju.js","utils-C2HkQgW0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-8rSppmTv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B6MjiCFm.js","snippetPresets-DwrSAONL.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-1-a5UQKQ.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C541m7wZ.js","shallow-CWELCZ77.js","getApiPlaygroundDisplay-CTo5Zn03.js","CodeSnippet-D--dzvnl.js","CodeSnippets-DM3cXEDh.js","Page-CxAy5y67.js","getPastedJson-C-VECgcL.js","icon-BPq2-Mg3.js","MethodPill-D9J5cUHd.js","DuplicateIcon-BqHaxUnD.js","createIcon-CIbcZHp9.js","DynamicMarkdown-BKiHAm_d.js","SectionHeading-DstQXt3H.js","axios-vUo_bRtp.js"]}