To create a collection, use the createCollectionOrder method:
async function createCollection() { const collectionOrder = await handCashMinter.createCollectionOrder({ name: 'My Game Collection', description: 'A collection of digital items for my game', mediaDetails: { image: { url: 'https://example.com/collection-image.png', contentType: 'image/png', }, }, }); console.log('Collection order created:', collectionOrder.id); // Wait for collection to be created (typically takes less than 5 seconds) await new Promise(resolve => setTimeout(resolve, 5000)); // Get the created collection const items = await handCashMinter.getOrderItems(collectionOrder.id); const collectionId = items[0].id; console.log(`Collection Created. ID: ${collectionId}`); return collectionId;}
Collection Order Response
interface CollectionOrderResponse { id: string; user: string; // Your business wallet ID app: string; type: 'collection'; status: 'pending' | 'completed' | 'failed'; pendingInscriptions: number; error?: string;}
Get Collection Details
Retrieve details of an existing collection:
async function getCollection(collectionId: string) { // Collections are items themselves, so you can retrieve them like any other item const collection = await handCashMinter.getItem(collectionId); console.log('Collection details:', collection); return collection;}
Strategy
Create a single top-level collection for your app to keep things organized
Use item attributes to categorize sub-types (rarity, season, set, etc.) within your collection
Keep immutable metadata minimal and reference off-chain metadata via URLs for flexibility
Save your collection ID after creation - you’ll need it when creating items
Best Practices
Create your collection once during app initialization and store the collection ID
Use descriptive names and descriptions for your collections
Provide high-quality images for your collection media
Use item attributes to organize items within a collection rather than creating multiple collections
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Handcash Developer Documentation","colors":{"primary":"#11ad4d","light":"#07C983","dark":"#0D9373"},"favicon":"https://mintcdn.com/handcash/5UQ-6SgMAr9jDsP3/favicon.svg?fit=max\u0026auto=format\u0026n=5UQ-6SgMAr9jDsP3\u0026q=85\u0026s=dec5221d33b41c7fd09b29b8e3d5798c","logo":{"light":"https://mintcdn.com/handcash/q03sWpGtEzxBOQeb/logo/handcash_overLight.svg?fit=max\u0026auto=format\u0026n=q03sWpGtEzxBOQeb\u0026q=85\u0026s=d4cd1f8e20eeafa1f19b8b30d4607056","dark":"https://mintcdn.com/handcash/q03sWpGtEzxBOQeb/logo/handcash_overDark.svg?fit=max\u0026auto=format\u0026n=q03sWpGtEzxBOQeb\u0026q=85\u0026s=6a44183051d60371ec6293e356511c58"},"navbar":{"links":[{"label":"Support","href":"mailto:Support@handcash.io"}],"primary":{"type":"button","label":"Developer Dashboard","href":"https://dashboard.handcash.io"}},"footer":{"socials":{"x":"https://twitter.com/handcashapp","github":"https://github.com/HandCash","linkedin":"https://www.linkedin.com/company/handcash"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Community","href":"https://discord.handcash.io","icon":"discord"},{"anchor":"Blog","href":"https://market.handcash.io/blog","icon":"newspaper"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"handcash","hasAudioNarration":false,"actualSubdomain":"handcash","customDomains":["docs.handcash.io"],"gitSource":{"type":"github","owner":"handcash","repo":"developerdocs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ada217f1cd014c88d98d5d0","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"Documentation","count":38},{"language":"default","tag":"BRC wallet (Beta)","count":11},{"language":"default","tag":"Wallet API / Whitelabel Services","count":9},{"language":"default","tag":"v2 / Item Operations","count":4},{"language":"default","tag":"v3 / Connect","count":4},{"language":"default","tag":"Get Started","count":2},{"language":"default","tag":"v3 / Items","count":2},{"language":"default","tag":"API / Payment Requests","count":1},{"language":"default","tag":"v2 / Collection Management","count":1},{"language":"default","tag":"v2 / Friends","count":1}]},"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":"control","enabled":true,"payload":{"type":"string","value":"control"},"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":[]}
{"page":{"pagePath":"v2/handcash-connect/collection-management","slug":"/v2/handcash-connect/collection-management","pageMetadata":{"title":"Collection Management","description":"Create and manage collections for organizing digital items","href":"/v2/handcash-connect/collection-management"},"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: \"Create and manage collections for organizing digital items\"\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={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`⚠️ Legacy SDK Documentation`})}),_jsxs(_components.p,{children:[`This documentation uses our older SDK (`,_jsx(_components.code,{children:`@handcash/handcash-connect`}),`), but the v3 SDK does not support this feature yet.`]})]}),`\n`,_jsx(Heading,{level:`1`,id:`collection-management`,children:`Collection Management`}),`\n`,_jsx(_components.p,{children:`This guide demonstrates how to create and manage collections using the HandCash Connect SDK. Collections are used to organize your digital items.`}),`\n`,_jsx(Heading,{level:`2`,id:`setup`,children:`Setup`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`7`,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:` { HandCashMinter } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@handcash/handcash-connect'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handCashMinter = HandCashMinter.fromAppCredentials({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appId: process.env.HANDCASH_APP_ID,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` authToken: process.env.HANDCASH_AUTH_TOKEN,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appSecret: process.env.HANDCASH_APP_SECRET`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-collection`,children:`Create a Collection`}),`\n`,_jsxs(_components.p,{children:[`To create a collection, use the `,_jsx(_components.code,{children:`createCollectionOrder`}),` method:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` createCollection() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` collectionOrder = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handCashMinter.createCollectionOrder({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` name: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'My Game Collection'`}),_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\":`#D4D4D4`},children:` description: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'A collection of digital items for my game'`}),_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:` mediaDetails: {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` image: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` url: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://example.com/collection-image.png'`}),_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\":`#D4D4D4`},children:` contentType: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'image/png'`}),_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(_components.span,{className:`line`,children:_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(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Collection order created:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, collectionOrder.id);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Wait for collection to be created (typically takes less than 5 seconds)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Promise(resolve => setTimeout(resolve, 5000));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Get the created collection`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` items = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handCashMinter.getOrderItems(collectionOrder.id);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` collectionId = items[0].id;`})]}),`\n`,_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Collection Created. ID: ${collectionId}`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` collectionId;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`collection-order-response`,children:`Collection Order Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`interface`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CollectionOrderResponse {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` id: string;`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` user: string; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Your business wallet ID`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` app: string;`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'collection'`}),_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\":`#D4D4D4`},children:` status: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'pending'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` | `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'completed'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` | `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'failed'`}),_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:` pendingInscriptions: number;`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error?: string;`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`get-collection-details`,children:`Get Collection Details`}),`\n`,_jsx(_components.p,{children:`Retrieve details of an existing collection:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` getCollection(collectionId: string) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Collections are items themselves, so you can retrieve them like any other item`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` collection = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handCashMinter.getItem(collectionId);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Collection details:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, collection);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` collection;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`strategy`,children:`Strategy`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Create a single top-level collection`}),` for your app to keep things organized`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use item attributes`}),` to categorize sub-types (rarity, season, set, etc.) within your collection`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Keep immutable metadata minimal`}),` and reference off-chain metadata via URLs for flexibility`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Save your collection ID`}),` after creation - you’ll need it when creating items`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Create your collection once during app initialization and store the collection ID`}),`\n`,_jsx(_components.li,{children:`Use descriptive names and descriptions for your collections`}),`\n`,_jsx(_components.li,{children:`Provide high-quality images for your collection media`}),`\n`,_jsx(_components.li,{children:`Use item attributes to organize items within a collection rather than creating multiple collections`}),`\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":"Collection Management","description":"Create and manage collections for organizing digital items","href":"/v2/handcash-connect/collection-management"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Collection Management","slug":"collection-management","depth":1,"children":[]},{"title":"Setup","slug":"setup","depth":2,"children":[]},{"title":"Create a Collection","slug":"create-a-collection","depth":2,"children":[{"title":"Collection Order Response","slug":"collection-order-response","depth":3,"children":[]}]},{"title":"Get Collection Details","slug":"get-collection-details","depth":2,"children":[]},{"title":"Strategy","slug":"strategy","depth":2,"children":[]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"handcash","siteName":"Handcash Developer Documentation","title":"Collection Management - Handcash Developer Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-16T14:27:10.452Z","originalFileLocation":"v2/handcash-connect/collection-management.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create and manage collections for organizing digital items\">\u003cmeta data-mint-head name=\"application-name\" content=\"Handcash Developer Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/handcash/2hPSU8zDT3gueGet/_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/handcash/2hPSU8zDT3gueGet/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/handcash/2hPSU8zDT3gueGet/_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/handcash/2hPSU8zDT3gueGet/_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/handcash/2hPSU8zDT3gueGet/_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/handcash/2hPSU8zDT3gueGet/_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/handcash/2hPSU8zDT3gueGet/_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/handcash/2hPSU8zDT3gueGet/_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/handcash/2hPSU8zDT3gueGet/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Collection Management - Handcash Developer Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create and manage collections for organizing digital items\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Handcash Developer Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.handcash.io/v2/handcash-connect/collection-management\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://handcash.mintlify.site/_mintlify/api/og/v2?division=v2+%2F+Collection+Management\u0026amp;title=Collection+Management\u0026amp;description=Create+and+manage+collections+for+organizing+digital+items\u0026amp;theme=189698f8ff1780e87eb67e34\u0026amp;signature=d5c9d865625352ec7c9e4f080062cd80d905d702dc70ee037fc3183600b4c8d8\">\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=\"Collection Management - Handcash Developer Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create and manage collections for organizing digital items\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://handcash.mintlify.site/_mintlify/api/og/v2?division=v2+%2F+Collection+Management\u0026amp;title=Collection+Management\u0026amp;description=Create+and+manage+collections+for+organizing+digital+items\u0026amp;theme=189698f8ff1780e87eb67e34\u0026amp;signature=d5c9d865625352ec7c9e4f080062cd80d905d702dc70ee037fc3183600b4c8d8\">\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/handcash/2hPSU8zDT3gueGet/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Handcash Developer Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#11ad4d\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.handcash.io/v2/handcash-connect/collection-management\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v2/handcash-connect/collection-management.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.handcash.io/#organization\",\"name\":\"Handcash Developer Documentation\",\"url\":\"https://docs.handcash.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/handcash/q03sWpGtEzxBOQeb/logo/handcash_overLight.svg?fit=max\u0026auto=format\u0026n=q03sWpGtEzxBOQeb\u0026q=85\u0026s=d4cd1f8e20eeafa1f19b8b30d4607056\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.handcash.io#website\",\"name\":\"Handcash Developer Documentation\",\"url\":\"https://docs.handcash.io\",\"publisher\":{\"@id\":\"https://docs.handcash.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.handcash.io/v2/handcash-connect/collection-management#webpage\",\"url\":\"https://docs.handcash.io/v2/handcash-connect/collection-management\",\"name\":\"Collection Management\",\"description\":\"Create and manage collections for organizing digital items\",\"dateModified\":\"2026-09-16T14:27:10.452Z\",\"isPartOf\":{\"@id\":\"https://docs.handcash.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.handcash.io/v2/handcash-connect/collection-management#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.handcash.io/v2/handcash-connect/collection-management#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Handcash Developer Documentation\",\"item\":\"https://docs.handcash.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Collection Management\",\"item\":\"https://docs.handcash.io/v2/handcash-connect/collection-management\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.handcash.io/v2/handcash-connect/collection-management#article\",\"headline\":\"Collection Management\",\"name\":\"Collection Management\",\"description\":\"Create and manage collections for organizing digital items\",\"url\":\"https://docs.handcash.io/v2/handcash-connect/collection-management\",\"mainEntityOfPage\":{\"@id\":\"https://docs.handcash.io/v2/handcash-connect/collection-management#webpage\"},\"dateModified\":\"2026-09-16T14:27:10.452Z\",\"publisher\":{\"@id\":\"https://docs.handcash.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.handcash.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Handcash Developer Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Handcash Developer Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v2/handcash-connect/collection-management.md","siteName":"Handcash Developer Documentation","nav":{"global":{"anchors":[{"anchor":"Community","href":"https://discord.handcash.io","icon":"discord"},{"anchor":"Blog","href":"https://market.handcash.io/blog","icon":"newspaper"}]},"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Developer Dashboard","href":"/developer-dashboard"}]},{"group":"BRC wallet (Beta)","pages":[{"title":"Overview","href":"/brc-wallet/overview"},{"title":"Getting started","href":"/brc-wallet/getting-started"},{"title":"Feature map","href":"/brc-wallet/feature-map"},{"title":"Wallet interactions","href":"/brc-wallet/interactions"},{"title":"Payments and actions","href":"/brc-wallet/payments"},{"title":"Collectables","href":"/brc-wallet/items"},{"title":"Tokens","href":"/brc-wallet/tokens"},{"title":"Signing and encryption","href":"/brc-wallet/signing"},{"title":"Permissions and scopes","href":"/brc-wallet/permissions"},{"title":"Local bridge","href":"/brc-wallet/local-bridge"},{"title":"Examples","href":"/brc-wallet/examples"}]},{"group":"v3 / Getting Started","pages":[{"title":"Getting Started","href":"/v3/getting-started"}]},{"group":"v3 / Connect","pages":[{"title":"Authentication","href":"/v3/connect/authentication"},{"title":"Sign in with Google","href":"/v3/connect/google-auth-proxy"},{"title":"User Account Creation","href":"/v3/connect/user-creation"},{"title":"User Profiles","href":"/v3/connect/profiles"}]},{"group":"v3 / Payments","pages":[{"title":"Payments","href":"/v3/connect/payments"}]},{"group":"v3 / Items","pages":[{"title":"Items Inventory","href":"/v3/items/inventory"},{"title":"Create Items","href":"/v3/items/creation"}]},{"group":"v3 / Business Wallet","pages":[{"title":"Business Payouts","href":"/v3/business-wallet/payouts"}]},{"group":"v2 / Item Operations","pages":[{"title":"Send an Item","href":"/v2/handcash-connect/send-item"},{"title":"Lock and Unlock Items","href":"/v2/handcash-connect/manage-items"},{"title":"Burn an Item","href":"/v2/handcash-connect/burn-item"},{"title":"Burn and Create Items","description":"Burn existing items and create new ones in a single operation","href":"/v2/handcash-connect/burn-and-create"}]},{"group":"v2 / Collection Management","pages":[{"title":"Collection Management","href":"/v2/handcash-connect/collection-management"}]},{"group":"v2 / Friends","pages":[{"title":"Friends","description":"Retrieve and manage user friends with HandCash Connect (Fallback for v3)","href":"/v2/handcash-connect/friends"}]},{"group":"API / Payment Requests","pages":[{"title":null,"href":"/handcash-pay/manage-payment-request"}]},{"group":"Wallet API / Whitelabel Services","pages":[{"title":"Getting Started","href":"/wallet-api/getting-started"},{"title":"Wallet API vs Connect","href":"/wallet-api/waas-vs-connect"},{"title":"Create a new Wallet","href":"/wallet-api/create-user-account"},{"title":"Get access to an existing Wallet","href":"/wallet-api/create-authorization-for-existing-account"},{"title":"Request signing","href":"/wallet-api/request-signing"},{"title":"Wallet operations","href":"/wallet-api/manage-wallets"},{"title":"Configure Paymail Domain (Optional)","href":"/wallet-api/configure-paymail"},{"title":"Configure Custom Verification Email (Optional)","href":"/wallet-api/custom-verification-email"},{"title":"On Ramps","href":"/wallet-api/on-ramps"}]}]}]},"basePath":"","title":"Collection Management - Handcash Developer Documentation","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":[],"chunks":[]}