Stops a terminal payment while the terminal still waits for a card: the payment answers canceled with cancellation_reason: requested. Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.
processing until the processor answers, and, on a bank debit, until it settles, that is until the processor sends it to the bank in its next batch; authorized when it approved but has not captured; succeeded once a card is captured or a bank debit has settled, which does not make a bank debit final (see returned); failed when it refused (the create then answers 402 and this object stays readable); canceled after a void, a cancel, or a terminal payment nobody paid within five minutes (see cancellation_reason); returned when the money came back after success (a bank return or a chargeback, see failure); requires_action while the customer has to pass 3-D Secure at next_action.url, which only a charge created with a return_url can reach; it then moves to succeeded or failed.
Set when status is failed or returned: why, in a fixed vocabulary. card_declined, insufficient_funds, authentication_failed, invalid_payment_method and duplicate_transaction are the processor refusing the card; ach_returned, acss_returned and chargeback are money coming back after success; processing_error is a fault on the way to the processor or in the request, safe to retry later; a refusal in words Payra cannot classify reads card_declined. message is Payra's own sentence for the reason, or for the code when there is none; the processor's own text is never relayed.
Set while status is requires_action: send the customer to url for 3-D Secure. Only a charge created with a return_url can be challenged; otherwise this is null.
How much of amount has been refunded so far, counting refunds that succeeded, wherever they were made. status stays succeeded; GET /v1/refunds?payment= lists them.
us_bank_account for a US bank debit (ACH), acss_debit for a Canadian one (EFT), card_present for a terminal payment. More values may be added: treat one you do not know as a card.
Set when status is canceled: requested (canceled on request before the card was presented, through the API or in RevOS), expired (no card was presented within five minutes) or voided (voided before the batch, in RevOS or by a full refund). More values may be added.
Available options:
requested,
expired,
voided
Example:
null
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Payra","colors":{"primary":"#2F63F5","light":"#6B93FF","dark":"#2450D6"},"logo":{"light":"https://mintcdn.com/payra/MH5RqIOlh9xdat81/logo/payra.svg?fit=max\u0026auto=format\u0026n=MH5RqIOlh9xdat81\u0026q=85\u0026s=b4dcf68c30ed708db9f58d7f875dc3bd","dark":"https://mintcdn.com/payra/MH5RqIOlh9xdat81/logo/payra.svg?fit=max\u0026auto=format\u0026n=MH5RqIOlh9xdat81\u0026q=85\u0026s=b4dcf68c30ed708db9f58d7f875dc3bd"},"favicon":"https://mintcdn.com/payra/MH5RqIOlh9xdat81/favicon.svg?fit=max\u0026auto=format\u0026n=MH5RqIOlh9xdat81\u0026q=85\u0026s=96d9a71f6b664a15a398e5f3865e6b58","navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"RevOS","href":"https://dashboard.payra.com"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/payrasoftware"}},"contextual":{"options":["copy","view","mcp","vscode"],"display":"header"},"variables":{"apiBaseUrl":"https://api-dashboard.payra.com/v1"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"payra","hasAudioNarration":false,"actualSubdomain":"payra","customDomains":["docs.payra.com"],"gitSource":{"type":"github","owner":"summit-pay","repo":"connector-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adbfff58eb08e354257e850","collectionId":"35c5c60f-e9e3-44be-96ed-e94c039c8fb8","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adbfff58eb08e354257e850"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae09f002ea1296893ea687b","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"API reference","count":41},{"language":"default","tag":"Guides","count":20},{"language":"default","tag":"Webhooks","count":8},{"language":"default","tag":"Terminals","count":6},{"language":"default","tag":"Get started","count":5},{"language":"default","tag":"Collect payment methods","count":4},{"language":"default","tag":"Core concepts","count":4},{"language":"default","tag":"Charge","count":4},{"language":"default","tag":"Checkout sessions","count":4},{"language":"default","tag":"Customers","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"editor-agent-model-picker","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/payments/cancel-a-terminal-payment","slug":"/api-reference/payments/cancel-a-terminal-payment","pageMetadata":{"title":"Cancel a terminal payment","description":"Stops a terminal payment while the terminal still waits for a card: the payment answers `canceled` with `cancellation_reason: requested`. Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /payments/{id}/cancel","href":"/api-reference/payments/cancel-a-terminal-payment","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {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(_components.p, {\n children: [\"Stops a terminal payment while the terminal still waits for a card: the payment answers \", _jsx(_components.code, {\n children: \"canceled\"\n }), \" with \", _jsx(_components.code, {\n children: \"cancellation_reason: requested\"\n }), \". Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.\"]\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":"Cancel a terminal payment","description":"Stops a terminal payment while the terminal still waits for a card: the payment answers `canceled` with `cancellation_reason: requested`. Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /payments/{id}/cancel","href":"/api-reference/payments/cancel-a-terminal-payment","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Payments"],"summary":"Cancel a terminal payment","description":"Stops a terminal payment while the terminal still waits for a card: the payment answers `canceled` with `cancellation_reason: requested`. Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.","security":["8bf7bf97-ce2c-4506-b5bf-26fa32662811"],"parameters":["908a1b97-56ae-4821-8caf-37be607a778e"],"responses":{"200":"b9dcef4b-fd97-4236-914e-3516810832f9","400":"c190bfec-a65c-4650-bb44-35ae5cdb65a3","401":"466a7dfa-7b44-419b-a5f8-e95041081250","403":"3898c194-c6cb-48c0-b064-21d16fca26dd","404":"ee5f3683-850f-4ba8-942f-4a262040c185","409":"20c1d327-3f28-48d6-9840-4d78eee6c862","429":"9386e1ce-5095-47ae-8aaf-4e9af376933e","500":"91266fa1-0f18-4317-a6cd-f59fdbd16bc9"},"method":"post","type":"path","servers":["c69709d6-197a-4535-8a0a-500d2be9800e"],"path":"/payments/{id}/cancel","baseUrlOptions":["https://api-dashboard.payra.com/v1"],"title":"Cancel a terminal payment","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"908a1b97-56ae-4821-8caf-37be607a778e":{"schema":{"type":"string","minLength":1,"maxLength":64,"isRequired":true,"uniqueKey":"","typeLabel":"string"},"required":true,"name":"id","in":"path"}},"responses":{"b9dcef4b-fd97-4236-914e-3516810832f9":{"description":"The payment","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["payment"],"isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"id":{"type":"string","example":"pay_test_7Hs2kQ9mL1pXv4cR8tWzAbCdEf","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"status":{"type":"string","enum":["processing","requires_action","authorized","succeeded","failed","canceled","returned"],"example":"succeeded","description":"`processing` until the processor answers, and, on a bank debit, until it settles, that is until the processor sends it to the bank in its next batch; `authorized` when it approved but has not captured; `succeeded` once a card is captured or a bank debit has settled, which does not make a bank debit final (see `returned`); `failed` when it refused (the create then answers 402 and this object stays readable); `canceled` after a void, a cancel, or a terminal payment nobody paid within five minutes (see `cancellation_reason`); `returned` when the money came back after success (a bank return or a chargeback, see `failure`); `requires_action` while the customer has to pass 3-D Secure at `next_action.url`, which only a charge created with a `return_url` can reach; it then moves to `succeeded` or `failed`.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","example":12550,"description":"In the smallest unit of the currency (cents).","isRequired":true,"uniqueKey":"amount","typeLabel":"integer"},"currency":{"type":"string","enum":["USD","CAD"],"example":"USD","isRequired":true,"uniqueKey":"currency","typeLabel":"enum\u003cstring>"},"payment_method":{"oneOf":[{"type":"string","example":"pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf","description":"The payment method charged; null on a terminal payment, where the customer presented the card on the terminal.","isRequired":true,"uniqueKey":"payment_method.oneOf.0","typeLabel":"string"},{"type":"null","example":"pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf","description":"The payment method charged; null on a terminal payment, where the customer presented the card on the terminal.","isRequired":true,"uniqueKey":"payment_method.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment_method","typeLabel":"string | null"},"customer":{"oneOf":[{"type":"string","format":"uuid","example":null,"isRequired":true,"uniqueKey":"customer.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","example":null,"isRequired":true,"uniqueKey":"customer.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"customer","typeLabel":"string\u003cuuid> | null"},"description":{"oneOf":[{"type":"string","example":"Invoice INV-1042","isRequired":true,"uniqueKey":"description.oneOf.0","typeLabel":"string"},{"type":"null","example":"Invoice INV-1042","isRequired":true,"uniqueKey":"description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"description","typeLabel":"string | null"},"reference":{"oneOf":[{"type":"string","example":"INV-1042","description":"Your reference, as you sent it.","isRequired":true,"uniqueKey":"reference.oneOf.0","typeLabel":"string"},{"type":"null","example":"INV-1042","description":"Your reference, as you sent it.","isRequired":true,"uniqueKey":"reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"reference","typeLabel":"string | null"},"card":{"oneOf":[{"type":"object","properties":{"brand":{"oneOf":[{"type":"string","example":"visa","isRequired":true,"uniqueKey":"card.oneOf.0.brand.oneOf.0","typeLabel":"string"},{"type":"null","example":"visa","isRequired":true,"uniqueKey":"card.oneOf.0.brand.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"card.oneOf.0.brand","typeLabel":"string | null"},"last4":{"type":"string","example":"4242","isRequired":true,"uniqueKey":"card.oneOf.0.last4","typeLabel":"string"},"exp_month":{"type":"integer","example":12,"isRequired":true,"uniqueKey":"card.oneOf.0.exp_month","typeLabel":"integer"},"exp_year":{"type":"integer","example":2030,"isRequired":true,"uniqueKey":"card.oneOf.0.exp_year","typeLabel":"integer"}},"required":["brand","last4","exp_month","exp_year"],"description":"Set when `payment_method_type` is `card`.","isRequired":true,"uniqueKey":"card.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"brand":{"oneOf":[{"type":"string","example":"visa"},{"type":"null","example":"visa"}]},"last4":{"type":"string","example":"4242"},"exp_month":{"type":"integer","example":12},"exp_year":{"type":"integer","example":2030}},"required":["brand","last4","exp_month","exp_year"],"description":"Set when `payment_method_type` is `card`.","isRequired":true,"uniqueKey":"card.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"card","typeLabel":"object | null"},"failure":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["card_declined","insufficient_funds","authentication_failed","invalid_payment_method","duplicate_transaction","ach_returned","acss_returned","chargeback","processing_error"],"example":"invalid_payment_method","isRequired":true,"uniqueKey":"failure.oneOf.0.code","typeLabel":"enum\u003cstring>"},"reason":{"oneOf":[{"type":"string","enum":["cardholder_name_incomplete","expired_card","invalid_expiry_date","incorrect_cvc","incorrect_number","withdrawal_limit_exceeded","card_blocked","restricted_card","suspected_fraud"],"example":"expired_card","description":"Finer than `code`, when the processor says exactly what it refused: `cardholder_name_incomplete`, `expired_card`, `invalid_expiry_date`, `incorrect_cvc` and `incorrect_number` come with `invalid_payment_method`; `withdrawal_limit_exceeded`, `card_blocked`, `restricted_card` and `suspected_fraud` with `card_declined`. Null when it does not say. More values may be added.","isRequired":true,"uniqueKey":"failure.oneOf.0.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["cardholder_name_incomplete","expired_card","invalid_expiry_date","incorrect_cvc","incorrect_number","withdrawal_limit_exceeded","card_blocked","restricted_card","suspected_fraud"],"example":"expired_card","description":"Finer than `code`, when the processor says exactly what it refused: `cardholder_name_incomplete`, `expired_card`, `invalid_expiry_date`, `incorrect_cvc` and `incorrect_number` come with `invalid_payment_method`; `withdrawal_limit_exceeded`, `card_blocked`, `restricted_card` and `suspected_fraud` with `card_declined`. Null when it does not say. More values may be added.","isRequired":true,"uniqueKey":"failure.oneOf.0.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"failure.oneOf.0.reason","typeLabel":"enum\u003cstring> | null"},"message":{"type":"string","example":"The card has expired.","isRequired":true,"uniqueKey":"failure.oneOf.0.message","typeLabel":"string"}},"required":["code","reason","message"],"description":"Set when `status` is `failed` or `returned`: why, in a fixed vocabulary. `card_declined`, `insufficient_funds`, `authentication_failed`, `invalid_payment_method` and `duplicate_transaction` are the processor refusing the card; `ach_returned`, `acss_returned` and `chargeback` are money coming back after success; `processing_error` is a fault on the way to the processor or in the request, safe to retry later; a refusal in words Payra cannot classify reads `card_declined`. `message` is Payra's own sentence for the reason, or for the code when there is none; the processor's own text is never relayed.","isRequired":true,"uniqueKey":"failure.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"code":{"type":"string","enum":["card_declined","insufficient_funds","authentication_failed","invalid_payment_method","duplicate_transaction","ach_returned","acss_returned","chargeback","processing_error"],"example":"invalid_payment_method"},"reason":{"oneOf":[{"type":"string","enum":["cardholder_name_incomplete","expired_card","invalid_expiry_date","incorrect_cvc","incorrect_number","withdrawal_limit_exceeded","card_blocked","restricted_card","suspected_fraud"],"example":"expired_card","description":"Finer than `code`, when the processor says exactly what it refused: `cardholder_name_incomplete`, `expired_card`, `invalid_expiry_date`, `incorrect_cvc` and `incorrect_number` come with `invalid_payment_method`; `withdrawal_limit_exceeded`, `card_blocked`, `restricted_card` and `suspected_fraud` with `card_declined`. Null when it does not say. More values may be added."},{"type":"null","enum":["cardholder_name_incomplete","expired_card","invalid_expiry_date","incorrect_cvc","incorrect_number","withdrawal_limit_exceeded","card_blocked","restricted_card","suspected_fraud"],"example":"expired_card","description":"Finer than `code`, when the processor says exactly what it refused: `cardholder_name_incomplete`, `expired_card`, `invalid_expiry_date`, `incorrect_cvc` and `incorrect_number` come with `invalid_payment_method`; `withdrawal_limit_exceeded`, `card_blocked`, `restricted_card` and `suspected_fraud` with `card_declined`. Null when it does not say. More values may be added."}]},"message":{"type":"string","example":"The card has expired."}},"required":["code","reason","message"],"description":"Set when `status` is `failed` or `returned`: why, in a fixed vocabulary. `card_declined`, `insufficient_funds`, `authentication_failed`, `invalid_payment_method` and `duplicate_transaction` are the processor refusing the card; `ach_returned`, `acss_returned` and `chargeback` are money coming back after success; `processing_error` is a fault on the way to the processor or in the request, safe to retry later; a refusal in words Payra cannot classify reads `card_declined`. `message` is Payra's own sentence for the reason, or for the code when there is none; the processor's own text is never relayed.","isRequired":true,"uniqueKey":"failure.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"failure","typeLabel":"object | null"},"next_action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["redirect"],"isRequired":true,"uniqueKey":"next_action.oneOf.0.type","typeLabel":"enum\u003cstring>"},"url":{"type":"string","isRequired":true,"uniqueKey":"next_action.oneOf.0.url","typeLabel":"string"}},"required":["type","url"],"example":null,"description":"Set while `status` is `requires_action`: send the customer to `url` for 3-D Secure. Only a charge created with a `return_url` can be challenged; otherwise this is null.","isRequired":true,"uniqueKey":"next_action.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"type":{"type":"string","enum":["redirect"]},"url":{"type":"string"}},"required":["type","url"],"example":null,"description":"Set while `status` is `requires_action`: send the customer to `url` for 3-D Secure. Only a charge created with a `return_url` can be challenged; otherwise this is null.","isRequired":true,"uniqueKey":"next_action.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"next_action","typeLabel":"object | null"},"livemode":{"type":"boolean","example":false,"isRequired":true,"uniqueKey":"livemode","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","example":"2026-09-18T20:00:00.000Z","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"succeeded_at":{"oneOf":[{"type":"string","format":"date-time","example":"2026-09-18T20:00:01.312Z","description":"When the card was captured, or the bank debit settled.","isRequired":true,"uniqueKey":"succeeded_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2026-09-18T20:00:01.312Z","description":"When the card was captured, or the bank debit settled.","isRequired":true,"uniqueKey":"succeeded_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"succeeded_at","typeLabel":"string\u003cdate-time> | null"},"amount_refunded":{"type":"integer","default":0,"example":0,"description":"How much of `amount` has been refunded so far, counting refunds that succeeded, wherever they were made. `status` stays `succeeded`; `GET /v1/refunds?payment=` lists them.","uniqueKey":"amount_refunded","typeLabel":"integer"},"payment_method_type":{"type":"string","enum":["card","us_bank_account","acss_debit","card_present"],"default":"card","example":"card","description":"`us_bank_account` for a US bank debit (ACH), `acss_debit` for a Canadian one (EFT), `card_present` for a terminal payment. More values may be added: treat one you do not know as a card.","uniqueKey":"payment_method_type","typeLabel":"enum\u003cstring>"},"terminal":{"oneOf":[{"type":"string","default":null,"example":null,"description":"The terminal a terminal payment was sent to (`GET /v1/terminals/{id}`); null on any other payment.","uniqueKey":"terminal.oneOf.0","typeLabel":"string"},{"type":"null","default":null,"example":null,"description":"The terminal a terminal payment was sent to (`GET /v1/terminals/{id}`); null on any other payment.","uniqueKey":"terminal.oneOf.1","typeLabel":"null"}],"uniqueKey":"terminal","typeLabel":"string | null"},"line_items":{"oneOf":[{"type":"array","items":{"type":"object","properties":{"sku":{"oneOf":[{"type":"string","example":"VHC-BL-12","isRequired":true,"uniqueKey":"line_items.oneOf.0.items.[INDEX].sku.oneOf.0","typeLabel":"string"},{"type":"null","example":"VHC-BL-12","isRequired":true,"uniqueKey":"line_items.oneOf.0.items.[INDEX].sku.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.oneOf.0.items.[INDEX].sku","typeLabel":"string | null"},"description":{"type":"string","example":"Blue widget, case of 12","isRequired":true,"uniqueKey":"line_items.oneOf.0.items.[INDEX].description","typeLabel":"string"},"quantity":{"type":"integer","example":2,"isRequired":true,"uniqueKey":"line_items.oneOf.0.items.[INDEX].quantity","typeLabel":"integer"},"unit_amount":{"type":"integer","example":900,"isRequired":true,"uniqueKey":"line_items.oneOf.0.items.[INDEX].unit_amount","typeLabel":"integer"},"amount":{"type":"integer","example":1800,"description":"`quantity` × `unit_amount`.","isRequired":true,"uniqueKey":"line_items.oneOf.0.items.[INDEX].amount","typeLabel":"integer"}},"required":["sku","description","quantity","unit_amount","amount"],"uniqueKey":"line_items.oneOf.0.items.[INDEX]","typeLabel":"object"},"default":null,"example":null,"description":"The order behind `amount`, as you sent it (or as the checkout session it was paid on had it); null when there was none.","uniqueKey":"line_items.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","properties":{"sku":{"oneOf":[{"type":"string","example":"VHC-BL-12"},{"type":"null","example":"VHC-BL-12"}]},"description":{"type":"string","example":"Blue widget, case of 12"},"quantity":{"type":"integer","example":2},"unit_amount":{"type":"integer","example":900},"amount":{"type":"integer","example":1800,"description":"`quantity` × `unit_amount`."}},"required":["sku","description","quantity","unit_amount","amount"]},"default":null,"example":null,"description":"The order behind `amount`, as you sent it (or as the checkout session it was paid on had it); null when there was none.","uniqueKey":"line_items.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items","typeLabel":"object[] | null"},"amount_details":{"oneOf":[{"type":"object","properties":{"shipping":{"type":"integer","example":499,"isRequired":true,"uniqueKey":"amount_details.oneOf.0.shipping","typeLabel":"integer"},"tax":{"type":"integer","example":158,"isRequired":true,"uniqueKey":"amount_details.oneOf.0.tax","typeLabel":"integer"},"discount":{"type":"integer","example":500,"isRequired":true,"uniqueKey":"amount_details.oneOf.0.discount","typeLabel":"integer"}},"default":null,"required":["shipping","tax","discount"],"example":null,"description":"Shipping, tax and discount around `line_items`; null when none were sent.","uniqueKey":"amount_details.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"shipping":{"type":"integer","example":499},"tax":{"type":"integer","example":158},"discount":{"type":"integer","example":500}},"default":null,"required":["shipping","tax","discount"],"example":null,"description":"Shipping, tax and discount around `line_items`; null when none were sent.","uniqueKey":"amount_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"amount_details","typeLabel":"object | null"},"us_bank_account":{"oneOf":[{"type":"object","properties":{"last4":{"oneOf":[{"type":"string","example":"6789","description":"Null when the account number has fewer than 7 digits.","isRequired":true,"uniqueKey":"us_bank_account.oneOf.0.last4.oneOf.0","typeLabel":"string"},{"type":"null","example":"6789","description":"Null when the account number has fewer than 7 digits.","isRequired":true,"uniqueKey":"us_bank_account.oneOf.0.last4.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"us_bank_account.oneOf.0.last4","typeLabel":"string | null"},"account_type":{"type":"string","enum":["checking","savings"],"example":"checking","isRequired":true,"uniqueKey":"us_bank_account.oneOf.0.account_type","typeLabel":"enum\u003cstring>"},"account_holder_type":{"type":"string","enum":["individual","company"],"example":"individual","isRequired":true,"uniqueKey":"us_bank_account.oneOf.0.account_holder_type","typeLabel":"enum\u003cstring>"}},"default":null,"required":["last4","account_type","account_holder_type"],"description":"Set when `payment_method_type` is `us_bank_account`.","example":null,"uniqueKey":"us_bank_account.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"last4":{"oneOf":[{"type":"string","example":"6789","description":"Null when the account number has fewer than 7 digits."},{"type":"null","example":"6789","description":"Null when the account number has fewer than 7 digits."}]},"account_type":{"type":"string","enum":["checking","savings"],"example":"checking"},"account_holder_type":{"type":"string","enum":["individual","company"],"example":"individual"}},"default":null,"required":["last4","account_type","account_holder_type"],"description":"Set when `payment_method_type` is `us_bank_account`.","example":null,"uniqueKey":"us_bank_account.oneOf.1","typeLabel":"null"}],"uniqueKey":"us_bank_account","typeLabel":"object | null"},"acss_debit":{"oneOf":[{"type":"object","properties":{"last4":{"type":"string","example":"3191","isRequired":true,"uniqueKey":"acss_debit.oneOf.0.last4","typeLabel":"string"},"account_type":{"type":"string","enum":["checking","savings"],"example":"checking","isRequired":true,"uniqueKey":"acss_debit.oneOf.0.account_type","typeLabel":"enum\u003cstring>"},"account_holder_type":{"type":"string","enum":["individual","company"],"example":"individual","isRequired":true,"uniqueKey":"acss_debit.oneOf.0.account_holder_type","typeLabel":"enum\u003cstring>"},"institution_number":{"type":"string","example":"001","description":"The three-digit financial institution number.","isRequired":true,"uniqueKey":"acss_debit.oneOf.0.institution_number","typeLabel":"string"},"transit_number":{"type":"string","example":"00114","description":"The five-digit branch transit number.","isRequired":true,"uniqueKey":"acss_debit.oneOf.0.transit_number","typeLabel":"string"}},"default":null,"required":["last4","account_type","account_holder_type","institution_number","transit_number"],"description":"Set when `payment_method_type` is `acss_debit`.","example":null,"uniqueKey":"acss_debit.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"last4":{"type":"string","example":"3191"},"account_type":{"type":"string","enum":["checking","savings"],"example":"checking"},"account_holder_type":{"type":"string","enum":["individual","company"],"example":"individual"},"institution_number":{"type":"string","example":"001","description":"The three-digit financial institution number."},"transit_number":{"type":"string","example":"00114","description":"The five-digit branch transit number."}},"default":null,"required":["last4","account_type","account_holder_type","institution_number","transit_number"],"description":"Set when `payment_method_type` is `acss_debit`.","example":null,"uniqueKey":"acss_debit.oneOf.1","typeLabel":"null"}],"uniqueKey":"acss_debit","typeLabel":"object | null"},"cancellation_reason":{"oneOf":[{"type":"string","enum":["requested","expired","voided"],"default":null,"example":null,"description":"Set when `status` is `canceled`: `requested` (canceled on request before the card was presented, through the API or in RevOS), `expired` (no card was presented within five minutes) or `voided` (voided before the batch, in RevOS or by a full refund). More values may be added.","uniqueKey":"cancellation_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["requested","expired","voided"],"default":null,"example":null,"description":"Set when `status` is `canceled`: `requested` (canceled on request before the card was presented, through the API or in RevOS), `expired` (no card was presented within five minutes) or `voided` (voided before the batch, in RevOS or by a full refund). More values may be added.","uniqueKey":"cancellation_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"cancellation_reason","typeLabel":"enum\u003cstring> | null"}},"required":["object","id","status","amount","currency","payment_method","customer","description","reference","card","failure","next_action","livemode","created_at","succeeded_at"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"object":"payment","id":"pay_test_7Hs2kQ9mL1pXv4cR8tWzAbCdEf","status":"succeeded","amount":12550,"currency":"USD","payment_method":"pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf","customer":null,"description":"Invoice INV-1042","reference":"INV-1042","card":{"brand":"visa","last4":"4242","exp_month":12,"exp_year":2030},"failure":{"code":"invalid_payment_method","reason":"expired_card","message":"The card has expired."},"next_action":null,"livemode":false,"created_at":"2026-09-18T20:00:00.000Z","succeeded_at":"2026-09-18T20:00:01.312Z","amount_refunded":0,"payment_method_type":"card","terminal":null,"line_items":null,"amount_details":null,"us_bank_account":null,"acss_debit":null,"cancellation_reason":null}}},"exampleType":"generated"}},"exampleType":"generated"},"c190bfec-a65c-4650-bb44-35ae5cdb65a3":{"description":"Not a terminal payment still waiting for a card (`payment_not_cancelable`)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","rate_limit_error","idempotency_error","card_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":{"type":"string","uniqueKey":"error.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"466a7dfa-7b44-419b-a5f8-e95041081250":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","rate_limit_error","idempotency_error","card_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":{"type":"string","uniqueKey":"error.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"3898c194-c6cb-48c0-b064-21d16fca26dd":{"description":"The API is not enabled for the workspace, or the key lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","rate_limit_error","idempotency_error","card_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":{"type":"string","uniqueKey":"error.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"ee5f3683-850f-4ba8-942f-4a262040c185":{"description":"No such payment in this workspace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","rate_limit_error","idempotency_error","card_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":{"type":"string","uniqueKey":"error.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"20c1d327-3f28-48d6-9840-4d78eee6c862":{"description":"The cancel could not be confirmed and the payment is still waiting; retry the cancel","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","rate_limit_error","idempotency_error","card_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":{"type":"string","uniqueKey":"error.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"9386e1ce-5095-47ae-8aaf-4e9af376933e":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","rate_limit_error","idempotency_error","card_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":{"type":"string","uniqueKey":"error.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"91266fa1-0f18-4317-a6cd-f59fdbd16bc9":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","rate_limit_error","idempotency_error","card_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":{"type":"string","uniqueKey":"error.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"8bf7bf97-ce2c-4506-b5bf-26fa32662811":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A secret key, `sk_test_...` or `sk_live_...`; a publishable key (`pk_...`) on the browser routes only","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"c69709d6-197a-4535-8a0a-500d2be9800e":{"url":"https://api-dashboard.payra.com/v1","description":"Sandbox and live: the key decides which"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"A secret key, `sk_test_...` or `sk_live_...`; a publishable key (`pk_...`) on the browser routes only","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"A secret key, `sk_test_...` or `sk_live_...`; a publishable key (`pk_...`) on the browser routes only","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi-v1.json"},"subdomain":"payra","siteName":"Payra","title":"Cancel a terminal payment - Payra","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T12:54:29.303Z","originalFileLocation":"api-reference/payments/cancel-a-terminal-payment.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=\"Stops a terminal payment while the terminal still waits for a card: the payment answers canceled with cancellation_reason: requested. Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Payra\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/payra/9w6PdDW_o-nXMNf7/_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/payra/9w6PdDW_o-nXMNf7/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/payra/9w6PdDW_o-nXMNf7/_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/payra/9w6PdDW_o-nXMNf7/_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/payra/9w6PdDW_o-nXMNf7/_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/payra/9w6PdDW_o-nXMNf7/_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/payra/9w6PdDW_o-nXMNf7/_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/payra/9w6PdDW_o-nXMNf7/_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/payra/9w6PdDW_o-nXMNf7/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel a terminal payment - Payra\">\u003cmeta data-mint-head property=\"og:description\" content=\"Stops a terminal payment while the terminal still waits for a card: the payment answers canceled with cancellation_reason: requested. Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Payra\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://payra.mintlify.app/_mintlify/api/og/v2?division=Payments\u0026amp;title=Cancel+a+terminal+payment\u0026amp;description=Stops+a+terminal+payment+while+the+terminal+still+waits+for+a+card%3A+the+payment+answers+%60canceled%60+with+%60cancellation_reason%3A+requested%60.+Once+a+card+was+presen\u0026amp;theme=db73ac360acef52ebd4c46fc\u0026amp;signature=8dff2655a1534b2bd9d94c1e933f992ecbbb62ab967e20673449811f4d75c1f6\">\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=\"Cancel a terminal payment - Payra\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Stops a terminal payment while the terminal still waits for a card: the payment answers canceled with cancellation_reason: requested. Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://payra.mintlify.app/_mintlify/api/og/v2?division=Payments\u0026amp;title=Cancel+a+terminal+payment\u0026amp;description=Stops+a+terminal+payment+while+the+terminal+still+waits+for+a+card%3A+the+payment+answers+%60canceled%60+with+%60cancellation_reason%3A+requested%60.+Once+a+card+was+presen\u0026amp;theme=db73ac360acef52ebd4c46fc\u0026amp;signature=8dff2655a1534b2bd9d94c1e933f992ecbbb62ab967e20673449811f4d75c1f6\">\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/payra/9w6PdDW_o-nXMNf7/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Payra\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2F63F5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment\">\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/cancel-a-terminal-payment.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.payra.com/#organization\",\"name\":\"Payra\",\"url\":\"https://docs.payra.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/payra/MH5RqIOlh9xdat81/logo/payra.svg?fit=max\u0026auto=format\u0026n=MH5RqIOlh9xdat81\u0026q=85\u0026s=b4dcf68c30ed708db9f58d7f875dc3bd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.payra.com#website\",\"name\":\"Payra\",\"url\":\"https://docs.payra.com\",\"publisher\":{\"@id\":\"https://docs.payra.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment#webpage\",\"url\":\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment\",\"name\":\"Cancel a terminal payment\",\"description\":\"Stops a terminal payment while the terminal still waits for a card: the payment answers canceled with cancellation_reason: requested. Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.\",\"dateModified\":\"2026-10-27T12:54:29.303Z\",\"isPartOf\":{\"@id\":\"https://docs.payra.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Payments\",\"item\":\"https://docs.payra.com/api-reference/payments/create-a-payment\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cancel a terminal payment\",\"item\":\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment#apireference\",\"headline\":\"Cancel a terminal payment\",\"name\":\"Cancel a terminal payment\",\"description\":\"Stops a terminal payment while the terminal still waits for a card: the payment answers canceled with cancellation_reason: requested. Once a card was presented, it is refused and the payment finishes on its own. Canceling a terminal payment that is already canceled answers it as it is.\",\"url\":\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment\",\"mainEntityOfPage\":{\"@id\":\"https://docs.payra.com/api-reference/payments/cancel-a-terminal-payment#webpage\"},\"dateModified\":\"2026-10-27T12:54:29.303Z\",\"publisher\":{\"@id\":\"https://docs.payra.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.payra.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Payra\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Payra","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"Overview","href":"/api-reference/overview"}]},{"group":"Account","pages":[{"title":"Retrieve the account","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /account","href":"/api-reference/account/retrieve-the-account"}]},{"group":"Payment method sessions","pages":[{"title":"Create a payment method session","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /payment-method-sessions","href":"/api-reference/payment-method-sessions/create-a-payment-method-session"},{"title":"Retrieve a payment method session","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /payment-method-sessions/{id}","href":"/api-reference/payment-method-sessions/retrieve-a-payment-method-session"},{"title":"Cancel a payment method session","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /payment-method-sessions/{id}/cancel","href":"/api-reference/payment-method-sessions/cancel-a-payment-method-session"},{"title":"Confirm a payment method session","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /payment-method-sessions/{id}/confirm","href":"/api-reference/payment-method-sessions/confirm-a-payment-method-session"}]},{"group":"Customers","pages":[{"title":"Create a customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /customers","href":"/api-reference/customers/create-a-customer"},{"title":"List customers","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /customers","href":"/api-reference/customers/list-customers"},{"title":"Retrieve a customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /customers/{id}","href":"/api-reference/customers/retrieve-a-customer"},{"title":"Update a customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /customers/{id}","href":"/api-reference/customers/update-a-customer"}]},{"group":"Invoices","pages":[{"title":"List invoices","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /invoices","href":"/api-reference/invoices/list-invoices"},{"title":"Retrieve an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /invoices/{id}","href":"/api-reference/invoices/retrieve-an-invoice"}]},{"group":"Payment methods","pages":[{"title":"Create a payment method","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /payment-methods","href":"/api-reference/payment-methods/create-a-payment-method"},{"title":"List a customer's payment methods","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /payment-methods","href":"/api-reference/payment-methods/list-a-customers-payment-methods"},{"title":"Retrieve a payment method","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /payment-methods/{id}","href":"/api-reference/payment-methods/retrieve-a-payment-method"},{"title":"Detach a payment method","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json delete /payment-methods/{id}","href":"/api-reference/payment-methods/detach-a-payment-method"}]},{"group":"Payments","pages":[{"title":"Create a payment","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /payments","href":"/api-reference/payments/create-a-payment"},{"title":"List payments","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /payments","href":"/api-reference/payments/list-payments"},{"title":"Retrieve a payment","description":"The current state of one of your payments; a pending one moves as the processor settles it.","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /payments/{id}","href":"/api-reference/payments/retrieve-a-payment"},{"title":"Cancel a terminal payment","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /payments/{id}/cancel","href":"/api-reference/payments/cancel-a-terminal-payment"}]},{"group":"Terminals","pages":[{"title":"List terminals","description":"The card terminals assigned to your account in this environment, oldest first. Only terminals ready to take payments are listed; one still being set up does not appear until it is. `checked_out=false` lists the free ones.","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /terminals","href":"/api-reference/terminals/list-terminals"},{"title":"Retrieve a terminal","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /terminals/{id}","href":"/api-reference/terminals/retrieve-a-terminal"},{"title":"Rename a terminal","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /terminals/{id}","href":"/api-reference/terminals/rename-a-terminal"},{"title":"Check a terminal out","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /terminals/{id}/check-out","href":"/api-reference/terminals/check-a-terminal-out"},{"title":"Check a terminal in","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /terminals/{id}/check-in","href":"/api-reference/terminals/check-a-terminal-in"},{"title":"List a terminal's check-outs","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /terminals/{id}/check-outs","href":"/api-reference/terminals/list-a-terminals-check-outs"}]},{"group":"Checkout sessions","pages":[{"title":"Create a checkout session","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /checkout-sessions","href":"/api-reference/checkout-sessions/create-a-checkout-session"},{"title":"List checkout sessions","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /checkout-sessions","href":"/api-reference/checkout-sessions/list-checkout-sessions"},{"title":"Retrieve a checkout session","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /checkout-sessions/{id}","href":"/api-reference/checkout-sessions/retrieve-a-checkout-session"},{"title":"Expire a checkout session","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /checkout-sessions/{id}/expire","href":"/api-reference/checkout-sessions/expire-a-checkout-session"}]},{"group":"Refunds","pages":[{"title":"Create a refund","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /refunds","href":"/api-reference/refunds/create-a-refund"},{"title":"List refunds","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /refunds","href":"/api-reference/refunds/list-refunds"},{"title":"Retrieve a refund","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /refunds/{id}","href":"/api-reference/refunds/retrieve-a-refund"}]},{"group":"Webhooks","pages":[{"title":"Create a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /webhook-endpoints","href":"/api-reference/webhooks/create-a-webhook-endpoint"},{"title":"List webhook endpoints","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /webhook-endpoints","href":"/api-reference/webhooks/list-webhook-endpoints"},{"title":"Retrieve a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /webhook-endpoints/{id}","href":"/api-reference/webhooks/retrieve-a-webhook-endpoint"},{"title":"Update a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /webhook-endpoints/{id}","href":"/api-reference/webhooks/update-a-webhook-endpoint"},{"title":"Delete a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json delete /webhook-endpoints/{id}","href":"/api-reference/webhooks/delete-a-webhook-endpoint"},{"title":"List events","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /events","href":"/api-reference/webhooks/list-events"},{"title":"Retrieve an event","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json get /events/{id}","href":"/api-reference/webhooks/retrieve-an-event"},{"title":"Resend an event","deprecated":null,"version":null,"openapi":"/api-reference/openapi-v1.json post /events/{id}/resend","href":"/api-reference/webhooks/resend-an-event"}]}]}]},"title":"Cancel a terminal payment - Payra","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-rfhihCWU.js","utils-BmH1XFxk.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BcNsxPKB.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BAES3tkd.js","snippetPresets-DCMQBKLP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D6l_bzE9.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BOktbnNh.js","shallow-BCs8SgM7.js","getApiPlaygroundDisplay-DEmW5bJB.js","CodeSnippet-CpZOpB9C.js","CodeSnippets-BOBDqibl.js","Page-D5fEM6aW.js","getPastedJson-DH2JBvmr.js","icon-BBJH-kKh.js","MethodPill-D2Sd5NLC.js","DuplicateIcon-CGgfL2qN.js","createIcon-BKudBBzi.js","DynamicMarkdown-85clUA0i.js","SectionHeading-D0JiMgDx.js","axios-vUo_bRtp.js","Markdown-Cfiy0xZO.js","clsx-rL8ZCCw4.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-aeztFa9U.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BywkCr5C.js"]}