From zero to a paid invoice: which path to pick, what to store, and what to do about the double click.
Before your first sale: today a sale happens in Brazil (you and the buyer in
Brazil), by Pix or card (single payment), both in test environment. The charge
lands on your receiving account at the payment provider. International sales,
with Infi UK Ltd as the merchant of record, are coming soon. See
going to production.
One-off sale, charging over WhatsApp, a first sale before an app exists
Invoice + charge
the “Buy” button and a return page
You have an app and want the buyer inside your flow, without building a payment screen
Both end in the same place: the buyer pays on Infi’s checkout page
(/pay/...), which shows the Pix QR or the card form. Both end in the same
invoice and the same webhook. The difference is how much of the experience is
yours.
When in doubt, start with the link. It is the only one that asks nothing of your app. You can switch later: the product
and the catalog are the same.
Assuming you already have a published product (see the
catalog), a key and an account ready to receive:
# 1. create your customer's invoiceINV=$(curl -s -X POST $API/billing/products/$PID/invoices \ -H "Authorization: Bearer $K" -H 'Content-Type: application/json' -H "$(IDEM)" \ -d '{"customer":{"externalId":"u1","email":"u1@x.com","taxId":"52998224725"}}' | jq -r .id)# 2. STORE THIS. It is the step nobody documents and everybody forgets.# (in your database: invoiceId -> your user, status "open")
You must map invoiceId → your user. We do not know who your user is: you pass an externalId and we hand back an
invoiceId. When the payment confirms, the webhook carries the invoiceId,
not your user. If you did not store the pair, you received money and do not
know from whom.It is the most important architecture decision on this page and it fits in one
row of a table in your database.
The response carries what the buyer needs to finish, such as the Pix QR code, and
the flow stays on Infi’s checkout page. status comes back pending.
Do not trust the buyer’s return. They may come back without having paid, or never come back. The webhook is what
confirms; the return query string never proves anything.
Do not trust the return of charge: it comes back pending. Payment is
asynchronous, and the confirmation arrives by webhook (payment.confirmed,
invoice.paid).
# sandbox: polling, because registering a webhook answers 503curl -s $API/pay/$SLUG/invoices/$INV | jq .invoice.status # "open" | "paid"
When it confirms, use the event’s invoiceId to find the order you stored in
step 2. Details in webhooks.
Every non-GET method on the authenticated API requires an Idempotency-Key
(the public /pay/* routes, which the buyer’s browser calls, do not). It is what
stops two clicks from becoming two invoices.
# the SAME key for the SAME purchase intentKEY="order-$USER_ID-$PID-$(date +%F)"curl -s -X POST $API/billing/products/$PID/invoices \ -H "Authorization: Bearer $K" -H 'Content-Type: application/json' \ -H "Idempotency-Key: $KEY" -d '{"customer":{"externalId":"u1","email":"u1@x.com","taxId":"52998224725"}}'
Same key, same body → you get the original response back. One invoice.
Same key, different body → 409 idempotency_key_reused. It is protection:
it means you reused the key for something else.
No key → 400 idempotency_key_required.
A fresh key on every call protects against a network retry, not against a double
click. For the double click, the key must come from something stable in your
intent, as in the example above.
The simplest thing is not to let them click twice. Disable the button on the first click and treat the
Idempotency-Key as the safety net, not the first line of defense.
Your tenant is born with a placeholder name. If you do not change it, the checkout
and the payment link literally say “New app”, and nobody buys from a store
called New app.
await infi.account.update({ name: "Orvalho Coffee" });// optional, cited in the payment mandate:await infi.account.update({ termsUrl: "https://orvalhocoffee.com/terms" });
It takes effect at once, with no product republish and no new link: the same link
shows the new name. infi.account.get() reads it back. (From
@beinfi/sdk@0.10.7; before that it is PATCH /account/tenant.)
If what you sell is a file or access, do not build that by hand: attach the
deliverable to the product and Infi sends the buyer a personal link when the
payment confirms, and hands you the same link to show on your thank-you page. It is
in delivering the product.The buyer’s side (finding out they paid, delivering, and the two polls nobody
guesses) is in the thank-you page.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Infi","colors":{"primary":"#0A1430","light":"#E2B13C","dark":"#0A1430"},"logo":{"light":"https://mintcdn.com/beinfi/owBheEE6vXSyqXTj/logo/logo.svg?fit=max\u0026auto=format\u0026n=owBheEE6vXSyqXTj\u0026q=85\u0026s=b1b9ce09a8814e42032ef2bf2c08fb54","dark":"https://mintcdn.com/beinfi/owBheEE6vXSyqXTj/logo/logo.svg?fit=max\u0026auto=format\u0026n=owBheEE6vXSyqXTj\u0026q=85\u0026s=b1b9ce09a8814e42032ef2bf2c08fb54","href":"https://beinfi.com"},"favicon":"https://mintcdn.com/beinfi/owBheEE6vXSyqXTj/favicon.svg?fit=max\u0026auto=format\u0026n=owBheEE6vXSyqXTj\u0026q=85\u0026s=cbb3280c14965b007e9662521134e88c","api":{"playground":{"display":"interactive"}},"navbar":{"links":[{"href":"https://app-sandbox.beinfi.com","label":"Sandbox"}],"primary":{"type":"button","label":"Começar","href":"https://app.beinfi.com"}},"footer":{"socials":{"website":"https://beinfi.com"}},"styling":{"latex":true},"navigation":{"languages":[{"language":"pt-BR","default":true,"href":"introducao"},{"language":"en","href":"en/introducao"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"beinfi","hasAudioNarration":false,"actualSubdomain":"beinfi","customDomains":["docs.beinfi.com"],"gitSource":{"type":"github","owner":"be-infinitum","repo":"infi","deployBranch":"main","contentDirectory":"infi-docs","isPrivate":true,"mountPath":"","label":"","_id":"6adfafa06d56e5c194b62908"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae91a58c27bfbde36d8601a","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"pt-BR","tag":"Referência da API","count":72},{"language":"en","tag":"API reference","count":72},{"language":"pt-BR","tag":"Catálogo","count":21},{"language":"en","tag":"Catalog","count":21},{"language":"pt-BR","tag":"Guias","count":17},{"language":"en","tag":"Guides","count":17},{"language":"pt-BR","tag":"Começar","count":13},{"language":"en","tag":"Get started","count":13},{"language":"pt-BR","tag":"Clientes","count":8},{"language":"pt-BR","tag":"Faturas","count":8},{"language":"en","tag":"Customers","count":8},{"language":"en","tag":"Invoices","count":8},{"language":"pt-BR","tag":"Webhooks","count":7},{"language":"en","tag":"Webhooks","count":7},{"language":"pt-BR","tag":"Conta","count":5},{"language":"pt-BR","tag":"Cupons","count":5},{"language":"pt-BR","tag":"Pagamentos","count":5},{"language":"en","tag":"Account","count":5},{"language":"en","tag":"Coupons","count":5},{"language":"en","tag":"Payments","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/primeira-venda","slug":"/en/primeira-venda","pageMetadata":{"title":"Your first sale","description":"From zero to a paid invoice: which path to pick, what to store, and what to do about the double click.","href":"/en/primeira-venda"},"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: \"From zero to a paid invoice: which path to pick, what to store, and what to do about the double click.\"\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`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Before your first sale: today a sale happens `,_jsx(_components.strong,{children:`in Brazil`}),` (you and the buyer in\nBrazil), by Pix or card (single payment), both in test environment. The charge\nlands on your receiving account at the payment provider. International sales,\nwith Infi UK Ltd as the merchant of record, are coming soon. See\n`,_jsx(_components.a,{href:`/en/producao`,children:`going to production`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`which-path-is-yours`,children:`Which path is yours`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`What you build`}),_jsx(_components.th,{children:`When to use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Payment link`})}),_jsx(_components.td,{children:`nothing`}),_jsx(_components.td,{children:`One-off sale, charging over WhatsApp, a first sale before an app exists`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsxs(_components.strong,{children:[`Invoice + `,_jsx(_components.code,{children:`charge`})]})}),_jsx(_components.td,{children:`the “Buy” button and a return page`}),_jsx(_components.td,{children:`You have an app and want the buyer inside your flow, without building a payment screen`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Both end in the same place: the buyer `,_jsx(_components.strong,{children:`pays on Infi’s checkout page`}),`\n(`,_jsx(_components.code,{children:`/pay/...`}),`), which shows the Pix QR or the card form. Both end in the same\ninvoice and the same webhook. The difference is `,_jsx(_components.strong,{children:`how much of the experience is\nyours`}),`.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`When in doubt, start with the link.`}),` It is the only one that asks nothing of your app. You can switch later: the product\nand the catalog are the same.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`the-middle-path-end-to-end`,children:`The middle path, end to end`}),`\n`,_jsxs(_components.p,{children:[`Assuming you already have a `,_jsx(_components.strong,{children:`published`}),` product (see the\n`,_jsx(_components.a,{href:`/en/catalogo`,children:`catalog`}),`), a key and an account ready to receive:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. create your customer's invoice`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`INV`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $API`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/billing/products/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/invoices`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$K`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`IDEM`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"customer\":{\"externalId\":\"u1\",\"email\":\"u1@x.com\",\"taxId\":\"52998224725\"}}'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. STORE THIS. It is the step nobody documents and everybody forgets.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# (in your database: invoiceId -> your user, status \"open\")`})}),`\n`]})})}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`You must map `,_jsx(_components.code,{children:`invoiceId`}),` → your user.`]}),` We do not know who your user is: you pass an `,_jsx(_components.code,{children:`externalId`}),` and we hand back an\n`,_jsx(_components.code,{children:`invoiceId`}),`. When the payment confirms, the webhook carries the `,_jsx(_components.code,{children:`invoiceId`}),`,\n`,_jsx(_components.strong,{children:`not your user`}),`. If you did not store the pair, you received money and do not\nknow from whom.`]}),_jsx(_components.p,{children:`It is the most important architecture decision on this page and it fits in one\nrow of a table in your database.`})]}),`\n`,_jsxs(Heading,{level:`2`,id:`charging-what-charge-returns`,children:[`Charging: what `,_jsx(_components.code,{children:`charge`}),` returns`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $API`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/pay/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SLUG`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/invoices/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$INV`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/charge`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`IDEM`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"method\":\"pix\"}'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The response carries what the buyer needs to finish, such as the Pix QR code, and\nthe flow stays on Infi’s checkout page. `,_jsx(_components.code,{children:`status`}),` comes back `,_jsx(_components.code,{children:`pending`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Do not trust the buyer’s return.`}),` They may come back without having paid, or never come back. The webhook is what\nconfirms; the return query string never proves anything.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`knowing-it-was-paid`,children:`Knowing it was paid`}),`\n`,_jsxs(_components.p,{children:[`Do not trust the return of `,_jsx(_components.code,{children:`charge`}),`: it comes back `,_jsx(_components.code,{children:`pending`}),`. Payment is\nasynchronous, and the confirmation arrives by webhook (`,_jsx(_components.code,{children:`payment.confirmed`}),`,\n`,_jsx(_components.code,{children:`invoice.paid`}),`).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# sandbox: polling, because registering a webhook answers 503`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $API`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/pay/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SLUG`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/invoices/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$INV`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .invoice.status`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # \"open\" | \"paid\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`When it confirms, use the event’s `,_jsx(_components.code,{children:`invoiceId`}),` to find the order you stored in\nstep 2. Details in `,_jsx(_components.a,{href:`/en/webhooks`,children:`webhooks`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-buyer-clicked-“buy”-twice`,children:`The buyer clicked “Buy” twice`}),`\n`,_jsxs(_components.p,{children:[`Every non-`,_jsx(_components.code,{children:`GET`}),` method `,_jsx(_components.strong,{children:`on the authenticated API`}),` requires an `,_jsx(_components.code,{children:`Idempotency-Key`}),`\n(the public `,_jsx(_components.code,{children:`/pay/*`}),` routes, which the buyer’s browser calls, do not). It is what\nstops two clicks from becoming two invoices.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# the SAME key for the SAME purchase intent`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"order-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$USER_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`-$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`date`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +%F)\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $API`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/billing/products/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/invoices`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$K`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"customer\":{\"externalId\":\"u1\",\"email\":\"u1@x.com\",\"taxId\":\"52998224725\"}}'`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Same key, same body`}),` → you get the original response back. One invoice.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Same key, different body`}),` → `,_jsx(_components.code,{children:`409 idempotency_key_reused`}),`. It is protection:\nit means you reused the key for something else.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No key`}),` → `,_jsx(_components.code,{children:`400 idempotency_key_required`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A fresh key on every call protects against a `,_jsx(_components.em,{children:`network retry`}),`, not against a double\nclick. For the double click, the key must come from something stable in your\nintent, as in the example above.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The simplest thing is not to let them click twice.`}),` Disable the button on the first click and treat the\n`,_jsx(_components.code,{children:`Idempotency-Key`}),` as the safety net, not the first line of defense.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`before-selling-the-name-the-buyer-sees`,children:`Before selling: the name the buyer sees`}),`\n`,_jsxs(_components.p,{children:[`Your tenant is born with a placeholder name. If you do not change it, the checkout\nand the payment link literally say `,_jsx(_components.strong,{children:`“New app”`}),`, and nobody buys from a store\ncalled New app.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` infi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`account`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Orvalho Coffee\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// optional, cited in the payment mandate:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` infi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`account`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`termsUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://orvalhocoffee.com/terms\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`It takes effect at once, with no product republish and no new link: the same link\nshows the new name. `,_jsx(_components.code,{children:`infi.account.get()`}),` reads it back. (From\n`,_jsx(_components.code,{children:`@beinfi/sdk@0.10.7`}),`; before that it is `,_jsx(_components.code,{children:`PATCH /account/tenant`}),`.)`]}),`\n`,_jsx(Heading,{level:`2`,id:`sold-now-deliver`,children:`Sold. Now deliver`}),`\n`,_jsxs(_components.p,{children:[`If what you sell is a file or access, do not build that by hand: attach the\ndeliverable to the product and Infi sends the buyer a personal link when the\npayment confirms, and hands you the same link to show on your thank-you page. It is\nin `,_jsx(_components.a,{href:`/en/entrega-do-produto`,children:`delivering the product`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The buyer’s side (finding out they paid, delivering, and the two polls nobody\nguesses) is in `,_jsx(_components.a,{href:`/en/pagina-de-obrigado`,children:`the thank-you page`}),`.`]})]})}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":"Your first sale","description":"From zero to a paid invoice: which path to pick, what to store, and what to do about the double click.","href":"/en/primeira-venda"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Which path is yours","slug":"which-path-is-yours","depth":2,"children":[]},{"title":"The middle path, end to end","slug":"the-middle-path-end-to-end","depth":2,"children":[]},{"title":"Charging: what charge returns","slug":"charging-what-charge-returns","depth":2,"children":[]},{"title":"Knowing it was paid","slug":"knowing-it-was-paid","depth":2,"children":[]},{"title":"The buyer clicked “Buy” twice","slug":"the-buyer-clicked-“buy”-twice","depth":2,"children":[]},{"title":"Before selling: the name the buyer sees","slug":"before-selling-the-name-the-buyer-sees","depth":2,"children":[]},{"title":"Sold. Now deliver","slug":"sold-now-deliver","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"beinfi","siteName":"Infi","title":"Your first sale - Infi","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pt-BR":{"href":"/primeira-venda","matchLevel":1},"en":{"href":"/en/primeira-venda","matchLevel":0}}},"lastModified":"2026-10-26T19:53:37.461Z","originalFileLocation":"en/primeira-venda.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=\"From zero to a paid invoice: which path to pick, what to store, and what to do about the double click.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Infi\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/beinfi/6L9ijlDVcq5aSfgL/_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/beinfi/6L9ijlDVcq5aSfgL/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/beinfi/6L9ijlDVcq5aSfgL/_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/beinfi/6L9ijlDVcq5aSfgL/_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/beinfi/6L9ijlDVcq5aSfgL/_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/beinfi/6L9ijlDVcq5aSfgL/_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/beinfi/6L9ijlDVcq5aSfgL/_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/beinfi/6L9ijlDVcq5aSfgL/_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/beinfi/6L9ijlDVcq5aSfgL/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Your first sale - Infi\">\u003cmeta data-mint-head property=\"og:description\" content=\"From zero to a paid invoice: which path to pick, what to store, and what to do about the double click.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Infi\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.beinfi.com/en/primeira-venda\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://beinfi.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Your+first+sale\u0026amp;description=From+zero+to+a+paid+invoice%3A+which+path+to+pick%2C+what+to+store%2C+and+what+to+do+about+the+double+click.\u0026amp;theme=0f1e10ebee4743982aba108c\u0026amp;signature=2577288b28d3bf714c0dedfcd97b5ab9d37f229b90c7d1b4f460e74bf281b7b1\">\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=\"Your first sale - Infi\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"From zero to a paid invoice: which path to pick, what to store, and what to do about the double click.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://beinfi.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Your+first+sale\u0026amp;description=From+zero+to+a+paid+invoice%3A+which+path+to+pick%2C+what+to+store%2C+and+what+to+do+about+the+double+click.\u0026amp;theme=0f1e10ebee4743982aba108c\u0026amp;signature=2577288b28d3bf714c0dedfcd97b5ab9d37f229b90c7d1b4f460e74bf281b7b1\">\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/beinfi/6L9ijlDVcq5aSfgL/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Infi\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0A1430\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.beinfi.com/en/primeira-venda\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/primeira-venda.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.beinfi.com/en/primeira-venda\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://docs.beinfi.com/primeira-venda\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.beinfi.com/primeira-venda\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.beinfi.com/#organization\",\"name\":\"Infi\",\"url\":\"https://docs.beinfi.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/beinfi/owBheEE6vXSyqXTj/logo/logo.svg?fit=max\u0026auto=format\u0026n=owBheEE6vXSyqXTj\u0026q=85\u0026s=b1b9ce09a8814e42032ef2bf2c08fb54\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.beinfi.com#website\",\"name\":\"Infi\",\"url\":\"https://docs.beinfi.com\",\"publisher\":{\"@id\":\"https://docs.beinfi.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.beinfi.com/en/primeira-venda#webpage\",\"url\":\"https://docs.beinfi.com/en/primeira-venda\",\"name\":\"Your first sale\",\"description\":\"From zero to a paid invoice: which path to pick, what to store, and what to do about the double click.\",\"dateModified\":\"2026-10-26T19:53:37.461Z\",\"isPartOf\":{\"@id\":\"https://docs.beinfi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.beinfi.com/en/primeira-venda#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.beinfi.com/en/primeira-venda#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://docs.beinfi.com/en/introducao\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Your first sale\",\"item\":\"https://docs.beinfi.com/en/primeira-venda\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.beinfi.com/en/primeira-venda#article\",\"headline\":\"Your first sale\",\"name\":\"Your first sale\",\"description\":\"From zero to a paid invoice: which path to pick, what to store, and what to do about the double click.\",\"url\":\"https://docs.beinfi.com/en/primeira-venda\",\"mainEntityOfPage\":{\"@id\":\"https://docs.beinfi.com/en/primeira-venda#webpage\"},\"dateModified\":\"2026-10-26T19:53:37.461Z\",\"publisher\":{\"@id\":\"https://docs.beinfi.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.beinfi.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Infi\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Infi","nav":{"global":null,"languages":[{"language":"pt-BR","default":true,"pages":[{"title":"pt-BR","href":"/primeira-venda"}]},{"language":"en","tabs":[{"tab":"Guides","groups":[{"group":"Get started","pages":[{"title":"Sell without borders.","href":"/en/introducao"},{"title":"Quickstart","href":"/en/inicio-rapido"},{"title":"Agent onboarding","description":"Let an agent collect the details, prepare the integration and hand the account to its owner.","href":"/en/agent-onboarding"},{"title":"Your first sale","href":"/en/primeira-venda"},{"title":"Catalog","description":"Product → published version → link: the chain that exists before you sell anything.","href":"/en/catalogo"},{"title":"Payment link","href":"/en/link-de-pagamento"},{"title":"Delivering the product","href":"/en/entrega-do-produto"},{"title":"The thank-you page","href":"/en/pagina-de-obrigado"},{"title":"Testing in the sandbox","href":"/en/testar-no-sandbox"},{"title":"Refunds","href":"/en/reembolso"},{"title":"Claim","href":"/en/sandbox"},{"title":"Company as code","href":"/en/company-as-code"},{"title":"Going to production","href":"/en/producao"}]},{"group":"Integration","pages":[{"title":"TypeScript SDK","href":"/en/sdk"},{"title":"Webhooks","href":"/en/webhooks"},{"title":"HTTP API","href":"/en/api-http"},{"title":"Lovable","href":"/en/lovable"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/en/api-reference/checkout/read-an-invoice-at-checkout"}]}]}]},"basePath":"","title":"Your first sale - Infi","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":[],"chunks":[]}