19. Sale/Expense Cancellation
This service should be used to cancel a purchase transaction.
Sale/Expense Cancellation
POST
{{WalletUrl}}/api/v1/wallet/purchase/cancel
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 that defines the client application.
{
"ExternalReference": "{{externalReference}}",
"RollbackFee": true,
"RollbackCashback": true
}
Service Request
ExternalReference
string
The tracking number for the sale/expense transaction. It is the value provided by you at the time the transaction occurs.
RollbackFee
bool
Should the commissions applied (if any) be reversed as a result of the transaction?
RollbackCashback
bool
Should the cashback applied (if any) be reversed as a result of the transaction?
{
"Value": {
"Id": "5b451d65-3e18-415b-9cb0-b7999fc67a7e",
"WalletId": "0e5439b8-efa5-43d3-91e9-3cc351cc6ecc",
"TransactionType": "Cancel",
"Amount": 1.00,
"GiftAmount": null,
"Description": "Cancel of Purchase Eddie Leuschke",
"ExternalReference": "Eddie Leuschke",
"CreatedAt": "2025-05-01T18:14:29.6583832Z",
"UpdatedAt": null,
"BalanceAfterTransaction": 30.00,
"SourceWalletId": null,
"DestinationWalletId": null,
"GiftBalanceId": null,
"MainTransactionId": "13d23fb6-effa-4776-8385-c345d24b737e",
"UniqueCode": "dcfe720f-a77a-46f0-b6f2-0deda66425ec",
"UsedGiftBalances": null,
"CashbackAmount": 0
},
"Errors": [],
"IsSuccess": true,
"IsFailure": false
}
Service Response
IsFailure
bool
It returns true if the service call failed, otherwise false.
IsSuccess
bool
It returns true if the service call was successful, otherwise false.
Errors
Array
It contains the error messages encountered during the transaction.
Value
Array<Items>
It is the list of data returned in the case of a successful response.
Service Response (Value)
Id
Guid
It is the unique identifier generated by the system for the transaction.
WalletId
String
It is the ID of the wallet to which the transaction belongs.
TransactionType
String
It specifies the type of the transaction (e.g., payment, refund, etc.).
Amount
Decimal
The total amount of the transaction.
GiftAmount
Decimal
The amount used from the gift balance.
Description
String
The description or note related to the transaction.
ExternalReference
String
The reference code from external sources.
CreatedAt
DateTime
The date and time when the transaction was created.
UpdatedAt
DateTime
The date and time when the transaction was last updated.
BalanceAfterTransaction
Decimal
The remaining wallet balance after the transaction.
SourceWalletId
String
The ID of the wallet that initiated the transaction (if applicable).
DestinationWalletId
String
The ID of the wallet to which the transaction was sent (if applicable).
GiftBalanceId
Guid
The ID of the used gift balance record.
MainTransactionId
Guid
If this transaction is linked to another parent transaction, it is the ID of the parent transaction.
UniqueCode
String
It is the unique code that defines the transaction.
UsedGiftBalances
List
It is the list of used gift balances.
CashbackAmount
Decimal
The cashback (refund) amount earned related to this transaction.
Last updated