Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program’s for this customer — it rides the same 60-second cache as the balance, so a change to a customer’s rules takes up to a minute to reach checkout.
GET
/
v1
/
loyalty
/
accounts
/
{accountId}
Error
A valid request URL is required to generate request examples
Hex HMAC-SHA256 of the raw request body (empty string when there is no body), keyed with the app's OAuth secret. Verify against the exact bytes received.
OPTIONAL per-customer boundaries. When present they REPLACE the program-level capabilities.redemptionLimits for this customer entirely — not field by field: declaring only max here means this customer has no minimum, whatever the program declares. Omit the object (or omit a bound inside it) to leave the customer under the program's own limits. Answer here ONLY when your rules genuinely vary per customer (a tier, a segment, an individual agreement) — a single rule for every customer belongs on the program's capabilities, not repeated on every account. Note that a limit reaching you inside a per-customer lookup is not by itself evidence that the limit is per-customer. Malformed values are ignored and the program's limits stand.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"DeliveryVip Developers","description":"Documentação das APIs da DeliveryVip: Merchant API, Open Delivery, Fidelidade e Partner API, com guias, tutoriais e referência.","colors":{"primary":"#EC681B","light":"#F4A476","dark":"#EC681B"},"logo":{"light":"https://mintcdn.com/deliveryvip-a4256422/ELxpcniK2_BP8zxT/logo/light.svg?fit=max\u0026auto=format\u0026n=ELxpcniK2_BP8zxT\u0026q=85\u0026s=b5cd347a6fb8b88418ecffa2cecba5ca","dark":"https://mintcdn.com/deliveryvip-a4256422/ELxpcniK2_BP8zxT/logo/dark.svg?fit=max\u0026auto=format\u0026n=ELxpcniK2_BP8zxT\u0026q=85\u0026s=c4d4b4b52656b650a0faa7dcc736c1a4"},"favicon":"https://mintcdn.com/deliveryvip-a4256422/ELxpcniK2_BP8zxT/favicon.png?fit=max\u0026auto=format\u0026n=ELxpcniK2_BP8zxT\u0026q=85\u0026s=f7fca2ed2e2a42c04178d079778d86f7","appearance":{"default":"system","strict":true},"navbar":{"primary":{"type":"button","label":"Painel do developer","href":"https://developer.deliveryvip.com.br"}},"footer":{"socials":{"website":"https://deliveryvip.com.br","github":"https://github.com/DeliveryVip","discord":"https://discord.gg/AJF8Yha4"},"links":[{"header":"Plataforma","items":[{"label":"Painel do lojista","href":"https://app.deliveryvip.com.br"},{"label":"Painel do developer","href":"https://developer.deliveryvip.com.br"},{"label":"Status","href":"https://status.deliveryvip.com.br"},{"label":"Central de ajuda","href":"https://ajuda.deliveryvip.com.br"}]},{"header":"Desenvolvedores","items":[{"label":"Jornada do Developer","href":"/docs/inicio/primeiros-passos/jornada-do-developer"},{"label":"Postman","href":"/docs/inicio/conceitos/postman"},{"label":"Use com IA","href":"/docs/inicio/conceitos/usando-com-ia"},{"label":"Cofrinho (exemplo de fidelidade)","href":"https://github.com/DeliveryVip/cofrinho"},{"label":"Changelog","href":"/docs/changelog"}]},{"header":"Suporte","items":[{"label":"Discord","href":"https://discord.gg/AJF8Yha4"},{"label":"Agendar uma reunião","href":"https://calendar.app.google/EchaXk57y7xp8Hyx6"}]}]},"search":{"prompt":"Pesquisar na documentação..."},"seo":{"metatags":{"og:site_name":"DeliveryVip Developers","og:locale":"pt_BR","twitter:card":"summary_large_image"}},"fonts":{"family":"Geist"},"errors":{"404":{"redirect":false,"title":"Página não encontrada","description":"Volte para a [página inicial](/) ou use a busca."}},"contextual":{"options":["copy","view","chatgpt","claude","cursor","vscode","mcp"],"display":"header"},"markdown":{"instructions":"Documentação das APIs da DeliveryVip, em português. Regras que mais quebram integrações: (1) Merchant API: faça polling em GET /merchant/v3/events:polling no máximo a cada 30 s por token; confirme todo evento recebido com POST /merchant/v3/events/acknowledgment e corpo [{\"id\": \"\u003ceventId>\"}] (o campo lido é id, não eventId), inclusive eventos repetidos ou que o sistema não trata; deduplique por eventId; o evento é só um aviso, busque o pedido na orderURL. (2) Tokens client_credentials valem 24 h e não têm refresh_token: peça outro ao receber 401. (3) Webhooks: valide a assinatura HMAC sobre o corpo bruto e responda 2xx rápido; o polling é a reconciliação. (4) Open Delivery: host od.deliveryvip.com.br, um client_secret por loja, datas em UTC. (5) Fidelidade: o operador implementa 5 rotas assinadas com HMAC e chama o config push; o estorno precisa ser idempotente. (6) Partner API: scope dv.partner. Não invente endpoints: use a referência gerada das specs OpenAPI."},"styling":{"latex":false},"navigation":{"languages":[{"language":"pt-BR","href":""}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"deliveryvip-a4256422","hasAudioNarration":false,"actualSubdomain":"deliveryvip-a4256422","customDomains":[],"gitSource":{"type":"github","owner":"deliveryvip","repo":"developerdocs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6ae4c831d9cc4cd9a0a2acf8"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae4cc91981729a4c39866ff","collectionId":"b87548ca-f6e4-4b97-b2a3-975659825db2","liveDeploymentHistoryId":"6ae4cc91981729a4c39866ff","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4cc91981729a4c39866ff","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"pt-BR","tag":"Referência","count":120},{"language":"pt-BR","tag":"Merchant API","count":88},{"language":"pt-BR","tag":"Partner API","count":87},{"language":"pt-BR","tag":"Indoor","count":35},{"language":"pt-BR","tag":"Lojas","count":34},{"language":"pt-BR","tag":"Revendas","count":29},{"language":"pt-BR","tag":"Open Delivery","count":27},{"language":"pt-BR","tag":"Pedidos","count":25},{"language":"pt-BR","tag":"Endpoints","count":25},{"language":"pt-BR","tag":"Início","count":20}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","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":"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":"byok-sep-25","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":"billing-updated-9-15","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}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#localization-select-trigger,[data-component-part=localization-select-trigger]{display:none!important}"}],"page":{"pagePath":"api-reference/accounts/account-balance","slug":"/api-reference/accounts/account-balance","pageMetadata":{"title":"Account balance","description":"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program's for this customer — it rides the same 60-second cache as the balance, so a change to a customer's rules takes up to a minute to reach checkout.","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml get /v1/loyalty/accounts/{accountId}","href":"/api-reference/accounts/account-balance","autogeneratedByOpenApi":true},"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: \"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program’s for this customer — it rides the same 60-second cache as the balance, so a change to a customer’s rules takes up to a minute to reach checkout.\"\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Account balance","description":"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program's for this customer — it rides the same 60-second cache as the balance, so a change to a customer's rules takes up to a minute to reach checkout.","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml get /v1/loyalty/accounts/{accountId}","href":"/api-reference/accounts/account-balance","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Accounts"],"summary":"Account balance","description":"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program's for this customer — it rides the same 60-second cache as the balance, so a change to a customer's rules takes up to a minute to reach checkout.","parameters":["7d4ddf6b-2c55-44c5-b8bd-52b0b7ca42a0"],"responses":{"200":"3566bad8-e6be-4f65-9e5e-674a4e8e797e","404":"c34ed269-9ef7-44a3-a241-a2aa10342d4c"},"method":"get","type":"path","servers":["cfe626c9-bcd3-4ea8-b786-bcfa1588ed7d"],"security":["bece94ee-6d31-4b66-ad14-0f0948d5fa85"],"path":"/v1/loyalty/accounts/{accountId}","baseUrlOptions":["{api_base_url}"],"title":"Account balance","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"7d4ddf6b-2c55-44c5-b8bd-52b0b7ca42a0":{"in":"path","name":"accountId","required":true,"schema":{"type":"string","isRequired":true,"description":"The opaque account id returned by accounts:link.","uniqueKey":"","typeLabel":"string"},"description":"The opaque account id returned by accounts:link."}},"responses":{"3566bad8-e6be-4f65-9e5e-674a4e8e797e":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","programId","balanceType","balance","currency"],"properties":{"id":{"type":"string","description":"Opaque and STABLE — relinking the same customer must return the same id byte-for-byte.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"programId":{"type":"string","isRequired":true,"uniqueKey":"programId","typeLabel":"string"},"balanceType":{"type":"string","enum":["cashback"],"isRequired":true,"uniqueKey":"balanceType","typeLabel":"enum\u003cstring>"},"balance":{"type":"number","description":"Current balance in BRL. Read format-agnostically by DeliveryVip.","isRequired":true,"uniqueKey":"balance","typeLabel":"number"},"currency":{"type":"string","default":"BRL","isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"redemptionLimits":{"type":"object","description":"OPTIONAL per-customer boundaries. When present they REPLACE the program-level capabilities.redemptionLimits for this customer entirely — not field by field: declaring only max here means this customer has no minimum, whatever the program declares. Omit the object (or omit a bound inside it) to leave the customer under the program's own limits. Answer here ONLY when your rules genuinely vary per customer (a tier, a segment, an individual agreement) — a single rule for every customer belongs on the program's capabilities, not repeated on every account. Note that a limit reaching you inside a per-customer lookup is not by itself evidence that the limit is per-customer. Malformed values are ignored and the program's limits stand.","properties":{"min":{"type":"object","description":"A single boundary: a fixed amount in BRL or a percentage of the redeemable base. A minimum never raises the redeemed amount — it only decides whether redeeming is possible at all. Same shape the operator uses to declare program-level limits in capabilities.redemptionLimits (see the Merchant API swagger).","required":["type","value"],"properties":{"type":{"type":"string","enum":["fixed","percent"],"isRequired":true,"uniqueKey":"redemptionLimits.min.type","typeLabel":"enum\u003cstring>"},"value":{"type":"number","description":"Amount in BRL when type is fixed; 0-100 when type is percent.","isRequired":true,"uniqueKey":"redemptionLimits.min.value","typeLabel":"number"}},"uniqueKey":"redemptionLimits.min","typeLabel":"object"},"max":{"type":"object","description":"A single boundary: a fixed amount in BRL or a percentage of the redeemable base. A minimum never raises the redeemed amount — it only decides whether redeeming is possible at all. Same shape the operator uses to declare program-level limits in capabilities.redemptionLimits (see the Merchant API swagger).","required":["type","value"],"properties":{"type":{"type":"string","enum":["fixed","percent"],"isRequired":true,"uniqueKey":"redemptionLimits.max.type","typeLabel":"enum\u003cstring>"},"value":{"type":"number","description":"Amount in BRL when type is fixed; 0-100 when type is percent.","isRequired":true,"uniqueKey":"redemptionLimits.max.value","typeLabel":"number"}},"uniqueKey":"redemptionLimits.max","typeLabel":"object"}},"uniqueKey":"redemptionLimits","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","programId":"\u003cstring>","balanceType":"cashback","balance":123,"currency":"BRL","redemptionLimits":{"min":{"type":"fixed","value":123},"max":{"type":"fixed","value":123}}}}},"exampleType":"generated"}},"exampleType":"generated"},"c34ed269-9ef7-44a3-a241-a2aa10342d4c":{"description":"Account no longer exists on the operator side. DeliveryVip treats the customer as not linked anymore and offers the opt-in again (never counted as an outage).","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"bece94ee-6d31-4b66-ad14-0f0948d5fa85":{"appId":{"type":"apiKey","in":"header","name":"X-App-Id","description":"The uid of the operator's OAuth application on DeliveryVip.","scopes":[],"schemeName":"appId"},"appMerchantId":{"type":"apiKey","in":"header","name":"X-App-MerchantId","description":"The UUID of the merchant (company) the call concerns.","scopes":[],"schemeName":"appMerchantId"},"appSignature":{"type":"apiKey","in":"header","name":"X-App-Signature","description":"Hex HMAC-SHA256 of the raw request body (empty string when there is no body), keyed with the app's OAuth secret. Verify against the exact bytes received.","scopes":[],"schemeName":"appSignature"}}},"servers":{"cfe626c9-bcd3-4ea8-b786-bcfa1588ed7d":{"url":"{api_base_url}","description":"The base URL the operator declares on the loyalty extension (https only; may include a path prefix).","variables":{"api_base_url":{"default":"https://operator.example.com/dv/v1"}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-App-Id","description":"The uid of the operator's OAuth application on DeliveryVip.","scopes":[],"schemeName":"appId"},"schema":{"title":"X-App-Id","type":"string","description":"The uid of the operator's OAuth application on DeliveryVip.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"appId","name":"X-App-Id"},{"scheme":{"type":"apiKey","in":"header","name":"X-App-MerchantId","description":"The UUID of the merchant (company) the call concerns.","scopes":[],"schemeName":"appMerchantId"},"schema":{"title":"X-App-MerchantId","type":"string","description":"The UUID of the merchant (company) the call concerns.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"appMerchantId","name":"X-App-MerchantId"},{"scheme":{"type":"apiKey","in":"header","name":"X-App-Signature","description":"Hex HMAC-SHA256 of the raw request body (empty string when there is no body), keyed with the app's OAuth secret. Verify against the exact bytes received.","scopes":[],"schemeName":"appSignature"},"schema":{"title":"X-App-Signature","type":"string","description":"Hex HMAC-SHA256 of the raw request body (empty string when there is no body), keyed with the app's OAuth secret. Verify against the exact bytes received.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"appSignature","name":"X-App-Signature"}],"title":"appId \u0026 appMerchantId \u0026 appSignature"}]},"originalFileLocation":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml"},"subdomain":"deliveryvip-a4256422","siteName":"DeliveryVip Developers","title":"Account balance - DeliveryVip Developers","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pt-BR":{"href":"/api-reference/accounts/account-balance","matchLevel":0}}},"lastModified":"2026-10-30T16:41:32.836Z","originalFileLocation":"api-reference/accounts/account-balance.mdx","locale":"pt-BR"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"system\";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=\"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program\u0026#x27;s for this customer — it rides the same 60-second cache as the balance, so a change to a customer\u0026#x27;s rules takes up to a minute to reach checkout.\">\u003cmeta data-mint-head name=\"application-name\" content=\"DeliveryVip Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_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=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Account balance - DeliveryVip Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program\u0026#x27;s for this customer — it rides the same 60-second cache as the balance, so a change to a customer\u0026#x27;s rules takes up to a minute to reach checkout.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DeliveryVip Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://deliveryvip-a4256422.mintlify.app/_mintlify/api/og/v2?division=Rotas+do+operador\u0026amp;title=Account+balance\u0026amp;description=Balance+read+for+the+checkout+surface.+DeliveryVip+caches+the+answer+for+60+seconds+per+account.+The+request+carries+only+the+opaque+account+id+%E2%80%94+never+the+CPF.\u0026amp;theme=3b22322ae3bbae2651505377\u0026amp;signature=f64678b0e9f77db382c0c7666f833dc7fb3064efce18b99100c05fafd5f185d5\">\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=\"Account balance - DeliveryVip Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program\u0026#x27;s for this customer — it rides the same 60-second cache as the balance, so a change to a customer\u0026#x27;s rules takes up to a minute to reach checkout.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://deliveryvip-a4256422.mintlify.app/_mintlify/api/og/v2?division=Rotas+do+operador\u0026amp;title=Account+balance\u0026amp;description=Balance+read+for+the+checkout+surface.+DeliveryVip+caches+the+answer+for+60+seconds+per+account.+The+request+carries+only+the+opaque+account+id+%E2%80%94+never+the+CPF.\u0026amp;theme=3b22322ae3bbae2651505377\u0026amp;signature=f64678b0e9f77db382c0c7666f833dc7fb3064efce18b99100c05fafd5f185d5\">\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=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DeliveryVip Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EC681B\">\u003cmeta data-mint-head name=\"og:locale\" content=\"pt_BR\">\u003clink data-mint-head rel=\"canonical\" href=\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/accounts/account-balance.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/#organization\",\"name\":\"DeliveryVip Developers\",\"url\":\"https://deliveryvip-a4256422.mintlify.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/deliveryvip-a4256422/ELxpcniK2_BP8zxT/logo/light.svg?fit=max\u0026auto=format\u0026n=ELxpcniK2_BP8zxT\u0026q=85\u0026s=b5cd347a6fb8b88418ecffa2cecba5ca\"}},{\"@type\":\"WebSite\",\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs#website\",\"name\":\"DeliveryVip Developers\",\"url\":\"https://deliveryvip-a4256422.mintlify.dev/docs\",\"publisher\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance#webpage\",\"url\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance\",\"name\":\"Account balance\",\"description\":\"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program's for this customer — it rides the same 60-second cache as the balance, so a change to a customer's rules takes up to a minute to reach checkout.\",\"dateModified\":\"2026-10-30T16:41:32.836Z\",\"isPartOf\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs#website\"},\"breadcrumb\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Referência\",\"item\":\"https://deliveryvip-a4256422.mintlify.dev/docs/guides/merchant/loyalty/referencia-rapida\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rotas do operador\",\"item\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/handshake/signed-reachability-check\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Account balance\",\"item\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance#apireference\",\"headline\":\"Account balance\",\"name\":\"Account balance\",\"description\":\"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program's for this customer — it rides the same 60-second cache as the balance, so a change to a customer's rules takes up to a minute to reach checkout.\",\"url\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance\",\"mainEntityOfPage\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/account-balance#webpage\"},\"dateModified\":\"2026-10-30T16:41:32.836Z\",\"publisher\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"DeliveryVip Developers\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"DeliveryVip Developers","nav":{"global":null,"languages":[{"language":"pt-BR","tabs":[{"tab":"Início","icon":"house","pages":[{"title":"Início","href":""}]},{"tab":"Merchant API","icon":"store","pages":[{"title":"Merchant API","href":"/guides/merchant"}]},{"tab":"Open Delivery","icon":"right-left","pages":[{"title":"Open Delivery","href":"/guides/open-delivery"}]},{"tab":"Fidelidade","icon":"gift","groups":[{"group":"Visão geral","icon":"compass","pages":[{"title":"Fidelidade","sidebarTitle":"Introdução","icon":"gift","href":"/guides/merchant/loyalty"},{"title":"Primeiros passos","icon":"rocket","href":"/guides/merchant/loyalty/primeiros-passos"},{"title":"Monte um operador de fidelidade mínimo","sidebarTitle":"Operador mínimo","icon":"rocket","href":"/guides/merchant/loyalty/operador-minimo"}]},{"group":"Guias","icon":"map","pages":[{"title":"Ativando o programa","icon":"toggle-on","href":"/guides/merchant/loyalty/ativando-o-programa"},{"title":"Acúmulo","icon":"coins","href":"/guides/merchant/loyalty/acumulo"}]},{"group":"Contrato do operador","icon":"file-contract","pages":[{"title":"Contrato do operador","sidebarTitle":"Visão geral do contrato","icon":"file-signature","href":"/guides/merchant/loyalty/contrato-do-operador/index"},{"title":"Vínculo e PIN","icon":"link","href":"/guides/merchant/loyalty/contrato-do-operador/vinculo-e-pin"},{"title":"Resgate e estorno","icon":"money-bill-transfer","href":"/guides/merchant/loyalty/contrato-do-operador/resgate-e-estorno"}]},{"group":"Referência","icon":"code","pages":[{"title":"Referência rápida","icon":"list","href":"/guides/merchant/loyalty/referencia-rapida"},{"group":"Configuração do programa","icon":"sliders","pages":[{"title":"Fidelidade","icon":"gift","href":"/reference/merchant/v3/loyalty"},{"group":"Push da configuração","pages":[{"title":"Enviar configuração de fidelidade","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/merchant.yaml put /merchant/v3/{merchantId}/loyalty/config","href":"/api-reference/loyalty/enviar-configuração-de-fidelidade"}]},{"group":"Remoção da configuração","pages":[{"title":"Remover configuração de fidelidade","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/merchant.yaml delete /merchant/v3/{merchantId}/loyalty/config","href":"/api-reference/loyalty/remover-configuração-de-fidelidade"}]}]},{"group":"Rotas do operador","icon":"server","pages":[{"title":"Signed reachability check","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml get /v1/loyalty/ping","href":"/api-reference/handshake/signed-reachability-check"},{"title":"Locate-or-enroll the customer (opt-in)","description":"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform's UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml post /v1/loyalty/accounts:link","href":"/api-reference/accounts/locate-or-enroll-the-customer-opt-in"},{"title":"Account balance","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml get /v1/loyalty/accounts/{accountId}","href":"/api-reference/accounts/account-balance"},{"title":"Synchronous balance debit","description":"The authoritative debit, called as the LAST step inside DeliveryVip's order-creation transaction. A non-201 answer (or timeout) rolls the whole order back — the order is never born and the customer keeps shopping. Idempotency key is relatedOrderId (the order UUID): replaying the same relatedOrderId with the same amount must answer 201 with the SAME redemptionId; the same relatedOrderId with a DIFFERENT amount must be rejected with 422 code idempotency_conflict. amount is a JSON number (natural serialization, e.g. 25.0) and is always the value actually discounted on the order — it may be lower than what the customer originally reserved if the cart shrank. It also already honours the operator's own capabilities.redemptionLimits: never below the declared minimum, never above the declared maximum. Percentage ceilings are computed over the order's items (subtotal minus other cart discounts) — shipping and fees are never redeemable — so for operators whose own rule applies to the order total this amount can be lower than their ceiling, never higher. A 201 without redemptionId is treated as malformed and rolls the order back.","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml post /v1/loyalty/redemptions","href":"/api-reference/redemptions/synchronous-balance-debit"},{"title":"Explicit idempotent reversal","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml post /v1/loyalty/redemptions/{redemptionId}/reversal","href":"/api-reference/redemptions/explicit-idempotent-reversal"}]}]}]},{"tab":"Partner API","icon":"handshake","pages":[{"title":"Partner API","href":"/guides/partner"}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog"}]}]}]},"basePath":"","title":"Account balance - DeliveryVip Developers","buildId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","deploymentId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-D_4Sesi0.js","utils-DRHeK26p.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C6d-DUc2.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dex7slho.js","snippetPresets-BcCEBp0Z.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CufowNTX.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-A4lJSCIe.js","shallow-DqoHP7zn.js","getApiPlaygroundDisplay-Cku8AmtL.js","CodeSnippet-CtHQbNqc.js","CodeSnippets-CGo5Cslf.js","Page-BoJxk0m8.js","getPastedJson-M-bKdue4.js","icon-DEqCU4st.js","MethodPill-DnfSSXiJ.js","DuplicateIcon-BHu2PE8M.js","createIcon-BPsE5X7c.js","DynamicMarkdown-Dnt6YhtR.js","SectionHeading-6CtFWqMQ.js","axios-vUo_bRtp.js","Markdown-BoKe_1fI.js","clsx-DM5-sUNJ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CkIdkovK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-B3e6Nh_r.js"]}