WooCommerce Wallet REST API - malsubrata/woo-wallet GitHub Wiki
We are using WP REST API Authentication
For WooWallet REST API Authentication Please see https://v2.wp-api.org/guide/authentication/
-
Method:
GET -
URL Params
Replace
{id}with respective user idRequired:
id=[integer] -
Success Response:
-
Code: 200
Content:Array([0] => stdClass Object([transaction_id] => 74[user_id] => 1[date] => 2018-04-16 17:04:52[type] => credit[amount] => 3.60[balance] => 289.20[details] => Wallet credit through cashback #16-111-04[currency] => DKK[blog_id] => 1)[1] => stdClass Object([transaction_id] => 73[user_id] => 1[date] => 2018-04-16 17:04:51[type] => debit[amount] => 18.00[balance] => 285.60[details] => For order payment Subrata #16-111-04[currency] => DKK[blog_id] => 1))
-
-
Error Response:
-
Code: 401 UNAUTHORIZED
Content:stdClass Object([code] => rest_forbidden[message] => Sorry, you are not allowed to do that.[data] => stdClass Object([status] => 401))
OR
-
Code: invalid_username
Content:stdClass Object([code] => invalid_username[message] => ERROR: Invalid username. Lost your password?[data] =>)
-
Code: 401 UNAUTHORIZED
-
Method:
GET -
URL Params
Replace
{id}with respective user idRequired:
id=[integer] -
Success Response:
-
Code: 200
Content:BALANCE
-
Code: 200
-
Error Response:
-
Code: 401 UNAUTHORIZED
Content:stdClass Object([code] => rest_forbidden[message] => Sorry, you are not allowed to do that.[data] => stdClass Object([status] => 401))
OR
-
Code: invalid_username
Content:stdClass Object([code] => invalid_username[message] => ERROR: Invalid username. Lost your password?[data] =>)
-
Code: 401 UNAUTHORIZED
-
Method:
POST -
URL Params
Replace
{id}with respective user idRequired:
id=[integer] -
Data Params
type=[string]tarnsaction typedebitorcreditamount=[decimal]transaction amountdetails=[string]optional transaction description -
Success Response:
-
Code: 200
Content:TRANSACTION ID
-
Code: 200
-
Error Response:
-
Code: 401 UNAUTHORIZED
Content:stdClass Object([code] => rest_forbidden[message] => Sorry, you are not allowed to do that.[data] => stdClass Object([status] => 401))
OR
-
Code: invalid_username
Content:stdClass Object([code] => invalid_username[message] => ERROR: Invalid username. Lost your password?[data] =>)
-
Code: 401 UNAUTHORIZED