---
updatedAt: 2025-11-11T00:10:05.000Z
agentTools:
  projectIndex: https://docs.interswitchgroup.com/v1.1/llms.txt
---

# Do Refund

This endpoint is provisioned for providers who need to refund a customer that has been debited in excess during loan repayment / direct debit.\
NOTE: Only CLOSED loans are eligible for refunds (i.e. the customer’s loan has been fully repaid).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "ipg",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://sandbox.interswitchng.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/lending-service/v1/payments/refund": {
      "post": {
        "summary": "Do Refund",
        "description": "",
        "operationId": "do-refund",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customerId",
                  "amount",
                  "transactionId",
                  "loanId",
                  "providerCode"
                ],
                "properties": {
                  "customerId": {
                    "type": "string",
                    "description": "The Email or Mobile Number of the customer to be refunded. Max length: 50",
                    "default": "2348123456789"
                  },
                  "amount": {
                    "type": "integer",
                    "description": "The Amount to be refunded to the customer’s account (in kobo). Max length: 50",
                    "default": 1250000,
                    "format": "int64"
                  },
                  "transactionId": {
                    "type": "string",
                    "description": "The unique transaction identifier. This is the reference that will be used to re-query for the transaction status in case of an unresolved state. Max length: 50",
                    "default": "09389877487857"
                  },
                  "loanId": {
                    "type": "string",
                    "description": "The loanId of the customer’s loan. Max length: 20",
                    "default": "LOAN123"
                  },
                  "providerCode": {
                    "type": "string",
                    "description": "The Code of the provider from which this request is coming from. Max length: 50",
                    "default": "PER"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"responseCode\" : \"00\",\n  \"responseMessage\" : \"Transaction Successful\",\n  \"transactionRef\" : \"UBN|WEB|ILS|20170501091282|01238797\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "responseCode": {
                      "type": "string",
                      "example": "00"
                    },
                    "responseMessage": {
                      "type": "string",
                      "example": "Transaction Successful"
                    },
                    "transactionRef": {
                      "type": "string",
                      "example": "UBN|WEB|ILS|20170501091282|01238797"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": []
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```