17. Sale/Expense (Wallet)
You can manage the sales/expense transactions made with the wallet through this service.
Sale/Expense with Wallet 'Id'
POST
{{WalletUrl}}/api/v1/Wallet/purchase
The parameters that need to be sent to the service are as follows:
apikeypublic
string
Yes
The general key used for API access.
apiclientpublic
string
Yes
The general key representing the API client ID.
{
"Id": "{{walletId}}",
"Amount": 100,
"Description": "string",
"ExternalReference": "{{$randomFullName}}",
"UseGiftBalances": true, // If there is a defined gift balance, it will be spent first.
"CashbackApply": true,
"CashbackType": "Amount",
"CashbackValue": 100
}
Service Request
Id
Guid
The identity information of the wallet where the sale/expense transaction took place.
Amount
decimal
The transaction amount.
Description
string
The description of the transaction.
ExternalReference
string
The transaction tracking number.
UseGiftBalance
bool
If there is a gift balance assigned to the wallet where the transaction occurred, should this balance be used?
CashbackApply
bool
Should cashback be applied after the transaction?
CashbackType
string
Cashback type See: Cashback Types
CashbackValue
decimal
The cashback value to be given.
{
"Value": {
"Id": "fa78cd93-81cf-43c8-b28f-638c0fd1120b",
"WalletId": "30bac1c0-ad6b-4c50-a52e-1b34f9b487a7",
"TransactionType": "Purchase",
"Amount": 100,
"GiftAmount": null,
"Description": "string",
"ExternalReference": "Johnathan O'Connell I",
"CreatedAt": "2025-04-28T07:52:53.8666424Z",
"UpdatedAt": null,
"BalanceAfterTransaction": 975.00,
"SourceWalletId": null,
"DestinationWalletId": null,
"GiftBalanceId": null,
"MainTransactionId": null,
"UniqueCode": "1c956e17-5745-4306-864f-305f44fedd73",
"UsedGiftBalances": null,
"CashbackAmount": 100
},
"Errors": [],
"IsSuccess": true,
"IsFailure": false
}
Service Response
IsFailure
bool
It returns true if the transaction failed, otherwise false.
IsSuccess
bool
It returns true if the transaction was successful, otherwise false.
Errors
Array
A list of error messages.
Value
Array<Items>
The data set returned as a result of the transaction.
Service Response (Value)
Id
Guid
It is the unique identifier generated by the system for the transaction. It is in UUID format.
WalletId
String
It is the system identifier of the wallet where the transaction took place. It indicates which wallet the transaction is associated with.
TransactionType
String
It specifies the type of the transaction. For example, it defines transactions such as "Payment," "Refund," or "Transfer."
Amount
Decimal
It is the amount of the transaction, expressed in the currency used.
GiftAmount
Decimal
It is the amount of gift balance used in the transaction. Unlike the regular balance, it represents promotional usage.
Description
String
It is the explanatory information related to the transaction. It can be written by the user or the system.
ExternalReference
String
It is the reference number provided by an external system for the transaction. It is typically used for integration systems.
CreatedAt
DateTime
It is the date and time when the transaction was created. It is recorded according to UTC or the system time.
UpdatedAt
DateTime
It is the date and time when the transaction was last updated. It is updated whenever a change occurs.
BalanceAfterTransaction
Decimal
It is the remaining balance in the wallet after the transaction. It represents the value after account updates.
SourceWalletId
String
It is the ID of the wallet on the sender's side of the transaction. It specifies the wallet from which the money is being withdrawn.
DestinationWalletId
String
It is the ID of the wallet on the recipient's side of the transaction. It specifies the wallet into which the money is being deposited.
GiftBalanceId
Guid
It is the unique identifier for the used gift balance. It is for tracking purposes.
MainTransactionId
Guid
If this transaction is a continuation or part of another transaction, it is the ID of the parent transaction.
UniqueCode
String
It is the unique code generated by the system for the transaction. It guarantees its uniqueness.
UsedGiftBalances
List
It is the list of gift balances used in the transaction. Multiple balances can be used.
CashbackAmount
Decimal
It is the cashback amount earned as a result of the transaction. It is sourced from a campaign or promotion.
Last updated