Return/Cancellation Service

Return/Cancellation Service Request Modela;

Method
API URL
Parameter

POST

https://posservice.esnekpos.com/api/services/OrderReturn

JSON File

The parameters to be sent to the service are as follows;

Parameters
Type
Compulsory
Description

MERCHANT

string

Yes

It is a unique credential created specifically for the member business.

MERCHANT_KEY

string

Yes

It is the key information created specifically for the member business.

ORDER_REF_NUMBER

string

Yes

It is the reference number information given by the merchant when sending the payment transaction request. The payment transaction to be canceled is matched with the reference number of the relevant merchant, and the transaction is carried out.

AMOUNT

int

Yes

It is the Cancellation/Refund amount information of the reference number to be processed.

SYNC_WITH_POS

bool

No

It is the parameter that will enable you to perform the refund/cancellation of the payment synchronously with the bank. If you send a false message, your return/cancellation request, which is not instantly approved by the bank, is recorded in our system and then your transaction is completed by our operation unit.

Here is a sample JSON file to send to the service;

                                            
{
      "MERCHANT": "TEST1234" , 
      "MERCHANT_KEY": "4oK26hK8MOXrIV1bzTRVPA==" ,
      "ORDER_REF_NUMBER" : "0.54251300 1595848596|93" ,
      "AMOUNT": 29.99,
      "SYNC_WITH_POS": false,
}
                                        

Return/Cancellation Service Reply Message;

The parameters of the reply message sent from the service after the transaction are as follows;

Parameters
Type
Compulsory
Description

RETURN_CODE

string

Yes

The status of the return process is the code information.

RETURN_MESSAGE

string

Yes

The status message is the result of the return process.

STATUS

string

Yes

The result of the return process is the status information.

ORDER_REF_NUMBER

string

Yes

It is the reference number information of the request given by the merchant in the payment request.

REFNO

string

Yes

It is the reference number information given by the Esnekpos system for the return transaction.

TRANSACTION_ID

int

Yes

If the refund is instantly approved by the card bank, it is the reference number information of the record added to the sub-transactions of the payment by the Esnekpsos system.

                                            
{
    "RETURN_CODE": "0",
    "RETURN_MESSAGE": "29,99 ₺ Your return request has been successfully registered.",
    "STATUS": "SUCCESS",
    "ORDER_REF_NUMBER": null,
    "REFNO": null
}
                                        

Returning the value of STATUS parameter to SUCCESS and RETURN_CODE parameter to 0 in the return/cancellation response message indicates that the Return/Cancellation Transaction was successful.

Last updated