wc/v3/wallet namespace. This allows developers to interact with the wallet system programmatically from external applications.
Authentication
TeraWallet uses standard WooCommerce REST API authentication. You must provide a Consumer Key and Consumer Secret with the appropriate permissions.Endpoints
Get User Balance
Retrieve the current wallet balance for a specific user.- URL:
GET /wp-json/wc/v3/wallet/balance - Parameters:
email(string): The email address of the user.
- Example Request:
GET https://example.com/wp-json/wc/v3/wallet/balance?email=customer@example.com - Response:
Get Transaction History
Retrieve a list of ledger entries for a specific user.- URL:
GET /wp-json/wc/v3/wallet - Parameters:
email(string): The email address of the user.
- Example Request:
GET https://example.com/wp-json/wc/v3/wallet?email=customer@example.com - Response:
Create Manual Transaction (Admin Only)
Manually credit or debit a user’s wallet balance.- URL:
POST /wp-json/wc/v3/wallet - Request Body:
email(string): The recipient’s email.type(string):creditordebit.amount(float): The amount to adjust.details(string): A description for the ledger entry.
- Example Request:
All API responses are returned in JSON format. Ensure your request headers include
Content-Type: application/json.