Stay organized with collections Save and categorize content based on your preferences.

Create and resolve complaints

This page describes how you can use the issuer switch API to create or resolve a complaint in the Unified Real-time Clearing and Settlement (URCS) system of NPCI. This page assumes that you are familiar with the Unified Dispute and Issue Resolution (UDIR) specification defined by the NPCI.

When you create a complaint, you specify a reason for the complaint. For example, some reasons for creating a complaint could be:

  • Goods or services are not provided for a specified payment.
  • Payment isn't reversed when good or services are cancelled or returned.
  • Payment isn't credited to the beneficiary's account when a transaction is completed.
  • Payement isn't credited back to the payer's account when a transaction is declined.

Each of the reasons specified when creating a complaint maps to a specific reason code in the Unified Dispute and Issue Resolution (UDIR) specification defined by the NPCI.

When you create a complaint, you must also specify if an adjustment is required or not.

When a complaint is processed and the action required is determined, you can use the issuer switch API to resolve the complaint. While resolving a complaint, specify the adjustment required and the reason code for the resolution of the complaint. The adjustment required as well as the reason for resolving the complaint map to specific adjustment flags and reason codes in the UDIR specification.

Create a complaint

To create a complaint using the issuer switch API, use the CreateComplaint method [REST, gRPC]. In the request body, specify the Complaint object. This object requires you to specify the RaiseComplaintAdjustment object and the CaseDetails object, which contain the specific values that you want to associate with the complaint.

The following curl command creates a complaint for an original transaction with the specified Retrieval Reference Number (RRN) and transaction ID. The reason for the complaint is specified in the adjustment code and the adjustment flag is set to RAISE to indicate that an adjustment is required. The transaction amount and currency are also provided. In this example, the complaint is created by the remitter bank, as indicated by the transaction subtype.

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json; charset=utf-8" -d '
{
  "parent": "projects/PROJECT_ID",
  "complaint": {
    "raiseComplaintAdjustment": {
      "adjustmentFlag": "RAISE",
      "adjustmentCode": "GOODS_SERVICES_NOT_PROVIDED"
    },
    "details": {
      "originalTransaction": {
        "transactionId": "GOO4a69d250abe6433899c2f5a081000033882",
        "retrievalReferenceNumber": "013100747891"
      },
      "transactionSubType": "TRANSACTION_SUB_TYPE_REMITTER",
      "amount": {
        "currencyCode": "INR",
        "units": "99",
        "nanos": 990000000
      },
      "originalSettlementResponseCode": "RB",
      "currentCycle": true
    }
  }
}
    ' "https://ISSUER_SWITCH_API_ENDPOINT/v1/projects/PROJECT_ID/complaints"

In this example:

  • PROJECT_ID is the ID of your Google Cloud project.
  • $TOKEN is your OAuth 2.0 access token.
  • ISSUER_SWITCH_API_ENDPOINT is your issuer switch's API endpoint. For example, api.129a0b1a-bb73-4906-a5b7-a6e0bfe7860e.issuerswitch.goog.

Replace these with values specific to your environment.

When you run this command, you see a response similar to the following:

{
  "name": "projects/PROJECT_ID/operations/Q09NUExBSU5UIyNvcmlnUlJOJCRUUkFOU0FDVElPTl9TVUJfVFlQRV9SRU1JVFRFUg==",
  "metadata": null,
  "done": false
}

Resolve a complaint

To resolve a complaint using the issuer switch API, use the ResolveComplaint method [REST, gRPC]. In the request body, specify the Complaint object. This object allows you to specify the ResolveComplaintAdjustment object and the CaseDetails object, which contain the specific values that you want to associate with the complaint resolution.

The following curl command resolves a complaint with the specified complaint ID. The details provided inlcude the Retrieval Reference Number (RRN) and transaction ID of the original transaction. The reason for resolving the complaint is specified in the adjustment code and the adjustment flag indicates the adjustment made. The transaction amount and currency are also provided. In this example, the complaint resolution is accepted by the beneficiary bank, as indicated by the transaction subtype.

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json; charset=utf-8" -d '
{
  "complaint": {
    "name": "projects/PROJECT_ID/complaints/COMPLAINT_ID",
    "details": {
      "originalTransaction": {
        "transactionId": "GOO4a69d250abe6433899c2f5a081000033882",
        "retrievalReferenceNumber": "013100747891"
      },
      "transactionSubType": "TRANSACTION_SUB_TYPE_BENEFICIARY",
      "amount": {
        "currencyCode": "INR",
        "units": "99",
        "nanos": 990000000
      },
      "originalSettlementResponseCode": "RB",
      "currentCycle": true
    },
    "resolveComplaintAdjustment": {
      "adjustmentFlag": "REFUND_REVERSAL_CONFIRMATION",
      "adjustmentCode": "RRC_CUSTOMER_ACCOUNT_CREDITED"
    }
  }
}
    ' "https://ISSUER_SWITCH_API_ENDPOINT/v1/projects/PROJECT_ID/complaints/COMPLAINT_ID:resolve"

In this example:

  • PROJECT_ID is the ID of your Google Cloud project.
  • COMPLAINT_ID is the unique identifier of the complaint that you want to resolve.
  • $TOKEN is your OAuth 2.0 access token.
  • ISSUER_SWITCH_API_ENDPOINT is your issuer switch's API endpoint. For example, api.129a0b1a-bb73-4906-a5b7-a6e0bfe7860e.issuerswitch.goog.

Replace these with values specific to your environment.

When you run this command, you see a response similar to the following:

{
  "name": "projects/PROJECT_ID/operations/Q09NUExBSU5UIyNvcmlnUlJOJCRUUkFOU0FDVElPTl9TVUJfVFlQRV9SRU1JVFRFUg==",
  "metadata": null,
  "done": false
}