Prepaid Coupons(Epin)
Manage Coupons
Active Coupons
GET ‎https://<domain>/<api prefix>/<version>/user/get/active-epin/
This API endpoint will return a list of active coupons.
Query Parameters
wallet
string
eg: wallet1, wallet2, ....
code
string
coupon code
Headers
apikey*
string
Apikey
Authorization*
string
Bearer access token
​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {
"results": [
{
"id": <coupon_id>,
"pin": "<coupon_pin>",
"charge": "<coupon_charge>",
"balance": "<balance>",
"reusable": <reusable_status>,
"transferable": <transferable_status>,
"wallet_type": "<wallet_type>",
"currecy_data": {
"decimals": <decimals>,
"symbol_placement": "<symbol_placement>",
"symbol": "<currency_symbol>",
"rate": <currency_multiple_rate>
},
"currency_code": "<currency_code>"
},
...
],
"count": <list_count>,
"previous": <previous_page_url>,
"next": <next_page_url>
}
}Sample Code
Node
PHP
Transfer Coupon
POST ‎https://<domain>/<api prefix>/<version>/user/transfer/epin/
This API endpoint will transfer a coupon to a user.
Headers
apikey*
string
Apikey
Authorization*
string
Bearer access token
Request Body
user
string
Username
epin
string
Coupon id
Sample Code
Node
PHP
Error Responses
Status Code
Error Type
FIeld
Description
400
Validation Error
user
User is not found.
Field may not be blank.
Self transfer not allowed.
User already has the maximum number of active coupons.
400
Validation Error
epin
Coupon is not found.
Coupon is not transferable.
Invalid coupon.
Share Coupon
POST ‎https://<domain>/<api prefix>/<version>/user/share/epin/
This API endpoint will share an amount from coupon to anonymous user.
Headers
apikey*
string
apikey
Authorization*
string
Bearer access token
Request Body
email*
string
user mail address
epin*
string
coupon id
share_amount*
string
amount to share
Sample Code
Node
PHP
Error Responses
Status Code
Error Type
FIeld
Description
400
Validation Error
This field is required.
This field may not be blank.
Enter a valid email address.
400
Validation Error
epin
This field is required.
This field may not be blank.
Only numeric characters are allowed.
Coupon is not found.
Coupon is not transferable.
400
Validation Error
share_amount
This field is required.
This field may not be blank.
Only numeric characters are allowed.
Insufficient Balance.
Delete Coupon
DELETE ‎https://<domain>/<api prefix>/<version>/user/delete/epin/
This API endpoint will delete a coupon. Use the same endpoint to get refund status without status in query params.
Query Parameters
epin*
string
Coupon id
status
string
1
Headers
apikey*
string
Apikey
Authorization*
string
Bearer access token
Sample Code
Node
PHP
Error Responses
Status Code
Error Type
FIeld
Description
400
Validation Error
epin
This field is required.
This field may not be blank.
Only numeric characters are allowed.
Coupon is not found.
Generate Coupon
Get Wallet List
GET ‎https://<domain>/<api prefix>/<version>/user/generate/epin/
This API endpoint will return the coupon facility enabled wallet list with data.
Headers
apikey*
string
Apiekey
Authorization*
string
Bearer access token
Sample Code
Node
PHP
Error Responses
Status Code
Error Type
Description
401
Request Failed
Coupon facility is disabled, Please contact your administrator.
Create Coupon
POST ‎https://<domain>/<api prefix>/<version>/user/generate/epin/
This API endpoint will create a coupon.
Headers
apikey*
string
Apikey
Authorization*
string
Bearer access token
Request Body
wallet_type*
string
wallet key
epin_amount*
string
amount
number_of_pins*
string
number of coupons
transferable*
string
True or False
reusable*
string
True or False
token_field*
string
Mail token
token_checksum_field*
string
token checksum
form_key*
string
form post key
Sample Code
Node
PHP
Error Responses
Status Code
Error Type
FIeld
Description
400
Validation Error
wallet_type
This field is required.
This field may not be blank.
You don't have sufficient balance to continue with this operation.
400
Validation Error
epin_amount
Invalid or empty Amount.
This field is required.
This field may not be blank.
Please enter an amount between <min> and <max>.
Only integers are allowed.
Ensure this field has no more than 7 characters.
400
Validation Error
number_of_pins
This field is required.
This field may not be blank.
This operation exceeds the maximum number of active Coupons.
Invalid number of Coupon.
Only numeric characters are allowed.
400
Validation Error
transferable
This field is required.
This field may not be blank.
Select True or False
400
Validation Error
reusable
This field is required.
This field may not be blank.
Select True or False
400
Validation Error
token_checksum_field
This field is required.
This field may not be blank.
400
Validation Error
token_field
This field is required.
This field may not be blank.
Token is not matching.
400
Validation Error
form_key
You have another form running, Please reload.
401
Request Failed
Coupon facility is disabled, Please contact your administrator.
Coupon History
GET ‎https://<domain>/<api prefix>/<version>/user/epin/history/
This API endpoint will return the history of used coupons.
Query Parameters
wallet
string
wallet key, eg: wallet1, wallet2, etc
Headers
apikey*
string
Apikey
Authorization*
string
Bearere access token
Sample Code
Node
PHP
Last updated
Was this helpful?