/v1/issuer/offers
API Key
Create a credential offer
Create a new credential offer for the OpenID4VCI pre-authorized code flow.
The offer can be shared with holders via QR code or deep link, allowing them
to claim the credential using a compatible wallet app.
Parameters
| Name | Location | Type | Description |
|---|---|---|---|
X-API-Key
*
|
header | string | Issuer API key for authentication |
* Required parameter
Request Body
Parameters for creating a credential offer
schema_id
*
string
Schema UUID or slug
Example: employee-badge
subject_claims
*
object
Pre-filled claim values
Example: {"name":"New Employee","employee_id":"EMP-NEW-001"}
expires_in
integer
Expiration in seconds from now
Example: 604800
require_tx_code
boolean
Require PIN/tx_code to claim (OID4VCI 1.0)
Example: true
Response
Content-Type: application/json
success
boolean
data
object
Result of creating a credential offer
offer_id
*
string (uuid)
Unique identifier for the offer (used in URLs)
Example: 5e318536-d82a-46b2-b829-f11eda8c4da5
offer_uri
*
string (uri)
URL where the offer can be retrieved (for credential_offer_uri)
Example: https://issuer.example.com/credential_offers/550e8400-e29b-41d4-a716-446655440000
deep_link
*
string (uri)
Deep link for wallet apps (openid-credential-offer://)
Example: openid-credential-offer://?credential_offer_uri=https%3A%2F%2Fissuer.example.com%2Fcredential_offers%2F550e8400
tx_code
string
nullable
PIN/tx_code the holder must enter to claim (only if require_tx_code was true, OID4VCI 1.0)
Example: 123456
expires_at
*
string (date-time)
When the offer expires
Example: 2025-01-16T12:00:00Z
Code Examples
import os
from aho_sdk import AhoSdk
client = AhoSdk.issuer(api_key=os.environ["AHO_API_KEY"])
result = client.offers.create(
body={
"schema_id": "employee-badge",
"subject_identifier": "[email protected]",
"subject_claims": {
"name": "New Employee",
"employee_id": "EMP-NEW-001"
},
"expires_in": 604800,
"require_tx_code": True
}
)
client = AhoSdk.issuer(api_key: ENV["AHO_API_KEY"])
result = client.offers.create(
body: {
schema_id: "employee-badge",
subject_identifier: "[email protected]",
subject_claims: {
name: "New Employee",
employee_id: "EMP-NEW-001"
},
expires_in: 604800,
require_tx_code: true
}
)
import { AhoSdk } from '@aho/sdk';
const client = AhoSdk.issuer({ apiKey: process.env.AHO_API_KEY });
const result = await client.offers.create({
body: {
schemaId: "employee-badge",
subjectIdentifier: "[email protected]",
subjectClaims: {
name: "New Employee",
employeeId: "EMP-NEW-001"
},
expiresIn: 604800,
requireTxCode: true
}
});
curl -X POST 'https://api.aho.com/v1/issuer/offers' \
-H 'X-API-Key: $AHO_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"schema_id": "employee-badge",
"subject_identifier": "[email protected]",
"subject_claims": {
"name": "New Employee",
"employee_id": "EMP-NEW-001"
},
"expires_in": 604800,
"require_tx_code": true
}'
Try It
Log in to test this endpoint directly from the documentation.
Log in