CredentialCreate Transaction

A CredentialCreate transaction creates a credential in the ledger. The issuer of the credential uses this transaction to provisionally issue a credential. The credential is not valid until the subject of the credential accepts it with a CredentialAccept transaction.

Example CredentialCreate JSON

{
    "TransactionType" : "CredentialCreate",
    "Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
    "Subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
    "CredentialType": "6D795F63726564656E7469616C",
    "Fee": "10",
    "Flags": 0,
    "Sequence": 234200
}

CredentialCreate Fields

In addition to the common fields, CredentialCreate transactions use the following fields:

FieldJSON TypeInternal TypeRequired?Description
SubjectString - AddressAccountIDYesThe subject of the credential.
CredentialTypeString - HexadecimalBlobYesArbitrary data defining the type of credential this entry represents. The minimum length is 1 byte and the maximum length is 64 bytes.
ExpirationNumberUInt32NoTime after which this credential should be considered expired, in seconds since the Ripple Epoch.
URIStringBlobNoArbitrary additional data about the credential, such as the URL where users can look up an associated Verifiable Credential document. If present, the minimum length is 1 byte and the maximum is 256 bytes.

The Account field (the sender) of the transaction is the issuer of the credential. It is possible for the issuer and the subject to be the same account.

Error Cases

Besides errors that can occur for all transactions, CredentialCreate transactions can result in the following transaction result codes:

Error CodeDescription
tecDUPLICATEA credential with the same subject, issuer, and credential type already exists in the ledger.
tecEXPIREDThe credential's expiration time is in the past.
tecNO_TARGETThe account specified in the Subject field is not a funded account in the ledger.
temDISABLEDThe related amendment is not enabled.
temINVALID_ACCOUNT_IDThe provided Subject field is invalid. For example, it contains ACCOUNT_ZERO.