> For the complete documentation index, see [llms.txt](https://docs.meeco.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meeco.me/openapi-docs/svx-api/credential-offers.md).

# Credential Offers

## Create credential offer

> Creates a credential offer. The credential offer object can be retrieved via the \`uri\` in the response.\
> \
> \`claims\` will be validated against the registered credentialTemplate.schema\
> \
> An \`authorization\_code\` or \`urn:ietf:params:oauth:grant-type:authorized\_code\` grant MUST be provided. However, \`issuer\_state\` and \`pre-authorized\_code\` are optional. If not provided, Wallet will generate random values for them.\
> \
> \`user\_id\` can only be used if Resource Hook is configured.\
> \`user\_id\` can only be used with Pre-authorized Code Grant.\
> \`user\_id\` will be sent to the external resource server via the resource hook.\
> \
> One of \`claims\` OR \`user\_id\` MUST be provided.\
> \
> Credential offers expire. Expiration is controlled by runtime configuration - \`issuer.issuance\_policy.credential\_offer\_expiry\`.\
> \
> \## Supported Standards\
> \
> \- \[OpenID for Verifiable Credential Issuance 1.0 - Credential Offer Endpoint]\(<https://openid.net/specs/openid-4-verifiable-credential-issuance-1\\_0.html#name-credential-offer-endpoint>)<br>

```json
{"openapi":"3.1.0","info":{"title":"SVX Wallet API","version":"4.0.1"},"servers":[{"url":"https://zyfla-wallet-sandbox.meeco.cloud","description":"SVX Wallet deployment (relative)"}],"security":[{},{"bearerAuth":[]},{"mutualTLS":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"},"mutualTLS":{"type":"mutualTLS"}},"schemas":{"CredentialOfferRequest":{"properties":{"claims":{"description":"Claims to be included in the issued verifiable credential","properties":{},"type":"object"},"credential_configuration_ids":{"description":"Credential configuration identifiers to include in the offer.","items":{"type":"string"},"type":"array"},"grants":{"properties":{"authorization_code":{"properties":{"issuer_state":{"type":"string"}},"type":"object"},"urn:ietf:params:oauth:grant-type:pre-authorized_code":{"properties":{"pre-authorized_code":{"type":"string"},"tx_code":{"type":"object","description":"parameter to specify if tx_code will be required when using the pre-authorized_code to claim the credential offer.\n\nIf not provided, tx_code will not be required.\nIf empty object {} is set, tx_code will be required.\n","properties":{"length":{"type":"number","description":"specify the length of the tx_code.\nIn general tx_code will be sent separately of the credential offer and will require manual input, so a large value is not advised.\n"}}}},"type":"object"}},"type":"object"},"user_id":{"description":"user_id sent to the external resource server via resource hook","type":"string"}},"type":"object","required":["credential_configuration_ids","grants"]},"CredentialOfferResponse":{"properties":{"credential_offer_uri":{"type":"string","description":"credential offer URI\n"},"tx_code":{"type":"string","description":"randomly generated code that will be required when claiming the credential offer\n"}},"type":"object"},"InvalidCredentialOfferPayload":{"properties":{"error":{"description":"Unique error identifier","enum":["invalid_create_credential_offer_payload"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"]},"InvalidCredentialOfferClaims":{"properties":{"error":{"description":"Unique error identifier","enum":["invalid_create_credential_offer_claims"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"]}}},"paths":{"/issuer/offers":{"post":{"summary":"Create credential offer","description":"Creates a credential offer. The credential offer object can be retrieved via the `uri` in the response.\n\n`claims` will be validated against the registered credentialTemplate.schema\n\nAn `authorization_code` or `urn:ietf:params:oauth:grant-type:authorized_code` grant MUST be provided. However, `issuer_state` and `pre-authorized_code` are optional. If not provided, Wallet will generate random values for them.\n\n`user_id` can only be used if Resource Hook is configured.\n`user_id` can only be used with Pre-authorized Code Grant.\n`user_id` will be sent to the external resource server via the resource hook.\n\nOne of `claims` OR `user_id` MUST be provided.\n\nCredential offers expire. Expiration is controlled by runtime configuration - `issuer.issuance_policy.credential_offer_expiry`.\n\n## Supported Standards\n\n- [OpenID for Verifiable Credential Issuance 1.0 - Credential Offer Endpoint](https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-credential-offer-endpoint)\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialOfferRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialOfferResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidCredentialOfferPayload"},{"$ref":"#/components/schemas/InvalidCredentialOfferClaims"}]}}},"description":""}},"tags":["Credential Offers"]}}}}
```

## Get credential offer by ID

> Get credential offer by ID. The credential offer object contains necessary information for the wallet to proceed with credential issuance.\
> \
> \`id\` path parameter refers to the \`issuer\_state\` or \`pre-authorized\_code\` of the credential offer.\
> \
> Expired credential offers cannot be retrieved by using this endpoint.<br>

```json
{"openapi":"3.1.0","info":{"title":"SVX Wallet API","version":"4.0.1"},"servers":[{"url":"https://zyfla-wallet-sandbox.meeco.cloud","description":"SVX Wallet deployment (relative)"}],"security":[],"paths":{"/issuer/offers/{id}":{"get":{"summary":"Get credential offer by ID","description":"Get credential offer by ID. The credential offer object contains necessary information for the wallet to proceed with credential issuance.\n\n`id` path parameter refers to the `issuer_state` or `pre-authorized_code` of the credential offer.\n\nExpired credential offers cannot be retrieved by using this endpoint.\n","parameters":[{"description":"ID of the credential offer to retrieve","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialOfferDto"}}},"description":"OK"}},"tags":["Credential Offers"]}}},"components":{"schemas":{"CredentialOfferDto":{"properties":{"credential_issuer":{"type":"string"},"credential_configuration_ids":{"description":"Credential configuration identifiers included in the offer.","items":{"type":"string"},"type":"array"},"grants":{"$ref":"#/components/schemas/GrantDto"}},"type":"object"},"GrantDto":{"properties":{"authorization_code":{"properties":{"issuer_state":{"type":"string"}},"type":"object"},"urn:ietf:params:oauth:grant-type:pre-authorized_code":{"properties":{"pre-authorized_code":{"type":"string"},"tx_code":{"type":"object","properties":{"input_mode":{"type":"string","enum":["numeric","text"]},"length":{"type":"number"},"description":{"type":"string"}}}},"type":"object"}},"type":"object"}}}}
```

## Delete credential offer by ID

> Delete credential offer by ID. Deleted credential offers can no longer be retrieved or used for credential issuance. Ensure to review the implications before deleting a credential offer.\
> \
> \`id\` path parameter refers to the \`issuer\_state\` or \`pre-authorized\_code\` of the credential offer.\
> \
> Expired credential offers can be deleted by using this endpoint.<br>

```json
{"openapi":"3.1.0","info":{"title":"SVX Wallet API","version":"4.0.1"},"servers":[{"url":"https://zyfla-wallet-sandbox.meeco.cloud","description":"SVX Wallet deployment (relative)"}],"security":[{},{"bearerAuth":[]},{"mutualTLS":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"},"mutualTLS":{"type":"mutualTLS"}}},"paths":{"/issuer/offers/{id}":{"delete":{"summary":"Delete credential offer by ID","description":"Delete credential offer by ID. Deleted credential offers can no longer be retrieved or used for credential issuance. Ensure to review the implications before deleting a credential offer.\n\n`id` path parameter refers to the `issuer_state` or `pre-authorized_code` of the credential offer.\n\nExpired credential offers can be deleted by using this endpoint.\n","parameters":[{"description":"ID of the credential offer to delete","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Credential offer deleted"}},"tags":["Credential Offers"]}}}}
```
