Retrospective issuance of digital card using credential feeder

I am using the Credential Feeder service for retrospective issuance of digital cards. The transaction ID is being generated as a UUID (for example, 9e76a945-0bc8-4cbd-b24b-4a96b07d21ac). However, the Resident Service allows card downloads only by validating an ID in the format <registration-id>-PDF.

As a result, even though the digital card is successfully issued, I am unable to download it through the Resident Service because the generated transaction ID does not match the expected format. This is with reference to the older ticket-

Hi malay.pandey

Thank you for reaching out to us, we will look in to this issue and get back to you shortly.

Regards,
Mrudula
on behalf of Team MOSIP

Hi,

Could you please share which credential partner you used while running the Credential Feeder?

The -PDF transaction ID format is typically generated for the Digital Card partner. To better understand the issue, please provide:

  • The credential partner ID/configuration used by the Credential Feeder.

  • MOSIP version.

  • Resident Service version.

  • Digital Card Service version.

  • Other deployed module versions.

Also, please note that the digital card download functionality in Resident Service depends on compatible versions of Resident Service, Digital Card Service, and other supporting modules.

We recommend using Resident Service v0.9.1 along with its compatible module versions as documented here:

Once you share the partner details and module versions, we can further investigate whether the issue is related to the Credential Feeder configuration, partner setup, or module compatibility.

Regards,
Kamesh
on behalf of Team MOSIP

Hi @Kamesh thanks for the reply. I am using the ‘mpartner-default-digitalcard’ partner , on issuing the credentials for the partner in the credential-transaction table the transaction id is not generated like -PDF format, due to which in the resident service I am unable to download the digital card.

  • Mosip version used is v1.2.0.1
    -Digital card service v1.3.0

Hi @malay.pandey,

Thanks for sharing the partner and version details. After looking into this, the behaviour is expected for the Credential Feeder as it stands — and it’s not something the partner configuration can fix.

The <registration-id>-PDF request ID isn’t produced by the partner; it comes from the API path the request takes. When Resident Service requests a digital card, it calls the credential request generator’s v2 endpoint (POST /v2/requestgenerator/{rid}), passing rid = <registration-id>-PDF, which is stored verbatim. The Credential Feeder, however, calls the v1 path with no request ID, so the generator falls back to UUID.randomUUID() (Utilities.generateId()). This happens regardless of whether you point the feeder at mpartner-default-digitalcard — so the UUID you’re seeing in credential_transaction is by design in this job.

Since the Credential Feeder job is not carried forward in the latest release, here is a self-contained code fix you can apply to your build of id-repository-credentials-feeder (no changes needed in id-repository-core). It makes the feeder pass requestId = <registration-id>-PDF for the digital-card partner, which routes that credential through the v2/RID path and stores the deterministic request ID Resident Service expects.

CredentialsFeedingWriter.java

Add a property for the digital-card partner:

// the partner whose credential Resident Service downloads using <registrationId>-PDF
@Value("${mosip.credential.feeder.digital-card-partner-id:mpartner-default-digitalcard}")
private String digitalCardPartnerId;

Keep the Uin entity so regId is available:

@Override
public void write(List<? extends Uin> requestIdEntities) throws Exception {
    requestIdEntities.forEach(this::issueCredential);
}

private void issueCredential(Uin entity) {
    String uin = decryptUin(entity);
    issueUinCredential(uin, entity.getRegId());
    issueVidCredential(uin);
    publishAuthLock(uin);
}

Issue per-partner, using the deterministic request ID only for the digital-card partner:

private void issueUinCredential(String uin, String regId) {
    String digitalCardRequestId = regId + "-PDF";
    for (String partnerId : onlineVerificationPartnerIds) {
        // Resident Service downloads only the digital-card partner credential, looking it
        // up by requestId = <registrationId>-PDF. Passing that requestId routes this partner
        // through the v2 (RID) credential path, which stores it verbatim instead of a UUID.
        // Other partners keep the existing behaviour (null requestId -> v1 -> UUID).
        String requestId = digitalCardPartnerId.equals(partnerId) ? digitalCardRequestId : null;
        credentialServiceManager.sendUinEventsToCredService(uin, null, false, null, null,
                Arrays.asList(partnerId), uinHashSaltRepo::retrieveSaltById,
                credentialStatusManager::credentialRequestResponseConsumer, requestId);
    }
}

No new imports are required (Arrays is already imported), and this replaces the existing single-argument issueUinCredential(String).

A few things to keep in mind:

  • This assumes regId (the registration id on the UIN record) is the identifier Resident Service uses to build <rid>-PDF. If your setup uses a different value, adjust accordingly.
  • Ensure the feeder’s configured credential type/template and the digital-card partner subscription match what the Digital Card service expects — this change makes the record discoverable by request ID, but the credential itself must still be the digital-card type to render on download.
  • The fix only applies to records issued after the patch. For identities already issued with UUID request IDs, you’ll need to re-run the feeder for those records (or update the existing request_id values to <regId>-PDF) so they become downloadable.

Please do also confirm you’re on Resident Service v0.9.1 with its compatible module versions, as the download flow depends on it.

Hope this helps — let us know how it goes.

Regards, Kamesh on behalf of Team MOSIP