Cria uma cobrança para o valor em aberto da fatura (amountDue) e a vincula em payments. A fatura precisa estar open, em brl e sem outro pagamento em andamento.
Pix: a fatura continua open com um pagamento pending. Ela vira paid quando a cobrança é paga (webhook invoice.paid); se o Pix vencer, vira uncollectible.
Cartão: o resultado sai na própria resposta. Aprovado, a fatura já volta paid; recusado, ela continua open, attemptCount sobe e você pode pagar de novo.
Permissão: invoice.write. Apenas chave secreta (sk_…).
Os exemplos usam o sandbox (https://api.upag.dev/v1). Em produção use https://api.upag.io/v1 com sk_live_….
Num Pix, status fica open e payments[0] vem com type: "pix", status: "pending" e settledAt: null. Num cartão recusado, status fica open, attemptCount é 1 e o pagamento vem failed.
Já existe um pagamento pendente (um Pix ainda aberto, por exemplo)
422
VALIDATION_FAILED
method inválido, card ausente num pagamento de cartão etc.
Erros do cartão (card inexistente, 3DS inválido etc.) seguem as regras de Criar cobrança.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Upag Documentation","colors":{"primary":"#06AEDD","light":"#13C6F9","dark":"#0583A6"},"logo":{"light":"https://mintcdn.com/upag/J0FSTIds_wQSyfe4/logo/light.svg?fit=max\u0026auto=format\u0026n=J0FSTIds_wQSyfe4\u0026q=85\u0026s=69934217fd5359442c60393a5611af74","dark":"https://mintcdn.com/upag/J0FSTIds_wQSyfe4/logo/dark.svg?fit=max\u0026auto=format\u0026n=J0FSTIds_wQSyfe4\u0026q=85\u0026s=17e82005fbb54288e4d8a5d7918e98ee"},"favicon":"https://mintcdn.com/upag/J0FSTIds_wQSyfe4/favicon.svg?fit=max\u0026auto=format\u0026n=J0FSTIds_wQSyfe4\u0026q=85\u0026s=f25e12f43de622c85348e03828014f7b","api":{"playground":{"display":"interactive","proxy":true},"examples":{"defaults":"required","languages":["curl","javascript","node"],"prefill":false,"autogenerate":true},"url":"full","mdx":{"auth":{"method":"bearer"}}},"navbar":{"links":[{"href":"/llm.txt","label":"llm.txt"}]},"seo":{"metatags":{"canonical":"https://docs.upag.io","og:locale":"pt_BR","language":"pt-BR"},"organization":{"name":"Upag","url":"https://upag.io"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"upag","hasAudioNarration":false,"actualSubdomain":"upag","customDomains":["docs.upag.io"],"gitSource":{"type":"github","owner":"upaghq","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ac77c4fdf14e6603e2e7221","collectionId":"963f6f45-482c-44a6-a108-8476cd42d472","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ac77c4fdf14e6603e2e7221"},"entitlements":{},"buildId":"6ac77c4fdf14e6603e2e7221","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Referência","count":113},{"language":"default","tag":"Webhooks","count":19},{"language":"default","tag":"Sessões de checkout","count":14},{"language":"default","tag":"Apps","count":11},{"language":"default","tag":"Faturas","count":11},{"language":"default","tag":"Links de pagamento","count":11},{"language":"default","tag":"Assinaturas","count":11},{"language":"default","tag":"Guias","count":10},{"language":"default","tag":"Payloads","count":8},{"language":"default","tag":"Layouts de checkout","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"pages/invoices/pay","slug":"/pages/invoices/pay","pageMetadata":{"title":"Pagar fatura","description":"Paga uma fatura aberta com Pix ou com um cartão tokenizado","sidebarTitle":"Pagar","api":"POST https://api.upag.io/v1/invoices/{invoiceId}/pay","href":"/pages/invoices/pay"},"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: \"Paga uma fatura aberta com Pix ou com um cartão tokenizado\"\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`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,ParamField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Cria uma `,_jsx(_components.a,{href:`/pages/charges/reference`,children:`cobrança`}),` para o valor em aberto da fatura (`,_jsx(_components.code,{children:`amountDue`}),`) e a vincula em `,_jsx(_components.code,{children:`payments`}),`. A fatura precisa estar `,_jsx(_components.code,{children:`open`}),`, em `,_jsx(_components.code,{children:`brl`}),` e sem outro pagamento em andamento.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Pix`}),`: a fatura continua `,_jsx(_components.code,{children:`open`}),` com um pagamento `,_jsx(_components.code,{children:`pending`}),`. Ela vira `,_jsx(_components.code,{children:`paid`}),` quando a cobrança é paga (webhook `,_jsx(_components.code,{children:`invoice.paid`}),`); se o Pix vencer, vira `,_jsx(_components.code,{children:`uncollectible`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cartão`}),`: o resultado sai na própria resposta. Aprovado, a fatura já volta `,_jsx(_components.code,{children:`paid`}),`; recusado, ela continua `,_jsx(_components.code,{children:`open`}),`, `,_jsx(_components.code,{children:`attemptCount`}),` sobe e você pode pagar de novo.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Permissão: `,_jsx(_components.code,{children:`invoice.write`}),`. Apenas chave secreta (`,_jsx(_components.code,{children:`sk_…`}),`).`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Os exemplos usam o sandbox (`,_jsx(_components.code,{children:`https://api.upag.dev/v1`}),`). Em produção use `,_jsx(_components.code,{children:`https://api.upag.io/v1`}),` com `,_jsx(_components.code,{children:`sk_live_…`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`endpoint`,children:`Endpoint`}),`\n`,_jsx(Heading,{level:`3`,id:`pix`,children:`Pix`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`4`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.upag.dev/v1/invoices/5b0e8d3a-9c71-4e26-a8f4-1d7c3b6e9a02/pay`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk_test_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{ \"method\": \"pix\", \"dueDate\": \"2026-10-08T12:00:00.000Z\" }'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js SDK`,numberOfLines:`8`,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:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Upag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'upag'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` upag`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Upag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sk_test_your_api_key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` invoice`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` upag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`invoices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'5b0e8d3a-9c71-4e26-a8f4-1d7c3b6e9a02'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'pix'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` dueDate:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '2026-10-08T12:00:00.000Z'`}),_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`]})})})]}),`\n`,_jsxs(_components.p,{children:[`A resposta é a fatura: o QR code do Pix está na cobrança de `,_jsx(_components.code,{children:`payments[0].charge`}),`. Consulte-a em `,_jsx(_components.a,{href:`/pages/charges/get`,children:`Obter cobrança`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`cartão`,children:`Cartão`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`9`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.upag.dev/v1/invoices/5b0e8d3a-9c71-4e26-a8f4-1d7c3b6e9a02/pay`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk_test_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"method\": \"card\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"card\": \"5f0c3d1a-7b2e-4c9d-8a41-0e6f2b9d7c15\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"installments\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"threeDSecureSession\": \"9b7c1e52-3f0a-4d86-a1c4-6e2d8f35b790\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js SDK`,numberOfLines:`10`,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:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Upag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'upag'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` upag`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Upag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sk_test_your_api_key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` invoice`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` upag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`invoices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'5b0e8d3a-9c71-4e26-a8f4-1d7c3b6e9a02'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'card'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` card:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '5f0c3d1a-7b2e-4c9d-8a41-0e6f2b9d7c15'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` installments:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` threeDSecureSession:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '9b7c1e52-3f0a-4d86-a1c4-6e2d8f35b790'`}),_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`]})})})]}),`\n`,_jsxs(_components.p,{children:[`O `,_jsx(_components.code,{children:`card`}),` vem de `,_jsx(_components.a,{href:`/pages/cards/create`,children:`Criar cartão`}),` (idealmente tokenizado no navegador com `,_jsx(_components.code,{children:`upag-js`}),`). Para autenticar o portador antes de cobrar, veja `,_jsx(_components.a,{href:`/pages/guides/card-3ds`,children:`Cartão com 3DS`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`parâmetros`,children:`Parâmetros`}),`\n`,_jsx(ParamField,{path:`invoiceId`,type:`string (uuid)`,required:true,id:`param-invoice-id`,children:_jsx(_components.p,{children:`ID da fatura.`})}),`\n`,_jsx(ParamField,{body:`method`,type:`string`,required:true,id:`param-method`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`pix`}),` ou `,_jsx(_components.code,{children:`card`}),`. Define quais dos campos abaixo valem.`]})}),`\n`,_jsxs(Heading,{level:`3`,id:`pix-method-pix`,children:[`Pix (`,_jsx(_components.code,{children:`method: \"pix\"`}),`)`]}),`\n`,_jsx(ParamField,{body:`dueDate`,type:`string`,id:`param-due-date`,children:_jsx(_components.p,{children:`Vencimento do QR code (ISO 8601). Padrão: 10 minutos a partir de agora.`})}),`\n`,_jsxs(Heading,{level:`3`,id:`cartão-method-card`,children:[`Cartão (`,_jsx(_components.code,{children:`method: \"card\"`}),`)`]}),`\n`,_jsx(ParamField,{body:`card`,type:`string (uuid)`,required:true,id:`param-card`,children:_jsxs(_components.p,{children:[`UUID de um `,_jsx(_components.a,{href:`/pages/cards/create`,children:`cartão tokenizado`}),` da conta.`]})}),`\n`,_jsx(ParamField,{body:`installments`,type:`integer`,default:`1`,id:`param-installments`,children:_jsx(_components.p,{children:`Número de parcelas, de 1 a 12.`})}),`\n`,_jsx(ParamField,{body:`threeDSecureSession`,type:`string (uuid)`,id:`param-three-d-secure-session`,children:_jsx(_components.p,{children:`Sessão 3D Secure concluída para este cartão, valor e parcelamento.`})}),`\n`,_jsx(ParamField,{body:`ipAddress`,type:`string`,id:`param-ip-address`,children:_jsx(_components.p,{children:`IP público do pagador (IPv4 ou IPv6).`})}),`\n`,_jsx(ParamField,{body:`location`,type:`object`,id:`param-location`,children:_jsxs(_components.p,{children:[`Localização do pagador: `,_jsx(_components.code,{children:`city`}),` (até 50 caracteres), `,_jsx(_components.code,{children:`state`}),` (2), `,_jsx(_components.code,{children:`country`}),` (2) e `,_jsx(_components.code,{children:`zip`}),` (até 9). Todos opcionais.`]})}),`\n`,_jsx(ParamField,{body:`softDescriptor`,type:`string`,id:`param-soft-descriptor`,children:_jsx(_components.p,{children:`Texto na fatura do cartão, de 1 a 13 caracteres.`})}),`\n`,_jsx(Heading,{level:`2`,id:`resposta`,children:`Resposta`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`200 OK`}),` com o `,_jsx(_components.a,{href:`/pages/invoices/reference`,children:`objeto fatura`}),`. Exemplo de cartão aprovado:`]}),`\n`,_jsx(CodeBlock,{filename:`Response`,numberOfLines:`37`,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:`37`,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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5b0e8d3a-9c71-4e26-a8f4-1d7c3b6e9a02\"`}),_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:` \"customer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"8c1f0a26-5d3b-4f1e-9c72-1a4e6b9d0f83\"`}),_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:` \"paymentMethod\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"subscription\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"paid\"`}),_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:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"brl\"`}),_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:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Consultoria de setembro\"`}),_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:` \"amountDue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9900`}),_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:` \"amountPaid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9900`}),_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:` \"attemptCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_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:` \"dueDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"paidAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-07T19:05:12.000Z\"`}),_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:` \"items\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"e4a1c7f8-2b95-4d03-8e6a-9f1b5d0c3a74\"`}),_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:` \"product\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7d2b5e90-1c34-4a68-b9f7-0e3a6c8d1f25\"`}),_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:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3a7e9c14-6b2d-4f85-9e10-5c8d2a7b4f61\"`}),_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Plano mensal\"`}),_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:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4950`}),_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:` \"quantity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:` \"totalAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9900`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"discounts\"`}),_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:` \"payments\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"charge\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1f7d3c8a-4b52-4c9e-8a11-6d0e2f5b7c34\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"card\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"paid\"`}),_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:` \"settledAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-07T19:05:12.000Z\"`}),_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:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-07T19:05:11.000Z\"`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-07T19:00:00.000Z\"`}),_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:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-07T19:05:12.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Num Pix, `,_jsx(_components.code,{children:`status`}),` fica `,_jsx(_components.code,{children:`open`}),` e `,_jsx(_components.code,{children:`payments[0]`}),` vem com `,_jsx(_components.code,{children:`type: \"pix\"`}),`, `,_jsx(_components.code,{children:`status: \"pending\"`}),` e `,_jsx(_components.code,{children:`settledAt: null`}),`. Num cartão recusado, `,_jsx(_components.code,{children:`status`}),` fica `,_jsx(_components.code,{children:`open`}),`, `,_jsx(_components.code,{children:`attemptCount`}),` é `,_jsx(_components.code,{children:`1`}),` e o pagamento vem `,_jsx(_components.code,{children:`failed`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`erros`,children:`Erros`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Código`}),_jsx(_components.th,{children:`Quando`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`INVOICE_NOT_FOUND`})}),_jsx(_components.td,{children:`A fatura não existe ou é de outra conta`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`INVOICE_NOT_PAYABLE`})}),_jsxs(_components.td,{children:[`A fatura não está `,_jsx(_components.code,{children:`open`}),` ou não tem valor a pagar`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`INVOICE_CURRENCY_UNSUPPORTED`})}),_jsxs(_components.td,{children:[`A fatura não está em `,_jsx(_components.code,{children:`brl`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`INVOICE_PAYMENT_IN_PROGRESS`})}),_jsx(_components.td,{children:`Já existe um pagamento pendente (um Pix ainda aberto, por exemplo)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_FAILED`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`method`}),` inválido, `,_jsx(_components.code,{children:`card`}),` ausente num pagamento de cartão etc.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Erros do cartão (`,_jsx(_components.code,{children:`card`}),` inexistente, 3DS inválido etc.) seguem as regras de `,_jsx(_components.a,{href:`/pages/charges/create`,children:`Criar cobrança`}),`.`]})]})}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":"Pagar fatura","description":"Paga uma fatura aberta com Pix ou com um cartão tokenizado","sidebarTitle":"Pagar","api":"POST https://api.upag.io/v1/invoices/{invoiceId}/pay","href":"/pages/invoices/pay"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Endpoint","slug":"endpoint","depth":2,"children":[{"title":"Pix","slug":"pix","depth":3,"children":[]},{"title":"Cartão","slug":"cartão","depth":3,"children":[]}]},{"title":"Parâmetros","slug":"parâmetros","depth":2,"children":[{"title":"Pix (method: \"pix\")","slug":"pix-method-pix","depth":3,"children":[]},{"title":"Cartão (method: \"card\")","slug":"cartão-method-card","depth":3,"children":[]}]},{"title":"Resposta","slug":"resposta","depth":2,"children":[]},{"title":"Erros","slug":"erros","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Pagar fatura","path":"/v1/invoices/{invoiceId}/pay","servers":[{"url":"https://api.upag.io"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{"invoiceId":{"schema":[{"type":"object","properties":{},"description":"ID da fatura.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"method":[{"type":"string","description":"`pix` ou `card` . Define quais dos campos abaixo valem.","required":true}],"dueDate":[{"type":"string","description":"Vencimento do QR code (ISO 8601). Padrão: 10 minutos a partir de agora."}],"card":[{"type":"object","properties":{},"description":"UUID de um cartão tokenizado da conta.","required":true}],"installments":[{"type":"integer","description":"Número de parcelas, de 1 a 12."}],"threeDSecureSession":[{"type":"object","properties":{},"description":"Sessão 3D Secure concluída para este cartão, valor e parcelamento."}],"ipAddress":[{"type":"string","description":"IP público do pagador (IPv4 ou IPv6)."}],"location":[{"type":"object","properties":{},"description":"Localização do pagador: `city` (até 50 caracteres), `state` (2), `country` (2) e `zip` (até 9). Todos opcionais."}],"softDescriptor":[{"type":"string","description":"Texto na fatura do cartão, de 1 a 13 caracteres."}]}}],"examples":{"example":{"value":{"method":"\u003cstring>","dueDate":"\u003cstring>","card":{},"installments":123,"threeDSecureSession":{},"ipAddress":"\u003cstring>","location":{},"softDescriptor":"\u003cstring>"}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"upag","siteName":"Upag Documentation","title":"Pagar fatura - Upag Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-08T11:19:51.204Z","originalFileLocation":"pages/invoices/pay.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=\"Paga uma fatura aberta com Pix ou com um cartão tokenizado\">\u003cmeta data-mint-head name=\"application-name\" content=\"Upag 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/upag/-kAfZwMHyVqMVY71/_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/upag/-kAfZwMHyVqMVY71/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/upag/-kAfZwMHyVqMVY71/_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/upag/-kAfZwMHyVqMVY71/_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/upag/-kAfZwMHyVqMVY71/_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/upag/-kAfZwMHyVqMVY71/_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/upag/-kAfZwMHyVqMVY71/_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/upag/-kAfZwMHyVqMVY71/_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/upag/-kAfZwMHyVqMVY71/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Pagar fatura - Upag Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Paga uma fatura aberta com Pix ou com um cartão tokenizado\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Upag Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.upag.io/pages/invoices/pay\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://upag.mintlify.site/_mintlify/api/og/v2?division=Faturas\u0026amp;title=Pagar+fatura\u0026amp;description=Paga+uma+fatura+aberta+com+Pix+ou+com+um+cart%C3%A3o+tokenizado\u0026amp;theme=24438c70022642b5f3af8183\u0026amp;signature=3febd8bcd0af23c63a10eb8942fa03d422ffc213d718567ee7af3e9bbbed7021\">\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=\"Pagar fatura - Upag Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Paga uma fatura aberta com Pix ou com um cartão tokenizado\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://upag.mintlify.site/_mintlify/api/og/v2?division=Faturas\u0026amp;title=Pagar+fatura\u0026amp;description=Paga+uma+fatura+aberta+com+Pix+ou+com+um+cart%C3%A3o+tokenizado\u0026amp;theme=24438c70022642b5f3af8183\u0026amp;signature=3febd8bcd0af23c63a10eb8942fa03d422ffc213d718567ee7af3e9bbbed7021\">\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/upag/-kAfZwMHyVqMVY71/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Upag Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#06AEDD\">\u003cmeta data-mint-head name=\"og:locale\" content=\"pt_BR\">\u003cmeta data-mint-head name=\"language\" content=\"pt-BR\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.upag.io/pages/invoices/pay\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/pages/invoices/pay.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://upag.io/#organization\",\"name\":\"Upag\",\"url\":\"https://upag.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/upag/J0FSTIds_wQSyfe4/logo/light.svg?fit=max\u0026auto=format\u0026n=J0FSTIds_wQSyfe4\u0026q=85\u0026s=69934217fd5359442c60393a5611af74\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.upag.io#website\",\"name\":\"Upag Documentation\",\"url\":\"https://docs.upag.io\",\"publisher\":{\"@id\":\"https://upag.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.upag.io/pages/invoices/pay#webpage\",\"url\":\"https://docs.upag.io/pages/invoices/pay\",\"name\":\"Pagar fatura\",\"description\":\"Paga uma fatura aberta com Pix ou com um cartão tokenizado\",\"dateModified\":\"2026-10-08T11:19:51.204Z\",\"isPartOf\":{\"@id\":\"https://docs.upag.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.upag.io/pages/invoices/pay#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.upag.io/pages/invoices/pay#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Faturas\",\"item\":\"https://docs.upag.io/pages/invoices/reference\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pagar fatura\",\"item\":\"https://docs.upag.io/pages/invoices/pay\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.upag.io/pages/invoices/pay#apireference\",\"headline\":\"Pagar fatura\",\"name\":\"Pagar fatura\",\"description\":\"Paga uma fatura aberta com Pix ou com um cartão tokenizado\",\"url\":\"https://docs.upag.io/pages/invoices/pay\",\"mainEntityOfPage\":{\"@id\":\"https://docs.upag.io/pages/invoices/pay#webpage\"},\"dateModified\":\"2026-10-08T11:19:51.204Z\",\"publisher\":{\"@id\":\"https://upag.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.upag.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Upag Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Upag Documentation","nav":{"global":null,"tabs":[{"tab":"Guias","pages":[{"title":"Guias","href":"/pages/guides/quickstart"}]},{"tab":"Referência","groups":[{"group":"Cobranças","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/charges/reference"},{"title":"Criar cobrança","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/charges","href":"/pages/charges/create"},{"title":"Listar cobranças","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/charges","href":"/pages/charges/list"},{"title":"Obter cobrança","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/charges/{chargeId}","href":"/pages/charges/get"}]},{"group":"Cartões","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/cards/reference"},{"title":"Criar cartão","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/cards","href":"/pages/cards/create"},{"title":"Listar cartões","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/cards","href":"/pages/cards/list"},{"title":"Obter cartão","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/cards/{cardId}","href":"/pages/cards/get"},{"title":"Remover cartão","sidebarTitle":"Remover","api":"DELETE https://api.upag.io/v1/cards/{cardId}","href":"/pages/cards/delete"}]},{"group":"3D Secure","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/three-d-secure/reference"},{"title":"Criar sessão 3DS","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/3ds/sessions","href":"/pages/three-d-secure/create"},{"title":"Obter sessão 3DS","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/3ds/sessions/{sessionId}","href":"/pages/three-d-secure/get"},{"title":"Iniciar sessão 3DS","sidebarTitle":"Iniciar","api":"POST https://api.upag.io/v1/3ds/sessions/start","href":"/pages/three-d-secure/start"},{"title":"Concluir sessão 3DS","sidebarTitle":"Concluir","api":"POST https://api.upag.io/v1/3ds/sessions/complete","href":"/pages/three-d-secure/complete"}]},{"group":"Clientes","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/customers/reference"},{"title":"Criar cliente","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/customers","href":"/pages/customers/create"},{"title":"Listar clientes","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/customers","href":"/pages/customers/list"},{"title":"Obter cliente","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/customers/{customerId}","href":"/pages/customers/get"},{"title":"Atualizar cliente","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/customers/{customerId}","href":"/pages/customers/update"},{"title":"Excluir cliente","sidebarTitle":"Excluir","api":"DELETE https://api.upag.io/v1/customers/{customerId}","href":"/pages/customers/delete"}]},{"group":"Produtos","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/products/reference"},{"title":"Criar produto","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/products","href":"/pages/products/create"},{"title":"Listar produtos","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/products","href":"/pages/products/list"},{"title":"Obter produto","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/products/{productId}","href":"/pages/products/get"},{"title":"Atualizar produto","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/products/{productId}","href":"/pages/products/update"}]},{"group":"Preços","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/prices/reference"},{"title":"Criar preço","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/products/{productId}/prices","href":"/pages/prices/create"},{"title":"Listar preços","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/products/{productId}/prices","href":"/pages/prices/list"},{"title":"Obter preço","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/products/{productId}/prices/{priceId}","href":"/pages/prices/get"},{"title":"Atualizar preço","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/products/{productId}/prices/{priceId}","href":"/pages/prices/update"}]},{"group":"Cupons","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/coupons/reference"},{"title":"Criar cupom","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/coupons","href":"/pages/coupons/create"},{"title":"Listar cupons","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/coupons","href":"/pages/coupons/list"},{"title":"Obter cupom","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/coupons/{couponId}","href":"/pages/coupons/get"},{"title":"Atualizar cupom","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/coupons/{couponId}","href":"/pages/coupons/update"},{"title":"Excluir cupom","sidebarTitle":"Excluir","api":"DELETE https://api.upag.io/v1/coupons/{couponId}","href":"/pages/coupons/delete"}]},{"group":"Faturas","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/invoices/reference"},{"title":"Criar fatura","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/invoices","href":"/pages/invoices/create"},{"title":"Listar faturas","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/invoices","href":"/pages/invoices/list"},{"title":"Obter fatura","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/invoices/{invoiceId}","href":"/pages/invoices/get"},{"title":"Atualizar fatura","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/invoices/{invoiceId}","href":"/pages/invoices/update"},{"title":"Próxima fatura","description":"Pré-visualiza a fatura que a assinatura gera na próxima renovação","sidebarTitle":"Próxima fatura","api":"GET https://api.upag.io/v1/invoices/upcoming","href":"/pages/invoices/upcoming"},{"title":"Pagar fatura","sidebarTitle":"Pagar","api":"POST https://api.upag.io/v1/invoices/{invoiceId}/pay","href":"/pages/invoices/pay"},{"title":"Marcar como paga","description":"Registra o pagamento de uma fatura recebido fora da plataforma","sidebarTitle":"Marcar como paga","api":"POST https://api.upag.io/v1/invoices/{invoiceId}/mark-as-paid","href":"/pages/invoices/mark-as-paid"},{"title":"Adicionar item","sidebarTitle":"Adicionar item","api":"POST https://api.upag.io/v1/invoices/{invoiceId}/items","href":"/pages/invoices/create-item"},{"title":"Atualizar item","sidebarTitle":"Atualizar item","api":"PATCH https://api.upag.io/v1/invoices/{invoiceId}/items/{itemId}","href":"/pages/invoices/update-item"},{"title":"Remover item","sidebarTitle":"Remover item","api":"DELETE https://api.upag.io/v1/invoices/{invoiceId}/items/{itemId}","href":"/pages/invoices/delete-item"}]},{"group":"Assinaturas","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/subscriptions/reference"},{"title":"Criar assinatura","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/subscriptions","href":"/pages/subscriptions/create"},{"title":"Listar assinaturas","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/subscriptions","href":"/pages/subscriptions/list"},{"title":"Obter assinatura","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/subscriptions/{subscriptionId}","href":"/pages/subscriptions/get"},{"title":"Atualizar assinatura","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/subscriptions/{subscriptionId}","href":"/pages/subscriptions/update"},{"title":"Cancelar assinatura","sidebarTitle":"Cancelar","api":"POST https://api.upag.io/v1/subscriptions/{subscriptionId}/cancel","href":"/pages/subscriptions/cancel"},{"title":"Adicionar item","sidebarTitle":"Adicionar item","api":"POST https://api.upag.io/v1/subscriptions/{subscriptionId}/items","href":"/pages/subscriptions/create-item"},{"title":"Atualizar item","sidebarTitle":"Atualizar item","api":"PATCH https://api.upag.io/v1/subscriptions/{subscriptionId}/items/{itemId}","href":"/pages/subscriptions/update-item"},{"title":"Remover item","sidebarTitle":"Remover item","api":"DELETE https://api.upag.io/v1/subscriptions/{subscriptionId}/items/{itemId}","href":"/pages/subscriptions/delete-item"},{"title":"Mudanças agendadas","sidebarTitle":"Mudanças agendadas","api":"GET https://api.upag.io/v1/subscriptions/{subscriptionId}/scheduled-changes","href":"/pages/subscriptions/scheduled-changes"},{"title":"Cancelar mudança agendada","sidebarTitle":"Cancelar mudança agendada","api":"DELETE https://api.upag.io/v1/subscriptions/{subscriptionId}/scheduled-changes/{changeId}","href":"/pages/subscriptions/delete-scheduled-change"}]},{"group":"Links de pagamento","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/payment-links/reference"},{"title":"Criar link de pagamento","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/payment-links","href":"/pages/payment-links/create"},{"title":"Listar links de pagamento","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/payment-links","href":"/pages/payment-links/list"},{"title":"Obter link de pagamento","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/payment-links/{paymentLinkId}","href":"/pages/payment-links/get"},{"title":"Atualizar link de pagamento","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/payment-links/{paymentLinkId}","href":"/pages/payment-links/update"},{"title":"Adicionar item ao link","sidebarTitle":"Adicionar item","api":"POST https://api.upag.io/v1/payment-links/{paymentLinkId}/items","href":"/pages/payment-links/add-item"},{"title":"Atualizar item do link","sidebarTitle":"Atualizar item","api":"PATCH https://api.upag.io/v1/payment-links/{paymentLinkId}/items/{itemId}","href":"/pages/payment-links/update-item"},{"title":"Remover item do link","sidebarTitle":"Remover item","api":"DELETE https://api.upag.io/v1/payment-links/{paymentLinkId}/items/{itemId}","href":"/pages/payment-links/remove-item"},{"title":"Adicionar bump ao link","sidebarTitle":"Adicionar bump","api":"POST https://api.upag.io/v1/payment-links/{paymentLinkId}/bumps","href":"/pages/payment-links/add-bump"},{"title":"Atualizar bump do link","sidebarTitle":"Atualizar bump","api":"PATCH https://api.upag.io/v1/payment-links/{paymentLinkId}/bumps/{bumpId}","href":"/pages/payment-links/update-bump"},{"title":"Remover bump do link","sidebarTitle":"Remover bump","api":"DELETE https://api.upag.io/v1/payment-links/{paymentLinkId}/bumps/{bumpId}","href":"/pages/payment-links/remove-bump"}]},{"group":"Sessões de checkout","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/checkout-sessions/reference"},{"title":"Criar sessão de checkout","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/checkout/sessions","href":"/pages/checkout-sessions/create"},{"title":"Listar sessões de checkout","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/checkout/sessions","href":"/pages/checkout-sessions/list"},{"title":"Obter sessão de checkout","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/checkout/sessions/{sessionId}","href":"/pages/checkout-sessions/get"},{"title":"Atualizar sessão de checkout","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/checkout/sessions/{sessionId}","href":"/pages/checkout-sessions/update"},{"title":"Remover sessão de checkout","sidebarTitle":"Remover","api":"DELETE https://api.upag.io/v1/checkout/sessions/{sessionId}","href":"/pages/checkout-sessions/delete"},{"title":"Iniciar sessão de checkout","sidebarTitle":"Iniciar","api":"POST https://api.upag.io/v1/checkout/payment-links/{code}/sessions","href":"/pages/checkout-sessions/start"},{"title":"Obter sessão (pagador)","sidebarTitle":"Obter (pagador)","api":"GET https://api.upag.io/v1/checkout/sessions/{sessionId}","href":"/pages/checkout-sessions/retrieve"},{"title":"Confirmar sessão de checkout","sidebarTitle":"Confirmar","api":"POST https://api.upag.io/v1/checkout/sessions/{sessionId}/confirm","href":"/pages/checkout-sessions/confirm"},{"title":"Abrir sessão 3DS do checkout","sidebarTitle":"Sessão 3DS","api":"POST https://api.upag.io/v1/checkout/sessions/{sessionId}/3ds/session","href":"/pages/checkout-sessions/three-d-secure"},{"title":"Aplicar cupom","sidebarTitle":"Aplicar cupom","api":"POST https://api.upag.io/v1/checkout/sessions/{sessionId}/coupon","href":"/pages/checkout-sessions/apply-coupon"},{"title":"Remover cupom","sidebarTitle":"Remover cupom","api":"DELETE https://api.upag.io/v1/checkout/sessions/{sessionId}/coupon","href":"/pages/checkout-sessions/remove-coupon"},{"title":"Listar apps do checkout","sidebarTitle":"Listar apps","api":"GET https://api.upag.io/v1/checkout/sessions/{sessionId}/apps","href":"/pages/checkout-sessions/list-apps"},{"title":"Iniciar checkout Shopify","sidebarTitle":"Checkout Shopify","api":"POST https://api.upag.io/v1/checkout/shopify/sessions","href":"/pages/checkout-sessions/shopify"}]},{"group":"Layouts de checkout","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/checkout-layouts/reference"},{"title":"Criar layout de checkout","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/checkout/layouts","href":"/pages/checkout-layouts/create"},{"title":"Listar layouts de checkout","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/checkout/layouts","href":"/pages/checkout-layouts/list"},{"title":"Obter layout de checkout","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/checkout/layouts/{layoutId}","href":"/pages/checkout-layouts/get"},{"title":"Atualizar layout de checkout","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/checkout/layouts/{layoutId}","href":"/pages/checkout-layouts/update"},{"title":"Excluir layout de checkout","sidebarTitle":"Excluir","api":"DELETE https://api.upag.io/v1/checkout/layouts/{layoutId}","href":"/pages/checkout-layouts/delete"}]},{"group":"Transferências Pix","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/transfers/reference"},{"title":"Consultar destino Pix","sidebarTitle":"Consultar","api":"POST https://api.upag.io/v1/transfers/lookup","href":"/pages/transfers/lookup"},{"title":"Criar transferência","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/transfers","href":"/pages/transfers/create"},{"title":"Listar transferências","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/transfers","href":"/pages/transfers/list"},{"title":"Obter transferência","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/transfers/{transferId}","href":"/pages/transfers/get"},{"title":"Comprovante","sidebarTitle":"Comprovante","api":"GET https://api.upag.io/v1/transfers/{transferId}/receipt","href":"/pages/transfers/receipt"}]},{"group":"Subcontas","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/sub-accounts/reference"},{"title":"Criar subconta","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/sub-accounts","href":"/pages/sub-accounts/create"},{"title":"Listar subcontas","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/sub-accounts","href":"/pages/sub-accounts/list"},{"title":"Obter subconta","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/sub-accounts/{subAccountId}","href":"/pages/sub-accounts/get"},{"title":"Rotacionar chave da subconta","sidebarTitle":"Rotacionar chave","api":"POST https://api.upag.io/v1/sub-accounts/{subAccountId}/api-key/roll","href":"/pages/sub-accounts/roll-api-key"}]},{"group":"Apps","pages":[{"title":"Referência","sidebarTitle":"Visão geral","href":"/pages/apps/reference"},{"title":"Criar app","sidebarTitle":"Criar","api":"POST https://api.upag.io/v1/apps","href":"/pages/apps/create"},{"title":"Listar apps","sidebarTitle":"Listar","api":"GET https://api.upag.io/v1/apps","href":"/pages/apps/list"},{"title":"Obter app","sidebarTitle":"Obter","api":"GET https://api.upag.io/v1/apps/{appId}","href":"/pages/apps/get"},{"title":"Atualizar app","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/apps/{appId}","href":"/pages/apps/update"},{"title":"Excluir app","sidebarTitle":"Excluir","api":"DELETE https://api.upag.io/v1/apps/{appId}","href":"/pages/apps/delete"},{"title":"Instalar app","sidebarTitle":"Instalar","api":"POST https://api.upag.io/v1/apps/{appId}/install","href":"/pages/apps/install"},{"title":"Verificar script","sidebarTitle":"Verificar script","api":"GET https://api.upag.io/v1/apps/{appId}/script","href":"/pages/apps/verify-script"},{"title":"Desinstalar app","sidebarTitle":"Desinstalar","api":"DELETE https://api.upag.io/v1/apps/{appId}/uninstall","href":"/pages/apps/uninstall"},{"title":"Listar logs do app","sidebarTitle":"Listar logs","api":"GET https://api.upag.io/v1/apps/{appId}/logs","href":"/pages/apps/list-logs"},{"title":"Obter log do app","sidebarTitle":"Obter log","api":"GET https://api.upag.io/v1/apps/{appId}/logs/{logId}","href":"/pages/apps/get-log"}]},{"group":"Chave de API","pages":[{"title":"Identificar chave","sidebarTitle":"Identificar chave","api":"GET https://api.upag.io/v1/me","href":"/pages/me/get"}]}]},{"tab":"Webhooks","pages":[{"title":"Webhooks","href":"/pages/webhooks/overview"}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/pages/sdk/overview"}]},{"tab":"Simulador","pages":[{"title":"Simulador","href":"/pages/simulator"}]}]},"basePath":"","title":"Pagar fatura - Upag Documentation","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"]}