This endpoint does two different jobs, and one request may do only one of them.
Edit fields.metadata, failure_policy and retry_offsets_days can be changed at any time.
Change the plan. Send product_id, optionally with quantity.
product_id cannot be combined with the editable fields, and quantity requires product_id. Both combinations are rejected with 422 so that no part of the request is silently dropped.Amount, interval and currency are not edited directly — they come from the plan, and they change when the plan changes.A subscription.updated webhook is dispatched in every case.On a Pix Automático subscription, plan changes are not available: sending product_id returns 422 and the plan stays the same (PLAN_CHANGE_UNAVAILABLE_FOR_PAYMENT_METHOD when the subscription is tied to a catalog plan). retry_offsets_days is stored but has no effect there, because retry timing follows the Pix Automático rules.
Which plans a subscription can move to
A subscription can only change plans when it is already tied to a catalog plan. Check productId first: when it is null, no plan change is possible.The target must be an active plan in the same product family as the current one — productFamilyId tells you which family that is. A target in another family, or a product that is not a recurring plan, is rejected before anything is charged or written.
What happens, and when the customer is charged
Case
Effect
Plan of a higher tier
charged immediately for what remains of the current period; the renewal date does not move
Plan of a lower tier
scheduled for current_period_end. Nothing is charged and nothing is refunded
Any plan whose total comes out below the current amount — fewer units, or a higher tier priced under the current plan
scheduled for current_period_end, exactly like a lower tier
Plan with a different billing cycle
applied immediately at the full price of the new plan; the renewal date restarts
Subscription is past_due
applied immediately at the full price of the new plan, settling the open cycle; the subscription returns to active
The billing cycle takes precedence: moving between plans billed on different cycles is always immediate and always charges the full price, whichever tier the target is.When a charge is declined, the plan does not change — the request fails with 402 and the subscription is left exactly as it was.When the charge returns no result at all — a timeout, for instance — the outcome is unknown rather than a decline, so the request fails with 409PLAN_CHARGE_INDETERMINATE instead. The plan does not change. Retry the same change once the charge settles; retrying it earlier is refused, because the charge may already have gone through.
Scheduled changes
A change scheduled for the end of the period is visible in pendingChange, with the target plan, the amount that will be billed — the plan plus anything billed alongside it — and the date it takes effect. Its price is fixed when you schedule it, so later edits to the plan do not alter what was agreed.To cancel a scheduled change, send product_id with the plan the subscription is currently on. pendingChange returns to null.
Response fields
Field
Meaning
productId
the plan being billed, or null when the subscription is not tied to one
productFamilyId
the product family the plan belongs to, or null
pendingChange
the scheduled change (productId, amount, effectiveAt), or null
Errors
Status
Code
When
422
PRODUCT_NOT_FOUND
the product id does not resolve, or the target plan is inactive
422
PRODUCT_NOT_RECURRING
the target is not a recurring plan
422
PLAN_NOT_IN_SAME_FAMILY
the target belongs to another family, or either side has none
422
SUBSCRIPTION_HAS_NO_CATALOG_PLAN
the subscription is not tied to a catalog plan
422
PLAN_CHANGE_CURRENCY_MISMATCH
the target is priced in a different currency
422
PLAN_CHANGE_SAME_PRODUCT
the subscription is already on that plan and has nothing scheduled
422
PLAN_CHANGE_NOT_ALLOWED_DURING_TRIAL
the subscription is trialing
422
PLAN_CHANGE_NOT_ALLOWED_FOR_STATUS
the status does not allow a change
422
PLAN_CHANGE_UNAVAILABLE_FOR_PAYMENT_METHOD
the payment method does not support changing plans
409
PLAN_CHANGE_BLOCKED_BY_PENDING_RENEWAL
a charge for this subscription is still in flight; retry once it settles
402
PLAN_CHARGE_DECLINED
the charge for the new plan was declined
409
PLAN_CHARGE_INDETERMINATE
the charge returned no result; the plan did not change and the charge is being reconciled
409
PLAN_CHANGE_NOT_APPLIED
the subscription changed while the change was being applied; the plan was not changed
{"docsConfig":{"theme":"sequoia","$schema":"https://mintlify.com/docs.json","name":"Pagou Developer Docs","description":"Integrate payments, subscriptions, payouts, webhooks, and frontend card flows with Pagou.ai API.","colors":{"primary":"#198754","light":"#07C983","dark":"#198754"},"logo":{"light":"https://mintcdn.com/pagouai/G-8AHDSd0H3lSbe_/logo/logo-long.webp?fit=max\u0026auto=format\u0026n=G-8AHDSd0H3lSbe_\u0026q=85\u0026s=f29ebde8b8d8c96183843fc8bc58e508","dark":"https://mintcdn.com/pagouai/G-8AHDSd0H3lSbe_/logo/logo-long-dark.webp?fit=max\u0026auto=format\u0026n=G-8AHDSd0H3lSbe_\u0026q=85\u0026s=838f22bb8beb6e11ce9c45d0e3dba402"},"favicon":"https://mintcdn.com/pagouai/G-8AHDSd0H3lSbe_/logo/logo-short.webp?fit=max\u0026auto=format\u0026n=G-8AHDSd0H3lSbe_\u0026q=85\u0026s=38c30337b736500dd5c2667b1820ba19","background":{"decoration":"windows"},"navbar":{"links":[{"icon":"bot","href":"/start-here/ai-integration","label":"Integrate with AI"},{"icon":"activity","href":"https://status.pagou.ai","label":"Status"},{"icon":"arrow-up-right","href":"https://pagou.ai","label":"Pagou.ai"}]},"footer":{},"fonts":{"family":"Google Sans"},"icons":{"library":"lucide"},"integrations":{"intercom":{"appId":"uhg6tri7"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"AI Integration","icon":"bot","href":"/start-here/ai-integration"},{"anchor":"API status","href":"https://status.pagou.ai"},{"anchor":"GitHub","href":"https://github.com/pagouai"}]},"languages":[{"language":"en","default":true,"href":""},{"language":"pt-BR","href":"pt"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pagouai","hasAudioNarration":false,"actualSubdomain":"pagouai","customDomains":["developer.pagou.ai"],"gitSource":{"type":"github","owner":"pagouai","repo":"gateway-backend","deployBranch":"main","contentDirectory":"packages/docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b05724c045bb8fe70aac54a","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"en","tag":"API Reference","count":37},{"language":"pt-BR","tag":"Referência API","count":37},{"language":"en","tag":"Payments","count":15},{"language":"pt-BR","tag":"Pagamentos","count":15},{"language":"en","tag":"Subscriptions","count":13},{"language":"en","tag":"Start Here","count":13},{"language":"pt-BR","tag":"Assinaturas","count":13},{"language":"pt-BR","tag":"Comece Aqui","count":13},{"language":"en","tag":"Webhooks","count":12},{"language":"pt-BR","tag":"Webhooks","count":12},{"language":"pt-BR","tag":"Transferências","count":10},{"language":"en","tag":"Legacy v1","count":9},{"language":"en","tag":"Front-end","count":9},{"language":"pt-BR","tag":"Legado v1","count":9},{"language":"pt-BR","tag":"Frontend","count":9},{"language":"en","tag":"Transactions","count":8},{"language":"pt-BR","tag":"Transações","count":8},{"language":"en","tag":"Resources","count":7},{"language":"en","tag":"Examples","count":7},{"language":"pt-BR","tag":"Recursos","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"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":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":":root{--pagou-ink: #0f172a;--pagou-mint: #07c983;--pagou-emerald: #16a34a;--pagou-forest: #14532d;--pagou-sand: #f8fafc;--pagou-border: rgba(15, 23, 42, 0.08)}.hero-shell{background:radial-gradient(circle at 18% 12%, rgba(7, 201, 131, 0.16), transparent 26%),\n\t\tradial-gradient(circle at 88% 10%, rgba(25, 135, 84, 0.12), transparent 22%),\n\t\tradial-gradient(circle at 50% 100%, rgba(22, 163, 74, 0.16), transparent 36%),\n\t\tlinear-gradient(180deg, rgba(8, 18, 14, 0.98) 0%, rgba(4, 12, 10, 0.96) 100%);border:1px solid rgba(52, 211, 153, 0.16);border-radius:28px;box-shadow:0 24px 80px rgba(2, 6, 23, 0.42);overflow:hidden;padding:2.4rem;position:relative}.hero-shell::after{background:radial-gradient(circle at 20% 100%, rgba(8, 201, 131, 0.12), transparent 26%),\n\t\tradial-gradient(circle at 70% 100%, rgba(163, 230, 53, 0.12), transparent 24%);bottom:-18%;content:\"\";height:54%;left:-6%;position:absolute;right:-6%}.hero-content{position:relative;z-index:1}.hero-kicker{color:#7ee7b8;font-size:0.8rem;font-weight:700;letter-spacing:0.14em;text-transform:uppercase}.hero-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))}.hero-panel{background:rgba(11, 24, 20, 0.76);border:1px solid rgba(52, 211, 153, 0.16);border-radius:18px;padding:1rem;backdrop-filter:blur(16px);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.03)}.hero-shell h1,.hero-shell p,.hero-shell strong{color:rgba(241, 245, 249, 0.96)}.home-section{margin-top:2.4rem}.checklist-band{background:linear-gradient(90deg, rgba(20, 83, 45, 0.95), rgba(22, 163, 74, 0.92));border-radius:22px;color:white;padding:1.25rem 1.5rem}.checklist-band strong,.checklist-band code{color:white}.doc-note-grid{display:grid;gap:0.8rem;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr))}.doc-note{background:linear-gradient(180deg, rgba(7, 201, 131, 0.08), rgba(22, 163, 74, 0.02));border:1px solid rgba(7, 201, 131, 0.16);border-radius:18px;padding:1rem}.legacy-banner{background:linear-gradient(90deg, rgba(127, 29, 29, 0.08), rgba(180, 83, 9, 0.08));border:1px solid rgba(180, 83, 9, 0.18);border-radius:18px;padding:1rem 1.1rem}.status-table strong{color:var(--pagou-ink)}"}]}
{"page":{"pagePath":"api-reference/subscriptions/update","slug":"/api-reference/subscriptions/update","pageMetadata":{"title":"Update a Subscription","description":"Update the editable fields of an existing subscription, or move it to another plan.","icon":"pencil","openapi":"api-reference/openapi-v2.json PATCH /v2/subscriptions/{id}","href":"/api-reference/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: \"Update the editable fields of an existing subscription, or move it to another plan.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Table}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This endpoint does two different jobs, and one request may do only one of them.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Edit fields.`}),` `,_jsx(_components.code,{children:`metadata`}),`, `,_jsx(_components.code,{children:`failure_policy`}),` and `,_jsx(_components.code,{children:`retry_offsets_days`}),` can be changed at any time.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Change the plan.`}),` Send `,_jsx(_components.code,{children:`product_id`}),`, optionally with `,_jsx(_components.code,{children:`quantity`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`product_id`}),` cannot be combined with the editable fields, and `,_jsx(_components.code,{children:`quantity`}),` requires `,_jsx(_components.code,{children:`product_id`}),`. Both combinations are rejected with `,_jsx(_components.code,{children:`422`}),` so that no part of the request is silently dropped.`]}),`\n`,_jsx(_components.p,{children:`Amount, interval and currency are not edited directly — they come from the plan, and they change when the plan changes.`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`subscription.updated`}),` webhook is dispatched in every case.`]}),`\n`,_jsxs(_components.p,{children:[`On a Pix Automático subscription, plan changes are not available: sending `,_jsx(_components.code,{children:`product_id`}),` returns `,_jsx(_components.code,{children:`422`}),` and the plan stays the same (`,_jsx(_components.code,{children:`PLAN_CHANGE_UNAVAILABLE_FOR_PAYMENT_METHOD`}),` when the subscription is tied to a catalog plan). `,_jsx(_components.code,{children:`retry_offsets_days`}),` is stored but has no effect there, because retry timing follows the Pix Automático rules.`]}),`\n`,_jsx(Heading,{level:`2`,id:`which-plans-a-subscription-can-move-to`,children:`Which plans a subscription can move to`}),`\n`,_jsxs(_components.p,{children:[`A subscription can only change plans when it is already tied to a catalog plan. Check `,_jsx(_components.code,{children:`productId`}),` first: when it is `,_jsx(_components.code,{children:`null`}),`, no plan change is possible.`]}),`\n`,_jsxs(_components.p,{children:[`The target must be an `,_jsx(_components.strong,{children:`active plan in the same product family`}),` as the current one — `,_jsx(_components.code,{children:`productFamilyId`}),` tells you which family that is. A target in another family, or a product that is not a recurring plan, is rejected before anything is charged or written.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-happens-and-when-the-customer-is-charged`,children:`What happens, and when the customer is charged`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Case`}),_jsx(_components.th,{children:`Effect`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Plan of a higher tier`}),_jsx(_components.td,{children:`charged immediately for what remains of the current period; the renewal date does not move`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Plan of a lower tier`}),_jsxs(_components.td,{children:[`scheduled for `,_jsx(_components.code,{children:`current_period_end`}),`. Nothing is charged and nothing is refunded`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Any plan whose total comes out below the current amount — fewer units, or a higher tier priced under the current plan`}),_jsxs(_components.td,{children:[`scheduled for `,_jsx(_components.code,{children:`current_period_end`}),`, exactly like a lower tier`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Plan with a different billing cycle`}),_jsx(_components.td,{children:`applied immediately at the full price of the new plan; the renewal date restarts`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Subscription is `,_jsx(_components.code,{children:`past_due`})]}),_jsxs(_components.td,{children:[`applied immediately at the full price of the new plan, settling the open cycle; the subscription returns to `,_jsx(_components.code,{children:`active`})]})]})]})]}),`\n`,_jsx(_components.p,{children:`The billing cycle takes precedence: moving between plans billed on different cycles is always immediate and always charges the full price, whichever tier the target is.`}),`\n`,_jsxs(_components.p,{children:[`When a charge is declined, `,_jsx(_components.strong,{children:`the plan does not change`}),` — the request fails with `,_jsx(_components.code,{children:`402`}),` and the subscription is left exactly as it was.`]}),`\n`,_jsxs(_components.p,{children:[`When the charge returns no result at all — a timeout, for instance — the outcome is unknown rather than a decline, so the request fails with `,_jsx(_components.code,{children:`409`}),` `,_jsx(_components.code,{children:`PLAN_CHARGE_INDETERMINATE`}),` instead. The plan does not change. Retry the same change once the charge settles; retrying it earlier is refused, because the charge may already have gone through.`]}),`\n`,_jsx(Heading,{level:`2`,id:`scheduled-changes`,children:`Scheduled changes`}),`\n`,_jsxs(_components.p,{children:[`A change scheduled for the end of the period is visible in `,_jsx(_components.code,{children:`pendingChange`}),`, with the target plan, the amount that will be billed — the plan plus anything billed alongside it — and the date it takes effect. Its price is fixed when you schedule it, so later edits to the plan do not alter what was agreed.`]}),`\n`,_jsxs(_components.p,{children:[`To cancel a scheduled change, send `,_jsx(_components.code,{children:`product_id`}),` with the plan the subscription is currently on. `,_jsx(_components.code,{children:`pendingChange`}),` returns to `,_jsx(_components.code,{children:`null`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`productId`})}),_jsxs(_components.td,{children:[`the plan being billed, or `,_jsx(_components.code,{children:`null`}),` when the subscription is not tied to one`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`productFamilyId`})}),_jsxs(_components.td,{children:[`the product family the plan belongs to, or `,_jsx(_components.code,{children:`null`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pendingChange`})}),_jsxs(_components.td,{children:[`the scheduled change (`,_jsx(_components.code,{children:`productId`}),`, `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`effectiveAt`}),`), or `,_jsx(_components.code,{children:`null`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PRODUCT_NOT_FOUND`})}),_jsx(_components.td,{children:`the product id does not resolve, or the target plan is inactive`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PRODUCT_NOT_RECURRING`})}),_jsx(_components.td,{children:`the target is not a recurring plan`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_NOT_IN_SAME_FAMILY`})}),_jsx(_components.td,{children:`the target belongs to another family, or either side has none`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SUBSCRIPTION_HAS_NO_CATALOG_PLAN`})}),_jsx(_components.td,{children:`the subscription is not tied to a catalog plan`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_CHANGE_CURRENCY_MISMATCH`})}),_jsx(_components.td,{children:`the target is priced in a different currency`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_CHANGE_SAME_PRODUCT`})}),_jsx(_components.td,{children:`the subscription is already on that plan and has nothing scheduled`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_CHANGE_NOT_ALLOWED_DURING_TRIAL`})}),_jsxs(_components.td,{children:[`the subscription is `,_jsx(_components.code,{children:`trialing`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_CHANGE_NOT_ALLOWED_FOR_STATUS`})}),_jsx(_components.td,{children:`the status does not allow a change`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_CHANGE_UNAVAILABLE_FOR_PAYMENT_METHOD`})}),_jsx(_components.td,{children:`the payment method does not support changing plans`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_CHANGE_BLOCKED_BY_PENDING_RENEWAL`})}),_jsx(_components.td,{children:`a charge for this subscription is still in flight; retry once it settles`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`402`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_CHARGE_DECLINED`})}),_jsx(_components.td,{children:`the charge for the new plan was declined`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_CHARGE_INDETERMINATE`})}),_jsx(_components.td,{children:`the charge returned no result; the plan did not change and the charge is being reconciled`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PLAN_CHANGE_NOT_APPLIED`})}),_jsx(_components.td,{children:`the subscription changed while the change was being applied; the plan was not changed`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`read-next`,children:`Read next`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/subscriptions/lifecycle`,children:`Subscription Lifecycle`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/subscriptions/webhooks`,children:`Subscription Webhooks`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/subscriptions/get`,children:`API: Get a Subscription`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a Subscription","description":"Update the editable fields of an existing subscription, or move it to another plan.","icon":"pencil","openapi":"api-reference/openapi-v2.json PATCH /v2/subscriptions/{id}","href":"/api-reference/subscriptions/update"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Which plans a subscription can move to","slug":"which-plans-a-subscription-can-move-to","depth":2,"children":[]},{"title":"What happens, and when the customer is charged","slug":"what-happens-and-when-the-customer-is-charged","depth":2,"children":[]},{"title":"Scheduled changes","slug":"scheduled-changes","depth":2,"children":[]},{"title":"Response fields","slug":"response-fields","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Read next","slug":"read-next","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Subscriptions"],"description":"Update the editable fields of an existing subscription, or move it to another plan.","requestBody":"2025ac1e-892d-4bdd-af4e-a3691357bd5a","parameters":["1bcd7a33-d907-4a01-8a53-3b7f1bfe701e"],"responses":{"200":"8cfa301b-aa6e-4847-993a-2ff0da047ac1","402":"8aeded24-8027-4012-8998-cf9e5ad5d43e","404":"ba64d270-5e0f-481a-bbc5-b88c88f6e229","409":"02de56a4-27be-466d-9831-3e00387d9517","422":"e0ffb993-7fd7-4032-85ab-bcde525ab109","503":"a1d8e79e-9652-4ef6-a2f5-c5ef876d45dc","default":"02fbf14c-120d-4b1b-8cf5-9baccf7df836"},"operationId":"patchSubscriptionsById","summary":"Update a Subscription","security":["c09f05e2-da24-4441-b773-9b4e83c9370c","5f548b97-37da-4a8f-8110-75932f9adfc8","0b9a492a-e65d-4957-ad4c-98ca527439b1"],"method":"patch","type":"path","servers":["a4969a60-890c-4f4f-b187-7cbe29068711","e1ba3307-9963-48a9-aac6-330caba68aca"],"path":"/v2/subscriptions/{id}","baseUrlOptions":["https://api.pagou.ai","https://api.sandbox.pagou.ai"],"title":"Update a Subscription","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"1bcd7a33-d907-4a01-8a53-3b7f1bfe701e":{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","isRequired":true,"description":"Public subscription id (UUID).","uniqueKey":"","typeLabel":"string\u003cuuid>"},"in":"path","name":"id","required":true,"description":"Public subscription id (UUID)."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"oneOf":[{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"metadata.oneOf.0.additionalProperties","typeLabel":"any"},"uniqueKey":"metadata.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":{"oneOf":[{}],"uniqueKey":"metadata.oneOf.1.additionalProperties","typeLabel":"any"},"uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata","typeLabel":"object | null"},"failure_policy":{"type":"string","enum":["immediate_cancel","retry_then_cancel","retry_then_unpaid"],"uniqueKey":"failure_policy","typeLabel":"enum\u003cstring>"},"retry_offsets_days":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"integer","minimum":1,"maximum":30,"uniqueKey":"retry_offsets_days.items.[INDEX]","typeLabel":"integer"},"uniqueKey":"retry_offsets_days","typeLabel":"integer[]"},"product_id":{"description":"Public id of a catalog product in the same family. Changes the subscription's plan.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","uniqueKey":"product_id","typeLabel":"string\u003cuuid>"},"quantity":{"description":"Quantity for the new plan. Omitted keeps the current one.","type":"integer","minimum":1,"maximum":999999,"uniqueKey":"quantity","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"metadata":{},"retry_offsets_days":[15],"product_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","quantity":500000}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"8cfa301b-aa6e-4847-993a-2ff0da047ac1":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"requestId":{"type":"string","isRequired":true,"uniqueKey":"requestId","typeLabel":"string"},"data":{"type":"object","properties":{"id":{"type":"string","description":"Public subscription id (UUID).","isRequired":true,"uniqueKey":"data.id","typeLabel":"string"},"customerId":{"type":"string","description":"Public customer id (UUID) the subscription belongs to.","isRequired":true,"uniqueKey":"data.customerId","typeLabel":"string"},"status":{"type":"string","enum":["incomplete","trialing","active","past_due","unpaid","cancel_scheduled","canceled"],"description":"Current subscription status.","isRequired":true,"uniqueKey":"data.status","typeLabel":"enum\u003cstring>"},"paymentMethod":{"type":"string","enum":["credit_card","pix_automatic"],"description":"How each cycle is paid.","isRequired":true,"uniqueKey":"data.paymentMethod","typeLabel":"enum\u003cstring>"},"billingModel":{"type":"string","enum":["merchant_initiated","provider_initiated"],"description":"`provider_initiated` when each cycle is debited automatically under a recurring authorization the customer approved.","isRequired":true,"uniqueKey":"data.billingModel","typeLabel":"enum\u003cstring>"},"billingDayOfMonth":{"oneOf":[{"description":"Day of month cycles are billed, when fixed.","type":"integer","minimum":1,"maximum":31,"isRequired":true,"uniqueKey":"data.billingDayOfMonth.oneOf.0","typeLabel":"integer"},{"description":"Day of month cycles are billed, when fixed.","type":"null","minimum":1,"maximum":31,"isRequired":true,"uniqueKey":"data.billingDayOfMonth.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.billingDayOfMonth","typeLabel":"integer | null"},"interval":{"type":"string","enum":["day","week","month"],"description":"Billing interval unit.","isRequired":true,"uniqueKey":"data.interval","typeLabel":"enum\u003cstring>"},"intervalCount":{"type":"integer","minimum":1,"maximum":365,"description":"Number of interval units per billing cycle.","isRequired":true,"uniqueKey":"data.intervalCount","typeLabel":"integer"},"amount":{"type":"integer","minimum":0,"maximum":100000000,"description":"Billing amount in cents.","isRequired":true,"uniqueKey":"data.amount","typeLabel":"integer"},"currency":{"type":"string","enum":["BRL","MXN","COP","CLP","ARS","PEN","USD","GTQ","CRC","NIO","PYG","UYU","BOB","PHP","RUB","INR","SAR","AED","KWD","QAR","OMR","KHR","SGD","IDR","KRW","THB","MYR","HKD","CNY","EGP","EUR","GBP","BHD","MAD","AUD","CAD","CHF","NZD","PLN","KZT","UZS","JPY","GLC"],"description":"Billing currency.","isRequired":true,"uniqueKey":"data.currency","typeLabel":"enum\u003cstring>"},"trialEnd":{"oneOf":[{"description":"Trial end timestamp, when applicable.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.trialEnd.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"Trial end timestamp, when applicable.","type":"null","format":"date-time","isRequired":true,"uniqueKey":"data.trialEnd.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.trialEnd","typeLabel":"string\u003cdate-time> | null"},"currentPeriodStart":{"description":"Start of the current billing period.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.currentPeriodStart","typeLabel":"string\u003cdate-time>"},"currentPeriodEnd":{"description":"End of the current billing period.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.currentPeriodEnd","typeLabel":"string\u003cdate-time>"},"cancelAtPeriodEnd":{"type":"boolean","description":"Whether cancellation is scheduled at period end.","isRequired":true,"uniqueKey":"data.cancelAtPeriodEnd","typeLabel":"boolean"},"canceledAt":{"oneOf":[{"description":"Cancellation timestamp, when canceled.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.canceledAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"Cancellation timestamp, when canceled.","type":"null","format":"date-time","isRequired":true,"uniqueKey":"data.canceledAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.canceledAt","typeLabel":"string\u003cdate-time> | null"},"failurePolicy":{"type":"string","enum":["immediate_cancel","retry_then_cancel","retry_then_unpaid"],"description":"Behavior on a failed billing attempt.","isRequired":true,"uniqueKey":"data.failurePolicy","typeLabel":"enum\u003cstring>"},"retryOffsetsDays":{"type":"array","items":{"type":"integer","minimum":1,"maximum":30,"uniqueKey":"data.retryOffsetsDays.items.[INDEX]","typeLabel":"integer"},"description":"Days after a failed attempt to retry.","isRequired":true,"uniqueKey":"data.retryOffsetsDays","typeLabel":"integer[]"},"cancellationReason":{"oneOf":[{"description":"Reason for cancellation, when canceled. `completed` when the last of `maxCycles` charges was paid.","type":"string","enum":["user_requested","payment_failure","chargeback","system","admin_requested","completed"],"isRequired":true,"uniqueKey":"data.cancellationReason.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"Reason for cancellation, when canceled. `completed` when the last of `maxCycles` charges was paid.","type":"null","enum":["user_requested","payment_failure","chargeback","system","admin_requested","completed"],"isRequired":true,"uniqueKey":"data.cancellationReason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.cancellationReason","typeLabel":"enum\u003cstring> | null"},"cycleCount":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Current billing cycle, starting at 1. Without a trial it equals the number of paid charges.","isRequired":true,"uniqueKey":"data.cycleCount","typeLabel":"integer"},"maxCycles":{"oneOf":[{"description":"Number of paid charges after which the subscription ends, or null when it has no end.","type":"integer","minimum":2,"maximum":120,"isRequired":true,"uniqueKey":"data.maxCycles.oneOf.0","typeLabel":"integer"},{"description":"Number of paid charges after which the subscription ends, or null when it has no end.","type":"null","minimum":2,"maximum":120,"isRequired":true,"uniqueKey":"data.maxCycles.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.maxCycles","typeLabel":"integer | null"},"customerEmail":{"type":"string","description":"Email of the subscriber.","isRequired":true,"uniqueKey":"data.customerEmail","typeLabel":"string"},"cardLast4":{"oneOf":[{"description":"Last four digits of the billing card, for card subscriptions.","type":"string","isRequired":true,"uniqueKey":"data.cardLast4.oneOf.0","typeLabel":"string"},{"description":"Last four digits of the billing card, for card subscriptions.","type":"null","isRequired":true,"uniqueKey":"data.cardLast4.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.cardLast4","typeLabel":"string | null"},"metadata":{"oneOf":[{"description":"Custom metadata.","type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"data.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"isRequired":true,"uniqueKey":"data.metadata.oneOf.0","typeLabel":"object"},{"description":"Custom metadata.","type":"null","additionalProperties":{"oneOf":[{}],"uniqueKey":"data.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"isRequired":true,"uniqueKey":"data.metadata.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.metadata","typeLabel":"object | null"},"informations":{"oneOf":[{"description":"Custom key/value metadata you attached on create, echoed back.","maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"description":"Key of the additional information entry.","isRequired":true,"uniqueKey":"data.informations.oneOf.0.items.[INDEX].key","typeLabel":"string"},"value":{"type":"string","minLength":1,"maxLength":255,"description":"Value of the additional information entry.","isRequired":true,"uniqueKey":"data.informations.oneOf.0.items.[INDEX].value","typeLabel":"string"}},"required":["key","value"],"additionalProperties":false,"uniqueKey":"data.informations.oneOf.0.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"data.informations.oneOf.0","typeLabel":"object[]"},{"description":"Custom key/value metadata you attached on create, echoed back.","maxItems":50,"type":"null","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"description":"Key of the additional information entry."},"value":{"type":"string","minLength":1,"maxLength":255,"description":"Value of the additional information entry."}},"required":["key","value"],"additionalProperties":false},"isRequired":true,"uniqueKey":"data.informations.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.informations","typeLabel":"object[] | null"},"products":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Catalog product name.","isRequired":true,"uniqueKey":"data.products.items.[INDEX].name","typeLabel":"string"},"price":{"type":"integer","minimum":0,"maximum":100000000,"description":"Unit price in cents.","isRequired":true,"uniqueKey":"data.products.items.[INDEX].price","typeLabel":"integer"},"quantity":{"type":"integer","minimum":1,"maximum":999999,"description":"Quantity included in the subscription.","isRequired":true,"uniqueKey":"data.products.items.[INDEX].quantity","typeLabel":"integer"},"tangible":{"type":"boolean","description":"Whether the product is a tangible good.","isRequired":true,"uniqueKey":"data.products.items.[INDEX].tangible","typeLabel":"boolean"},"sku":{"description":"Optional SKU.","type":"string","maxLength":255,"uniqueKey":"data.products.items.[INDEX].sku","typeLabel":"string"}},"required":["name","price","quantity","tangible"],"additionalProperties":false,"uniqueKey":"data.products.items.[INDEX]","typeLabel":"object"},"description":"Snapshot of catalog products billed each cycle.","isRequired":true,"uniqueKey":"data.products","typeLabel":"object[]"},"recurringAuthorization":{"oneOf":[{"description":"Recurring debit authorization, for subscriptions whose cycles are debited automatically.","type":"object","properties":{"status":{"type":"string","enum":["pending","approved","rejected","cancel_pending","canceled"],"description":"State of the customer's recurring debit authorization.","isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.0.status","typeLabel":"enum\u003cstring>"},"lastDebit":{"oneOf":[{"description":"Most recent debit attempt. Included on GET by id.","type":"object","properties":{"status":{"type":"string","enum":["succeeded","failed"],"isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit.oneOf.0.status","typeLabel":"enum\u003cstring>"},"failureCode":{"oneOf":[{"type":"string","enum":["debit_rejected"],"isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit.oneOf.0.failureCode.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["debit_rejected"],"isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit.oneOf.0.failureCode.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit.oneOf.0.failureCode","typeLabel":"enum\u003cstring> | null"},"at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit.oneOf.0.at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit.oneOf.0.at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit.oneOf.0.at","typeLabel":"string\u003cdate-time> | null"}},"required":["status","failureCode","at"],"additionalProperties":false,"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit.oneOf.0","typeLabel":"object"},{"description":"Most recent debit attempt. Included on GET by id.","type":"null","properties":{"status":{"type":"string","enum":["succeeded","failed"]},"failureCode":{"oneOf":[{"type":"string","enum":["debit_rejected"]},{"type":"null","enum":["debit_rejected"]}]},"at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["status","failureCode","at"],"additionalProperties":false,"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.recurringAuthorization.oneOf.0.lastDebit","typeLabel":"object | null"}},"required":["status"],"additionalProperties":false,"isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.0","typeLabel":"object"},{"description":"Recurring debit authorization, for subscriptions whose cycles are debited automatically.","type":"null","properties":{"status":{"type":"string","enum":["pending","approved","rejected","cancel_pending","canceled"],"description":"State of the customer's recurring debit authorization."},"lastDebit":{"oneOf":[{"description":"Most recent debit attempt. Included on GET by id.","type":"object","properties":{"status":{"type":"string","enum":["succeeded","failed"]},"failureCode":{"oneOf":[{"type":"string","enum":["debit_rejected"]},{"type":"null","enum":["debit_rejected"]}]},"at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["status","failureCode","at"],"additionalProperties":false},{"description":"Most recent debit attempt. Included on GET by id.","type":"null","properties":{"status":{"type":"string","enum":["succeeded","failed"]},"failureCode":{"oneOf":[{"type":"string","enum":["debit_rejected"]},{"type":"null","enum":["debit_rejected"]}]},"at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["status","failureCode","at"],"additionalProperties":false}]}},"required":["status"],"additionalProperties":false,"isRequired":true,"uniqueKey":"data.recurringAuthorization.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.recurringAuthorization","typeLabel":"object | null"},"createdAt":{"description":"Subscription creation timestamp.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.createdAt","typeLabel":"string\u003cdate-time>"},"updatedAt":{"oneOf":[{"description":"Last update timestamp.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.updatedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"Last update timestamp.","type":"null","format":"date-time","isRequired":true,"uniqueKey":"data.updatedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.updatedAt","typeLabel":"string\u003cdate-time> | null"},"productId":{"oneOf":[{"description":"Public id of the catalog product billed by this subscription. Included on GET and LIST.","type":"string","uniqueKey":"data.productId.oneOf.0","typeLabel":"string"},{"description":"Public id of the catalog product billed by this subscription. Included on GET and LIST.","type":"null","uniqueKey":"data.productId.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.productId","typeLabel":"string | null"},"productFamilyId":{"oneOf":[{"description":"Public id of the product family the plan belongs to. Included on GET and LIST.","type":"string","uniqueKey":"data.productFamilyId.oneOf.0","typeLabel":"string"},{"description":"Public id of the product family the plan belongs to. Included on GET and LIST.","type":"null","uniqueKey":"data.productFamilyId.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.productFamilyId","typeLabel":"string | null"},"pendingChange":{"oneOf":[{"description":"Scheduled plan change, when one is pending. Included on GET and LIST.","type":"object","properties":{"productId":{"type":"string","description":"Public id of the plan that takes effect at the period end.","isRequired":true,"uniqueKey":"data.pendingChange.oneOf.0.productId","typeLabel":"string"},"amount":{"type":"integer","minimum":0,"maximum":100000000,"description":"Amount in cents that the renewal will bill: the scheduled plan plus whatever is billed alongside it.","isRequired":true,"uniqueKey":"data.pendingChange.oneOf.0.amount","typeLabel":"integer"},"effectiveAt":{"description":"When the scheduled plan takes effect.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.pendingChange.oneOf.0.effectiveAt","typeLabel":"string\u003cdate-time>"}},"required":["productId","amount","effectiveAt"],"additionalProperties":false,"uniqueKey":"data.pendingChange.oneOf.0","typeLabel":"object"},{"description":"Scheduled plan change, when one is pending. Included on GET and LIST.","type":"null","properties":{"productId":{"type":"string","description":"Public id of the plan that takes effect at the period end."},"amount":{"type":"integer","minimum":0,"maximum":100000000,"description":"Amount in cents that the renewal will bill: the scheduled plan plus whatever is billed alongside it."},"effectiveAt":{"description":"When the scheduled plan takes effect.","type":"string","format":"date-time"}},"required":["productId","amount","effectiveAt"],"additionalProperties":false,"uniqueKey":"data.pendingChange.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.pendingChange","typeLabel":"object | null"},"authorization":{"description":"Pending customer authorization for PIX automatic subscriptions.","type":"object","properties":{"type":{"type":"string","enum":["pix_qr"],"isRequired":true,"uniqueKey":"data.authorization.type","typeLabel":"enum\u003cstring>"},"qr_code":{"type":"string","description":"PIX copy-and-paste code the customer uses to authorize the recurring debit.","isRequired":true,"uniqueKey":"data.authorization.qr_code","typeLabel":"string"},"expires_at":{"oneOf":[{"description":"When the authorization code expires, when known.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.authorization.expires_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the authorization code expires, when known.","type":"null","format":"date-time","isRequired":true,"uniqueKey":"data.authorization.expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.authorization.expires_at","typeLabel":"string\u003cdate-time> | null"},"status":{"type":"string","enum":["awaiting_customer"],"isRequired":true,"uniqueKey":"data.authorization.status","typeLabel":"enum\u003cstring>"},"payment_link_url":{"description":"Hosted page where the customer can authorize, when provided.","type":"string","uniqueKey":"data.authorization.payment_link_url","typeLabel":"string"}},"required":["type","qr_code","expires_at","status"],"additionalProperties":false,"uniqueKey":"data.authorization","typeLabel":"object"},"transactions":{"description":"Transactions billed under this subscription. Included on GET by id.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Public transaction id.","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].id","typeLabel":"string"},"status":{"type":"string","description":"Transaction status.","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].status","typeLabel":"string"},"amount":{"type":"integer","minimum":0,"maximum":100000000,"description":"Transaction amount in cents.","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].amount","typeLabel":"integer"},"paidAmount":{"type":"integer","minimum":0,"maximum":100000000,"description":"Amount paid in cents.","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].paidAmount","typeLabel":"integer"},"refundedAmount":{"type":"integer","minimum":0,"maximum":100000000,"description":"Amount refunded in cents.","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].refundedAmount","typeLabel":"integer"},"currency":{"type":"string","enum":["BRL","MXN","COP","CLP","ARS","PEN","USD","GTQ","CRC","NIO","PYG","UYU","BOB","PHP","RUB","INR","SAR","AED","KWD","QAR","OMR","KHR","SGD","IDR","KRW","THB","MYR","HKD","CNY","EGP","EUR","GBP","BHD","MAD","AUD","CAD","CHF","NZD","PLN","KZT","UZS","JPY","GLC"],"description":"Transaction currency.","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].currency","typeLabel":"enum\u003cstring>"},"externalRef":{"oneOf":[{"description":"External reference, when provided.","type":"string","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].externalRef.oneOf.0","typeLabel":"string"},{"description":"External reference, when provided.","type":"null","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].externalRef.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].externalRef","typeLabel":"string | null"},"createdAt":{"description":"Transaction creation timestamp.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].createdAt","typeLabel":"string\u003cdate-time>"},"paidAt":{"oneOf":[{"description":"Payment confirmation timestamp.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].paidAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"Payment confirmation timestamp.","type":"null","format":"date-time","isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].paidAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.transactions.items.[INDEX].paidAt","typeLabel":"string\u003cdate-time> | null"}},"required":["id","status","amount","paidAmount","refundedAmount","currency","externalRef","createdAt","paidAt"],"additionalProperties":false,"uniqueKey":"data.transactions.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data.transactions","typeLabel":"object[]"},"nextManualCharge":{"description":"Open cycles a manual charge settles now. Included on GET by id while the subscription is `unpaid`.","type":"object","properties":{"periodStart":{"description":"Start of the oldest open cycle. Send it as `expected_period_start`.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.nextManualCharge.periodStart","typeLabel":"string\u003cdate-time>"},"periodEnd":{"description":"End of that cycle, on the subscription's original billing calendar.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.nextManualCharge.periodEnd","typeLabel":"string\u003cdate-time>"},"openCycles":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Open cycles up to the one that covers today, on the original billing calendar.","isRequired":true,"uniqueKey":"data.nextManualCharge.openCycles","typeLabel":"integer"},"currentPeriodStart":{"description":"Start of the open cycle that covers today.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.nextManualCharge.currentPeriodStart","typeLabel":"string\u003cdate-time>"},"currentPeriodEnd":{"description":"End of the open cycle that covers today.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.nextManualCharge.currentPeriodEnd","typeLabel":"string\u003cdate-time>"},"cycleAmount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Base amount in cents of one cycle, before any fee passed to the buyer. A scheduled plan change applies first, so it is the new plan's price.","isRequired":true,"uniqueKey":"data.nextManualCharge.cycleAmount","typeLabel":"integer"},"allCyclesAmount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Base amount in cents of charging every open cycle: `cycleAmount` times `openCycles`.","isRequired":true,"uniqueKey":"data.nextManualCharge.allCyclesAmount","typeLabel":"integer"}},"required":["periodStart","periodEnd","openCycles","currentPeriodStart","currentPeriodEnd","cycleAmount","allCyclesAmount"],"additionalProperties":false,"uniqueKey":"data.nextManualCharge","typeLabel":"object"}},"required":["id","customerId","status","paymentMethod","billingModel","billingDayOfMonth","interval","intervalCount","amount","currency","trialEnd","currentPeriodStart","currentPeriodEnd","cancelAtPeriodEnd","canceledAt","failurePolicy","retryOffsetsDays","cancellationReason","cycleCount","maxCycles","customerEmail","cardLast4","metadata","informations","products","recurringAuthorization","createdAt","updatedAt"],"additionalProperties":false,"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"required":["success","requestId","data"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"example":{"success":true,"requestId":"0190a2b4-18a7-7de0-9a43-69b7cf261201","data":{"id":"string","customerId":"string","status":"incomplete","paymentMethod":"credit_card","billingModel":"merchant_initiated","billingDayOfMonth":1,"interval":"day","intervalCount":1,"amount":0,"currency":"BRL","trialEnd":"2026-07-14T12:00:00.000Z","currentPeriodStart":"2026-07-14T12:00:00.000Z","currentPeriodEnd":"2026-07-14T12:00:00.000Z","cancelAtPeriodEnd":false,"canceledAt":"2026-07-14T12:00:00.000Z","failurePolicy":"immediate_cancel","retryOffsetsDays":[1],"cancellationReason":"user_requested","cycleCount":1,"maxCycles":2,"customerEmail":"string","cardLast4":"string","metadata":{},"informations":[{"key":"string","value":"string"}],"products":[{"name":"string","price":0,"quantity":1,"tangible":false}],"recurringAuthorization":{"status":"pending"},"createdAt":"2026-07-14T12:00:00.000Z","updatedAt":"2026-07-14T12:00:00.000Z"}},"examples":{"Example":{"title":"Example","value":{"success":true,"requestId":"0190a2b4-18a7-7de0-9a43-69b7cf261201","data":{"id":"string","customerId":"string","status":"incomplete","paymentMethod":"credit_card","billingModel":"merchant_initiated","billingDayOfMonth":1,"interval":"day","intervalCount":1,"amount":0,"currency":"BRL","trialEnd":"2026-07-14T12:00:00.000Z","currentPeriodStart":"2026-07-14T12:00:00.000Z","currentPeriodEnd":"2026-07-14T12:00:00.000Z","cancelAtPeriodEnd":false,"canceledAt":"2026-07-14T12:00:00.000Z","failurePolicy":"immediate_cancel","retryOffsetsDays":[1],"cancellationReason":"user_requested","cycleCount":1,"maxCycles":2,"customerEmail":"string","cardLast4":"string","metadata":{},"informations":[{"key":"string","value":"string"}],"products":[{"name":"string","price":0,"quantity":1,"tangible":false}],"recurringAuthorization":{"status":"pending"},"createdAt":"2026-07-14T12:00:00.000Z","updatedAt":"2026-07-14T12:00:00.000Z"}}}},"exampleType":"examples"}},"exampleType":"examples"},"8aeded24-8027-4012-8998-cf9e5ad5d43e":{"description":"HTTP 402 response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Short, human-readable summary of the problem.","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"description":"URI reference identifying the problem type.","type":"string","uniqueKey":"type","typeLabel":"string"},"detail":{"description":"Human-readable explanation specific to this occurrence.","type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"URI reference identifying the specific occurrence.","type":"string","uniqueKey":"instance","typeLabel":"string"}},"required":["title","status"],"additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":0,"type":"\u003cstring>","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"ba64d270-5e0f-481a-bbc5-b88c88f6e229":{"description":"HTTP 404 response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Short, human-readable summary of the problem.","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"description":"URI reference identifying the problem type.","type":"string","uniqueKey":"type","typeLabel":"string"},"detail":{"description":"Human-readable explanation specific to this occurrence.","type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"URI reference identifying the specific occurrence.","type":"string","uniqueKey":"instance","typeLabel":"string"}},"required":["title","status"],"additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":0,"type":"\u003cstring>","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"02de56a4-27be-466d-9831-3e00387d9517":{"description":"HTTP 409 response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Short, human-readable summary of the problem.","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"description":"URI reference identifying the problem type.","type":"string","uniqueKey":"type","typeLabel":"string"},"detail":{"description":"Human-readable explanation specific to this occurrence.","type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"URI reference identifying the specific occurrence.","type":"string","uniqueKey":"instance","typeLabel":"string"}},"required":["title","status"],"additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":0,"type":"\u003cstring>","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"e0ffb993-7fd7-4032-85ab-bcde525ab109":{"description":"HTTP 422 response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Short, human-readable summary of the problem.","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"description":"URI reference identifying the problem type.","type":"string","uniqueKey":"type","typeLabel":"string"},"detail":{"description":"Human-readable explanation specific to this occurrence.","type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"URI reference identifying the specific occurrence.","type":"string","uniqueKey":"instance","typeLabel":"string"}},"required":["title","status"],"additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":0,"type":"\u003cstring>","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"},"application/problem+json":{"schema":{"type":"object","description":"RFC 7807 Problem Details object.","required":["type","title","status","detail"],"properties":{"type":{"type":"string","format":"uri-reference","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi-reference>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"number","isRequired":true,"uniqueKey":"status","typeLabel":"number"},"detail":{"type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","format":"uri-reference","uniqueKey":"instance","typeLabel":"string\u003curi-reference>"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"additionalProperties":true,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","instance":"\u003cstring>","errors":[{"field":"\u003cstring>","message":"\u003cstring>","code":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"a1d8e79e-9652-4ef6-a2f5-c5ef876d45dc":{"description":"HTTP 503 response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"number","isRequired":true,"uniqueKey":"status","typeLabel":"number"},"type":{"type":"string","uniqueKey":"type","typeLabel":"string"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"}},"required":["title","status"],"additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"\u003cstring>","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"02fbf14c-120d-4b1b-8cf5-9baccf7df836":{"description":"RFC 7807 Problem Details error response","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 7807 Problem Details object.","properties":{"type":{"type":"string","format":"uri-reference","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi-reference>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"number","isRequired":true,"uniqueKey":"status","typeLabel":"number"},"detail":{"type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","format":"uri-reference","uniqueKey":"instance","typeLabel":"string\u003curi-reference>"}},"required":["type","title","status","detail"],"additionalProperties":true,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"c09f05e2-da24-4441-b773-9b4e83c9370c":{"BearerAuth":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"}},"5f548b97-37da-4a8f-8110-75932f9adfc8":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","scopes":[],"schemeName":"ApiKeyAuth"}},"0b9a492a-e65d-4957-ad4c-98ca527439b1":{"BasicAuth":{"type":"http","scheme":"basic","description":"Use Basic auth with username `token` and password `x`.","scopes":[],"schemeName":"BasicAuth"}}},"servers":{"a4969a60-890c-4f4f-b187-7cbe29068711":{"url":"https://api.pagou.ai","description":"Production server"},"e1ba3307-9963-48a9-aac6-330caba68aca":{"url":"https://api.sandbox.pagou.ai","description":"Sandbox server for testing"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"apiKey","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"apiKey","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"apiKey"}],"title":"ApiKeyAuth"},{"schemes":[{"scheme":{"type":"http","scheme":"basic","description":"Use Basic auth with username `token` and password `x`.","scopes":[],"schemeName":"BasicAuth"},"schema":{"title":"Basic Auth","type":"object","description":"Use Basic auth with username `token` and password `x`.","isRequired":true,"properties":{"username":{"type":"string","uniqueKey":"username","isRequired":true,"typeLabel":"string","deprecated":false},"password":{"type":"string","uniqueKey":"password","isRequired":true,"typeLabel":"string","deprecated":false}},"additionalProperties":false,"deprecated":false},"schemeName":"BasicAuth","name":"Authorization"}],"title":"BasicAuth"}]},"originalFileLocation":"api-reference/openapi-v2.json"},"subdomain":"pagouai","siteName":"Pagou Developer Docs","title":"Update a Subscription - Pagou Developer Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/subscriptions/update","matchLevel":0},"pt-BR":{"href":"/pt/api-reference/subscriptions/update","matchLevel":1}}},"lastModified":"2026-11-13T11:11:31.270Z","originalFileLocation":"api-reference/subscriptions/update.mdx","locale":"en"},"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=\"Update the editable fields of an existing subscription, or move it to another plan.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Pagou Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pagouai/PlsMSqiZuXJsWwoT/_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/pagouai/PlsMSqiZuXJsWwoT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pagouai/PlsMSqiZuXJsWwoT/_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/pagouai/PlsMSqiZuXJsWwoT/_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/pagouai/PlsMSqiZuXJsWwoT/_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/pagouai/PlsMSqiZuXJsWwoT/_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/pagouai/PlsMSqiZuXJsWwoT/_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/pagouai/PlsMSqiZuXJsWwoT/_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/pagouai/PlsMSqiZuXJsWwoT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a Subscription - Pagou Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Update the editable fields of an existing subscription, or move it to another plan.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Pagou Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.pagou.ai/api-reference/subscriptions/update\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pagouai.mintlify.site/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Update+a+Subscription\u0026amp;description=Update+the+editable+fields+of+an+existing+subscription%2C+or+move+it+to+another+plan.\u0026amp;theme=be5f6b4c2c97766dd572dfce\u0026amp;signature=91236081e55829dedee99169f3b42e18526c9759546c6ccfe3eddb987a93f0eb\">\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=\"Update a Subscription - Pagou Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Update the editable fields of an existing subscription, or move it to another plan.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pagouai.mintlify.site/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Update+a+Subscription\u0026amp;description=Update+the+editable+fields+of+an+existing+subscription%2C+or+move+it+to+another+plan.\u0026amp;theme=be5f6b4c2c97766dd572dfce\u0026amp;signature=91236081e55829dedee99169f3b42e18526c9759546c6ccfe3eddb987a93f0eb\">\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/pagouai/PlsMSqiZuXJsWwoT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Pagou Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#198754\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developer.pagou.ai/api-reference/subscriptions/update\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/subscriptions/update.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://developer.pagou.ai/api-reference/subscriptions/update\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://developer.pagou.ai/pt/api-reference/subscriptions/update\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://developer.pagou.ai/api-reference/subscriptions/update\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developer.pagou.ai/#organization\",\"name\":\"Pagou Developer Docs\",\"url\":\"https://developer.pagou.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pagouai/G-8AHDSd0H3lSbe_/logo/logo-long.webp?fit=max\u0026auto=format\u0026n=G-8AHDSd0H3lSbe_\u0026q=85\u0026s=f29ebde8b8d8c96183843fc8bc58e508\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developer.pagou.ai#website\",\"name\":\"Pagou Developer Docs\",\"url\":\"https://developer.pagou.ai\",\"publisher\":{\"@id\":\"https://developer.pagou.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developer.pagou.ai/api-reference/subscriptions/update#webpage\",\"url\":\"https://developer.pagou.ai/api-reference/subscriptions/update\",\"name\":\"Update a Subscription\",\"description\":\"Update the editable fields of an existing subscription, or move it to another plan.\",\"dateModified\":\"2026-11-13T11:11:31.270Z\",\"isPartOf\":{\"@id\":\"https://developer.pagou.ai#website\"},\"breadcrumb\":{\"@id\":\"https://developer.pagou.ai/api-reference/subscriptions/update#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.pagou.ai/api-reference/subscriptions/update#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Subscriptions\",\"item\":\"https://developer.pagou.ai/api-reference/subscriptions/reference\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update a Subscription\",\"item\":\"https://developer.pagou.ai/api-reference/subscriptions/update\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developer.pagou.ai/api-reference/subscriptions/update#apireference\",\"headline\":\"Update a Subscription\",\"name\":\"Update a Subscription\",\"description\":\"Update the editable fields of an existing subscription, or move it to another plan.\",\"url\":\"https://developer.pagou.ai/api-reference/subscriptions/update\",\"mainEntityOfPage\":{\"@id\":\"https://developer.pagou.ai/api-reference/subscriptions/update#webpage\"},\"dateModified\":\"2026-11-13T11:11:31.270Z\",\"publisher\":{\"@id\":\"https://developer.pagou.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://developer.pagou.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Pagou Developer Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Pagou Developer Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/subscriptions/update.md","siteName":"Pagou Developer Docs","nav":{"global":{"anchors":[{"anchor":"AI Integration","icon":"bot","href":"/start-here/ai-integration"},{"anchor":"API status","href":"https://status.pagou.ai"},{"anchor":"GitHub","href":"https://github.com/pagouai"}]},"languages":[{"language":"en","default":true,"tabs":[{"tab":"Start Here","icon":"rocket","pages":[{"title":"Start Here","href":""}]},{"tab":"Payments","icon":"wallet","pages":[{"title":"Payments","href":"/payments/overview"}]},{"tab":"Subscriptions","icon":"repeat","pages":[{"title":"Subscriptions","href":"/subscriptions/overview"}]},{"tab":"Payouts","icon":"arrow-left-right","pages":[{"title":"Payouts","href":"/payouts/pix-out/overview"}]},{"tab":"Webhooks","icon":"webhook","pages":[{"title":"Webhooks","href":"/webhooks/overview"}]},{"tab":"Front-end","icon":"monitor-smartphone","pages":[{"title":"Front-end","href":"/frontend/payment-element/overview"}]},{"tab":"SDKs","icon":"code-xml","pages":[{"title":"SDKs","href":"/sdks/typescript/quickstart"}]},{"tab":"Examples","icon":"code","pages":[{"title":"Examples","href":"/examples/overview"}]},{"tab":"API Reference","icon":"file-code-2","groups":[{"group":"Customers","pages":[{"title":"Customers Reference","icon":"book-open","href":"/api-reference/customers/reference"},{"title":"Create a Customer","icon":"plus","openapi":"api-reference/openapi-v2.json POST /v2/customers","href":"/api-reference/customers/create"},{"title":"List Customers","icon":"list","openapi":"api-reference/openapi-v2.json GET /v2/customers","href":"/api-reference/customers/list"},{"title":"Get a Customer","icon":"search","openapi":"api-reference/openapi-v2.json GET /v2/customers/{id}","href":"/api-reference/customers/get"}]},{"group":"Transactions","pages":[{"title":"Transactions Reference","icon":"book-open","href":"/api-reference/transactions/reference"},{"title":"Create a Transaction","icon":"plus","openapi":"api-reference/openapi-v2.json POST /v2/transactions","href":"/api-reference/transactions/create"},{"title":"List Transactions","icon":"list","openapi":"api-reference/openapi-v2.json GET /v2/transactions","href":"/api-reference/transactions/list"},{"title":"Get a Transaction","icon":"search","openapi":"api-reference/openapi-v2.json GET /v2/transactions/{id}","href":"/api-reference/transactions/get"},{"title":"Update a Transaction","icon":"pencil","openapi":"api-reference/openapi-v2.json PUT /v2/transactions/{id}","href":"/api-reference/transactions/update"},{"title":"Refund a Transaction","icon":"rotate-ccw","openapi":"api-reference/openapi-v2.json PUT /v2/transactions/{id}/refund","href":"/api-reference/transactions/refund"},{"title":"Update Delivery Tracking","icon":"truck","openapi":"api-reference/openapi-v2.json PUT /v2/transactions/{id}/delivery","href":"/api-reference/transactions/delivery"},{"title":"Mark a Transaction as Paid Externally","icon":"hand-coins","openapi":"api-reference/openapi-v2.json PUT /v2/transactions/{id}/paid-externally","href":"/api-reference/transactions/paid-externally"}]},{"group":"Checkout Links","pages":[{"title":"Checkout Links Reference","icon":"book-open","href":"/api-reference/checkout-links/reference"},{"title":"Create a Checkout Link","icon":"plus","openapi":"api-reference/openapi-v2.json POST /v2/checkout-links","href":"/api-reference/checkout-links/create"}]},{"group":"Transfers","pages":[{"title":"Transfers Reference","icon":"book-open","href":"/api-reference/transfers/reference"},{"title":"Create a Transfer","icon":"plus","openapi":"api-reference/openapi-v2.json POST /v2/transfers","href":"/api-reference/transfers/create"},{"title":"List Transfers","icon":"list","openapi":"api-reference/openapi-v2.json GET /v2/transfers","href":"/api-reference/transfers/list"},{"title":"Get a Transfer","icon":"search","openapi":"api-reference/openapi-v2.json GET /v2/transfers/{id}","href":"/api-reference/transfers/get"},{"title":"Cancel a Transfer","icon":"ban","openapi":"api-reference/openapi-v2.json POST /v2/transfers/{id}/cancel","href":"/api-reference/transfers/cancel"}]},{"group":"Subscriptions","pages":[{"title":"Subscriptions Reference","icon":"book-open","href":"/api-reference/subscriptions/reference"},{"title":"Create a Subscription","icon":"plus","openapi":"api-reference/openapi-v2.json POST /v2/subscriptions","href":"/api-reference/subscriptions/create"},{"title":"List Subscriptions","icon":"list","openapi":"api-reference/openapi-v2.json GET /v2/subscriptions","href":"/api-reference/subscriptions/list"},{"title":"Get a Subscription","description":"Retrieve a single subscription by id, including its billed transactions.","icon":"search","openapi":"api-reference/openapi-v2.json GET /v2/subscriptions/{id}","href":"/api-reference/subscriptions/get"},{"title":"Update a Subscription","icon":"pencil","openapi":"api-reference/openapi-v2.json PATCH /v2/subscriptions/{id}","href":"/api-reference/subscriptions/update"},{"title":"Cancel a Subscription","description":"Cancel a subscription: at the end of the period for cards, immediately for Pix Automático.","icon":"ban","openapi":"api-reference/openapi-v2.json POST /v2/subscriptions/{id}/cancel","href":"/api-reference/subscriptions/cancel"},{"title":"Charge an Unpaid Subscription","icon":"credit-card","openapi":"api-reference/openapi-v2.json POST /v2/subscriptions/{id}/charge","href":"/api-reference/subscriptions/charge"},{"title":"Replace a Subscription's Card","icon":"credit-card","openapi":"api-reference/openapi-v2.json POST /v2/subscriptions/{id}/payment-method","href":"/api-reference/subscriptions/update-payment-method"},{"title":"Simulate a Pix Automático Event","icon":"flask-conical","openapi":"api-reference/openapi-v2.json POST /v2/subscriptions/{id}/simulate","href":"/api-reference/subscriptions/simulate"}]},{"group":"Legacy v1","pages":[{"title":"Legacy v1 Reference","icon":"book-open","href":"/api-reference/legacy-v1/reference"},{"title":"Create a Webhook Integration","icon":"plus","openapi":"api-reference/openapi-v1.json POST /v1/business/integration","href":"/api-reference/legacy-v1/create-webhook-integration"},{"title":"Validate Authentication","icon":"shield-check","openapi":"api-reference/openapi-v1.json GET /v1/health-check","href":"/api-reference/legacy-v1/validate-authentication"},{"title":"Get Account Balance","icon":"search","openapi":"api-reference/openapi-v1.json GET /v1/account/balance","href":"/api-reference/legacy-v1/get-account-balance"},{"title":"List PIX Transactions","icon":"list","openapi":"api-reference/openapi-v1.json GET /pix/v1/transactions","href":"/api-reference/legacy-v1/list-pix-transactions"},{"title":"Get a PIX Transaction","icon":"search","openapi":"api-reference/openapi-v1.json GET /pix/v1/transactions/{id}","href":"/api-reference/legacy-v1/get-pix-transaction"},{"title":"Create a PIX Payment","icon":"plus","openapi":"api-reference/openapi-v1.json POST /pix/v1/payment","href":"/api-reference/legacy-v1/create-pix-payment"},{"title":"Refund a PIX Payment","icon":"rotate-ccw","openapi":"api-reference/openapi-v1.json POST /pix/v1/payment/refund/{id}","href":"/api-reference/legacy-v1/refund-pix-payment"},{"title":"Withdraw a PIX Payment","icon":"plus","openapi":"api-reference/openapi-v1.json POST /pix/v1/payment/withdraw","href":"/api-reference/legacy-v1/withdraw-pix-payment"}]}]},{"tab":"Resources","icon":"library-big","pages":[{"title":"Resources","href":"/changelog"}]}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/pt/api-reference/subscriptions/update"}]}]},"basePath":"","title":"Update a Subscription - Pagou Developer Docs","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CalkZbx8.js","snippetPresets-DtvvunBK.js","utils-Bn5byECU.js","style-to-object-BY3JEAdk.js","utils-DOTAoFcT.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CDauU9aU.js","conditional-requirements-CFM0id0Q.js","cloneDeep-k2aHAqp5.js","_Uint8Array-CQuRedKT.js","isObject-FP1Yky1u.js","Page-Dz3zehSO.js","api-description-markdown-DwoksVHI.js","DynamicMarkdown-XsrWkK-b.js","CodeSnippet-BBA8eWiP.js","SectionHeading-AR_EzDYe.js","ApiExamples-CSBS2nDe.js","usePlaygroundInputsStore-BkN7uKke.js","shallow-6IMgYiEa.js","isEqual-DicuCknl.js","CodeSnippets-C268fsRY.js","getApiPlaygroundDisplay-DMK5GRGS.js","MethodPill-CvOL8UTX.js","getPastedJson-BazkMjRw.js","Check2Icon-BL_xILK9.js","axios-CsQoIw0U.js","Markdown-CX8Sr5UZ.js","AssistantPageLink-B3VcLrB0.js","dist-WDJo6xkj.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}