> ## 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.

# Get Agent Card Credentials

> Create a payment credential from an order intent.

**API scope required**: `order-intents.credentials`



## OpenAPI

````yaml post /unstable/order-intents/{orderIntentId}/credentials
openapi: 3.0.0
info:
  contact:
    email: support@crossmint.com
    name: Crossmint Support
    url: https://www.crossmint.com
  description: Crossmint Payments API
  title: Crossmint Payments API
  version: 1.0.0
servers:
  - description: Staging environment (testnets)
    url: https://staging.crossmint.com/api
  - description: Production environment (mainnets)
    url: https://www.crossmint.com/api
security: []
tags: []
paths:
  /unstable/order-intents/{orderIntentId}/credentials:
    post:
      tags:
        - Order Intents
      summary: Create Order Intent Credential
      description: |-
        Create a payment credential from an order intent.

        **API scope required**: `order-intents.credentials`
      operationId: OrderIntentsController-createOrderIntentCredential-2
      parameters:
        - description: API key required for authentication
          in: header
          name: X-API-KEY
          required: true
          schema:
            type: string
        - in: path
          name: orderIntentId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderIntentCredentialInputDto'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderIntentCredentialResponseDto'
          description: Returns the payment credential
components:
  schemas:
    CreateOrderIntentCredentialInputDto:
      oneOf:
        - additionalProperties: false
          properties:
            amount:
              additionalProperties: false
              properties:
                currency:
                  pattern: ^[A-Za-z]{3}$
                  type: string
                value:
                  pattern: ^\d+(\.\d{1,4})?$
                  type: string
              required:
                - currency
                - value
              type: object
            credential:
              additionalProperties: false
              properties:
                format:
                  enum:
                    - card
                    - network-token
                  type: string
              required:
                - format
              type: object
            merchant:
              additionalProperties: false
              properties:
                acquirerBin:
                  pattern: ^\d{6}$
                  type: string
                categoryCode:
                  pattern: ^\d{4}$
                  type: string
                countryCode:
                  pattern: ^[A-Za-z]{2}$
                  type: string
                name:
                  maxLength: 200
                  minLength: 1
                  type: string
                url:
                  maxLength: 2048
                  pattern: ^https?:\/\/
                  type: string
              required:
                - countryCode
                - name
                - url
              type: object
            provider:
              enum:
                - agentpay
                - vic
              type: string
            rail:
              enum:
                - agentic-token
              type: string
          required:
            - amount
            - credential
            - provider
            - rail
          type: object
        - additionalProperties: false
          properties:
            amount:
              additionalProperties: false
              properties:
                currency:
                  pattern: ^[A-Za-z]{3}$
                  type: string
                value:
                  pattern: ^\d+(\.\d{1,4})?$
                  type: string
              required:
                - currency
                - value
              type: object
            credential:
              additionalProperties: false
              properties:
                format:
                  enum:
                    - identifier
                  type: string
                payload:
                  additionalProperties: false
                  properties:
                    networkBusinessProfile:
                      minLength: 1
                      type: string
                  required:
                    - networkBusinessProfile
                  type: object
              required:
                - format
                - payload
              type: object
            merchant:
              additionalProperties: false
              properties:
                acquirerBin:
                  pattern: ^\d{6}$
                  type: string
                categoryCode:
                  pattern: ^\d{4}$
                  type: string
                countryCode:
                  pattern: ^[A-Za-z]{2}$
                  type: string
                name:
                  maxLength: 200
                  minLength: 1
                  type: string
                url:
                  maxLength: 2048
                  pattern: ^https?:\/\/
                  type: string
              required:
                - countryCode
                - name
                - url
              type: object
            provider:
              enum:
                - stripe
              type: string
            rail:
              enum:
                - spt
              type: string
          required:
            - amount
            - credential
            - provider
            - rail
          type: object
        - additionalProperties: false
          properties:
            credential:
              additionalProperties: false
              properties:
                format:
                  enum:
                    - card
                  type: string
                publicKey:
                  additionalProperties: false
                  properties:
                    e:
                      minLength: 1
                      type: string
                    kty:
                      enum:
                        - RSA
                      type: string
                    'n':
                      minLength: 342
                      pattern: ^[A-Za-z0-9_-]+$
                      type: string
                  required:
                    - e
                    - kty
                    - 'n'
                  type: object
              required:
                - format
                - publicKey
              type: object
            rail:
              enum:
                - encrypted-card
              type: string
          required:
            - credential
            - rail
          type: object
    OrderIntentCredentialResponseDto:
      oneOf:
        - additionalProperties: false
          properties:
            amount:
              additionalProperties: false
              properties:
                currency:
                  pattern: ^[A-Za-z]{3}$
                  type: string
                value:
                  pattern: ^\d+(\.\d{1,4})?$
                  type: string
              required:
                - currency
                - value
              type: object
            credential:
              additionalProperties: false
              properties:
                format:
                  enum:
                    - identifier
                  type: string
                value:
                  minLength: 1
                  type: string
              required:
                - format
                - value
              type: object
            expiresAt:
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
              type: string
            id:
              minLength: 1
              type: string
            provider:
              enum:
                - stripe
              type: string
            rail:
              enum:
                - spt
              type: string
          required:
            - amount
            - credential
            - expiresAt
            - id
            - provider
            - rail
          type: object
        - additionalProperties: false
          properties:
            amount:
              additionalProperties: false
              properties:
                currency:
                  pattern: ^[A-Za-z]{3}$
                  type: string
                value:
                  pattern: ^\d+(\.\d{1,4})?$
                  type: string
              required:
                - currency
                - value
              type: object
            credential:
              anyOf:
                - additionalProperties: false
                  properties:
                    format:
                      enum:
                        - card
                      type: string
                    value:
                      additionalProperties: false
                      properties:
                        cvc:
                          type: string
                        expirationMonth:
                          maximum: 9007199254740991
                          minimum: -9007199254740991
                          type: integer
                        expirationYear:
                          maximum: 9007199254740991
                          minimum: -9007199254740991
                          type: integer
                        number:
                          type: string
                      required:
                        - cvc
                        - expirationMonth
                        - expirationYear
                        - number
                      type: object
                  required:
                    - format
                    - value
                  type: object
                - additionalProperties: false
                  properties:
                    format:
                      enum:
                        - network-token
                      type: string
                    value:
                      additionalProperties: false
                      properties:
                        cryptogram:
                          additionalProperties: false
                          properties:
                            expiresAt:
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                              type: string
                            type:
                              enum:
                                - CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM
                              type: string
                            value:
                              type: string
                          required:
                            - type
                            - value
                          type: object
                        eci:
                          type: string
                        expirationMonth:
                          maximum: 9007199254740991
                          minimum: -9007199254740991
                          type: integer
                        expirationYear:
                          maximum: 9007199254740991
                          minimum: -9007199254740991
                          type: integer
                        paymentToken:
                          type: string
                      required:
                        - cryptogram
                        - eci
                        - expirationMonth
                        - expirationYear
                        - paymentToken
                      type: object
                  required:
                    - format
                    - value
                  type: object
            expiresAt:
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
              type: string
            id:
              minLength: 1
              type: string
            provider:
              enum:
                - agentpay
                - vic
              type: string
            rail:
              enum:
                - agentic-token
              type: string
          required:
            - amount
            - credential
            - expiresAt
            - id
            - provider
            - rail
          type: object
        - additionalProperties: false
          properties:
            credential:
              additionalProperties: false
              properties:
                format:
                  enum:
                    - card
                  type: string
                value:
                  minLength: 1
                  type: string
              required:
                - format
                - value
              type: object
            rail:
              enum:
                - encrypted-card
              type: string
          required:
            - credential
            - rail
          type: object

````