Fetch Wallet
This API gets the consumer wallet data, this include the transactions that belong to that wallet.
Request
Endpoint
GET https://demo.rewardadz.com/public/api/v1/gateway/wallet
Headers
x-access-token:string
x-consumer-token:string
Below are the possible API responses: if wallet is not found
{
"success": false,
"ra_message": "Wallet not found",
"ra_response_data": null
}
otherwise you will get a success response that looks like this:
{
"success": true,
"ra_message": "Wallet fetched successfully",
"ra_response_data": {
"wallet": {
"_id": "65b0fa54e82e0458ee958f9e",
"consumer_id": "65b0fa53e82e0458ee958f9c",
"balance": 0,
"total_earned": 0,
"total_withdrawn": 0,
"pin": "$2b$10$4m/DBCGv936UiWO9Tduwseu/0UjzhJ.X0Wna7CgFQXT1vspUJ80Wy",
"created_at": "Wed, 24 Jan 2024 11:53:56 GMT",
"updated_at": "Thu, 25 Jan 2024 06:29:13 GMT",
"__v": 0
},
"transactions": []
}
}
The ra_response_data.wallet object contains the wallet data and the ra_response_data.transactions object contains the transactions that belong to that wallet.
before a user makes any transaction like withdrawal or transfer and so on, they must set up a pin for their wallet, this is done by calling the update/set wallet pin API.