{ "error": { "code": "NOT_FOUND", "message": "Card not found or not active" }}
Set one of a customer’s saved cards as their default. The default card is listed first in List Cards with is_default: true and is preselected in the payment iframe’s saved-card list. The customer can still choose another card at checkout.PATCH /v1/cards/{id}/default · Authenticated with your secret key.The card identifies the customer, so the card ID is all you need to send. Get card IDs from List Cards or the card.saved webhook.
If no default has been set, or the default card is deleted, the customer’s oldest active card is preselected until you set a new default.
Path parameters
string
required
The card to make the default (card_id from List Cards). It must be an active card saved through your merchant account.
Response
boolean
Whether the default was set.
string
The card that is now the customer’s default.
Error responses
Status
Code
Cause
Resolution
401
AUTH_1001
Invalid API key
Check your secret key
404
NOT_FOUND
Card doesn’t exist, is deleted, or wasn’t saved through your merchant account
{ "error": { "code": "NOT_FOUND", "message": "Card not found or not active" }}
Authorizations
Authorization
string
header
required
Your secret key: sk_test_* (sandbox) or sk_live_* (production).
Path Parameters
id
string
required
The card to make the default (card_id from List Cards). Must be an active card saved through your merchant account.
Response
Default card set
success
boolean
default_card_id
string
The card that is now the customer's default
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Prava Payments Docs","colors":{"primary":"#0D9488","light":"#5EEAD4","dark":"#0F766E"},"logo":{"light":"https://mintcdn.com/pravapayments/O4nkkn6wh7EpbsaN/logo/light.svg?fit=max\u0026auto=format\u0026n=O4nkkn6wh7EpbsaN\u0026q=85\u0026s=71d03047aba9f172d7f14809fdf5e948","dark":"https://mintcdn.com/pravapayments/O4nkkn6wh7EpbsaN/logo/dark.svg?fit=max\u0026auto=format\u0026n=O4nkkn6wh7EpbsaN\u0026q=85\u0026s=4df78b4529c65e9a8b94ac3a069adac5"},"favicon":"https://mintcdn.com/pravapayments/O4nkkn6wh7EpbsaN/favicon.svg?fit=max\u0026auto=format\u0026n=O4nkkn6wh7EpbsaN\u0026q=85\u0026s=1c66b21043707f41fe69a1954b061c8d","api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript"]},"mdx":{"auth":{"method":"bearer"},"server":["https://sandbox.api.prava.space","https://api.prava.space"]}},"appearance":{"default":"light","strict":false},"background":{"image":{"light":"https://mintcdn.com/pravapayments/O4nkkn6wh7EpbsaN/images/bg-light.jpg?fit=max\u0026auto=format\u0026n=O4nkkn6wh7EpbsaN\u0026q=85\u0026s=680ed7301d3d464f9dd9aba7b39301a0","dark":"https://mintcdn.com/pravapayments/O4nkkn6wh7EpbsaN/images/bg-dark.jpg?fit=max\u0026auto=format\u0026n=O4nkkn6wh7EpbsaN\u0026q=85\u0026s=e5bab65750a21bbc573f37bf88529afd"},"color":{"light":"#F0FDFA","dark":"#07100E"}},"navbar":{"links":[{"href":"https://www.prava.space/blog","label":"Blog"},{"href":"mailto:support@prava.space","label":"Support"}]},"footer":{"socials":{"x":"https://x.com/PravaPayments","github":"https://github.com/Prava-Payments","linkedin":"https://www.linkedin.com/company/prava-payments"}},"seo":{"metatags":{"og:image":"/images/brand-banner.png","twitter:image":"/images/brand-banner.png","twitter:card":"summary_large_image"}},"fonts":{"heading":{"family":"Neue Haas Display","weight":500,"source":"fonts/NeueHaasDisplayMedium.woff2","format":"woff2"},"body":{"family":"Inter"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"thumbnails":{"background":"https://mintcdn.com/pravapayments/O4nkkn6wh7EpbsaN/images/brand-banner.png?fit=max\u0026auto=format\u0026n=O4nkkn6wh7EpbsaN\u0026q=85\u0026s=5f9fd0ab72da457adc80b64355b7b407"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pravapayments","hasAudioNarration":false,"actualSubdomain":"pravapayments","customDomains":["docs.prava.space"],"gitSource":{"type":"github","owner":"prava-payments","repo":"prava-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b021de2e05a3ff738b0d732","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Developer Guide","count":35},{"language":"default","tag":"API Reference","count":35},{"language":"default","tag":"Server-Side API","count":17},{"language":"default","tag":"Webhooks API","count":15},{"language":"default","tag":"Prava CLI","count":9},{"language":"default","tag":"Endpoints","count":8},{"language":"default","tag":"Webhooks","count":8},{"language":"default","tag":"Getting Started","count":7},{"language":"default","tag":"Concepts","count":6},{"language":"default","tag":"Core Concepts","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@font-face{font-family:\"Neue Haas Display\";font-weight:300;font-style:normal;font-display:swap;src:url(\"/fonts/NeueHaasDisplayLight.woff2\") format(\"woff2\")}@font-face{font-family:\"Neue Haas Display\";font-weight:400;font-style:normal;font-display:swap;src:url(\"/fonts/NeueHaasDisplayRegular.woff2\") format(\"woff2\")}@font-face{font-family:\"Neue Haas Display\";font-weight:500;font-style:normal;font-display:swap;src:url(\"/fonts/NeueHaasDisplayMedium.woff2\") format(\"woff2\")}:root{--prava-teal: #0d9488;--prava-teal-deep: #0f766e;--prava-mint: #5eead4;--prava-green: #34d399;--prava-green-soft: #6ee7b7;--prava-airy-1: #f0fdfa;--prava-airy-2: #ccfbf1;--prava-airy-3: #99f6e4}h1,h2,h3,h4{font-family:\"Neue Haas Display\", \"Inter\", system-ui, sans-serif;letter-spacing:normal;word-spacing:0.02em;font-weight:500}h1{letter-spacing:-0.015em}img[src*=\"brand-banner\"]{display:block;width:100%;max-width:100%;height:auto;border-radius:18px;margin:0.25rem 0 1.75rem;box-shadow:0 14px 40px rgba(6, 42, 39, 0.22);border:1px solid rgba(13, 148, 136, 0.18)}@media (orientation: landscape){[style*=\"/images/bg-light\"]{--bg-shift: -800px;background-position:right var(--bg-shift)!important}}[style*=\"/images/bg-light\"]{opacity:0.5}.mermaid .node rect,.mermaid .node polygon,.mermaid .node circle{fill:var(--prava-airy-1)!important;stroke:var(--prava-teal)!important;stroke-width:1.25px!important;rx:8px}.mermaid .edgePath .path,.mermaid .flowchart-link{stroke:var(--prava-teal)!important}.mermaid .marker{fill:var(--prava-teal)!important;stroke:var(--prava-teal)!important}.mermaid .node .nodeLabel,.mermaid .node text{color:#134e4a!important;fill:#134e4a!important;font-family:\"Inter\", system-ui, sans-serif!important}.mermaid .edgeLabel,.mermaid .edgeLabel p{color:var(--prava-teal-deep)!important;background-color:transparent!important}.dark .mermaid .node rect,.dark .mermaid .node polygon,.dark .mermaid .node circle{fill:rgba(13, 148, 136, 0.15)!important;stroke:var(--prava-mint)!important}.dark .mermaid .node .nodeLabel,.dark .mermaid .node text{color:var(--prava-airy-2)!important;fill:var(--prava-airy-2)!important}.dark .mermaid .edgeLabel,.dark .mermaid .edgeLabel p{color:var(--prava-mint)!important}.callout[data-callout-type=\"note\"]{background:var(--prava-airy-1);border-color:var(--prava-airy-3)}.callout[data-callout-type=\"note\"] [data-component-part=\"callout-content\"],.callout[data-callout-type=\"note\"] [data-component-part=\"callout-icon\"] svg{color:var(--prava-teal-deep)}.callout[data-callout-type=\"info\"]{background:var(--prava-airy-2);border-color:var(--prava-mint)}.callout[data-callout-type=\"info\"] [data-component-part=\"callout-content\"],.callout[data-callout-type=\"info\"] [data-component-part=\"callout-icon\"] svg{color:#115e59}.callout[data-callout-type=\"tip\"]{background:#ecfdf5;border-color:#a7f3d0}.callout[data-callout-type=\"tip\"] [data-component-part=\"callout-content\"],.callout[data-callout-type=\"tip\"] [data-component-part=\"callout-icon\"] svg{color:#047857}.callout[data-callout-type=\"warning\"]{background:#fdf8ef;border-color:#f0dcb4}.callout[data-callout-type=\"warning\"] [data-component-part=\"callout-content\"],.callout[data-callout-type=\"warning\"] [data-component-part=\"callout-icon\"] svg{color:#8a5a0b}.dark .callout[data-callout-type=\"note\"]{background:rgba(13, 148, 136, 0.12);border-color:rgba(94, 234, 212, 0.28)}.dark .callout[data-callout-type=\"note\"] [data-component-part=\"callout-content\"],.dark .callout[data-callout-type=\"note\"] [data-component-part=\"callout-icon\"] svg{color:var(--prava-mint)}.dark .callout[data-callout-type=\"info\"]{background:rgba(13, 148, 136, 0.2);border-color:rgba(94, 234, 212, 0.4)}.dark .callout[data-callout-type=\"info\"] [data-component-part=\"callout-content\"],.dark .callout[data-callout-type=\"info\"] [data-component-part=\"callout-icon\"] svg{color:var(--prava-airy-2)}.dark .callout[data-callout-type=\"tip\"]{background:rgba(52, 211, 153, 0.12);border-color:rgba(52, 211, 153, 0.35)}.dark .callout[data-callout-type=\"tip\"] [data-component-part=\"callout-content\"],.dark .callout[data-callout-type=\"tip\"] [data-component-part=\"callout-icon\"] svg{color:var(--prava-green-soft)}.dark .callout[data-callout-type=\"warning\"]{background:rgba(202, 138, 4, 0.12);border-color:rgba(202, 138, 4, 0.35)}.dark .callout[data-callout-type=\"warning\"] [data-component-part=\"callout-content\"],.dark .callout[data-callout-type=\"warning\"] [data-component-part=\"callout-icon\"] svg{color:#e4b45e}.nav-tag-pill-text[data-nav-tag=\"GET\"]{color:#15803d!important;background-color:rgba(22, 163, 74, 0.12)!important}.dark .nav-tag-pill-text[data-nav-tag=\"GET\"]{color:#4ade80!important;background-color:rgba(74, 222, 128, 0.14)!important}.nav-tag-pill-text[data-nav-tag=\"POST\"]{color:#1d4ed8!important;background-color:rgba(37, 99, 235, 0.12)!important}.dark .nav-tag-pill-text[data-nav-tag=\"POST\"]{color:#60a5fa!important;background-color:rgba(96, 165, 250, 0.14)!important}.nav-tag-pill{order:-1}:where(div,span):has(>.nav-tag-pill){order:-1}"}]}
{"page":{"pagePath":"api-reference/set-default-card","slug":"/api-reference/set-default-card","pageMetadata":{"title":"Set Default Card","description":"Choose which of a customer's saved cards is preselected at checkout","icon":"star","openapi":"api-reference/openapi.json PATCH /v1/cards/{id}/default","playground":"interactive","href":"/api-reference/set-default-card"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Choose which of a customer’s saved cards is preselected at checkout\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Note,ParamField,ResponseField,Table}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Set one of a customer’s saved cards as their default. The default card is listed first in `,_jsx(_components.a,{href:`/api-reference/list-cards`,children:`List Cards`}),` with `,_jsx(_components.code,{children:`is_default: true`}),` and is preselected in the payment iframe’s saved-card list. The customer can still choose another card at checkout.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`PATCH /v1/cards/{id}/default`}),` · Authenticated with your secret key.`]}),`\n`,_jsxs(_components.p,{children:[`The card identifies the customer, so the card ID is all you need to send. Get card IDs from `,_jsx(_components.a,{href:`/api-reference/list-cards`,children:`List Cards`}),` or the `,_jsx(_components.a,{href:`/webhooks/events#card-lifecycle`,children:_jsx(_components.code,{children:`card.saved`})}),` webhook.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`If no default has been set, or the default card is deleted, the customer’s oldest active card is preselected until you set a new default.`})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsx(ParamField,{path:`id`,type:`string`,required:true,id:`param-id`,children:_jsxs(_components.p,{children:[`The card to make the default (`,_jsx(_components.code,{children:`card_id`}),` from `,_jsx(_components.a,{href:`/api-reference/list-cards`,children:`List Cards`}),`). It must be an active card saved through your merchant account.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:`Whether the default was set.`}),`\n`,_jsx(ResponseField,{name:`default_card_id`,type:`string`,id:`param-default-card-id`,children:`The card that is now the customer’s default.`}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Cause`}),_jsx(_components.th,{children:`Resolution`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`AUTH_1001`})}),_jsx(_components.td,{children:`Invalid API key`}),_jsx(_components.td,{children:`Check your secret key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`NOT_FOUND`})}),_jsx(_components.td,{children:`Card doesn’t exist, is deleted, or wasn’t saved through your merchant account`}),_jsxs(_components.td,{children:[`Verify `,_jsx(_components.code,{children:`id`}),` via `,_jsx(_components.a,{href:`/api-reference/list-cards`,children:`List Cards`})]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Set Default Card","description":"Choose which of a customer's saved cards is preselected at checkout","icon":"star","openapi":"api-reference/openapi.json PATCH /v1/cards/{id}/default","playground":"interactive","href":"/api-reference/set-default-card"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Set one of a customer’s saved cards as their default. The default card is listed first in `,_jsx(_components.a,{href:`/api-reference/list-cards`,children:`List Cards`}),` with `,_jsx(_components.code,{children:`is_default: true`}),` and is preselected in the payment iframe’s saved-card list. The customer can still choose another card at checkout.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`PATCH /v1/cards/{id}/default`}),` · Authenticated with your secret key.`]}),`\n`,_jsxs(_components.p,{children:[`The card identifies the customer, so the card ID is all you need to send. Get card IDs from `,_jsx(_components.a,{href:`/api-reference/list-cards`,children:`List Cards`}),` or the `,_jsx(_components.a,{href:`/webhooks/events#card-lifecycle`,children:_jsx(_components.code,{children:`card.saved`})}),` webhook.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`If no default has been set, or the default card is deleted, the customer’s oldest active card is preselected until you set a new default.`})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsx(ParamField,{path:`id`,type:`string`,required:true,id:`param-id`,children:_jsxs(_components.p,{children:[`The card to make the default (`,_jsx(_components.code,{children:`card_id`}),` from `,_jsx(_components.a,{href:`/api-reference/list-cards`,children:`List Cards`}),`). It must be an active card saved through your merchant account.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:`Whether the default was set.`}),`\n`,_jsx(ResponseField,{name:`default_card_id`,type:`string`,id:`param-default-card-id`,children:`The card that is now the customer’s default.`}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Cause`}),_jsx(_components.th,{children:`Resolution`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`AUTH_1001`})}),_jsx(_components.td,{children:`Invalid API key`}),_jsx(_components.td,{children:`Check your secret key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`NOT_FOUND`})}),_jsx(_components.td,{children:`Card doesn’t exist, is deleted, or wasn’t saved through your merchant account`}),_jsxs(_components.td,{children:[`Verify `,_jsx(_components.code,{children:`id`}),` via `,_jsx(_components.a,{href:`/api-reference/list-cards`,children:`List Cards`})]})]})]})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://sandbox.api.prava.space/v1/cards/card_1/default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk_test_...\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`resp `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.patch(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://sandbox.api.prava.space/v1/cards/card_1/default\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer sk_test_...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`4`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` resp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://sandbox.api.prava.space/v1/cards/card_1/default\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"PATCH\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer sk_test_...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200 Success`,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"default_card_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"card_1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`404 Not Found`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NOT_FOUND\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Card not found or not active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Set Default Card","description":"Choose which of a customer's saved cards is preselected at checkout","icon":"star","openapi":"api-reference/openapi.json PATCH /v1/cards/{id}/default","playground":"interactive","href":"/api-reference/set-default-card"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Path parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Error responses","slug":"error-responses","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> PATCH\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://sandbox.api.prava.space/v1/cards/card_1/default\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer sk_test_...\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">resp \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.patch(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://sandbox.api.prava.space/v1/cards/card_1/default\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer sk_test_...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> resp\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://sandbox.api.prava.space/v1/cards/card_1/default\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"PATCH\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">Authorization:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Bearer sk_test_...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 Success","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"1\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{ \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"default_card_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"card_1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"404 Not Found","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"NOT_FOUND\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Card not found or not active\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Set Default Card","description":"Choose which of a customer's saved cards is preselected at checkout","operationId":"setDefaultCard","security":["0846a2b9-9f10-4731-b194-c260d16e4964"],"parameters":["dbf67390-5dc9-4a65-a423-82ba3f0c8008"],"responses":{"200":"ef9c8da6-758e-4a13-963e-5f62b542a052","401":"6889e94a-5476-4ef3-ab33-e703268c3b48","404":"638cfe91-4dd2-49bb-b6e4-942e6556a9ab"},"method":"patch","type":"path","servers":["1a788c54-5158-4e62-a50a-5cffcb7e9814","e3d57ce5-db41-430c-9870-b9dbb2a64a99"],"path":"/v1/cards/{id}/default","baseUrlOptions":["https://sandbox.api.prava.space","https://api.prava.space"],"title":"Set Default Card","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"2","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -X"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" PATCH"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" https://sandbox.api.prava.space/v1/cards/card_1/default"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"Authorization: Bearer sk_test_...\""}}]}},"\n"]}}}},"filename":"cURL"},{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"6","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" requests"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"resp "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" requests.patch("}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"https://sandbox.api.prava.space/v1/cards/card_1/default\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" headers"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Authorization\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Bearer sk_test_...\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"},"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}}},"\n"]}}}},"filename":"Python"},{"dropdown":false,"language":"javascript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"javascript","children":{"type":"code","key":null,"ref":null,"props":{"language":"javascript","numberOfLines":"4","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" resp"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":" await"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":" fetch"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"https://sandbox.api.prava.space/v1/cards/card_1/default\""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", {"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" method:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"PATCH\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" headers:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"Authorization:"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"Bearer sk_test_...\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"});"}}}},"\n"]}}}},"filename":"JavaScript"}],"requestExampleType":"mdx","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"1","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{ "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":"\"success\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"true"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":"\"default_card_id\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"card_1\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}]}},"\n"]}}}},"filename":"200 Success"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"3","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"error\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": { "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":"\"code\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"NOT_FOUND\""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":"\"message\""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Card not found or not active\""}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"404 Not Found"}],"responseExampleType":"mdx"},"dependencies":{"parameters":{"dbf67390-5dc9-4a65-a423-82ba3f0c8008":{"name":"id","in":"path","required":true,"schema":{"type":"string","isRequired":true,"description":"The card to make the default (card_id from List Cards). Must be an active card saved through your merchant account.","uniqueKey":"","typeLabel":"string"},"description":"The card to make the default (card_id from List Cards). Must be an active card saved through your merchant account."}},"responses":{"ef9c8da6-758e-4a13-963e-5f62b542a052":{"description":"Default card set","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","uniqueKey":"success","typeLabel":"boolean"},"default_card_id":{"type":"string","description":"The card that is now the customer's default","uniqueKey":"default_card_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"default_card_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"6889e94a-5476-4ef3-ab33-e703268c3b48":{"description":"Invalid or missing API key (AUTH_1001)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code (e.g. VAL_2001, AUTH_1001)","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Optional — included for validation errors to specify which fields failed","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"},"638cfe91-4dd2-49bb-b6e4-942e6556a9ab":{"description":"Card not found, deleted, or not saved through your merchant account (NOT_FOUND)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code (e.g. VAL_2001, AUTH_1001)","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Optional — included for validation errors to specify which fields failed","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":{"0846a2b9-9f10-4731-b194-c260d16e4964":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your secret key: sk_test_* (sandbox) or sk_live_* (production).","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"1a788c54-5158-4e62-a50a-5cffcb7e9814":{"url":"https://sandbox.api.prava.space","description":"Sandbox"},"e3d57ce5-db41-430c-9870-b9dbb2a64a99":{"url":"https://api.prava.space","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Your secret key: sk_test_* (sandbox) or sk_live_* (production).","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your secret key: sk_test_* (sandbox) or sk_live_* (production).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"pravapayments","siteName":"Prava Payments Docs","title":"Set Default Card - Prava Payments Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T16:32:23.335Z","originalFileLocation":"api-reference/set-default-card.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=\"light\"}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=\"Choose which of a customer\u0026#x27;s saved cards is preselected at checkout\">\u003cmeta data-mint-head name=\"application-name\" content=\"Prava Payments Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pravapayments/58blChps3BZKEvne/_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/pravapayments/58blChps3BZKEvne/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pravapayments/58blChps3BZKEvne/_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/pravapayments/58blChps3BZKEvne/_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/pravapayments/58blChps3BZKEvne/_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/pravapayments/58blChps3BZKEvne/_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/pravapayments/58blChps3BZKEvne/_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/pravapayments/58blChps3BZKEvne/_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/pravapayments/58blChps3BZKEvne/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Set Default Card - Prava Payments Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Choose which of a customer\u0026#x27;s saved cards is preselected at checkout\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Prava Payments Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.prava.space/api-reference/set-default-card\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pravapayments.mintlify.site/images/brand-banner.png\">\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=\"Set Default Card - Prava Payments Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Choose which of a customer\u0026#x27;s saved cards is preselected at checkout\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pravapayments.mintlify.site/images/brand-banner.png\">\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/pravapayments/58blChps3BZKEvne/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Prava Payments Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9488\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.prava.space/api-reference/set-default-card\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/set-default-card.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.prava.space/#organization\",\"name\":\"Prava Payments Docs\",\"url\":\"https://docs.prava.space\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pravapayments/O4nkkn6wh7EpbsaN/logo/light.svg?fit=max\u0026auto=format\u0026n=O4nkkn6wh7EpbsaN\u0026q=85\u0026s=71d03047aba9f172d7f14809fdf5e948\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.prava.space#website\",\"name\":\"Prava Payments Docs\",\"url\":\"https://docs.prava.space\",\"publisher\":{\"@id\":\"https://docs.prava.space/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.prava.space/api-reference/set-default-card#webpage\",\"url\":\"https://docs.prava.space/api-reference/set-default-card\",\"name\":\"Set Default Card\",\"description\":\"Choose which of a customer's saved cards is preselected at checkout\",\"dateModified\":\"2026-11-13T16:32:23.335Z\",\"isPartOf\":{\"@id\":\"https://docs.prava.space#website\"},\"breadcrumb\":{\"@id\":\"https://docs.prava.space/api-reference/set-default-card#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.prava.space/api-reference/set-default-card#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Server-Side API\",\"item\":\"https://docs.prava.space/api-reference/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set Default Card\",\"item\":\"https://docs.prava.space/api-reference/set-default-card\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.prava.space/api-reference/set-default-card#apireference\",\"headline\":\"Set Default Card\",\"name\":\"Set Default Card\",\"description\":\"Choose which of a customer's saved cards is preselected at checkout\",\"url\":\"https://docs.prava.space/api-reference/set-default-card\",\"mainEntityOfPage\":{\"@id\":\"https://docs.prava.space/api-reference/set-default-card#webpage\"},\"image\":\"https://docs.prava.space/images/brand-banner.png\",\"dateModified\":\"2026-11-13T16:32:23.335Z\",\"publisher\":{\"@id\":\"https://docs.prava.space/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.prava.space#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Prava Payments Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Prava Payments Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/set-default-card.md","siteName":"Prava Payments Docs","nav":{"global":null,"tabs":[{"tab":"Developer Guide","pages":[{"title":"Developer Guide","href":""}]},{"tab":"API Reference","groups":[{"group":"Server-Side API","pages":[{"title":"API Reference","icon":"server","href":"/api-reference/overview"},{"title":"Create Session","icon":"plus","openapi":"api-reference/openapi.json POST /v1/sessions","playground":"interactive","href":"/api-reference/create-session"},{"title":"Enroll Card","icon":"credit-card","openapi":"api-reference/openapi.json POST /v1/sessions/enroll-card","playground":"interactive","href":"/api-reference/enroll-card"},{"title":"Get Card Enrollment Status","icon":"rotate","openapi":"api-reference/openapi.json GET /v1/sessions/{sessionId}/status","playground":"interactive","href":"/api-reference/get-card-enrollment-status"},{"title":"Revoke Session","icon":"ban","openapi":"api-reference/openapi.json POST /v1/sessions/{id}/revoke","playground":"interactive","href":"/api-reference/revoke-session"},{"title":"List Cards","icon":"credit-card","openapi":"api-reference/openapi.json GET /v1/listCards","playground":"interactive","href":"/api-reference/list-cards"},{"title":"Delete Card","description":"Delete a customer's enrolled card and retire its network token","icon":"trash","openapi":"api-reference/openapi.json POST /v1/deleteCard","playground":"interactive","href":"/api-reference/delete-card"},{"title":"Set Default Card","icon":"star","openapi":"api-reference/openapi.json PATCH /v1/cards/{id}/default","playground":"interactive","href":"/api-reference/set-default-card"},{"title":"Get Payment Result","description":"Retrieve transaction status, card identity, and payment credentials for a session","icon":"receipt","openapi":"api-reference/openapi.json GET /v1/sessions/{sessionId}/payment-result","playground":"interactive","href":"/api-reference/get-payment-result"},{"title":"Report Status","icon":"flag","openapi":"api-reference/openapi.json POST /v1/sessions/{sessionId}/report-status","playground":"interactive","href":"/api-reference/report-status"},{"title":"Charge a Mandate","icon":"bolt","openapi":"api-reference/openapi.json POST /v1/mandates/{id}/charge","playground":"interactive","href":"/api-reference/mandate-charge"},{"title":"Report a Mandate Charge","icon":"clipboard-check","openapi":"api-reference/openapi.json POST /v1/mandates/{id}/charges/{txnId}/report","playground":"interactive","href":"/api-reference/mandate-report"},{"title":"List Mandates","icon":"list","openapi":"api-reference/openapi.json GET /v1/mandates","playground":"interactive","href":"/api-reference/mandate-list"},{"title":"Get a Mandate","icon":"file-invoice","openapi":"api-reference/openapi.json GET /v1/mandates/{id}","playground":"interactive","href":"/api-reference/mandate-get"},{"group":"Mandate lifecycle","expanded":true,"pages":[{"title":"Pause a Mandate","icon":"sliders","openapi":"api-reference/openapi.json POST /v1/mandates/{id}/pause","playground":"interactive","href":"/api-reference/mandate-lifecycle"},{"title":"Resume a Mandate","icon":"play","openapi":"api-reference/openapi.json POST /v1/mandates/{id}/resume","playground":"interactive","href":"/api-reference/mandate-resume"},{"title":"Cancel a Mandate","icon":"ban","openapi":"api-reference/openapi.json POST /v1/mandates/{id}/cancel","playground":"interactive","href":"/api-reference/mandate-cancel"}]}]},{"group":"Webhooks API","pages":[{"title":"Webhooks API","icon":"bell","href":"/api-reference/webhooks/overview"},{"title":"List Event Types","icon":"list","openapi":"api-reference/openapi.json GET /v1/webhook-event-types","playground":"interactive","href":"/api-reference/webhooks/list-event-types"},{"group":"Endpoints","expanded":true,"pages":[{"title":"Create an Endpoint","icon":"plus","openapi":"api-reference/openapi.json POST /v1/webhook-endpoints","playground":"interactive","href":"/api-reference/webhooks/create-endpoint"},{"title":"List Endpoints","icon":"list-ul","openapi":"api-reference/openapi.json GET /v1/webhook-endpoints","playground":"interactive","href":"/api-reference/webhooks/list-endpoints"},{"title":"Retrieve an Endpoint","icon":"eye","openapi":"api-reference/openapi.json GET /v1/webhook-endpoints/{endpointId}","playground":"interactive","href":"/api-reference/webhooks/get-endpoint"},{"title":"Update an Endpoint","icon":"pen","openapi":"api-reference/openapi.json PATCH /v1/webhook-endpoints/{endpointId}","playground":"interactive","href":"/api-reference/webhooks/update-endpoint"},{"title":"Delete an Endpoint","icon":"trash","openapi":"api-reference/openapi.json DELETE /v1/webhook-endpoints/{endpointId}","playground":"interactive","href":"/api-reference/webhooks/delete-endpoint"},{"title":"Verify an Endpoint","icon":"circle-check","openapi":"api-reference/openapi.json POST /v1/webhook-endpoints/{endpointId}/verify","playground":"interactive","href":"/api-reference/webhooks/verify-endpoint"},{"title":"Send a Test Event","icon":"paper-plane","openapi":"api-reference/openapi.json POST /v1/webhook-endpoints/{endpointId}/test","playground":"interactive","href":"/api-reference/webhooks/send-test-event"},{"title":"Rotate the Signing Secret","icon":"key","openapi":"api-reference/openapi.json POST /v1/webhook-endpoints/{endpointId}/rotate-secret","playground":"interactive","href":"/api-reference/webhooks/rotate-signing-secret"}]},{"group":"Deliveries","expanded":true,"pages":[{"title":"List Deliveries","icon":"clock-rotate-left","openapi":"api-reference/openapi.json GET /v1/webhook-endpoints/{endpointId}/deliveries","playground":"interactive","href":"/api-reference/webhooks/list-deliveries"},{"title":"Retrieve a Delivery","icon":"magnifying-glass","openapi":"api-reference/openapi.json GET /v1/webhook-deliveries/{deliveryId}","playground":"interactive","href":"/api-reference/webhooks/get-delivery"},{"title":"Replay a Delivery","icon":"rotate-right","openapi":"api-reference/openapi.json POST /v1/webhook-deliveries/{deliveryId}/replay","playground":"interactive","href":"/api-reference/webhooks/replay-delivery"}]},{"group":"Events","expanded":true,"pages":[{"title":"List Events","icon":"list","openapi":"api-reference/openapi.json GET /v1/events","playground":"interactive","href":"/api-reference/webhooks/list-events"},{"title":"Retrieve an Event","icon":"bolt","openapi":"api-reference/openapi.json GET /v1/events/{eventId}","playground":"interactive","href":"/api-reference/webhooks/get-event"}]}]},{"group":"Reference","pages":[{"title":"Errors","icon":"triangle-exclamation","href":"/api-reference/errors"},{"title":"Test Cards","icon":"credit-card","href":"/api-reference/test-cards"},{"title":"Testing in Sandbox","icon":"flask","href":"/api-reference/testing"}]}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/concepts/payments"}]},{"tab":"Capabilities","pages":[{"title":"Capabilities","href":"/integration/overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/developer-faq"}]}]},"basePath":"","title":"Set Default Card - Prava Payments Docs","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js","Markdown-CX2QY19L.js","AssistantPageLink-CY3bFglh.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}