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

# Create Voucher (E pins)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "new-value-added-services",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://qa.interswitchng.com/quicktellerservice/api/v5"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/vouchers/generateVoucher": {
      "post": {
        "summary": "Create Voucher (E pins)",
        "description": "",
        "operationId": "create-voucher-e-pin",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "TerminalID",
            "in": "header",
            "description": "your terminal ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customerId",
                  "amount",
                  "type",
                  "ExpiryDate"
                ],
                "properties": {
                  "customerId": {
                    "type": "string",
                    "description": "This is the id of the customer who is trying to create the voucher"
                  },
                  "amount": {
                    "type": "integer",
                    "description": "This is the amount of voucher that needs to be created",
                    "format": "int64"
                  },
                  "type": {
                    "type": "string",
                    "description": "This is the type of voucher been created (Gift or Recharge)"
                  },
                  "ExpiryDate": {
                    "type": "string",
                    "description": "This is the expiry date of the voucher",
                    "format": "date"
                  },
                  "CodeConfig": {
                    "type": "object",
                    "description": "An object",
                    "required": [
                      "prefix",
                      "suffix",
                      "allowedchar",
                      "pattern"
                    ],
                    "properties": {
                      "prefix": {
                        "type": "string"
                      },
                      "suffix": {
                        "type": "string"
                      },
                      "allowedchar": {
                        "type": "string"
                      },
                      "pattern": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "{\nTransactionRef: \"PBL|Web|3pbl|VOS|020523100514|Y7UYYH3QEG\",\nRechargePIN:\"1220002\"\nApprovedAmount: \"100\",\nMiscData:\"1220002\",\nAdditionalInfo:{\n1220002:\"1220002\"\n},\nResponseCode: \"90000\"\nResponseDescription: \"Success\",\nResponseCodeGrouping: \"SUCCESSFUL\",\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl https://qa.interswitchng.com/api/v5/vouchers/generateVoucher \\\n-H \"Authorization: Bearer <TOKEN>\" \\\n-H \"Content-Type: application/json\" \\\n-H \"TerminalID: <your_terminal_id>\" \\\n-D '{\n    \"customerId\": \"234131670272\",\n    \"amount\": \"100\",\n    \"type\": \"GIFT\",\n    \"expiryDate\": \"2023-06-22\"\n    \"codeConfig\": {\n    \"prefix\": \"1\",\n    \"suffix\":\"2\",\n    \"length\":5,\n    \"allowedChar\":\"12890\",\n    \"pattern\":\"\"\n    \n    }\n   \n}'\n-X POST"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```