Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key.
Card payments are not accepted through the API. A card object, CARD in methods in headless mode (mode omitted or headless), or any of these fields at the top level of the body: deviceInfo, remoteIp, holderInfo, authorizeOnly, creditCard, creditCardHolderInfo, creditCardToken, installmentCount, installmentValue, totalValue, is rejected with 400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API, even without a valid API key, and the card data is not stored or logged.
To charge a card, create the payment with mode: hosted and CARD in methods (["CARD"], or ["PIX", "CARD"] to let the payer choose), with an amount of at least R$ 5.00, and redirect the payer to the returned checkoutUrl. The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as PAYMENT_CONFIRMED, PAYMENT_PAID, PAYMENT_EXPIRED or PAYMENT_CANCELLED; you can also poll GET /v1/payments/{paymentId}.
YuvexPay API key. Include as Authorization: Bearer ypk_<env>_<kid>_<secret> where <env> is test (sandbox) or live (production). Create and manage keys in the dashboard under Settings > API Keys.
A unique string to ensure the request is processed only once. Must be unique per request. Valid for 24 hours. Successful (2xx) responses are stored and replayed for the key. On POST /v1/payments, a 502 PROVIDER_TEMPORARILY_UNAVAILABLE for a boleto payment is stored and replayed too: to recover that payment, repeat the request once with the same externalId and a new key. A retry of an earlier card payment request now returns 400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API instead of the stored response (201 or 502): recover that payment with GET /v1/payments/txid/{txId}, or with a create request with the same externalId, mode: "hosted" and methods: ["CARD"], no card object or card fields, and a new key.
API key of an approved split platform, sent as the key itself, without Bearer, in the environment of the key in Authorization: ypk_live_ in production, ypk_test_ in sandbox. It lets the platform named in splits[] connect the seller on this call, with no dashboard invitation: the relationship is recorded as ACCEPTED with the platform's fee cap and the payment is created. The connection works in production and in sandbox under the same fee cap, and only a production connection notifies the seller. The header is read only when exactly one recipient in splits[] has no accepted relationship with your company, and ignored otherwise. A key that is unknown, revoked or expired, is from the other environment, lacks the payments:write scope, is used from outside its IP allowlist or belongs to your own company returns 403 SPLIT_PLATFORM_KEY_INVALID. A valid key whose company is not that recipient, or is not an approved platform, connects nobody: the request follows the regular flow and returns SPLIT_RELATIONSHIP_PENDING. Send it from a server only. See the Split platforms guide.
Accepted payment methods. Headless payments must use exactly one method, PIX or BOLETO. CARD requires mode: hosted; headless CARD is rejected with 400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API.
hosted redirects the payer to a YuvexPay checkout page. headless returns method data directly for a single payment method, PIX or BOLETO. CARD is available in hosted mode only: the YuvexPay checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself.
PIX only. Opt-in request that the charge be paid from an account whose CPF/CNPJ matches the customer's document (same-document payment). Best-effort: when it cannot be enforced, the charge is still created and paid normally.
Whether the YuvexPay fee should be added on top of amount and charged to the payer instead of being deducted from the merchant's net. When omitted, the company-level passFeeToPayerDefault setting applies. Note: payments with a resolved amount below R$1,00 are always charged to the payer regardless of this value (forced passthrough to keep merchant net positive). The final decision is reflected back as feePassedToPayer on the Payment object.
Share part of this payment with other YuvexPay companies when it settles. Optional. The maximum number of entries is the recipient limit configured for your account — three by default, and support can raise it; going over it returns SPLIT_RECIPIENT_LIMIT_EXCEEDED. The sum of the splits must not exceed netAmount, otherwise the request fails with SPLIT_AMOUNT_EXCEEDS_NET and nothing is clamped. The YuvexPay fee is always yours and is never apportioned. Splits are set only at creation: there is no endpoint to add, edit or remove one afterwards.
Boleto-specific options, applied only when BOLETO is one of the methods. Fine, interest, and discount mirror the boleto configuration registered with the bank and are settled against the amount the payer actually pays.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"YuvexPay","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/yuvexpay/_p0fopc5ZJwqr6Ao/logo/light.png?fit=max\u0026auto=format\u0026n=_p0fopc5ZJwqr6Ao\u0026q=85\u0026s=85eb8014f41b3db8d62050d2ff2d17eb","dark":"https://mintcdn.com/yuvexpay/_p0fopc5ZJwqr6Ao/logo/dark.png?fit=max\u0026auto=format\u0026n=_p0fopc5ZJwqr6Ao\u0026q=85\u0026s=bb76c5782cd7c2617b6337f945d8ce09"},"favicon":"https://mintcdn.com/yuvexpay/y4ZbUn0Z_aeTofU3/favicon.svg?fit=max\u0026auto=format\u0026n=y4ZbUn0Z_aeTofU3\u0026q=85\u0026s=149e82b739356ac0368489279ddb2785","api":{},"navbar":{"links":[{"href":"mailto:support@yuvexpay.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.yuvexpay.com"}},"footer":{"socials":{"github":"https://github.com/yuvexpay"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.yuvexpay.com"},{"anchor":"API status","icon":"signal","href":"https://status.yuvexpay.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"yuvexpay","hasAudioNarration":false,"actualSubdomain":"yuvexpay","customDomains":["docs.yuvexpay.com"],"gitSource":{"type":"github","owner":"yuvexpay","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6add2ecb41bc09b755441f21","collectionId":"f7c0a0d1-3dc0-4c6f-9c35-f75bb0f47542","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6add2ecb41bc09b755441f21"},"entitlements":{},"buildId":"6add2ecb41bc09b755441f21","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"API reference","count":33},{"language":"default","tag":"Products","count":13},{"language":"default","tag":"Guides","count":13},{"language":"default","tag":"Payments","count":8},{"language":"default","tag":"Core concepts","count":6},{"language":"default","tag":"Customers","count":5},{"language":"default","tag":"Withdrawals","count":4},{"language":"default","tag":"Documents","count":3},{"language":"default","tag":"Getting started","count":2},{"language":"default","tag":"Authentication","count":1}]},"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":"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":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/payments/create","slug":"/api-reference/payments/create","pageMetadata":{"title":"Create a payment","openapi":"POST /v1/payments","description":"Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key.\n\nCard payments are not accepted through the API. A `card` object, `CARD` in `methods` in headless mode (`mode` omitted or `headless`), or any of these fields at the top level of the body: `deviceInfo`, `remoteIp`, `holderInfo`, `authorizeOnly`, `creditCard`, `creditCardHolderInfo`, `creditCardToken`, `installmentCount`, `installmentValue`, `totalValue`, is rejected with `400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API`, even without a valid API key, and the card data is not stored or logged.\n\nTo charge a card, create the payment with `mode: hosted` and `CARD` in `methods` (`[\"CARD\"]`, or `[\"PIX\", \"CARD\"]` to let the payer choose), with an `amount` of at least R$ 5.00, and redirect the payer to the returned `checkoutUrl`. The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as `PAYMENT_CONFIRMED`, `PAYMENT_PAID`, `PAYMENT_EXPIRED` or `PAYMENT_CANCELLED`; you can also poll `GET /v1/payments/{paymentId}`.","href":"/api-reference/payments/create"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Card payments are not accepted through the API. A \", _jsx(_components.code, {\n children: \"card\"\n }), \" object, \", _jsx(_components.code, {\n children: \"CARD\"\n }), \" in \", _jsx(_components.code, {\n children: \"methods\"\n }), \" in headless mode (\", _jsx(_components.code, {\n children: \"mode\"\n }), \" omitted or \", _jsx(_components.code, {\n children: \"headless\"\n }), \"), or any of these fields at the top level of the body: \", _jsx(_components.code, {\n children: \"deviceInfo\"\n }), \", \", _jsx(_components.code, {\n children: \"remoteIp\"\n }), \", \", _jsx(_components.code, {\n children: \"holderInfo\"\n }), \", \", _jsx(_components.code, {\n children: \"authorizeOnly\"\n }), \", \", _jsx(_components.code, {\n children: \"creditCard\"\n }), \", \", _jsx(_components.code, {\n children: \"creditCardHolderInfo\"\n }), \", \", _jsx(_components.code, {\n children: \"creditCardToken\"\n }), \", \", _jsx(_components.code, {\n children: \"installmentCount\"\n }), \", \", _jsx(_components.code, {\n children: \"installmentValue\"\n }), \", \", _jsx(_components.code, {\n children: \"totalValue\"\n }), \", is rejected with \", _jsx(_components.code, {\n children: \"400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API\"\n }), \", even without a valid API key, and the card data is not stored or logged.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To charge a card, create the payment with \", _jsx(_components.code, {\n children: \"mode: hosted\"\n }), \" and \", _jsx(_components.code, {\n children: \"CARD\"\n }), \" in \", _jsx(_components.code, {\n children: \"methods\"\n }), \" (\", _jsx(_components.code, {\n children: \"[\\\"CARD\\\"]\"\n }), \", or \", _jsx(_components.code, {\n children: \"[\\\"PIX\\\", \\\"CARD\\\"]\"\n }), \" to let the payer choose), with an \", _jsx(_components.code, {\n children: \"amount\"\n }), \" of at least R$ 5.00, and redirect the payer to the returned \", _jsx(_components.code, {\n children: \"checkoutUrl\"\n }), \". The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as \", _jsx(_components.code, {\n children: \"PAYMENT_CONFIRMED\"\n }), \", \", _jsx(_components.code, {\n children: \"PAYMENT_PAID\"\n }), \", \", _jsx(_components.code, {\n children: \"PAYMENT_EXPIRED\"\n }), \" or \", _jsx(_components.code, {\n children: \"PAYMENT_CANCELLED\"\n }), \"; you can also poll \", _jsx(_components.code, {\n children: \"GET /v1/payments/{paymentId}\"\n }), \".\"]\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a payment","openapi":"POST /v1/payments","description":"Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key.\n\nCard payments are not accepted through the API. A `card` object, `CARD` in `methods` in headless mode (`mode` omitted or `headless`), or any of these fields at the top level of the body: `deviceInfo`, `remoteIp`, `holderInfo`, `authorizeOnly`, `creditCard`, `creditCardHolderInfo`, `creditCardToken`, `installmentCount`, `installmentValue`, `totalValue`, is rejected with `400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API`, even without a valid API key, and the card data is not stored or logged.\n\nTo charge a card, create the payment with `mode: hosted` and `CARD` in `methods` (`[\"CARD\"]`, or `[\"PIX\", \"CARD\"]` to let the payer choose), with an `amount` of at least R$ 5.00, and redirect the payer to the returned `checkoutUrl`. The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as `PAYMENT_CONFIRMED`, `PAYMENT_PAID`, `PAYMENT_EXPIRED` or `PAYMENT_CANCELLED`; you can also poll `GET /v1/payments/{paymentId}`.","href":"/api-reference/payments/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createPayment","summary":"Create a payment","description":"Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key.\n\nCard payments are not accepted through the API. A `card` object, `CARD` in `methods` in headless mode (`mode` omitted or `headless`), or any of these fields at the top level of the body: `deviceInfo`, `remoteIp`, `holderInfo`, `authorizeOnly`, `creditCard`, `creditCardHolderInfo`, `creditCardToken`, `installmentCount`, `installmentValue`, `totalValue`, is rejected with `400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API`, even without a valid API key, and the card data is not stored or logged.\n\nTo charge a card, create the payment with `mode: hosted` and `CARD` in `methods` (`[\"CARD\"]`, or `[\"PIX\", \"CARD\"]` to let the payer choose), with an `amount` of at least R$ 5.00, and redirect the payer to the returned `checkoutUrl`. The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as `PAYMENT_CONFIRMED`, `PAYMENT_PAID`, `PAYMENT_EXPIRED` or `PAYMENT_CANCELLED`; you can also poll `GET /v1/payments/{paymentId}`.","tags":["Payments"],"parameters":["647968f3-22cd-492c-a922-c3114a669c2b","ea035516-8f74-4807-b3ce-7d508b822bb9"],"requestBody":"04aa4d9d-1dfe-40fc-9796-354c3df2b635","responses":{"201":"b5d20c30-4117-4226-87e4-3b0d385fcda2","400":"e06ee2e5-24b2-462d-b096-298d141def27","401":"2aa3a759-a135-4646-93f8-5ed743a7db9d","403":"5c8beb0b-1fe8-46c9-9906-cbc38c140b22","409":"1c00a85f-1fbb-444d-a16d-9e82b55be11b","429":"2bb438e9-d025-44cc-a8c4-68b4fc0ab097","502":"06bc3c07-4ab0-45a1-847a-2c352b88deab","503":"48a1e927-f9d0-4c9a-914b-f98b21627f3c"},"method":"post","type":"path","servers":["30caf778-26b8-4811-87ad-19a2f5724d43"],"security":["2137f48b-cc8e-489b-84f6-226ef7e46562"],"path":"/v1/payments","baseUrlOptions":["https://api.yuvexpay.com"],"title":"Create a payment","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"647968f3-22cd-492c-a922-c3114a669c2b":{"name":"X-Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":100,"isRequired":true,"description":"A unique string to ensure the request is processed only once. Must be unique per request. Valid for 24 hours. Successful (`2xx`) responses are stored and replayed for the key. On `POST /v1/payments`, a `502 PROVIDER_TEMPORARILY_UNAVAILABLE` for a boleto payment is stored and replayed too: to recover that payment, repeat the request once with the same `externalId` and a new key. A retry of an earlier card payment request now returns `400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API` instead of the stored response (`201` or `502`): recover that payment with `GET /v1/payments/txid/{txId}`, or with a create request with the same `externalId`, `mode: \"hosted\"` and `methods: [\"CARD\"]`, no `card` object or card fields, and a new key.","uniqueKey":"","typeLabel":"string"},"description":"A unique string to ensure the request is processed only once. Must be unique per request. Valid for 24 hours. Successful (`2xx`) responses are stored and replayed for the key. On `POST /v1/payments`, a `502 PROVIDER_TEMPORARILY_UNAVAILABLE` for a boleto payment is stored and replayed too: to recover that payment, repeat the request once with the same `externalId` and a new key. A retry of an earlier card payment request now returns `400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API` instead of the stored response (`201` or `502`): recover that payment with `GET /v1/payments/txid/{txId}`, or with a create request with the same `externalId`, `mode: \"hosted\"` and `methods: [\"CARD\"]`, no `card` object or card fields, and a new key."},"ea035516-8f74-4807-b3ce-7d508b822bb9":{"name":"X-Split-Platform-Key","in":"header","required":false,"schema":{"type":"string","isRequired":false,"description":"API key of an approved split platform, sent as the key itself, without `Bearer`, in the environment of the key in `Authorization`: `ypk_live_` in production, `ypk_test_` in sandbox. It lets the platform named in `splits[]` connect the seller on this call, with no dashboard invitation: the relationship is recorded as `ACCEPTED` with the platform's fee cap and the payment is created. The connection works in production and in sandbox under the same fee cap, and only a production connection notifies the seller. The header is read only when exactly one recipient in `splits[]` has no accepted relationship with your company, and ignored otherwise. A key that is unknown, revoked or expired, is from the other environment, lacks the `payments:write` scope, is used from outside its IP allowlist or belongs to your own company returns `403 SPLIT_PLATFORM_KEY_INVALID`. A valid key whose company is not that recipient, or is not an approved platform, connects nobody: the request follows the regular flow and returns `SPLIT_RELATIONSHIP_PENDING`. Send it from a server only. See the Split platforms guide.","uniqueKey":"","typeLabel":"string"},"description":"API key of an approved split platform, sent as the key itself, without `Bearer`, in the environment of the key in `Authorization`: `ypk_live_` in production, `ypk_test_` in sandbox. It lets the platform named in `splits[]` connect the seller on this call, with no dashboard invitation: the relationship is recorded as `ACCEPTED` with the platform's fee cap and the payment is created. The connection works in production and in sandbox under the same fee cap, and only a production connection notifies the seller. The header is read only when exactly one recipient in `splits[]` has no accepted relationship with your company, and ignored otherwise. A key that is unknown, revoked or expired, is from the other environment, lacks the `payments:write` scope, is used from outside its IP allowlist or belongs to your own company returns `403 SPLIT_PLATFORM_KEY_INVALID`. A valid key whose company is not that recipient, or is not an approved platform, connects nobody: the request follows the regular flow and returns `SPLIT_RELATIONSHIP_PENDING`. Send it from a server only. See the Split platforms guide."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string","format":"uuid","description":"Link this payment to an existing product. If set, `amount` is optional and defaults to the product price.","uniqueKey":"productId","typeLabel":"string\u003cuuid>"},"customerId":{"type":"string","format":"uuid","description":"Link this payment to an existing customer. For CARD and BOLETO, the linked customer must have name and CPF/CNPJ.","uniqueKey":"customerId","typeLabel":"string\u003cuuid>"},"amount":{"type":"number","minimum":0.01,"maximum":1000000,"description":"Payment amount. Required unless `productId` is provided.","uniqueKey":"amount","typeLabel":"number"},"methods":{"type":"array","items":{"type":"string","enum":["PIX","CARD","BOLETO"],"description":"Available public payment methods.","uniqueKey":"methods.items.[INDEX]","typeLabel":"enum\u003cstring>"},"minItems":1,"default":["PIX"],"description":"Accepted payment methods. Headless payments must use exactly one method, `PIX` or `BOLETO`. `CARD` requires `mode: hosted`; headless `CARD` is rejected with `400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API`.","uniqueKey":"methods","typeLabel":"enum\u003cstring>[]"},"currency":{"type":"string","enum":["BRL"],"description":"Supported currencies.","default":"BRL","uniqueKey":"currency","typeLabel":"enum\u003cstring>"},"mode":{"type":"string","enum":["hosted","headless"],"default":"headless","description":"hosted redirects the payer to a YuvexPay checkout page. headless returns method data directly for a single payment method, PIX or BOLETO. CARD is available in hosted mode only: the YuvexPay checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself.","uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"returnUrl":{"type":"string","format":"uri","description":"URL to redirect the payer after payment (hosted mode).","uniqueKey":"returnUrl","typeLabel":"string\u003curi>"},"completionUrl":{"type":"string","format":"uri","description":"URL to redirect the payer after successful payment completion.","uniqueKey":"completionUrl","typeLabel":"string\u003curi>"},"description":{"type":"string","maxLength":500,"description":"Payment description shown to the payer.","uniqueKey":"description","typeLabel":"string"},"externalId":{"type":"string","maxLength":100,"description":"Your own reference ID (e.g., order number).","uniqueKey":"externalId","typeLabel":"string"},"expiresInMinutes":{"type":"integer","minimum":5,"maximum":10080,"default":60,"description":"Minutes until the payment expires (5-10080, i.e. up to 7 days).","uniqueKey":"expiresInMinutes","typeLabel":"integer"},"enforcePayerDocument":{"type":"boolean","default":false,"description":"PIX only. Opt-in request that the charge be paid from an account whose CPF/CNPJ matches the customer's document (same-document payment). Best-effort: when it cannot be enforced, the charge is still created and paid normally.","uniqueKey":"enforcePayerDocument","typeLabel":"boolean"},"customer":{"type":"object","description":"Inline customer data. For CARD and BOLETO, include at least name and CPF/CNPJ unless you use customerId.","properties":{"name":{"type":"string","description":"Payer name. Required for CARD and BOLETO when not using customerId.","uniqueKey":"customer.name","typeLabel":"string"},"document":{"type":"string","description":"CPF or CNPJ. Required for CARD and BOLETO when not using customerId.","uniqueKey":"customer.document","typeLabel":"string"},"email":{"type":"string","format":"email","uniqueKey":"customer.email","typeLabel":"string\u003cemail>"},"phone":{"type":"string","description":"Payer phone number in national or international format.","uniqueKey":"customer.phone","typeLabel":"string"}},"uniqueKey":"customer","typeLabel":"object"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"metadata.additionalProperties","typeLabel":"string"},"description":"Arbitrary key-value pairs attached to the payment.","uniqueKey":"metadata","typeLabel":"object"},"passFeeToPayer":{"type":"boolean","description":"Whether the YuvexPay fee should be added on top of `amount` and charged to the payer instead of being deducted from the merchant's net. When omitted, the company-level `passFeeToPayerDefault` setting applies. Note: payments with a resolved amount below R$1,00 are always charged to the payer regardless of this value (forced passthrough to keep merchant net positive). The final decision is reflected back as `feePassedToPayer` on the Payment object.","uniqueKey":"passFeeToPayer","typeLabel":"boolean"},"splits":{"type":"array","items":{"type":"object","description":"One split recipient, set at creation. Shares are computed from `amount` (the gross), never from `netAmount` and never from the fee.","properties":{"recipientCompanyId":{"type":"string","format":"uuid","description":"Company id of the YuvexPay account that receives this share. Must be a company other than your own, unique within `splits`, in the same environment as the payment (an approved split platform connected in sandbox is the exception), approved (KYC, plus KYB for a business), and it must have accepted split payments from your company. An approved split platform that is not connected yet can be named when the request carries its key in `X-Split-Platform-Key`. A split to an approved platform is limited by its fee cap (`SPLIT_FEE_CAP_EXCEEDED`).","isRequired":true,"uniqueKey":"splits.items.[INDEX].recipientCompanyId","typeLabel":"string\u003cuuid>"},"type":{"type":"string","enum":["PERCENTAGE","FIXED"],"description":"Whether `value` is a percentage of `amount` or a fixed BRL amount. Both forms may coexist in the same `splits` array.","isRequired":true,"uniqueKey":"splits.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"value":{"type":"number","minimum":0.01,"multipleOf":0.01,"description":"For `PERCENTAGE`, a percentage of `amount` between `0.01` and `100` with at most two decimal places; the resulting share is rounded down to the cent and every remaining cent stays with your company. For `FIXED`, a BRL amount of at least `0.01`.","isRequired":true,"uniqueKey":"splits.items.[INDEX].value","typeLabel":"number"}},"required":["recipientCompanyId","type","value"],"uniqueKey":"splits.items.[INDEX]","typeLabel":"object"},"description":"Share part of this payment with other YuvexPay companies when it settles. Optional. The maximum number of entries is the recipient limit configured for your account — three by default, and support can raise it; going over it returns `SPLIT_RECIPIENT_LIMIT_EXCEEDED`. The sum of the splits must not exceed `netAmount`, otherwise the request fails with `SPLIT_AMOUNT_EXCEEDS_NET` and nothing is clamped. The YuvexPay fee is always yours and is never apportioned. Splits are set only at creation: there is no endpoint to add, edit or remove one afterwards.","uniqueKey":"splits","typeLabel":"object[]"},"boleto":{"type":"object","description":"Boleto-specific options, applied only when `BOLETO` is one of the `methods`. Fine, interest, and discount mirror the boleto configuration registered with the bank and are settled against the amount the payer actually pays.","properties":{"dueDate":{"type":"string","format":"date","description":"Boleto due date (vencimento) as `YYYY-MM-DD`. Must be today or a future date within one year. Defaults to 3 business days out when omitted. The boleto can still be paid after this date unless the account is configured to reject post-due payment.","uniqueKey":"boleto.dueDate","typeLabel":"string\u003cdate>"},"fine":{"type":"object","description":"Fine (multa) charged once when the boleto is paid after the due date.","properties":{"value":{"type":"number","description":"Fine amount (must be greater than 0), interpreted per `type`.","isRequired":true,"uniqueKey":"boleto.fine.value","typeLabel":"number"},"type":{"type":"string","enum":["FIXED","PERCENTAGE"],"default":"PERCENTAGE","description":"Whether `value` is a fixed BRL amount or a percentage of the boleto value.","uniqueKey":"boleto.fine.type","typeLabel":"enum\u003cstring>"}},"required":["value"],"uniqueKey":"boleto.fine","typeLabel":"object"},"interest":{"type":"object","description":"Monthly interest (juros) accrued while the boleto is overdue.","properties":{"value":{"type":"number","description":"Monthly interest percentage (must be greater than 0).","isRequired":true,"uniqueKey":"boleto.interest.value","typeLabel":"number"}},"required":["value"],"uniqueKey":"boleto.interest","typeLabel":"object"},"discount":{"type":"object","description":"Discount granted when the boleto is paid on or before the discount deadline.","properties":{"value":{"type":"number","description":"Discount amount (must be greater than 0), interpreted per `type`.","isRequired":true,"uniqueKey":"boleto.discount.value","typeLabel":"number"},"type":{"type":"string","enum":["FIXED","PERCENTAGE"],"default":"PERCENTAGE","description":"Whether `value` is a fixed BRL amount or a percentage of the boleto value.","uniqueKey":"boleto.discount.type","typeLabel":"enum\u003cstring>"},"dueDateLimitDays":{"type":"integer","minimum":0,"maximum":60,"default":0,"description":"Number of days before the due date up to which the discount applies. 0 means the discount applies only until the due date.","uniqueKey":"boleto.discount.dueDateLimitDays","typeLabel":"integer"}},"required":["value"],"uniqueKey":"boleto.discount","typeLabel":"object"}},"uniqueKey":"boleto","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"amount":49.9,"methods":["PIX"],"currency":"BRL","mode":"headless","description":"Order #1234","externalId":"order-1234","expiresInMinutes":30,"customer":{"name":"Pedro Álvares Cabral","email":"user@example.com","phone":"+5511999999999","document":"12345678900"},"metadata":{"order_id":"1234","source":"website"}},"examples":{"headlessPix":{"title":"headlessPix","value":{"amount":49.9,"methods":["PIX"],"currency":"BRL","mode":"headless","description":"Order #1234","externalId":"order-1234","expiresInMinutes":30,"customer":{"name":"Pedro Álvares Cabral","email":"user@example.com","phone":"+5511999999999","document":"12345678900"},"metadata":{"order_id":"1234","source":"website"}}},"hostedCheckout":{"title":"hostedCheckout","value":{"amount":49.9,"methods":["PIX","CARD"],"currency":"BRL","mode":"hosted","description":"Order #1234","externalId":"order-1234","returnUrl":"https://store.example.com/checkout/return","completionUrl":"https://store.example.com/checkout/done","customer":{"name":"Pedro Álvares Cabral","email":"user@example.com","document":"12345678900"}}},"headlessPixWithSplit":{"title":"headlessPixWithSplit","value":{"amount":49.9,"methods":["PIX"],"currency":"BRL","mode":"headless","description":"Order #1234","externalId":"order-1234","expiresInMinutes":30,"customer":{"name":"Pedro Álvares Cabral","email":"user@example.com","phone":"+5511999999999","document":"12345678900"},"splits":[{"recipientCompanyId":"b7f1c3d2-4e5a-4b6c-8d9e-0a1b2c3d4e5f","type":"PERCENTAGE","value":10},{"recipientCompanyId":"c9a2d4e6-8b1f-4c3a-9d7e-2f5a8b0c1d3e","type":"FIXED","value":5}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"b5d20c30-4117-4226-87e4-3b0d385fcda2":{"description":"Payment created.","content":{"application/json":{"schema":{"type":"object","properties":{"payment":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"payment.oneOf.0.id","typeLabel":"string\u003cuuid>"},"txId":{"type":"string","uniqueKey":"payment.oneOf.0.txId","typeLabel":"string"},"amount":{"type":"number","description":"Merchant-requested base amount. Seller receivable when `feePassedToPayer` is true.","uniqueKey":"payment.oneOf.0.amount","typeLabel":"number"},"feeAmount":{"type":"number","description":"YuvexPay platform fee.","uniqueKey":"payment.oneOf.0.feeAmount","typeLabel":"number"},"netAmount":{"type":"number","description":"Merchant's net receivable, pre-split. When the payment carries `splits`, the originating company keeps `netAmount` minus the sum of the splits.","uniqueKey":"payment.oneOf.0.netAmount","typeLabel":"number"},"feePassedToPayer":{"type":"boolean","description":"Resolved decision on whether the fee was added on top for the payer.","uniqueKey":"payment.oneOf.0.feePassedToPayer","typeLabel":"boolean"},"payerFeeAmount":{"oneOf":[{"type":"number","description":"Fee added to payer's total when `feePassedToPayer` is true; null otherwise.","uniqueKey":"payment.oneOf.0.payerFeeAmount.oneOf.0","typeLabel":"number"},{"type":"null","description":"Fee added to payer's total when `feePassedToPayer` is true; null otherwise.","uniqueKey":"payment.oneOf.0.payerFeeAmount.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment.oneOf.0.payerFeeAmount","typeLabel":"number | null"},"splits":{"type":"array","items":{"type":"object","description":"A split recorded on a payment. Immutable once the payment is created.","properties":{"id":{"type":"string","format":"uuid","description":"Identifier of this split entry.","isRequired":true,"uniqueKey":"payment.oneOf.0.splits.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"recipientCompanyId":{"type":"string","format":"uuid","description":"Company id of the YuvexPay account that receives this share.","isRequired":true,"uniqueKey":"payment.oneOf.0.splits.items.[INDEX].recipientCompanyId","typeLabel":"string\u003cuuid>"},"type":{"type":"string","enum":["PERCENTAGE","FIXED"],"description":"Whether `value` is a percentage of `amount` or a fixed BRL amount.","isRequired":true,"uniqueKey":"payment.oneOf.0.splits.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"value":{"type":"number","description":"The percentage or the BRL amount, exactly as it was sent at creation.","isRequired":true,"uniqueKey":"payment.oneOf.0.splits.items.[INDEX].value","typeLabel":"number"}},"required":["id","recipientCompanyId","type","value"],"uniqueKey":"payment.oneOf.0.splits.items.[INDEX]","typeLabel":"object"},"description":"Splits recorded on this payment, in the order they were sent. `[]` when the payment has none.","uniqueKey":"payment.oneOf.0.splits","typeLabel":"object[]"},"isSandbox":{"type":"boolean","uniqueKey":"payment.oneOf.0.isSandbox","typeLabel":"boolean"},"status":{"type":"string","enum":["NEW","PENDING_METHOD_SELECTION","PROCESSING","CONFIRMED","PAID","CANCELLED","EXPIRED","REFUNDED","PARTIAL_REFUND","CHARGEBACK","MED_FROZEN"],"description":"Possible payment statuses.","uniqueKey":"payment.oneOf.0.status","typeLabel":"enum\u003cstring>"},"paymentMethod":{"type":"string","enum":["PIX","CARD","BOLETO"],"description":"Available public payment methods.","uniqueKey":"payment.oneOf.0.paymentMethod","typeLabel":"enum\u003cstring>"},"currency":{"type":"string","enum":["BRL"],"description":"Supported currencies.","uniqueKey":"payment.oneOf.0.currency","typeLabel":"enum\u003cstring>"},"description":{"oneOf":[{"type":"string","uniqueKey":"payment.oneOf.0.description.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"payment.oneOf.0.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment.oneOf.0.description","typeLabel":"string | null"},"expiresAt":{"type":"string","format":"date-time","uniqueKey":"payment.oneOf.0.expiresAt","typeLabel":"string\u003cdate-time>"},"createdAt":{"type":"string","format":"date-time","uniqueKey":"payment.oneOf.0.createdAt","typeLabel":"string\u003cdate-time>"},"methodData":{"oneOf":[{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","enum":["PIX","CARD","BOLETO"],"description":"Available public payment methods.","uniqueKey":"payment.oneOf.0.methodData.oneOf.0.type","typeLabel":"enum\u003cstring>"},"cardFundingType":{"oneOf":[{"type":"string","enum":["credit","debit",null],"description":"CARD only. `credit` when the card was charged as a credit card in a single installment, `debit` when it was charged as a debit card. `null` when the funding type is not known, including older payments.","uniqueKey":"payment.oneOf.0.methodData.oneOf.0.cardFundingType.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["credit","debit",null],"description":"CARD only. `credit` when the card was charged as a credit card in a single installment, `debit` when it was charged as a debit card. `null` when the funding type is not known, including older payments.","uniqueKey":"payment.oneOf.0.methodData.oneOf.0.cardFundingType.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment.oneOf.0.methodData.oneOf.0.cardFundingType","typeLabel":"enum\u003cstring> | null"}},"description":"Method-specific data. PIX returns QR data. BOLETO returns the digitable line and barcode. CARD returns masked card data and `cardFundingType`, only when the request returns an existing card payment. `null` when the request returns an existing boleto payment that is `PROCESSING` after a `502`, or one recorded `CANCELLED` before a charge was created.","example":{"type":"PIX","pixCopyPaste":"00020126...","qrCodeBase64":"data:image/png;base64,...","qrCodeUrl":null},"uniqueKey":"payment.oneOf.0.methodData.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"properties":{"type":{"type":"string","enum":["PIX","CARD","BOLETO"],"description":"Available public payment methods."},"cardFundingType":{"oneOf":[{"type":"string","enum":["credit","debit",null],"description":"CARD only. `credit` when the card was charged as a credit card in a single installment, `debit` when it was charged as a debit card. `null` when the funding type is not known, including older payments."},{"type":"null","enum":["credit","debit",null],"description":"CARD only. `credit` when the card was charged as a credit card in a single installment, `debit` when it was charged as a debit card. `null` when the funding type is not known, including older payments."}]}},"description":"Method-specific data. PIX returns QR data. BOLETO returns the digitable line and barcode. CARD returns masked card data and `cardFundingType`, only when the request returns an existing card payment. `null` when the request returns an existing boleto payment that is `PROCESSING` after a `502`, or one recorded `CANCELLED` before a charge was created.","example":{"type":"PIX","pixCopyPaste":"00020126...","qrCodeBase64":"data:image/png;base64,...","qrCodeUrl":null},"uniqueKey":"payment.oneOf.0.methodData.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment.oneOf.0.methodData","typeLabel":"object | null"}},"isRequired":true,"uniqueKey":"payment.oneOf.0","typeLabel":"object"},{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"payment.oneOf.1.id","typeLabel":"string\u003cuuid>"},"txId":{"type":"string","uniqueKey":"payment.oneOf.1.txId","typeLabel":"string"},"amount":{"type":"number","description":"Merchant-requested base amount. Seller receivable when `feePassedToPayer` is true.","uniqueKey":"payment.oneOf.1.amount","typeLabel":"number"},"feeAmount":{"type":"number","description":"YuvexPay platform fee.","uniqueKey":"payment.oneOf.1.feeAmount","typeLabel":"number"},"netAmount":{"type":"number","description":"Merchant's net receivable, pre-split. When the payment carries `splits`, the originating company keeps `netAmount` minus the sum of the splits.","uniqueKey":"payment.oneOf.1.netAmount","typeLabel":"number"},"feePassedToPayer":{"type":"boolean","description":"Resolved decision on whether the fee was added on top for the payer.","uniqueKey":"payment.oneOf.1.feePassedToPayer","typeLabel":"boolean"},"payerFeeAmount":{"oneOf":[{"type":"number","description":"Fee added to payer's total when `feePassedToPayer` is true; null otherwise.","uniqueKey":"payment.oneOf.1.payerFeeAmount.oneOf.0","typeLabel":"number"},{"type":"null","description":"Fee added to payer's total when `feePassedToPayer` is true; null otherwise.","uniqueKey":"payment.oneOf.1.payerFeeAmount.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment.oneOf.1.payerFeeAmount","typeLabel":"number | null"},"splits":{"type":"array","items":{"type":"object","description":"A split recorded on a payment. Immutable once the payment is created.","properties":{"id":{"type":"string","format":"uuid","description":"Identifier of this split entry.","isRequired":true,"uniqueKey":"payment.oneOf.1.splits.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"recipientCompanyId":{"type":"string","format":"uuid","description":"Company id of the YuvexPay account that receives this share.","isRequired":true,"uniqueKey":"payment.oneOf.1.splits.items.[INDEX].recipientCompanyId","typeLabel":"string\u003cuuid>"},"type":{"type":"string","enum":["PERCENTAGE","FIXED"],"description":"Whether `value` is a percentage of `amount` or a fixed BRL amount.","isRequired":true,"uniqueKey":"payment.oneOf.1.splits.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"value":{"type":"number","description":"The percentage or the BRL amount, exactly as it was sent at creation.","isRequired":true,"uniqueKey":"payment.oneOf.1.splits.items.[INDEX].value","typeLabel":"number"}},"required":["id","recipientCompanyId","type","value"],"uniqueKey":"payment.oneOf.1.splits.items.[INDEX]","typeLabel":"object"},"description":"Splits recorded on this payment, in the order they were sent. `[]` when the payment has none.","uniqueKey":"payment.oneOf.1.splits","typeLabel":"object[]"},"status":{"type":"string","enum":["NEW","PENDING_METHOD_SELECTION","PROCESSING","CONFIRMED","PAID","CANCELLED","EXPIRED","REFUNDED","PARTIAL_REFUND","CHARGEBACK","MED_FROZEN"],"description":"Possible payment statuses.","uniqueKey":"payment.oneOf.1.status","typeLabel":"enum\u003cstring>"},"methods":{"type":"array","items":{"type":"string","enum":["PIX","CARD","BOLETO"],"description":"Available public payment methods.","uniqueKey":"payment.oneOf.1.methods.items.[INDEX]","typeLabel":"enum\u003cstring>"},"uniqueKey":"payment.oneOf.1.methods","typeLabel":"enum\u003cstring>[]"},"currency":{"type":"string","enum":["BRL"],"description":"Supported currencies.","uniqueKey":"payment.oneOf.1.currency","typeLabel":"enum\u003cstring>"},"checkoutUrl":{"type":"string","format":"uri","uniqueKey":"payment.oneOf.1.checkoutUrl","typeLabel":"string\u003curi>"},"expiresAt":{"type":"string","format":"date-time","uniqueKey":"payment.oneOf.1.expiresAt","typeLabel":"string\u003cdate-time>"},"isSandbox":{"type":"boolean","uniqueKey":"payment.oneOf.1.isSandbox","typeLabel":"boolean"},"createdAt":{"type":"string","format":"date-time","uniqueKey":"payment.oneOf.1.createdAt","typeLabel":"string\u003cdate-time>"}},"isRequired":true,"uniqueKey":"payment.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"payment","typeLabel":"object"}},"required":["payment"],"uniqueKey":"","typeLabel":"object"},"examples":{"headlessPix":{"title":"headlessPix","value":{"payment":{"id":"5d0f8b6e-3a02-4f5b-9e1c-7c6a4a1b8c9d","txId":"PAY3f2a8b9c4e6d1f5a7b3c8d2e9f4a6b1c","amount":49.9,"feeAmount":2.99,"netAmount":46.91,"status":"NEW","paymentMethod":"PIX","currency":"BRL","description":"Order #1234","expiresAt":"2026-05-03T15:00:00.000Z","createdAt":"2026-05-03T14:30:00.000Z","methodData":{"type":"PIX","pixCopyPaste":"00020126...","qrCodeBase64":"data:image/png;base64,...","qrCodeUrl":null}}}},"hostedCheckout":{"title":"hostedCheckout","value":{"payment":{"id":"fa1c0a85-7c29-4e3a-9e07-5b1a7b6d1234","txId":"PAY9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e","amount":49.9,"feeAmount":2.99,"netAmount":46.91,"status":"PENDING_METHOD_SELECTION","methods":["PIX","CARD"],"currency":"BRL","checkoutUrl":"https://checkout.yuvexpay.com/checkout/fa1c0a85-7c29-4e3a-9e07-5b1a7b6d1234","expiresAt":"2026-05-03T15:00:00.000Z","isSandbox":true,"createdAt":"2026-05-03T14:30:00.000Z"}}},"headlessPixWithSplit":{"title":"headlessPixWithSplit","value":{"payment":{"id":"2c7d9e14-5b60-4a83-9f21-6d4e8a0b3c57","txId":"PAY4d7e2f8a1b3c5d6e9f0a1b2c3d4e5f60","amount":49.9,"feeAmount":2.99,"netAmount":46.91,"splits":[{"id":"a1e4c7b2-9d38-4f61-8c05-2b7d6e9f4a31","recipientCompanyId":"b7f1c3d2-4e5a-4b6c-8d9e-0a1b2c3d4e5f","type":"PERCENTAGE","value":10},{"id":"d3f8b1a6-27c4-4e09-9a5b-8c1e0d7f6b24","recipientCompanyId":"c9a2d4e6-8b1f-4c3a-9d7e-2f5a8b0c1d3e","type":"FIXED","value":5}],"status":"NEW","paymentMethod":"PIX","currency":"BRL","description":"Order #1234","expiresAt":"2026-05-03T15:00:00.000Z","createdAt":"2026-05-03T14:30:00.000Z","methodData":{"type":"PIX","pixCopyPaste":"00020126...","qrCodeBase64":"data:image/png;base64,...","qrCodeUrl":null}}}}},"exampleType":"examples"}},"exampleType":"examples"},"e06ee2e5-24b2-462d-b096-298d141def27":{"description":"Validation failed, or the request was refused. `CARD_PAYMENTS_NOT_AVAILABLE_VIA_API`: the request carries card data or asks for `CARD` in headless mode; card payments go through the hosted checkout only. It takes precedence over validation and authentication errors, so it is returned even without a valid API key. Split-specific codes: `SPLIT_RECIPIENT_LIMIT_EXCEEDED`, `SPLIT_SELF_RECIPIENT`, `SPLIT_AMOUNT_EXCEEDS_NET`, `SPLIT_RELATIONSHIP_PENDING`, `SPLIT_RELATIONSHIP_REQUEST_LIMIT`, `SPLIT_RELATIONSHIP_REVOKED`, `SPLIT_RELATIONSHIP_DECLINED`, `SPLIT_RECIPIENT_INACTIVE`, `SPLIT_RECIPIENT_NOT_APPROVED`, `SPLIT_ENVIRONMENT_MISMATCH`, `SPLIT_FEE_CAP_EXCEEDED`, `SPLIT_PLATFORM_SUSPENDED`, `SPLIT_PARTNER_LIMIT_EXCEEDED`. `SPLIT_RELATIONSHIP_PENDING` is returned for every recipient that cannot receive a split yet apart from a pair that declined an invitation from your company or was revoked, identical whether the company ID exists or not; `SPLIT_RELATIONSHIP_DECLINED` carries `details.recipients`, the company IDs that declined; `SPLIT_RECIPIENT_INACTIVE`, `SPLIT_RECIPIENT_NOT_APPROVED` and `SPLIT_ENVIRONMENT_MISMATCH` are returned only for a recipient that had already accepted the relationship. `SPLIT_FEE_CAP_EXCEEDED`: a split to an approved split platform is above its fee cap, with `details.recipientCompanyId` and `details.feeCap`. `SPLIT_PLATFORM_SUSPENDED`: the recipient is a platform connected with a fee cap whose approval was withdrawn, with `details.recipientCompanyId`. `SPLIT_PARTNER_LIMIT_EXCEEDED`: a platform connection through `X-Split-Platform-Key` would take your company past its limit of active partners, with `details.limit`. `PROVIDER_REJECTED` means the payment was refused and the message is generic; a refused boleto payment is recorded as `CANCELLED`. Note that a missing `X-Idempotency-Key` is rejected before the error envelope is applied and returns the flat shape `{ statusCode, error, message, code }` with code `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message.","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional error context.","uniqueKey":"error.details","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"cardPaymentsNotAvailableViaApi":{"title":"cardPaymentsNotAvailableViaApi","value":{"error":{"code":"CARD_PAYMENTS_NOT_AVAILABLE_VIA_API","message":"Pagamentos com cartão não são aceitos pela API. Use o checkout hospedado: crie o pagamento com mode \"hosted\" e envie o pagador para o checkoutUrl."}}},"providerRejected":{"title":"providerRejected","value":{"error":{"code":"PROVIDER_REJECTED","message":"Não foi possível processar este pagamento. Verifique os dados informados ou tente outro método de pagamento."}}},"splitAmountExceedsNet":{"title":"splitAmountExceedsNet","value":{"error":{"code":"SPLIT_AMOUNT_EXCEEDS_NET","message":"Splits total 48.00 but netAmount is 46.91, exceeding it by 1.09"}}},"splitRelationshipPending":{"title":"splitRelationshipPending","value":{"error":{"code":"SPLIT_RELATIONSHIP_PENDING","message":"Company b7f1c3d2-4e5a-4b6c-8d9e-0a1b2c3d4e5f has not accepted split payments from your company yet"}}},"splitFeeCapExceeded":{"title":"splitFeeCapExceeded","value":{"error":{"code":"SPLIT_FEE_CAP_EXCEEDED","message":"A divisão para a plataforma excede o teto de 4.00% do valor do pagamento.","details":{"recipientCompanyId":"b7f1c3d2-4e5a-4b6c-8d9e-0a1b2c3d4e5f","feeCap":"4.00"}}}}},"exampleType":"examples"}},"exampleType":"examples"},"2aa3a759-a135-4646-93f8-5ed743a7db9d":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message.","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional error context.","uniqueKey":"error.details","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"INVALID_API_KEY","message":"Invalid or revoked API key"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid or revoked API key"}}}},"exampleType":"examples"}},"exampleType":"examples"},"5c8beb0b-1fe8-46c9-9906-cbc38c140b22":{"description":"Payment creation blocked for this account, or the platform key was refused. Codes: `PAYMENT_CREATION_BLOCKED`, `SPLIT_ORIGINATOR_NOT_APPROVED`, `PAYMENT_METHOD_NOT_ENABLED`, `SPLIT_PLATFORM_KEY_INVALID`. `PAYMENT_METHOD_NOT_ENABLED`: a method in `methods` is not enabled for your account (`details.method` names it). If card payments are enabled for your account but card acceptance is temporarily unavailable, it is returned only when `CARD` is the only method; with other methods, the payment is created without `CARD`. `SPLIT_PLATFORM_KEY_INVALID`: the key sent in `X-Split-Platform-Key` was refused. Every reason gets this same answer, with no `details`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message.","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional error context.","uniqueKey":"error.details","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"splitPlatformKeyInvalid":{"title":"splitPlatformKeyInvalid","value":{"error":{"code":"SPLIT_PLATFORM_KEY_INVALID","message":"A chave enviada em X-Split-Platform-Key não é válida para conectar a plataforma a esta empresa."}}}},"exampleType":"examples"}},"exampleType":"examples"},"1c00a85f-1fbb-444d-a16d-9e82b55be11b":{"description":"Idempotency conflict, raised by the idempotency middleware. `IDEMPOTENCY_PAYLOAD_MISMATCH` means the key was already used with a different request body, at any point in the 24-hour window, including by a request still in flight. `IDEMPOTENCY_CONFLICT` means a request with the same key and the same body is still being processed. Both use the **flat** envelope: `error` is the HTTP reason phrase and the machine-readable code is the top-level `code`. Note that `IDEMPOTENCY_CONFLICT` raised later by the withdrawal service on an idempotency-key collision uses the nested `Error` envelope instead.","content":{"application/json":{"schema":{"type":"object","description":"The flat error envelope used by low-level guards that reply before the API error envelope is applied — today the idempotency middleware. The machine-readable code is the top-level `code`; `error` is only the HTTP reason phrase.","properties":{"statusCode":{"type":"integer","description":"HTTP status code, repeated in the body.","uniqueKey":"statusCode","typeLabel":"integer"},"error":{"type":"string","description":"HTTP reason phrase, for example `Conflict` or `Bad Request`. Not a machine-readable code.","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message.","uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"payloadMismatch":{"title":"payloadMismatch","value":{"statusCode":409,"error":"Conflict","message":"This idempotency key was already used with a different request payload","code":"IDEMPOTENCY_PAYLOAD_MISMATCH"}},"inFlight":{"title":"inFlight","value":{"statusCode":409,"error":"Conflict","message":"A request with this idempotency key is already being processed","code":"IDEMPOTENCY_CONFLICT"}}},"exampleType":"examples"}},"exampleType":"examples"},"2bb438e9-d025-44cc-a8c4-68b4fc0ab097":{"description":"Rate limit exceeded.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Request limit per window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Remaining requests in window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message.","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional error context.","uniqueKey":"error.details","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Too many requests"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Too many requests"}}}},"exampleType":"examples"}},"exampleType":"examples"},"06bc3c07-4ab0-45a1-847a-2c352b88deab":{"description":"Code `PROVIDER_TEMPORARILY_UNAVAILABLE`. On a boleto payment the outcome of the charge is not known yet: the payment stays `PROCESSING`, with `methodData: null`, until it is resolved, which can take 15 minutes or more, and then either continues normally or ends `CANCELLED`. This `502` is stored for the `X-Idempotency-Key`: a retry with the same key returns the same `502` for 24 hours and never submits a second charge. To recover the payment, repeat the request once with the same `externalId` and a new `X-Idempotency-Key`: the response is the existing payment, with its `id`, and no new charge is submitted. Then poll `GET /v1/payments/{paymentId}` until it leaves `PROCESSING`. On a PIX payment the charge was not created and the payment is recorded as `CANCELLED`: retry with a new `externalId`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message.","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional error context.","uniqueKey":"error.details","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"48a1e927-f9d0-4c9a-914b-f98b21627f3c":{"description":"Codes: `PROVIDER_TEMPORARILY_UNAVAILABLE`, the charge was not created and the payment is recorded as `CANCELLED`, so retry later with a new `externalId`; `SERVICE_UNAVAILABLE`, the requested payment method is temporarily disabled.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message.","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional error context.","uniqueKey":"error.details","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"2137f48b-cc8e-489b-84f6-226ef7e46562":{"bearerAuth":{"type":"http","scheme":"bearer","description":"YuvexPay API key. Include as `Authorization: Bearer ypk_\u003cenv>_\u003ckid>_\u003csecret>` where `\u003cenv>` is `test` (sandbox) or `live` (production). Create and manage keys in the dashboard under **Settings > API Keys**.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"30caf778-26b8-4811-87ad-19a2f5724d43":{"url":"https://api.yuvexpay.com","description":"Same base URL serves both sandbox and production. Send a `ypk_test_*` key for sandbox or a `ypk_live_*` key for production."}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"YuvexPay API key. Include as `Authorization: Bearer ypk_\u003cenv>_\u003ckid>_\u003csecret>` where `\u003cenv>` is `test` (sandbox) or `live` (production). Create and manage keys in the dashboard under **Settings > API Keys**.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"YuvexPay API key. Include as `Authorization: Bearer ypk_\u003cenv>_\u003ckid>_\u003csecret>` where `\u003cenv>` is `test` (sandbox) or `live` (production). Create and manage keys in the dashboard under **Settings > API Keys**.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"yuvexpay","siteName":"YuvexPay","title":"Create a payment - YuvexPay","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-16T03:35:09.697Z","originalFileLocation":"api-reference/payments/create.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key. Card payments are not accepted through the API. A card object, CARD in methods in headless mode (mode omitted or headless), or any of these fields at the top level of the body: deviceInfo, remoteIp, holderInfo, authorizeOnly, creditCard, creditCardHolderInfo, creditCardToken, installmentCount, installmentValue, totalValue, is rejected with 400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API, even without a valid API key, and the card data is not stored or logged. To charge a card, create the payment with mode: hosted and CARD in methods ([\u0026quot;CARD\u0026quot;], or [\u0026quot;PIX\u0026quot;, \u0026quot;CARD\u0026quot;] to let the payer choose), with an amount of at least R$ 5.00, and redirect the payer to the returned checkoutUrl. The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as PAYMENT_CONFIRMED, PAYMENT_PAID, PAYMENT_EXPIRED or PAYMENT_CANCELLED; you can also poll GET /v1/payments/{paymentId}.\">\u003cmeta data-mint-head name=\"application-name\" content=\"YuvexPay\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/yuvexpay/qrsJ3VUJ-racyQUp/_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/yuvexpay/qrsJ3VUJ-racyQUp/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/yuvexpay/qrsJ3VUJ-racyQUp/_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/yuvexpay/qrsJ3VUJ-racyQUp/_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/yuvexpay/qrsJ3VUJ-racyQUp/_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/yuvexpay/qrsJ3VUJ-racyQUp/_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/yuvexpay/qrsJ3VUJ-racyQUp/_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/yuvexpay/qrsJ3VUJ-racyQUp/_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/yuvexpay/qrsJ3VUJ-racyQUp/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a payment - YuvexPay\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key. Card payments are not accepted through the API. A card object, CARD in methods in headless mode (mode omitted or headless), or any of these fields at the top level of the body: deviceInfo, remoteIp, holderInfo, authorizeOnly, creditCard, creditCardHolderInfo, creditCardToken, installmentCount, installmentValue, totalValue, is rejected with 400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API, even without a valid API key, and the card data is not stored or logged. To charge a card, create the payment with mode: hosted and CARD in methods ([\u0026quot;CARD\u0026quot;], or [\u0026quot;PIX\u0026quot;, \u0026quot;CARD\u0026quot;] to let the payer choose), with an amount of at least R$ 5.00, and redirect the payer to the returned checkoutUrl. The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as PAYMENT_CONFIRMED, PAYMENT_PAID, PAYMENT_EXPIRED or PAYMENT_CANCELLED; you can also poll GET /v1/payments/{paymentId}.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"YuvexPay\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.yuvexpay.com/api-reference/payments/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://yuvexpay.mintlify.app/_mintlify/api/og/v2?division=Payments\u0026amp;title=Create+a+payment\u0026amp;description=Create+a+new+payment.+Supports+PIX+and+boleto%2C+in+headless+or+hosted+mode%2C+and+card+through+the+hosted+checkout+only.+Requires+an+idempotency+key.%0A%0ACard+payment\u0026amp;theme=e1bc7c37ec59feb92a55994b\u0026amp;signature=82a1acf84f51cf12e04fd7ba7f30787de18fb7d0b3337359bc878aa7e30ce5d8\">\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=\"Create a payment - YuvexPay\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key. Card payments are not accepted through the API. A card object, CARD in methods in headless mode (mode omitted or headless), or any of these fields at the top level of the body: deviceInfo, remoteIp, holderInfo, authorizeOnly, creditCard, creditCardHolderInfo, creditCardToken, installmentCount, installmentValue, totalValue, is rejected with 400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API, even without a valid API key, and the card data is not stored or logged. To charge a card, create the payment with mode: hosted and CARD in methods ([\u0026quot;CARD\u0026quot;], or [\u0026quot;PIX\u0026quot;, \u0026quot;CARD\u0026quot;] to let the payer choose), with an amount of at least R$ 5.00, and redirect the payer to the returned checkoutUrl. The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as PAYMENT_CONFIRMED, PAYMENT_PAID, PAYMENT_EXPIRED or PAYMENT_CANCELLED; you can also poll GET /v1/payments/{paymentId}.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://yuvexpay.mintlify.app/_mintlify/api/og/v2?division=Payments\u0026amp;title=Create+a+payment\u0026amp;description=Create+a+new+payment.+Supports+PIX+and+boleto%2C+in+headless+or+hosted+mode%2C+and+card+through+the+hosted+checkout+only.+Requires+an+idempotency+key.%0A%0ACard+payment\u0026amp;theme=e1bc7c37ec59feb92a55994b\u0026amp;signature=82a1acf84f51cf12e04fd7ba7f30787de18fb7d0b3337359bc878aa7e30ce5d8\">\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/yuvexpay/qrsJ3VUJ-racyQUp/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"YuvexPay\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.yuvexpay.com/api-reference/payments/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/payments/create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.yuvexpay.com/#organization\",\"name\":\"YuvexPay\",\"url\":\"https://docs.yuvexpay.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/yuvexpay/_p0fopc5ZJwqr6Ao/logo/light.png?fit=max\u0026auto=format\u0026n=_p0fopc5ZJwqr6Ao\u0026q=85\u0026s=85eb8014f41b3db8d62050d2ff2d17eb\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.yuvexpay.com#website\",\"name\":\"YuvexPay\",\"url\":\"https://docs.yuvexpay.com\",\"publisher\":{\"@id\":\"https://docs.yuvexpay.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.yuvexpay.com/api-reference/payments/create#webpage\",\"url\":\"https://docs.yuvexpay.com/api-reference/payments/create\",\"name\":\"Create a payment\",\"description\":\"Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key. Card payments are not accepted through the API. A card object, CARD in methods in headless mode (mode omitted or headless), or any of these fields at the top level of the body: deviceInfo, remoteIp, holderInfo, authorizeOnly, creditCard, creditCardHolderInfo, creditCardToken, installmentCount, installmentValue, totalValue, is rejected with 400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API, even without a valid API key, and the card data is not stored or logged. To charge a card, create the payment with mode: hosted and CARD in methods ([\\\"CARD\\\"], or [\\\"PIX\\\", \\\"CARD\\\"] to let the payer choose), with an amount of at least R$ 5.00, and redirect the payer to the returned checkoutUrl. The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as PAYMENT_CONFIRMED, PAYMENT_PAID, PAYMENT_EXPIRED or PAYMENT_CANCELLED; you can also poll GET /v1/payments/{paymentId}.\",\"dateModified\":\"2026-10-16T03:35:09.697Z\",\"isPartOf\":{\"@id\":\"https://docs.yuvexpay.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.yuvexpay.com/api-reference/payments/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.yuvexpay.com/api-reference/payments/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"YuvexPay\",\"item\":\"https://docs.yuvexpay.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a payment\",\"item\":\"https://docs.yuvexpay.com/api-reference/payments/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.yuvexpay.com/api-reference/payments/create#apireference\",\"headline\":\"Create a payment\",\"name\":\"Create a payment\",\"description\":\"Create a new payment. Supports PIX and boleto, in headless or hosted mode, and card through the hosted checkout only. Requires an idempotency key. Card payments are not accepted through the API. A card object, CARD in methods in headless mode (mode omitted or headless), or any of these fields at the top level of the body: deviceInfo, remoteIp, holderInfo, authorizeOnly, creditCard, creditCardHolderInfo, creditCardToken, installmentCount, installmentValue, totalValue, is rejected with 400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API, even without a valid API key, and the card data is not stored or logged. To charge a card, create the payment with mode: hosted and CARD in methods ([\\\"CARD\\\"], or [\\\"PIX\\\", \\\"CARD\\\"] to let the payer choose), with an amount of at least R$ 5.00, and redirect the payer to the returned checkoutUrl. The checkout collects the card, accepts credit cards in a single installment and debit cards, and runs 3D Secure itself. The result arrives as PAYMENT_CONFIRMED, PAYMENT_PAID, PAYMENT_EXPIRED or PAYMENT_CANCELLED; you can also poll GET /v1/payments/{paymentId}.\",\"url\":\"https://docs.yuvexpay.com/api-reference/payments/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.yuvexpay.com/api-reference/payments/create#webpage\"},\"dateModified\":\"2026-10-16T03:35:09.697Z\",\"publisher\":{\"@id\":\"https://docs.yuvexpay.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.yuvexpay.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"YuvexPay\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"YuvexPay","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.yuvexpay.com"},{"anchor":"API status","icon":"signal","href":"https://status.yuvexpay.com"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"API reference","href":"/api-reference/introduction"}]},{"group":"Authentication","pages":[{"title":"Inspect the current API key","openapi":"GET /v1/auth/self","description":"Return metadata about the API key currently being used: id, name, environment, scopes, IP allowlist, last-used timestamp and expiration. Useful for verifying key configuration without storing it client-side.","href":"/api-reference/auth/self"}]},{"group":"Payments","pages":[{"title":"Create a payment","openapi":"POST /v1/payments","href":"/api-reference/payments/create"},{"title":"List payments","openapi":"GET /v1/payments","description":"Retrieve a paginated list of payments with optional filters.","href":"/api-reference/payments/list"},{"title":"Get a payment","openapi":"GET /v1/payments/{paymentId}","href":"/api-reference/payments/get"},{"title":"Get a payment by transaction ID","openapi":"GET /v1/payments/txid/{txId}","href":"/api-reference/payments/get-by-txid"},{"title":"Download boleto PDF","openapi":"GET /v1/payments/{paymentId}/boleto","href":"/api-reference/payments/get-boleto"},{"title":"Refund a payment","openapi":"POST /v1/payments/{paymentId}/refund","href":"/api-reference/payments/refund"},{"title":"List payment refunds","openapi":"GET /v1/payments/{paymentId}/refunds","href":"/api-reference/payments/list-refunds"},{"title":"Simulate a payment","openapi":"POST /v1/payments/{paymentId}/simulate","href":"/api-reference/payments/simulate"}]},{"group":"Withdrawals","pages":[{"title":"Create a withdrawal","openapi":"POST /v1/withdrawals","href":"/api-reference/withdrawals/create"},{"title":"List withdrawals","openapi":"GET /v1/withdrawals","href":"/api-reference/withdrawals/list"},{"title":"Get a withdrawal","openapi":"GET /v1/withdrawals/{withdrawalId}","href":"/api-reference/withdrawals/get"},{"title":"Get withdrawal limits","openapi":"GET /v1/withdrawals/limits","href":"/api-reference/withdrawals/limits"}]},{"group":"Balance","pages":[{"title":"Get account balance","openapi":"GET /v1/balance","href":"/api-reference/balance/get"}]},{"group":"Splits","pages":[{"title":"List split partners","openapi":"GET /v1/splits/partners","href":"/api-reference/splits/partners"}]},{"group":"Products","pages":[{"title":"Create a product","openapi":"POST /v1/products","href":"/api-reference/products/create"},{"title":"List products","openapi":"GET /v1/products","href":"/api-reference/products/list"},{"title":"Get a product","openapi":"GET /v1/products/{productId}","href":"/api-reference/products/get"},{"title":"Get a product by external ID","openapi":"GET /v1/products/external/{externalId}","href":"/api-reference/products/get-by-external-id"},{"title":"Update a product","openapi":"PATCH /v1/products/{productId}","href":"/api-reference/products/update"},{"title":"Delete a product","openapi":"DELETE /v1/products/{productId}","href":"/api-reference/products/delete"},{"title":"Upload product image","openapi":"POST /v1/products/{productId}/image","href":"/api-reference/products/upload-image"},{"title":"Delete product image","openapi":"DELETE /v1/products/{productId}/image","href":"/api-reference/products/delete-image"}]},{"group":"Customers","pages":[{"title":"Create a customer","openapi":"POST /v1/customers","href":"/api-reference/customers/create"},{"title":"List customers","openapi":"GET /v1/customers","href":"/api-reference/customers/list"},{"title":"Get a customer","openapi":"GET /v1/customers/{customerId}","href":"/api-reference/customers/get"},{"title":"Update a customer","openapi":"PATCH /v1/customers/{customerId}","href":"/api-reference/customers/update"},{"title":"Delete a customer","openapi":"DELETE /v1/customers/{customerId}","href":"/api-reference/customers/delete"}]},{"group":"Documents","pages":[{"title":"Get payment receipt","openapi":"GET /v1/documents/payments/{paymentId}/receipt","href":"/api-reference/documents/payment-receipt"},{"title":"Get withdrawal receipt","openapi":"GET /v1/documents/withdrawals/{withdrawalId}/receipt","href":"/api-reference/documents/withdrawal-receipt"},{"title":"Get account statement","openapi":"GET /v1/documents/statements","href":"/api-reference/documents/statement"}]},{"group":"Public","pages":[{"title":"Get standard pricing","openapi":"GET /public/pricing","href":"/api-reference/public/pricing"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Create a payment - YuvexPay","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B7XKH4J3.js","utils-lOYzL7z-.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DF6jUUIM.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dpsj5f7C.js","snippetPresets-CYeiDe8v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CUFz1YZ_.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D8H_iLS4.js","shallow-DdluZBHX.js","getApiPlaygroundDisplay-B9922vev.js","CodeSnippet-CMoRNGYs.js","CodeSnippets-DwyrPHuw.js","Page-DSVu9Ucl.js","getPastedJson-G-zIvlHh.js","icon-B03fnEy0.js","MethodPill-CW7teklc.js","DuplicateIcon-CtO8eekd.js","createIcon-DZTKdM_A.js","DynamicMarkdown-D5M2At0B.js","SectionHeading-C_2NaA2U.js","axios-vUo_bRtp.js","Markdown-D7QRHV3m.js","clsx-D1Z-ELXV.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-lvhuD9Du.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CKfC4ywL.js"]}