Hi,
Thanks for using our plugin.
In reference to your query, please note that our plugin uses REST API and you can perform the following actions using the API:
Retrieve particular user wallet transactions
Retrieves all transactions related to the wallet of the user. The HTTP request is:
GET {home_url}/wp-json/wsfw-route/v1/wallet/transactions/<id>?consumer_key=XXXX&consumer_secret=XXXX where <id> is an user id of user.
Example : https://example.com/wp-json/wsfw-route/v1/wallet/transactions/1?consumer_key=XXXX&consumer_secret=XXXX
JSON response example:
[
{
"Id": "90",
"user_id": "1",
"amount": "22",
"transaction_type": "Debited by admin",
"payment_method": "Manually By Admin",
"transaction_id": "",
"note": "",
"date": "2021-04-22 20:16:23"
},
{
"Id": "94",
"user_id": "1",
"amount": "12",
"transaction_type": "Wallet credited through purchase #159",
"payment_method": "bacs",
"transaction_id": "159",
"note": "",
"date": "2021-04-22 21:35:47"
}
]
Update wallet of user
This allows you to update the (credit/debit) wallet of the particular user. The HTTP request is:
PUT {home_url}/wp-json/wsfw-route/v1/wallet/<id> where <id> is an user id of user.
Required Headers
Content-Type: application/json
Example: https://example.com/wp-json/wsfw-route/v1/wallet/1
curl -X PUT -d 'amount=29&action=credit' 'https://woocommerce.local/wp-json/wsfw-route/v1/wallet/1'
–header ‘Content-Type: application/json’
Please also see the attached image for the required parameters.
Thanks,