18. Sale/Expense (Alias)

You can manage sales/expense transactions made with the wallet through this service.

Sale/Expense with Wallet 'Alias'

POST{{WalletUrl}}/api/v1/wallet/purchase/by/alias

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 used for API access.

apiclientpublic

string

Yes

It is the general client key information that identifies the relevant client in the system.

{
  "Alias": "{{alias}}",
  "Amount": 1,
  "Description": "string",
  "ExternalReference": "{{$randomFullName}}",
  "UseGiftBalances": true, // If there is a defined gift balance, it will be spent first.
  "CashbackApply": true,
  "CashbackType": "Amount",
  "CashbackValue": 10
}

Service Request

Parameter
Type
Description

Alias

string

The wallet number 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": "e966d7fe-4d49-4b73-9c58-0921cfa51ea3",
        "WalletId": "30bac1c0-ad6b-4c50-a52e-1b34f9b487a7",
        "TransactionType": "Purchase",
        "Amount": 1,
        "GiftAmount": null,
        "Description": "string",
        "ExternalReference": "Casey Padberg",
        "CreatedAt": "2025-04-28T08:10:12.8828523Z",
        "UpdatedAt": null,
        "BalanceAfterTransaction": 984.00,
        "SourceWalletId": null,
        "DestinationWalletId": null,
        "GiftBalanceId": null,
        "MainTransactionId": null,
        "UniqueCode": "7006528f-c704-4aa5-b7ac-df84389059f6",
        "UsedGiftBalances": null,
        "CashbackAmount": 10
    },
    "Errors": [],
    "IsSuccess": true,
    "IsFailure": false
}

Service Request

Parameter
Type
Description

IsFailure

bool

It returns true if the service request failed, otherwise false.

IsSuccess

bool

It returns true if the service request was successful, otherwise false.

Errors

Array

It is the list of messages or error codes returned in case of an error.

Value

Array<Items>

It is the main list containing the data returned from the service.

Service Request (Value)

Parameter
Type
Description

Id

Guid

It is the unique identifier of the transaction.

WalletId

String

It is the identity of the wallet where the transaction took place.

TransactionType

String

It specifies the type of the transaction (e.g., payment, refund, transfer).

Amount

Decimal

It specifies the total amount used in the transaction.

GiftAmount

Decimal

It is the amount used from the gift balance.

Description

String

It is the explanatory information related to the transaction.

ExternalReference

String

It is the reference information provided by an external system.

CreatedAt

DateTime

The date and time when the transaction was created.

UpdatedAt

DateTime

The time of the last update made to the transaction.

BalanceAfterTransaction

Decimal

The new balance of the wallet after the transaction.

SourceWalletId

String

Source wallet ID (used in transfer transactions).

DestinationWalletId

String

Target wallet ID (used in transfer transactions).

GiftBalanceId

Guid

It is the identifier of the used gift balance.

MainTransactionId

Guid

It is the ID of the parent transaction (used as a reference in related transactions).

UniqueCode

String

It is the unique code specific to the transaction.

UsedGiftBalances

List

It is the list of gift balances used in the transaction.

CashbackAmount

Decimal

It is the cashback amount earned as a result of this transaction.

Last updated