---
title: "Create credential offer"
method: POST
path: "/webapp/credential-offers"
tags: ["Backend"]
---

# Create credential offer

`POST /webapp/credential-offers`

Generate and return a new credential offer

## Request body

- CredentialOfferRequest — Core credential offer data
  - `credential_issuer` string — URL of the credential issuer
  - `credential_configuration_ids` string[], required — Identifiers for the offered credential configurations
  - `grants` object — Supported authorization grant types
    - `urn:ietf:params:oauth:grant-type:pre-authorized_code` GrantUrnIetf
      - `pre-authorized_code` string — The pre-authorized_code value that the wallet will need to supply later
      - `authorization_server` string — The authorization server to use, if the issuer metadata lists multiple authorization servers. No needed otherwise. Default to the first authorization server
      - `tx_code` TxCode — A Transaction (pin) code that can be used for a pre-authorized_code flow
        - `input_mode` 'numeric' | 'text'
        - `length` number — Integer specifying the length of the Transaction Code. This helps the Wallet to render the input screen and improve the user experience.
        - `description` string — String containing guidance for the Holder of the Wallet on how to obtain the Transaction Code, e.g., describing over which communication channel it is delivered. The Wallet is RECOMMENDED to display this description next to the Transaction Code input screen to improve the user experience. The length of the string MUST NOT exceed 300 characters. The description does not support internationalization, however the Issuer MAY detect the Holder's language by previous communication or an HTTP Accept-Language header within an HTTP GET request for a Credential Offer URI.
    - `authorization_code` GrantAuthorizationCode
      - `issuer_state` string — An OAuth2 issuer_state that will be opaque to the wallet, but serves as a state correlation id between invocations as the wallet has to supply this value
      - `authorization_server` string — The authorization server to use, if the issuer metadata lists multiple authorization servers. No needed otherwise. Default to the first authorization server
  - `client_id` string — Optional Client identifier of the wallet

## Response `200`

Successful response

- object
  - `uri` string — Credential offer URI
  - `userPin` string — User PIN for access if required
  - `txCode` object — Transaction code details for tracking

---

[API](https://skmtc.net/sphereon-opensource/apis/sphereon-oid4vci-api.md) · [All operations](https://skmtc.net/sphereon-opensource/apis/sphereon-oid4vci-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sphereon-opensource/sphereon-oid4vci-api/revisions/bc177bfc5928/schema)
