> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Checkout Link

> **API scope required**: `nfts.checkout` Begin the checkout process for a mint
**This API is subject to change as it is currently in its alpha form.**

<Snippet file="alpha-api-note.mdx" />


## OpenAPI

````yaml post /v1-alpha1/checkout/mint
openapi: 3.0.1
info:
  description: |
    N/A
  version: 1.0.0
  title: NFT Checkout
  contact:
    name: Crossmint Payments APIs
    url: https://www.crossmint.com
    email: support@crossmint.com
servers:
  - url: https://staging.crossmint.com/api
    description: Staging environment (testnets)
  - url: https://www.crossmint.com/api
    description: Production environment (mainnets)
security: []
tags:
  - name: metadata
    description: Find out about the data sets
  - name: search
    description: Search a data set
paths:
  /v1-alpha1/checkout/mint:
    post:
      tags:
        - Checkout
      summary: Generate Checkout Link
      description: >-
        **API scope required**: `nfts.checkout` Begin the checkout process for a
        mint

        **This API is subject to change as it is currently in its alpha form.**
      operationId: checkout-mint
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                clientId:
                  type: string
                  description: The clientId of a previously created collection
                userId:
                  type: string
                  description: The userId of a previously created wallet
                emailTo:
                  type: string
                  description: Target email
                mintTo:
                  type: string
                  description: Crypto address to mint the NFT to
                paymentMethod:
                  type: string
                  description: Payment method
                listingId:
                  type: string
                collection:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Collection title
                    description:
                      type: string
                      description: Collection description
                    photo:
                      type: string
                      description: Photo url
                  required:
                    - title
                    - description
                    - photo
                redirect:
                  type: object
                  properties:
                    continue:
                      type: string
                    cancel:
                      type: string
                mintConfig:
                  type: object
                  properties:
                    totalPrice:
                      type: string
                whPassThroughArgs:
                  type: string
                  description: Any arguments to included in the webhook status updates
              required:
                - clientId
                - userId
      responses:
        '200':
          description: Checkout url generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutMintSuccess'
        '400':
          description: >
            ### Bad request.  

            #### This may be for a number of Crossmint compatibility reasons:  
              • One or more of the provided parameters is missing, incorrect, or in an invalid format  
              • The `clientId` does not exist  
              • Minting is unavailable because the collection is disabled  
              • Minting is unavailable because the developer and/or project has not verified their identity  
              • Attempting to mint directly into a wallet for an ERC1155 contract. Currently, this is not supported  
              • The collection is configured improperly for the given contract. An example of this may be that parameters to the mint function in your contract are not specified properly  
                
            #### Or any number of reasons with respect to the minting contract,
            not limited to:  
              • The user/wallet is not whitelisted  
              • The mint is sold out  
              • The mint has not yet gone live  
              • The mint period has ended  
              • The mint limit has been reached for the given user/wallet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: |
            Unauthorized. This may mean either:  
              • The API key may not exist, or does not have the proper scopes to perform this action (`nfts.checkout`), or  
              • The `clientId` for the collection is not registered under the same project as the API key.
      security:
        - apiKey: []
components:
  schemas:
    CheckoutMintSuccess:
      type: object
      properties:
        checkoutURL:
          type: string
          description: >-
            A URL to send the user to in order to capture payment and start the
            minting process
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-API-KEY
      in: header

````