20. Sale/Expense Refund

This service should be used to process a refund for a completed purchase transaction.

Initiate Purchase Refund

POST{{WalletUrl}}/api/v1/wallet/purchase/refund

Note: To use this service, it is mandatory to include the apikeypublic and apiclientpublic parameters in the Header field.

WalletAPI Address

The parameters that need to be sent to the service are as follows:

Parameter
Type
Required
Description

apikeypublic

string

Yes

It is the general key information required for system access.

apiclientpublic

string

Yes

It is the general identity information of the client accessing the service.

{
  "ExternalReference": "{{externalReference}}",
  "RollbackFee": true,
  "RollbackCashback": true
}

Service Request

Parameter
Type
Description

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": "01034c7e-a1b8-4ca5-827e-583cb4385b54",
        "WalletId": "30bac1c0-ad6b-4c50-a52e-1b34f9b487a7",
        "TransactionType": "Refund",
        "Amount": 1.00,
        "GiftAmount": null,
        "Description": "Refund of Purchase Jeannette Nolan",
        "ExternalReference": "Jeannette Nolan",
        "CreatedAt": "2025-04-28T13:46:52.6109788Z",
        "UpdatedAt": null,
        "BalanceAfterTransaction": 994.00,
        "SourceWalletId": null,
        "DestinationWalletId": null,
        "GiftBalanceId": null,
        "MainTransactionId": "2d2eba9b-f8a9-4482-8df3-2906b9577c6e",
        "UniqueCode": "97d9b40b-7d74-4279-8bb1-db9efd73c73d",
        "UsedGiftBalances": null,
        "CashbackAmount": 0
    },
    "Errors": [],
    "IsSuccess": true,
    "IsFailure": false
}

Service Response

Parameter
Type
Description

IsFailure

bool

Indicates whether the transaction has failed or not. (true: failed, false: successful)

IsSuccess

bool

Indicates whether the transaction was successful or not. (true: successful, false: failed)

Errors

Array

It is the list of error messages encountered during the transaction.

Value

Array<Items>

It is the list of data returned as a result of the transaction.

Service Response (Value)

Parameter
Type
Description

Id

Guid

It is the unique identifier assigned by the system to the transaction.

WalletId

String

It is the identity information of the wallet that performed the transaction.

TransactionType

String

Specifies the type of the transaction performed. (e.g., payment, refund)

Amount

Decimal

The total amount used in the transaction.

GiftAmount

Decimal

The amount used from the gift balance in the transaction

Description

String

Explanatory information related to the transaction

ExternalReference

String

The reference code given to the transaction by an external system

CreatedAt

DateTime

The date and time when the transaction was created

UpdatedAt

DateTime

The date and time when the transaction record was last updated

BalanceAfterTransaction

Decimal

The total balance of the wallet after the transaction

SourceWalletId

String

The identity of the wallet that initiated the transaction

DestinationWalletId

String

The identity of the wallet to which the transaction was sent

GiftBalanceId

Guid

The unique identifier of the gift balance used in the transaction

MainTransactionId

Guid

The identifier of the associated parent transaction

UniqueCode

String

A unique code specifically created for the transaction

UsedGiftBalances

List

The list of details of the gift balances used in the transaction

CashbackAmount

Decimal

It is the cashback (refund) amount earned as a result of the transaction.

Last updated