Repository navigation
Conversation
…call The owners reversed the 14 Nov ruling on 17 Nov: users accept Avenia's terms once, at Pix setup. This puts back useRouteTermsAcceptance and consentApi.acceptRouteTerms as fd50ab1 removed them, and types the route's new optional terms { key, url } until the generated contract carries it.
…I signal The Pix setup shows Avenia's terms again, after the identity check and before the account opening, with the restored copy in four locales. pixSetupState reads the route's terms (on any state, ready too) and the older accept-tos next action as one step, so the API can move between them without an app release. After acceptance the capabilities are read again and a new user goes on to the no-tap account opening.
…Pix use Add money, withdraw, a Pix-key send and a Pix QR payment read their readiness from usePixFlowSetupState. Terms gate a flow only at its entry: once the route read ready, terms a later capabilities read brings are set aside, so a running flow is never torn down mid-form; the next entry asks. The withdraw reload test now keeps its key lookup in flight, since the extra render let an unmocked lookup resolve.
pix-setup-terms (new user) and pix-withdraw-terms (existing account) let ds-shots capture the terms screen; p80 captures the acceptance not saved again. The demo-api answers POST /users/kyc/accept-terms so the strict Screen Library capture does not fail.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code-analysis diffPainscore total: 11390.67 → 11399.52 (+8.85) 🆕 New findings (67)
…and 47 more. ✅ Resolved (60)
…and 40 more. 📈 Painscore deltas (top movers)
|
…stored terms copy The terms step's title, body, terms line and not-saved error add 16-17 words to the Pix add-money and withdraw pages. The growth is deliberate: it is the consent copy fd50ab1 removed, and design.md requires the terms to be named and linked before the tap.
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
|
/chip review |
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
Two major findings: a new deposit attempt can bypass newly arrived terms, and the consent-recording control reads as navigation.
Findings
-
MAJOR · src/features/pix/usePixFlowSetupState.ts:22 · Ask for newly required terms before another deposit attempt
If a ready route gains the soft terms signal while an existing Pix QR code is open,startedremains true. After that code expires or is returned, “Start new deposit” only changes URL state; PixDepositFlow stays mounted, so this hook still sets the terms aside and exposes the amount form for a new deposit. The planned soft API signal does not refuse that create, so a second deposit can begin without the required acceptance. Reset the set-aside state when a new attempt starts, while preserving the already-open intent screen. -
MAJOR · src/features/pix/components/PixSetup.tsx:90 · Label the Pix consent action as acceptance
On this screen, the only consent control is labeled “Continue”, but its tap directly callsterms.accept()and records legal acceptance; unlike the card flow, there is no separate agreement checkbox. A user expecting navigation can therefore record consent with that tap.design.md → consent screens #4reserves “Continue” for a button that only opens the next screen and calls for the consent-recording control to say “accept” or “agree”. Use a localized acceptance label and put the named document link before the action. -
MAJOR · src/features/pix/pixRouteStep.ts:49 · Copy now wrong: Brazil Pix requirements omit the new Avenia terms acceptance
After this change: A Brazil resident who uses Pix must accept Avenia's provider terms once, at Pix setup (or at their next Pix use if already set up), before the Avenia account opens.
These places still say otherwise:
mono:content/help/verification/en.md:50— "If you live in Brazil, Pix also asks for your CPF and home address." → If you live in Brazil, Pix also asks for your CPF and home address, and you accept Avenia's terms once before your first Pix use.mono:content/help/verification/en.md:56— "Pix payments do too; residents of Brazil also add their CPF and home address." → Pix payments do too; residents of Brazil also add their CPF and home address, and accept Avenia's terms once.mono:content/help/verification/es-419.md:52— "Si vives en Brasil, Pix también te pide tu CPF y tu domicilio." → Si vives en Brasil, Pix también te pide tu CPF y tu domicilio, y aceptas una vez los términos de Avenia.mono:content/help/verification/es-419.md:58— "quienes viven en Brasil agregan además su CPF y su domicilio." → quienes viven en Brasil agregan además su CPF y su domicilio, y aceptan una vez los términos de Avenia.mono:content/help/verification/pt-br.md:52— "Se você mora no Brasil, o Pix também pede seu CPF e seu endereço." → Se você mora no Brasil, o Pix também pede seu CPF e seu endereço, e você aceita uma vez os termos da Avenia.mono:content/help/verification/pt-br.md:58— "quem mora no Brasil informa ainda o CPF e o endereço." → quem mora no Brasil informa ainda o CPF e o endereço, e aceita uma vez os termos da Avenia.mono:product/kyc.md:172— "A resident of Brazil pays Pix through an Avenia account, which also needs a CPF and a home address." → A resident of Brazil pays Pix through an Avenia account, which also needs a CPF, a home address and one acceptance of Avenia's terms.mono:product/kyc.md:204— "relies on Peanut's verification, needs a CPF and a home address" → relies on Peanut's verification, needs a CPF, a home address and one acceptance of Avenia's termsmono:product/support-answers/deposits-brazil-pix.md:58— "Brazil the Avenia account now opens at the first Pix use, with the prompts above." → Brazil the Avenia account now opens at the first Pix use, after the Avenia terms step, with the prompts above.
Fix them in this pull request, or say where the fix goes. mono: copy ships to mono main as its own content change, never inside a code PR.
- MAJOR · src/hooks/useRouteTermsAcceptance.ts:45 · [claude-opus] Existing users with a ready route get a silent 409 loop at the terms step unless the unseen API PR relaxes the accept-terms check
The PR shows the terms to an existing Avenia user whose route isreadybut carries the new optionaltermsfield (pixRouteStep.ts pixRouteTerms/pixSetupState; usePixFlowSetupState). It then POSTs{ key: terms.key }to /users/kyc/accept-terms. On peanut-api-ts's policy branch, src/routes/user/accept-terms.ts:49-55 calls routeFor() and returns 409 ROUTE_NOT_AVAILABLE unlesscandidate.action === request.body.key. A ready candidate has noaction(src/routing/rank.ts:168-169 returns{ state: 'ready' }), so the API refuses every acceptance from an existing user. useRouteTermsAcceptance.ts treats that 409 as 'the route moved on': it calls fetchUser() and returns with no error. Capabilities still containterms, so the terms screen comes back and the user taps again, gets another 409, and is stuck with no message and no Sentry event. On the policy branch Avenia is alsoenrolment: 'on-approval'with noterms(src/avenia/provider.ts:55), so its key would get a 404 'No such terms'. Routes also carry notermsfield there, which is why the UI types it by hand in src/types/capabilities.ts. The API half is presumably an open peanut-api-ts PR this checkout cannot show. Fix: that PR must (a) give Avenia terms and emitroutes[].terms, and (b) let accept-terms accept the key when the route is ready but the terms are not yet recorded. Confirm that before merging this PR. As a guard, have the UI raise an error or send a Sentry event when a 409 is followed by a capabilities read that still names the same terms key, instead of returning silently.
Checked clean
- Exact head and base matched; core CI checks passed.
- Screenshot capture failed on both base and head; the three new terms states passed at both captured widths. The two new Pix flow e2e cases were not run in that job.
- Read the linked task and the API policy-branch consent endpoint; the API terms signal is a separate in-progress change.
- Compared changed translations with English, locale fallback, and locale glossaries; no meaning drift found.
- Reviewed design.md consent-screen rules and the changed terms screen.
Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.
Third opinion by claude-opus: 1 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.
Copy check by claude-haiku-5-5: 1 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file.
Exact head: 8a82b4711793 · Context: repo, api, design, notion, lexicon · Took 5m
| useEffect(() => { | ||
| if (state === 'ready') setStarted(true) | ||
| }, [state]) | ||
| return started ? pixSetupState(route, nextActions, { setAsideTerms: true }) : state |
There was a problem hiding this comment.
MAJOR: Ask for newly required terms before another deposit attempt
If a ready route gains the soft terms signal while an existing Pix QR code is open, started remains true. After that code expires or is returned, “Start new deposit” only changes URL state; PixDepositFlow stays mounted, so this hook still sets the terms aside and exposes the amount form for a new deposit. The planned soft API signal does not refuse that create, so a second deposit can begin without the required acceptance. Reset the set-aside state when a new attempt starts, while preserving the already-open intent screen.
There was a problem hiding this comment.
Fixed in 5c901be: the gate's latch now ends when the opened payment closes, so Start new deposit (and every other new attempt) asks for the terms, while an opened payment keeps its screens.
| disabled={terms.isAccepting} | ||
| onClick={() => void terms.accept()} | ||
| > | ||
| {tCommon('continue')} |
There was a problem hiding this comment.
MAJOR: Label the Pix consent action as acceptance
On this screen, the only consent control is labeled “Continue”, but its tap directly calls terms.accept() and records legal acceptance; unlike the card flow, there is no separate agreement checkbox. A user expecting navigation can therefore record consent with that tap. design.md → consent screens #4 reserves “Continue” for a button that only opens the next screen and calls for the consent-recording control to say “accept” or “agree”. Use a localized acceptance label and put the named document link before the action.
There was a problem hiding this comment.
Fixed in 25a4b30: the linked terms sentence now sits above the button, which says "Agree and continue", and the sentence is localized around the provider's brand.
…e and continue button design.md consent screens: the document comes before the action, and only the control that records consent says agree (Chip). The linked sentence moves above the button and is localized around the provider's brand; the English-only termsName made pt-BR read 'você aceita os Avenia terms and conditions'. The wordiness baseline takes the 5-6 words this adds.
…pened payment The entry latch lasted the whole mount, so Start new deposit opened the amount form without the terms that arrived meanwhile (Chip). The latch now ends when the opened payment closes: an opened deposit code, withdrawal or its outcome keeps its screens, and the next attempt asks first.
…says so A 409 whose capabilities read still names the same terms key would make every tap loop silently (Chip). The user now sees the unavailable line and Sentry gets one event; a route that moved on stays silent as before.
|
/chip review |
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
The two earlier UI findings are fixed. The documentation follow-up was explicitly deferred; no new blocking defect was confirmed.
Findings
- MAJOR · src/features/pix/pixRouteStep.ts:49 · Copy now wrong: Pix setup and CPF/address requirement lists omit the Avenia terms step
After this change: A Brazil resident's Pix (deposit, withdrawal, send or QR payment) now needs a one-time acceptance of Avenia's terms on the Pix setup screen, after identity and before the Avenia account opens, and any Pix attempt while the route still names the terms gets that screen.
These places still say otherwise:
mono:product/kyc.md:172— "A resident of Brazil pays Pix through an Avenia account, which also needs a CPF and a home address." → A resident of Brazil pays Pix through an Avenia account, which also needs a CPF and a home address, and the user accepts the Avenia terms once before the first Pix.mono:product/kyc.md:195— "else at the first Pix use (about 6 seconds)." → else at the first Pix use, after the user accepts the Avenia terms once on the Pix setup screen (about 6 seconds).mono:product/kyc.md:204— "relies on Peanut's verification, needs a CPF and a home address" → relies on Peanut's verification, needs a CPF and a home address, and the user accepts the Avenia terms oncemono:product/support-answers/deposits-brazil-pix.md:34— "on file gets the CPF step; one with no home address gets the address step." → on file gets the CPF step; one with no home address gets the address step; then, once, the user accepts the Avenia terms on the Pix setup screen before the account opens.mono:product/support-answers/send-to-pix-key-brazil.md:59— "account (CPF and home address) and its monthly limit applies." → account (CPF and home address, and acceptance of the Avenia terms once) and its monthly limit applies.mono:product/support-answers/residence-country-and-tax-id.md:28— "If you live in Brazil, Pix also needs your CPF and home address." → If you live in Brazil, Pix also needs your CPF and home address, and you accept the Avenia terms once.mono:product/support-answers/residence-country-and-tax-id.md:57— "account, which needs a CPF and a home address" → account, which needs a CPF, a home address and one acceptance of the Avenia termsmono:content/pay-with/pix/en.md:82— "If you live in Brazil, the app asks for your CPF and home address before your first Pix." → If you live in Brazil, the app asks for your CPF and home address, then has you accept the Avenia terms once, before your first Pix.mono:content/pay-with/pix/pt-br.md:83— "Se você mora no Brasil, o app pede seu CPF e seu endereço antes do primeiro Pix." → Se você mora no Brasil, o app pede seu CPF e seu endereço e depois o aceite dos termos da Avenia, antes do primeiro Pix.mono:content/pay-with/pix/es-419.md:83— "Si vives en Brasil, la app te pide tu CPF y tu domicilio antes del primer Pix." → Si vives en Brasil, la app te pide tu CPF y tu domicilio, y luego que aceptes los términos de Avenia, antes del primer Pix.mono:content/pay-with/pix/es-ar.md:84— "Si vivís en Brasil, la app te pide tu CPF y tu domicilio antes del primer Pix." → Si vivís en Brasil, la app te pide tu CPF y tu domicilio, y luego que aceptes los términos de Avenia, antes del primer Pix.mono:content/pay-with/pix/es-es.md:79— "Si vives en Brasil, la app te pide tu CPF y tu domicilio antes del primer Pix." → Si vives en Brasil, la app te pide tu CPF y tu domicilio, y luego que aceptes los términos de Avenia, antes del primer Pix.mono:content/pay-with/pix/en.md:65— "If you live in Brazil, Pix also needs your CPF and home address." → If you live in Brazil, Pix also needs your CPF and home address, and your acceptance of the Avenia terms once.mono:content/pay-with/pix/pt-br.md:66— "Se você mora no Brasil, o Pix também pede CPF e endereço." → Se você mora no Brasil, o Pix também pede CPF e endereço, e o aceite único dos termos da Avenia.mono:content/pay-with/pix/es-419.md:66— "Si vives en Brasil, Pix también te pide CPF y domicilio." → Si vives en Brasil, Pix también te pide CPF y domicilio, y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/es-ar.md:67— "Si vivís en Brasil, Pix también te pide CPF y domicilio." → Si vivís en Brasil, Pix también te pide CPF y domicilio, y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/es-es.md:62— "Si vives en Brasil, Pix también te pide CPF y domicilio." → Si vives en Brasil, Pix también te pide CPF y domicilio, y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/en.md:59— "That withdrawal needs verified Brazilian residence and a CPF." → That withdrawal needs verified Brazilian residence, a CPF and the one-time acceptance of the Avenia terms.mono:content/pay-with/pix/pt-br.md:60— "Esse saque exige residência brasileira verificada e CPF." → Esse saque exige residência brasileira verificada, CPF e o aceite único dos termos da Avenia.mono:content/pay-with/pix/es-419.md:60— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/es-ar.md:61— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/es-es.md:56— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/countries/brazil/en.md:61— "If you live in Brazil, Pix also needs your CPF and home address" → If you live in Brazil, Pix also needs your CPF, your home address and your acceptance of the Avenia terms, and you can add and withdraw BRL by Pix.mono:content/countries/brazil/en.md:65— "That withdrawal needs verified Brazilian residence and a CPF." → That withdrawal needs verified Brazilian residence, a CPF and the one-time acceptance of the Avenia terms.mono:content/countries/brazil/en.md:80— "If you live in Brazil, the app also asks for your CPF." → If you live in Brazil, the app also asks for your CPF and has you accept the Avenia terms once.mono:content/countries/brazil/pt-br.md:91— "Se você mora no Brasil, o Pix também pede CPF e endereço" → Se você mora no Brasil, o Pix também pede CPF, endereço e o aceite dos termos da Aveniamono:content/countries/brazil/pt-br.md:75— "Depósitos e saques em reais são para usuários com residência brasileira verificada e CPF." → Depósitos e saques em reais são para usuários com residência brasileira verificada, CPF e aceite dos termos da Avenia.mono:content/countries/brazil/pt-br.md:87— "O app pede seu CPF e seu endereço." → O app pede seu CPF, seu endereço e o aceite dos termos da Avenia.mono:content/countries/brazil/pt-br.md:95— "Quem mora no Brasil precisa de CPF para usar o Pix no Peanut" → Quem mora no Brasil precisa de CPF para usar o Pix no Peanut, e aceitar os termos da Avenia uma vezmono:content/countries/brazil/es-419.md:62— "Si vives en Brasil, Pix también te pide CPF y domicilio" → Si vives en Brasil, Pix también te pide CPF, domicilio y aceptar los términos de Aveniamono:content/countries/brazil/es-419.md:66— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/countries/brazil/es-419.md:81— "Si vives en Brasil, la app también te pide tu CPF." → Si vives en Brasil, la app también te pide tu CPF y que aceptes los términos de Avenia una vez.mono:content/countries/brazil/es-ar.md:63— "Si vivís en Brasil, Pix también te pide CPF y domicilio" → Si vivís en Brasil, Pix también te pide CPF, domicilio y aceptar los términos de Aveniamono:content/countries/brazil/es-ar.md:67— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/countries/brazil/es-ar.md:82— "Si vivís en Brasil, la app también te pide tu CPF." → Si vivís en Brasil, la app tam
Answered by a human, not raised again
These are still present as far as this review can tell. You resolved the thread or deferred the fix, so Chip does not repeat them. If one needs a follow-up, file the task yourself.
- MAJOR · src/features/pix/pixRouteStep.ts:49 · Update Brazil Pix requirements after terms go live
Checked clean
- P1 fixed: the terms latch resets when an opened deposit closes; the new deposit-flow test covers Start new deposit without replacing the existing code.
- P2 fixed: the linked document precedes the localized Agree and continue consent action; the es-AR catalog inherits the CTA from es-419.
- P3 remains in the current product/help copy and is explicitly tracked for after the API terms step goes live.
- P4 silent-loop behavior fixed: a 409 with terms still named produces an error after the capability read. The paired API soft-signal contract is not on the policy branch and cannot be judged from this UI head.
- Changed locale strings match the English acceptance meaning and the locale glossaries; the consent screen follows design.md consent-screen rules.
- At final CI read, typecheck, eslint, format, design lint, screen-tests, and seo-contract passed; unit, i18n-overflow, and press-contract were still running. The earlier screenshot capture failures occurred on both base and prior head; the new Pix flow e2e cases were not run there.
Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.
Third opinion: did not run — it reads only the first review of a pull request; the first reviewer checks later rounds. This review is one reviewer short.
Copy check by claude-haiku-5-5: 1 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file.
Exact head: e27412930391 · Context: repo, api, design, product, notion · Took 8m
| ): PixSetupState { | ||
| if (route?.state === 'action_required' && route.action === VERIFY_ACTION) return 'verify' | ||
| const terms = pixRouteTerms(route, nextActions) | ||
| if (terms && !setAsideTerms) return 'accept-terms' |
There was a problem hiding this comment.
MAJOR: Copy now wrong: Pix setup and CPF/address requirement lists omit the Avenia terms step
After this change: A Brazil resident's Pix (deposit, withdrawal, send or QR payment) now needs a one-time acceptance of Avenia's terms on the Pix setup screen, after identity and before the Avenia account opens, and any Pix attempt while the route still names the terms gets that screen.
These places still say otherwise:
mono:product/kyc.md:172— "A resident of Brazil pays Pix through an Avenia account, which also needs a CPF and a home address." → A resident of Brazil pays Pix through an Avenia account, which also needs a CPF and a home address, and the user accepts the Avenia terms once before the first Pix.mono:product/kyc.md:195— "else at the first Pix use (about 6 seconds)." → else at the first Pix use, after the user accepts the Avenia terms once on the Pix setup screen (about 6 seconds).mono:product/kyc.md:204— "relies on Peanut's verification, needs a CPF and a home address" → relies on Peanut's verification, needs a CPF and a home address, and the user accepts the Avenia terms oncemono:product/support-answers/deposits-brazil-pix.md:34— "on file gets the CPF step; one with no home address gets the address step." → on file gets the CPF step; one with no home address gets the address step; then, once, the user accepts the Avenia terms on the Pix setup screen before the account opens.mono:product/support-answers/send-to-pix-key-brazil.md:59— "account (CPF and home address) and its monthly limit applies." → account (CPF and home address, and acceptance of the Avenia terms once) and its monthly limit applies.mono:product/support-answers/residence-country-and-tax-id.md:28— "If you live in Brazil, Pix also needs your CPF and home address." → If you live in Brazil, Pix also needs your CPF and home address, and you accept the Avenia terms once.mono:product/support-answers/residence-country-and-tax-id.md:57— "account, which needs a CPF and a home address" → account, which needs a CPF, a home address and one acceptance of the Avenia termsmono:content/pay-with/pix/en.md:82— "If you live in Brazil, the app asks for your CPF and home address before your first Pix." → If you live in Brazil, the app asks for your CPF and home address, then has you accept the Avenia terms once, before your first Pix.mono:content/pay-with/pix/pt-br.md:83— "Se você mora no Brasil, o app pede seu CPF e seu endereço antes do primeiro Pix." → Se você mora no Brasil, o app pede seu CPF e seu endereço e depois o aceite dos termos da Avenia, antes do primeiro Pix.mono:content/pay-with/pix/es-419.md:83— "Si vives en Brasil, la app te pide tu CPF y tu domicilio antes del primer Pix." → Si vives en Brasil, la app te pide tu CPF y tu domicilio, y luego que aceptes los términos de Avenia, antes del primer Pix.mono:content/pay-with/pix/es-ar.md:84— "Si vivís en Brasil, la app te pide tu CPF y tu domicilio antes del primer Pix." → Si vivís en Brasil, la app te pide tu CPF y tu domicilio, y luego que aceptes los términos de Avenia, antes del primer Pix.mono:content/pay-with/pix/es-es.md:79— "Si vives en Brasil, la app te pide tu CPF y tu domicilio antes del primer Pix." → Si vives en Brasil, la app te pide tu CPF y tu domicilio, y luego que aceptes los términos de Avenia, antes del primer Pix.mono:content/pay-with/pix/en.md:65— "If you live in Brazil, Pix also needs your CPF and home address." → If you live in Brazil, Pix also needs your CPF and home address, and your acceptance of the Avenia terms once.mono:content/pay-with/pix/pt-br.md:66— "Se você mora no Brasil, o Pix também pede CPF e endereço." → Se você mora no Brasil, o Pix também pede CPF e endereço, e o aceite único dos termos da Avenia.mono:content/pay-with/pix/es-419.md:66— "Si vives en Brasil, Pix también te pide CPF y domicilio." → Si vives en Brasil, Pix también te pide CPF y domicilio, y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/es-ar.md:67— "Si vivís en Brasil, Pix también te pide CPF y domicilio." → Si vivís en Brasil, Pix también te pide CPF y domicilio, y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/es-es.md:62— "Si vives en Brasil, Pix también te pide CPF y domicilio." → Si vives en Brasil, Pix también te pide CPF y domicilio, y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/en.md:59— "That withdrawal needs verified Brazilian residence and a CPF." → That withdrawal needs verified Brazilian residence, a CPF and the one-time acceptance of the Avenia terms.mono:content/pay-with/pix/pt-br.md:60— "Esse saque exige residência brasileira verificada e CPF." → Esse saque exige residência brasileira verificada, CPF e o aceite único dos termos da Avenia.mono:content/pay-with/pix/es-419.md:60— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/es-ar.md:61— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/pay-with/pix/es-es.md:56— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/countries/brazil/en.md:61— "If you live in Brazil, Pix also needs your CPF and home address" → If you live in Brazil, Pix also needs your CPF, your home address and your acceptance of the Avenia terms, and you can add and withdraw BRL by Pix.mono:content/countries/brazil/en.md:65— "That withdrawal needs verified Brazilian residence and a CPF." → That withdrawal needs verified Brazilian residence, a CPF and the one-time acceptance of the Avenia terms.mono:content/countries/brazil/en.md:80— "If you live in Brazil, the app also asks for your CPF." → If you live in Brazil, the app also asks for your CPF and has you accept the Avenia terms once.mono:content/countries/brazil/pt-br.md:91— "Se você mora no Brasil, o Pix também pede CPF e endereço" → Se você mora no Brasil, o Pix também pede CPF, endereço e o aceite dos termos da Aveniamono:content/countries/brazil/pt-br.md:75— "Depósitos e saques em reais são para usuários com residência brasileira verificada e CPF." → Depósitos e saques em reais são para usuários com residência brasileira verificada, CPF e aceite dos termos da Avenia.mono:content/countries/brazil/pt-br.md:87— "O app pede seu CPF e seu endereço." → O app pede seu CPF, seu endereço e o aceite dos termos da Avenia.mono:content/countries/brazil/pt-br.md:95— "Quem mora no Brasil precisa de CPF para usar o Pix no Peanut" → Quem mora no Brasil precisa de CPF para usar o Pix no Peanut, e aceitar os termos da Avenia uma vezmono:content/countries/brazil/es-419.md:62— "Si vives en Brasil, Pix también te pide CPF y domicilio" → Si vives en Brasil, Pix también te pide CPF, domicilio y aceptar los términos de Aveniamono:content/countries/brazil/es-419.md:66— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/countries/brazil/es-419.md:81— "Si vives en Brasil, la app también te pide tu CPF." → Si vives en Brasil, la app también te pide tu CPF y que aceptes los términos de Avenia una vez.mono:content/countries/brazil/es-ar.md:63— "Si vivís en Brasil, Pix también te pide CPF y domicilio" → Si vivís en Brasil, Pix también te pide CPF, domicilio y aceptar los términos de Aveniamono:content/countries/brazil/es-ar.md:67— "Ese retiro requiere residencia brasileña verificada y CPF." → Ese retiro requiere residencia brasileña verificada, CPF y aceptar una vez los términos de Avenia.mono:content/countries/brazil/es-ar.md:82— "Si vivís en Brasil, la app también te pide tu CPF." → Si vivís en Brasil, la app tam
Parked on 17 Nov 2026: the owner ruled acceptance by use for now. Kept as a draft in case the in-app acceptance step returns.
Summary
Peanut's Terms of Service will say that a user accepts Avenia's terms in the app when they set up Pix. On 17 Nov the owners reversed the 14 Nov ruling: users accept Avenia's terms once, at Pix setup. Users who already have an Avenia account accept them at their next Pix use.
This PR puts back the terms step that
fd50ab1a4("Avenia's Pix opens on first use with no tap and no terms") removed. It restores only the terms acceptance. Avenia's hosted identity check stays removed, because Avenia still relies on Peanut's identity check.Restored unchanged from
fd50ab1a4^:useRouteTermsAcceptanceand its test (accept, 409ROUTE_NOT_AVAILABLE, 500termsNotSaved, other failures to Sentry). One guard was added (Chip): after a 409, if the capabilities read still names the same terms key, the user sees "unavailable" and Sentry gets one event, so a tap never loops silently. When the route has moved on, nothing shows, as before.consentApi.acceptRouteTerms(POST /users/kyc/accept-terms).PixSetup: Pix mark, title, body, "Account provider · Avenia", and the error callout. A provider this build has no record of still goes to support.pix.setup.bodyandtermsNotSavedin en, es-419 and pt-BR, andtermsNotSavedin es-AR, as they were. es-AR had nobodybefore either.titlewas never removed.POST /users/kyc/accept-termsroute, and thep80-pix-terms-not-savedScreen Library state.Changed, because today's code forces it:
pixRouteTermsreads either the route's newterms: { key, url }(soft signal, on any state,readyincluded) or anaction_requiredroute whose action is anaccept-tosnext action (the shape used until 14 Nov).pixSetupStatereturnsaccept-termsfor both, so the API can switch between them without an app release.pixSetupState:verify, then terms, thenactivate,pending,ready. Areadyroute that still carriestermsgives the terms step.bodyBeforeVerification. The identity check now always comes first, so the user on the terms screen is already verified.pixOpensWithoutTap), with no extra tap.pix.setup.acceptCta; es-AR falls back to es-419), because it records the consent.pix.setup.terms), now localized around the provider'sbrand. The old sentence used the English-onlytermsName, so pt-BR read "Ao continuar, você aceita os Avenia terms and conditions.":terms.urlornextActions[].tosUrl), with the provider record'stermsUrlas the fallback, as before.CapabilityRoutegets an optionaltermsfield next to the generated contract type, until the API's OpenAPI carries it.pix-setup-terms(new user; the not-saved capture taps "Agree and continue" on it) andpix-withdraw-terms(existing account, ready route plus terms). The old terms fixture namepix-first-usenow shows the account opening, so it stays as it is.Per-attempt gate (
usePixFlowSetupState(route, paymentOpened)). Add money (PixDepositFlow), withdraw and send to a Pix key (PixWithdrawFlow), and a Pix QR payment (useQrPayRoute/QrPayPage) all read their readiness from this hook. The hook replaces their oldroute.state === 'ready'check. The rule: terms never replace the screens of a payment that is already opened, and every new attempt asks for them.intentId), an opened withdrawal or its outcome. Its screens are never replaced, whatever a later read brings.Task
TASK-25073
Risks / breaking changes
devyet. No route carriestermstoday, and no route sends theaccept-tosaction. Until the API ships, this PR changes nothing for users. Fixtures and unit tests cover the behaviour.POST /users/kyc/accept-termsalready exists on API dev.add-money/pixgoes from 124 to 146 andwithdraw/pixfrom 159 to 181, which is the restored and reworded consent copy. Beforefd50ab1a4the baselines were 161 and 246.ReConsentModalis untouched.NEXT_PUBLIC_API_VERSIONis unchanged.QA
pixFlow.utils.test.ts:pixSetupStateandpixRouteTermswith both signals,readyplusterms, and set-aside.useRouteTermsAcceptance.test.ts: accept, 409 with the route moved on, 409 with the terms still named, 500, and other failures.PixSetup.test.tsx: link and name before the button; "Agree and continue" sends the POST, the capabilities are read again, and the account opens with no tap; a failed save showstermsNotSaved; the hard signal; an unknown provider.usePixFlowSetupState.test.ts: an existing user gets the terms at entry and then the flow; a running flow is not replaced in either shape; an opened payment keeps its screen and the next attempt asks; other steps still apply.PixDepositFlow.terms.test.tsx: terms arrive while a deposit code is on screen; the code stays, and "Start new deposit" opens the terms step, not the amount form.useQrPayRoute.test.tsx: a ready route with terms gets setup; terms after entry keep the flow.e2e/flows/pix.spec.ts: the terms step names and links Avenia's terms (pix-setup-terms); an existing account meets the terms before the withdrawal key step (pix-withdraw-terms).ds-shotsrun (44141166736) capturedpix-setup-terms,pix-withdraw-termsandp80-pix-terms-not-savedat 320 and 430 px with no errors. The run still failed on 9 states that fail on the base (dev) commit too, such aspix-withdraw-keyandp81-pix-deposit-limit. Because of that, no diff comment was published, and the regression e2e step (which includespix.spec.ts) did not run.🤖 Generated with Claude Code