Topup Money (Add Money)
POST : http://<base_url>/digipay/v3/transaction/agent_calculate_charges
This API is used to add money from your card/bank to wallet
BODY PARAMS:-
Parameter | Type | Description | Value |
---|---|---|---|
wallet_id | String | unique wallet_id assigned to the user to topup his/her wallet | 116a51aa2b7d459a8b7e3db7dcf5e70a |
charges_info | Array | it combines total_charges amount with the arrayList of charges | b9a4cbeeedd340509cb1ac628cae2973 |
payment_response | Json | if payment gateway is configured it gives payment gateway response | |
card_info | Array | it containes credit/debit card information | |
debit_user_info | Json | it combines debit user currency_id,wallet_id,user_id of company admin ,user_type of company admin, payment_type of company admin and username | |
credit_user_info | Json | it combines credit user currency_id,wallet_id,user_id of company user ,user_type of company user, payment_type of company user and username | |
txn_amount | Double | txn_amount used to perform wallet_topup of user | 100 |
txn_code | String | unique txn_code for which wallet_topup has been done | CIB |
payment_mode | Int | which mode of payment used to perform wallet_topup | |
txn_device_info | Array | it combines device_id | |
note | string | a small note written at the time of wallet topup | testing |
meta_data | Array | it combines wallet_topup_request_id |
HEADERS:-
Parameter | Type | Description | Value |
---|---|---|---|
Authorization | String | It is a combination of type and token to authenticate user for the given token | Token duik7309njdlkhdauhknksadhjkas986876sd873j |
CompanyID | String | Company_id is a unique primary id, that is represent company detail | 76bc712200ca444fa334f9e55e5fd7a8 |
Request Body:-
Request Example
curl --request POST \
--url http://192.168.1.102:8014/digipay/v3/transaction/wallet_topup \
--header 'Authorization: Token duik7309njdlkhdauhknksadhjkas986876sd873j' \
--header 'CompanyID: 7753ad6bd8cf48f5b1312fd21eb36588' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"wallet_id": "116a51aa2b7d459a8b7e3db7dcf5e70a",
"txn_amount": 100,
"txn_code": "CIB",
"payment_mode": 2,
"note": "testing"
}
'
Response:-
Response 200(OK)
{
"success": 1,
"error": [],
"data": {
"message": "Money successfully added to your wallet.",
"transaction": {
"txn_id": "bcdc063cf4844eea82e1c0e68a2360e8",
"txn_number": "bcdc063cf4844eea82e1c0e68a2360e8",
"txn_status": 1
}
}
}
Response 400(BAD REQUEST)
{
"success": 0,
"error"": [1],
"data": {
"message": "BAD_REQUEST",
}
}
RESPONSES :-
Status Code | Description |
---|---|
200 | OK |
400 | BAD REQUEST |
404 | NOT FOUND |
500 | INTERNAL SERVER ERROR |