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

# Debit Customer

This endpoint will be used by the providers for loan collection when the loan repayment is due.

Currently, there are two implementations in the debit customer endpoint. The same request will be used for both, but the response differs depending on which implementation is triggered. They are:

* Debit Customer from Card: The service will use the customer’s provided payment debit card to trigger a payment request to IPG with the specified amount.
* Debit Customer from Bank Account:  The service will use the customer’s bank account details to send a payment request to the specified bank. (NOTE: this will ONLY happen for banks that have provided their Direct-to-Account Debit APIs)

# 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/api/v1/loans/{loanId}/debit": {
      "post": {
        "summary": "Debit Customer",
        "description": "This endpoint will be used by the providers for loan collection when the loan repayment is due.",
        "operationId": "debit-customer",
        "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"
            }
          },
          {
            "name": "loanId",
            "in": "path",
            "description": "The loan id of the loan for which this debit is for. Max length: 50",
            "schema": {
              "type": "string",
              "default": "OFFER1598612621100"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customerId",
                  "loanId",
                  "amount",
                  "providerCode",
                  "transactionId"
                ],
                "properties": {
                  "customerId": {
                    "type": "string",
                    "description": "The Email or Mobile Number of the User. Max length: 50",
                    "default": "2348123456789"
                  },
                  "loanId": {
                    "type": "string",
                    "description": "The loan id of the loan for which this debit is for. Max length: 50",
                    "default": "OFFER1598612621100"
                  },
                  "amount": {
                    "type": "integer",
                    "description": "The Amount to be debited from the user’s payment card. (This is in lower denomination KOBO)",
                    "default": 5000,
                    "format": "int64"
                  },
                  "providerCode": {
                    "type": "string",
                    "description": "The provider code. Max length: 50",
                    "default": "MKT"
                  },
                  "transactionId": {
                    "type": "string",
                    "description": "The Identifier for this transaction. This will be used to requery this transaction if needs be. Max length: 15",
                    "default": "145688247534499"
                  }
                }
              }
            }
          }
        },
        "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  \"transactionId\": \"198988747587875\"\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"
                    },
                    "transactionId": {
                      "type": "string",
                      "example": "198988747587875"
                    }
                  }
                }
              }
            }
          },
          "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
}
```