Build a Credential Issuing Service in Javascript
This tutorial shows how to build and use a small web service that issues credentials on the XRP Ledger. It is written in JavaScript with the Express framework for Node.js. The service issues a credential to a specific account, called the subject, and can list and revoke the credentials it has issued.
- Section
- Tutorials
What you will do
You start the service, ask it for a credential, list the issued credentials, accept one as the subject and revoke one. The service offers three methods: one to request a credential, one to list all credentials issued by the issuer's address, and one to delete a credential from the ledger, which revokes it. A separate command line tool lets the subject accept a credential.
What you need
You need Node.js v18 or higher, some familiarity with modern JavaScript and some understanding of the XRP Ledger. You also need an HTTP client, a tool that sends web requests, such as Postman, RESTED or cURL. Last, you need two accounts on the Devnet, where the Credentials amendment is already enabled. One acts as the credential issuer and the other as the credential subject.
The steps in short
Start the service and type in the issuer account's seed. Request a credential by sending the subject's address, a credential type and a documents field. The type can be up to 64 characters long. You may add an expiration time and URI data of up to 256 characters, which becomes public on the ledger. The service issues the credential at once with a CredentialCreate transaction. Then run the accept tool with the subject's seed and pick the credential. It signs and submits a CredentialAccept transaction. To revoke, send a delete request with the subject and the credential type.
Good to know
A credential is valid only after its subject accepts it. The documents you send are not saved on the ledger. The sample only checks a placeholder and has no sign-in for its admin methods, so the page suggests adding both for real use. Before revoking, the service looks the credential up, so the issuer does not pay for a transaction that would fail.
Source: xrpl.org. Read 6 December 2026.
Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made