Void Earning

The Void Earning API allows you to cancel or reverse a previously recorded earning transaction. This is useful when an earning was granted in error or needs to be adjusted.

Use this API carefully, as voiding an earning transaction will update the customer's account balance by removing the associated points or rewards.

The API will not process the request if voiding the transaction would result in the customer's point balance falling below zero

Void Earning Transaction

POST /customer/transaction/earning/{id}/void

This endpoint is used to void or reverse a specific earning transaction, effectively removing the points or rewards from the customer’s account

Headers

Name
Value

Accept

application/json

Authorization

Bearer <token>

{id}

Name
Type
Description

transaction_id

number

Input transaction earning id

Body

Name
Type
Description

client_code

string

Client Code [Required, Numeric, 6-7 Digits]

customer_id

number

Customer ID [Required, Integer, Exist on Data Customer]

Response

{
    "status": "success",
    "status_code": 200,
    "message": "Earning transaction #EA/24/00000025 has been voided.",
    "data": null
}

Last updated