Request Endpoint: https://sandbox.interswitchng.com/api/v2/quickteller/vouchers/create
Request Body Description
Field# | Field name | Data type | Max length | Required | Description |
---|---|---|---|---|---|
1 | paymentCode | string | 5 | False | This is the payment code |
2 | CustomerId | string | MAX | True | This is the id of the customer who is trying to create the voucher |
3 | Amount | Long | True | This is the amount of voucher that needs to be created | |
4 | Type | string | 10 | True | This is the type of voucher been created; gift | recharge |
5 | ExpiryDate | datetime | True | This is the expiry date of the voucher | |
6 | StartDate | dateTime | True | This is the start date of the voucher | |
7 | Redemption.Quantity | int | False | This specifies the total number of time a user can redeem the voucher | |
8 | CodeConfig.allowedChar | string | 50 | False | This specifies the length and pattern of the voucher |
Request Header
{
"terminalId" :" 3DMO0001 ",
"Content-Type":"application/json",
"authorization":"InterswitchAuth SUtJQUYzRDNGMkQyMEY1MTM2REVGNUExMjUwMzZDN0U0QjgzMzgwQjBGMjA=",
"nonce":"a42a92fa5718bf480684cb75c3d25fb1",
"timeStamp":"1588858522",
"signature":"5+NUy30sMxQM3VzNIS/CPTkjixo=",
"signatureMethod":"SHA1"
}
Request Body
{
"customerId": "081242267646",
"amount": "5000",
"type": "recharge",
"startDate": "2021-01-22",
"expiryDate": "2023-11-29"
}
Sample Response (Success)
{
"TransactionRef": "PBL|Web|3PBL0001|VOS|261119122709|3BYAHU7EB3",
"RechargePIN": "u865tO9ycr",
"ApprovedAmount": "5000",
"MiscData": "u865tO9ycr",
"ResponseCode": "90000",
"ResponseDescription": "Success",
"ResponseCodeGrouping": "SUCCESSFUL"
}
Sample Response (Failed)
{
"errors": [
{
"code": "90009",
"message": "Transaction in Progress",
"responseCodeGrouping": "PENDING"
}
],
"error": {
"code": "90009",
"message": "Transaction in Progress",
"responseCodeGrouping": "PENDING"
}
}
Response Codes
Response Code | Response Message |
---|---|
VS005 | TYPE_CANNOT_BE_EMPTY |
VS007 | UNRECOGNISED_TYPE |
VS008 | VOUCHER_TYPE_NOT ALLOWED |
VS009 | INVALID_START_DATE |
VS010 | BAD_START_DATE_FORMAT |
VS011 | BAD_EXPIRY_DATE_FORMAT |
VS012 | GIFT_OBJECT_NOT_SPECIFIED |
VS013 | DISCOUNT_OBJECT_NOT_SPECIFIED |
VS014 | INVALID_GIFT_BALANCE |
VS015 | INVALID_LENGTH |
VS016 | INVALID_EXPIRY_DATE |
VS017 | INVALID_REDEEM_QUANTITY |
VS019 | INVALID_CODE_CONFIG_LENGTH |
VS021 | NOT_AUTHORISED_TO_REDEEM_VOUCHER |