Troca o método de pagamento da assinatura e/ou marca (ou desmarca) o cancelamento ao fim do período. Todos os campos são opcionais; envie apenas o que mudar. Para alterar itens, use Adicionar item e Atualizar item.A troca não cobra nada na hora: o novo método é usado na próxima tentativa de cobrança, seja a renovação ou a nova tentativa de uma assinatura past_due. É também assim que você define o método de uma assinatura criada em teste sem paymentMethod.Permissão: subscription.write. Apenas chave secreta (sk_…). Assinaturas canceled ou void não podem ser alteradas.
Os exemplos usam o sandbox (https://api.upag.dev/v1). Em produção use https://api.upag.io/v1 com sk_live_….
await upag.subscriptions.update('9a3c6e1f-0d58-4b72-a4e9-7c2f8b5d1e36', { cancelAtPeriodEnd: true,});// Desfaz: a assinatura volta a renovarawait upag.subscriptions.update('9a3c6e1f-0d58-4b72-a4e9-7c2f8b5d1e36', { cancelAtPeriodEnd: false,});
UUID de um cartão tokenizado ativo que já pertença ao cliente da assinatura (um token novo ainda não pertence a ninguém; veja Criar assinatura). Obrigatório com paymentMethod: "card"; proibido com pix; não pode ser enviado sem paymentMethod.
true cancela a assinatura quando o período atual acabar (ela segue ativa até lá); false desfaz o agendamento. Para cancelar de imediato ou informar um motivo, use Cancelar assinatura.
O cartão não existe, está inativo ou não pertence ao cliente da assinatura
400
SUBSCRIPTION_NOT_EDITABLE
A assinatura está canceled ou void
422
VALIDATION_FAILED
card ausente com paymentMethod: "card", card com pix, ou card sem paymentMethod
{"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/subscriptions/update","slug":"/pages/subscriptions/update","pageMetadata":{"title":"Atualizar assinatura","description":"Troca o método de pagamento ou agenda/desfaz o cancelamento no fim do período","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/subscriptions/{subscriptionId}","href":"/pages/subscriptions/update"},"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: \"Troca o método de pagamento ou agenda/desfaz o cancelamento no fim do período\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._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:[`Troca o método de pagamento da assinatura e/ou marca (ou desmarca) o cancelamento ao fim do período. Todos os campos são opcionais; envie apenas o que mudar. Para alterar itens, use `,_jsx(_components.a,{href:`/pages/subscriptions/create-item`,children:`Adicionar item`}),` e `,_jsx(_components.a,{href:`/pages/subscriptions/update-item`,children:`Atualizar item`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A troca não cobra nada na hora: o novo método é usado na próxima tentativa de cobrança, seja a renovação ou a nova tentativa de uma assinatura `,_jsx(_components.code,{children:`past_due`}),`. É também assim que você define o método de uma assinatura criada em teste sem `,_jsx(_components.code,{children:`paymentMethod`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Permissão: `,_jsx(_components.code,{children:`subscription.write`}),`. Apenas chave secreta (`,_jsx(_components.code,{children:`sk_…`}),`). Assinaturas `,_jsx(_components.code,{children:`canceled`}),` ou `,_jsx(_components.code,{children:`void`}),` não podem ser alteradas.`]}),`\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`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`7`,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:`7`,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:` PATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.upag.dev/v1/subscriptions/9a3c6e1f-0d58-4b72-a4e9-7c2f8b5d1e36`}),_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:` \"paymentMethod\": \"card\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"card\": \"e1b84d70-3a9c-4f26-8d15-6c0a7f2b9e43\"`})}),`\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:`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:` subscription`}),_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:`subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'9a3c6e1f-0d58-4b72-a4e9-7c2f8b5d1e36'`}),_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:` paymentMethod:`}),_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:` 'e1b84d70-3a9c-4f26-8d15-6c0a7f2b9e43'`}),_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`,_jsx(Heading,{level:`3`,id:`cancelar-no-fim-do-período-e-desfazer`,children:`Cancelar no fim do período (e desfazer)`}),`\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:` PATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.upag.dev/v1/subscriptions/9a3c6e1f-0d58-4b72-a4e9-7c2f8b5d1e36`}),_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:` '{ \"cancelAtPeriodEnd\": true }'`})]}),`\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:`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:`subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'9a3c6e1f-0d58-4b72-a4e9-7c2f8b5d1e36'`}),_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:` cancelAtPeriodEnd:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Desfaz: a assinatura volta a renovar`})}),`\n`,_jsxs(_components.span,{className:`line`,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:`subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'9a3c6e1f-0d58-4b72-a4e9-7c2f8b5d1e36'`}),_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:` cancelAtPeriodEnd:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`parâmetros`,children:`Parâmetros`}),`\n`,_jsx(ParamField,{path:`subscriptionId`,type:`string (uuid)`,required:true,id:`param-subscription-id`,children:_jsx(_components.p,{children:`ID da assinatura.`})}),`\n`,_jsx(ParamField,{body:`paymentMethod`,type:`string`,id:`param-payment-method`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`pix`}),` ou `,_jsx(_components.code,{children:`card`}),`.`]})}),`\n`,_jsx(ParamField,{body:`card`,type:`string (uuid)`,id:`param-card`,children:_jsxs(_components.p,{children:[`UUID de um `,_jsx(_components.a,{href:`/pages/cards/create`,children:`cartão tokenizado`}),` ativo que já pertença ao cliente da assinatura (um token novo ainda não pertence a ninguém; veja `,_jsx(_components.a,{href:`/pages/subscriptions/create`,children:`Criar assinatura`}),`). Obrigatório com `,_jsx(_components.code,{children:`paymentMethod: \"card\"`}),`; proibido com `,_jsx(_components.code,{children:`pix`}),`; não pode ser enviado sem `,_jsx(_components.code,{children:`paymentMethod`}),`.`]})}),`\n`,_jsx(ParamField,{body:`cancelAtPeriodEnd`,type:`boolean`,id:`param-cancel-at-period-end`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` cancela a assinatura quando o período atual acabar (ela segue ativa até lá); `,_jsx(_components.code,{children:`false`}),` desfaz o agendamento. Para cancelar de imediato ou informar um motivo, use `,_jsx(_components.a,{href:`/pages/subscriptions/cancel`,children:`Cancelar assinatura`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`resposta`,children:`Resposta`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`200 OK`}),` com a `,_jsx(_components.a,{href:`/pages/subscriptions/reference`,children:`assinatura`}),` atualizada.`]}),`\n`,_jsx(CodeBlock,{filename:`Response`,numberOfLines:`35`,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:`35`,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:`\"9a3c6e1f-0d58-4b72-a4e9-7c2f8b5d1e36\"`}),_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:`#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:` \"card\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"e1b84d70-3a9c-4f26-8d15-6c0a7f2b9e43\"`}),_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:`\"active\"`}),_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:` \"interval\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"month\"`}),_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:` \"intervalCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cancelAtPeriodEnd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"startDate\"`}),_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:` \"endDate\"`}),_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:` \"trialStartDate\"`}),_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:` \"trialEndDate\"`}),_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:` \"trialEndBehavior\"`}),_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:` \"currentPeriodStart\"`}),_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:` \"currentPeriodEnd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-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:` \"canceledAt\"`}),_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:` \"cancellationReason\"`}),_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:` \"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:`\"c6d2f9a4-7e18-4b35-9a60-3f1e8d5b2c07\"`}),_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:`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:` \"quantity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_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:`#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`}),_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:00:00.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-12T14:20:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\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:`SUBSCRIPTION_NOT_FOUND`})}),_jsx(_components.td,{children:`A assinatura não existe ou é de outra conta`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SUBSCRIPTION_CARD_NOT_FOUND`})}),_jsx(_components.td,{children:`O cartão não existe, está inativo ou não pertence ao cliente da assinatura`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SUBSCRIPTION_NOT_EDITABLE`})}),_jsxs(_components.td,{children:[`A assinatura está `,_jsx(_components.code,{children:`canceled`}),` ou `,_jsx(_components.code,{children:`void`})]})]}),_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:`card`}),` ausente com `,_jsx(_components.code,{children:`paymentMethod: \"card\"`}),`, `,_jsx(_components.code,{children:`card`}),` com `,_jsx(_components.code,{children:`pix`}),`, ou `,_jsx(_components.code,{children:`card`}),` sem `,_jsx(_components.code,{children:`paymentMethod`})]})]})]})]})]})}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":"Atualizar assinatura","description":"Troca o método de pagamento ou agenda/desfaz o cancelamento no fim do período","sidebarTitle":"Atualizar","api":"PATCH https://api.upag.io/v1/subscriptions/{subscriptionId}","href":"/pages/subscriptions/update"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Endpoint","slug":"endpoint","depth":2,"children":[{"title":"Cancelar no fim do período (e desfazer)","slug":"cancelar-no-fim-do-período-e-desfazer","depth":3,"children":[]}]},{"title":"Parâmetros","slug":"parâmetros","depth":2,"children":[]},{"title":"Resposta","slug":"resposta","depth":2,"children":[]},{"title":"Erros","slug":"erros","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Atualizar assinatura","path":"/v1/subscriptions/{subscriptionId}","servers":[{"url":"https://api.upag.io"}],"method":"patch","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":{"subscriptionId":{"schema":[{"type":"object","properties":{},"description":"ID da assinatura.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"paymentMethod":[{"type":"string","description":"`pix` ou `card` ."}],"card":[{"type":"object","properties":{},"description":"UUID de um cartão tokenizado ativo que já pertença ao cliente da assinatura (um token novo ainda não pertence a ninguém; veja Criar assinatura ). Obrigatório com `paymentMethod: \"card\"` ; proibido com `pix` ; não pode ser enviado sem `paymentMethod` ."}],"cancelAtPeriodEnd":[{"type":"boolean","description":"`true` cancela a assinatura quando o período atual acabar (ela segue ativa até lá); `false` desfaz o agendamento. Para cancelar de imediato ou informar um motivo, use Cancelar assinatura ."}]}}],"examples":{"example":{"value":{"paymentMethod":"\u003cstring>","card":{},"cancelAtPeriodEnd":true}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"upag","siteName":"Upag Documentation","title":"Atualizar assinatura - Upag Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-08T11:19:48.277Z","originalFileLocation":"pages/subscriptions/update.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=\"Troca o método de pagamento ou agenda/desfaz o cancelamento no fim do período\">\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=\"Atualizar assinatura - Upag Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Troca o método de pagamento ou agenda/desfaz o cancelamento no fim do período\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Upag Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.upag.io/pages/subscriptions/update\">\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=Assinaturas\u0026amp;title=Atualizar+assinatura\u0026amp;description=Troca+o+m%C3%A9todo+de+pagamento+ou+agenda%2Fdesfaz+o+cancelamento+no+fim+do+per%C3%ADodo\u0026amp;theme=24438c70022642b5f3af8183\u0026amp;signature=320492143784c342d3deccd52a4d0fbd2182f608d5830631024feaa53b7145e5\">\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=\"Atualizar assinatura - Upag Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Troca o método de pagamento ou agenda/desfaz o cancelamento no fim do período\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://upag.mintlify.site/_mintlify/api/og/v2?division=Assinaturas\u0026amp;title=Atualizar+assinatura\u0026amp;description=Troca+o+m%C3%A9todo+de+pagamento+ou+agenda%2Fdesfaz+o+cancelamento+no+fim+do+per%C3%ADodo\u0026amp;theme=24438c70022642b5f3af8183\u0026amp;signature=320492143784c342d3deccd52a4d0fbd2182f608d5830631024feaa53b7145e5\">\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/subscriptions/update\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/pages/subscriptions/update.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/subscriptions/update#webpage\",\"url\":\"https://docs.upag.io/pages/subscriptions/update\",\"name\":\"Atualizar assinatura\",\"description\":\"Troca o método de pagamento ou agenda/desfaz o cancelamento no fim do período\",\"dateModified\":\"2026-10-08T11:19:48.277Z\",\"isPartOf\":{\"@id\":\"https://docs.upag.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.upag.io/pages/subscriptions/update#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.upag.io/pages/subscriptions/update#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Assinaturas\",\"item\":\"https://docs.upag.io/pages/subscriptions/reference\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Atualizar assinatura\",\"item\":\"https://docs.upag.io/pages/subscriptions/update\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.upag.io/pages/subscriptions/update#apireference\",\"headline\":\"Atualizar assinatura\",\"name\":\"Atualizar assinatura\",\"description\":\"Troca o método de pagamento ou agenda/desfaz o cancelamento no fim do período\",\"url\":\"https://docs.upag.io/pages/subscriptions/update\",\"mainEntityOfPage\":{\"@id\":\"https://docs.upag.io/pages/subscriptions/update#webpage\"},\"dateModified\":\"2026-10-08T11:19:48.277Z\",\"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","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","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","description":"Consulta uma assinatura com seus itens","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","description":"Cancela uma assinatura agora ou ao fim do período atual","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":"Atualizar assinatura - 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"]}