Wallet
Get Wallet Histories
The "Get Wallet History" API endpoint provides users with the ability to retrieve the transaction history of their wallet. Wallets are commonly used to store and manage funds or credits within a platform, and this API enables users to access a detailed record of their wallet-related activities.
Endpoint:
api/customer/wallet
Http Method:
GET
Success Response:
Key | Type | Description |
---|---|---|
total | Integer | The total count of items available. |
wallets | Array | An array containing wallet objects. For more details, refer to the Wallet Resource. |
{
"code": 200,
"data": {
"total": 1,
"wallets": [
{
"id": 2,
"affiliate_id": 32,
"affiliate": {
"id": 32,
"name": "Doc",
"email": "doc@supercommerce.io",
"phone": "01000000000",
//...
},
"order_id": null,
"order": null,
"amount": "10.00",
//...
}
]
}
}
Check the following section to learn more about the Get Wallet Histories API Reference
Send Wallet Request
The "Send Wallet Request" API endpoint allows users to create a new wallet request. Wallet requests are used to request funds or credits from a platform's wallet. This API provides access to crucial wallet request details, aiding users in monitoring their wallet-related activities.
Endpoint:
api/customer/wallet
Http Method:
POST
Request Body:
amount
(required): The amount of the wallet request.payment_method
(required): The ID of payment method of the wallet request.phone_number
(required if payment method1
COD): The phone number of the wallet request.
Success Response:
Key | Type | Description |
---|---|---|
statistics | object | The total count of items available. For more details, refer to the Wallet Statistics Resource. |
wallet | object | An object from wallet request created. For more details, refer to the Wallet Resource. |
{
"code": 200,
"message": "Success",
"data": {
"wallet": {
"id": 2,
"affiliate_id": 32,
"affiliate": {
"id": 32,
"name": "Doc",
"email": "doc@supercommerce.io",
"phone": "01000000000",
//...
},
"order_id": null,
"order": null,
"amount": "10.00",
//...
},
"statistics": {
"order_statistics": {
"total_count": 1,
"total_commission": 10100,
"completed_count": 1,
"completed_commission": 10100,
"pending_count": 0,
"pending_commission": 0,
"cancelled_count": 0,
"cancelled_commission": 0
},
"balance_statistics": {
"pending_balance": 0,
"admin_balance": 0,
"available_from_orders": 10100,
"total_balance": 10100,
"total_currently": 10090
},
"withdraw_statistics": {
"total_withdraw": 10,
"approved_withdraw": 0,
"pending_withdraw": 10
}
}
},
"meta": []
}
Check the following section to learn more about the Send Wallet Request API Reference
Get Wallet Statistics
The "Get Wallet Statistics" API endpoint provides users with the ability to retrieve statistics related to their wallet.
Endpoint:
api/customer/wallet/statistics
Http Method:
GET
Success Response:
You can check more details about Wallet Statistics Resource.
{
"code": 200,
"message": "Success",
"data": {
"order_statistics": {
"total_count": 1,
"total_commission": 10100,
"completed_count": 1,
"completed_commission": 10100,
"pending_count": 0,
"pending_commission": 0,
"cancelled_count": 0,
"cancelled_commission": 0
},
"balance_statistics": {
"pending_balance": 0,
"admin_balance": 0,
"available_from_orders": 10100,
"total_balance": 10100,
"total_currently": 10090
},
"withdraw_statistics": {
"total_withdraw": 10,
"approved_withdraw": 0,
"pending_withdraw": 10
}
},
"meta": []
}
Check the following section to learn more about the Get Wallet Statistics API Reference