Payment Service

Android Pos Payment Service Request Model

Method
API URL
Parameter

POST

https://posservice.esnekpos.com/api/pay/PhysicalPayment

JSON File

Android Pos Payment Service Transaction Flow;

In order to perform a successful collection with the Android Pos payment service model, you need to complete your integration by following the procedures described below.

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

Android Pos Payment Service Request Message Parameters

Config

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.

BACK_URL

string

Yes

It is the address information to which the operation result response will be returned by the system. Transaction response will be read from this address by the member business. The result of the transaction is sent as a json post.

PRICES_CURRENCY

string

Yes

It is the currency information in which the payment transaction will be made. Currently, only “TRY, USD, EUR, GBP” can be sent.

ORDER_REF_NUMBER

string

Yes

It is the reference number information to be given by the member workplace. Payment transactions can be tracked with this reference number. A maximum of 24 characters can be used.

ORDER_AMOUNT

string

Yes

It is the transaction amount information of the payment transaction.

POS_ID

int

Yes

Android pos id information.

Customer

Parameters
Type
Compulsory
Description

FIRST_NAME

string

Yes

It is the name of the user (customer) performing the transaction.

LAST_NAME

string

Yes

It is the surname of the user (customer) who performed the transaction.

MAIL

string

Yes

It is the e-mail information of the user (customer) performing the transaction.

PHONE

string

Yes

It is the phone information of the user (customer) performing the transaction.

CITY

string

Yes

It is the city information of the user (customer) performing the transaction.

STATE

string

Yes

It is the district information of the user (customer) performing the transaction.

ADDRESS

string

Yes

It is the address information of the user (customer) performing the transaction.

Product

Parameters
Type
Compulsory
Description

PRODUCT_ID

string

Yes

It is the ID information given to the product by the member merchant.

PRODUCT_NAME

string

Yes

The name of the product.

PRODUCT_CATEGORY

string

Yes

It is the category information of the product.

PRODUCT_DESCRIPTION

string

Yes

It is the description information of the product.

PRODUCT_AMOUNT

string

Yes

It is the amount information of the product.

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

                                            
                                        
    {
        "Config":{
            "MERCHANT": " TEST1234",
            "MERCHANT_KEY": " 4oK26hK8MOXrIV1bzTRVPA==",
            "BACK_URL": "The url address where the result of the transaction will be returned to the merchant",
            "PRICES_CURRENCY": "TRY",
            "ORDER_REF_NUMBER": "RFN0001",
            "ORDER_AMOUNT": "150.00",
            "POS_ID": 3
            },
       "Customer":{
           "FIRST_NAME": "firstname",
           "LAST_NAME": "lastname",
           "MAIL": "[email protected]",
           "PHONE": "1122356600",
           "CITY": "İstanbul",
           "STATE": "Kağıthane",
           "ADDRESS": " Merkez Mahallesi, Ayazma Cd. No:37/91 Papirus Plaza Kat:5, 34406 Kağıthane / İSTANBUL "
           },
        "Product" : [
            {
               "PRODUCT_ID": "1",
               "PRODUCT_NAME": "Product Name 1",
               "PRODUCT_CATEGORY": "Electronic",
               "PRODUCT_DESCRIPTION": "Product Description",
               "PRODUCT_AMOUNT": 80
               },
            {
               "PRODUCT_ID": "2",
               "PRODUCT_NAME": "Product Name 2",
               "PRODUCT_CATEGORY": "Home Textils",
               "PRODUCT_DESCRIPTION": "Product Description",
               "PRODUCT_AMOUNT": 70
               }
        ]
    }

                                            
                                        

Esnekpos evaluates the information and sends the reply message to the member business.

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

Android Pos Payment Service Reply Message Parameters

Parameters
Type
Compulsory
Description

STATUS

string

Yes

The result of the payment transaction is the status information.

RETURN_CODE

string

Yes

The result of the payment transaction is the status information.

RETURN_MESSAGE

string

Yes

The status message is the result of the payment process.

ORDER_REF_NUMBER

string

Yes

Reference number information given by the Android Pos system for the payment transaction.

                                            
                                        
    {
        "STATUS": "SUCCESS",
        "RETURN_CODE": "0",
        "RETURN_MESSAGE": null,
        "ORDER_REF_NUMBER": "ORDER_REF_NUMBER"
    }

                                            
                                        

If the value of STATUS parameter is SUCCESS and RETURN_CODE parameter is 0 in the Android Pos Payment Service transaction response message, it means that the Android Pos Payment transaction has been accepted.

Step 1:

If the payment is accepted by evaluating the answer received, the merchant directs the customer to the URL_3DS address given by Esnekpos.

Step 2:

Android Pos finalizes the payment transaction, and reports the result of the payment to the BACK_URL address that the merchant reported in step 1, with the JSON POST method.

After the payment transaction is completed, the parameters of the payment result message are as follows;

Android Pos Payment Service Reply Message Parameters

Parameters
Tip
Compulsory
Açıklama

STATUS

string

Yes

The result of the payment transaction is the status information.

RETURN_CODE

string

Yes

The status of the payment process is the code information.

RETURN_MESSAGE

string

Yes

The status of the payment process is the code information.

ORDER_REF_NUMBER

string

Yes

It is the reference number information given by the merchant when sending the payment transaction request.

                                            
                                        
    {
        "STATUS": "SUCCESS",
        "RETURN_CODE": "0",
        "RETURN_MESSAGE": null,
        "ORDER_REF_NUMBER": "ORDER_REF_NUMBER"
    }

                                            
                                        

In the JSON POST message sent to the merchant, the value of the STATUS parameter is SUCCESS and the RETURN_CODE parameter is 0, indicating that the Android Pos Payment process has been completed without any problems.

Reply Message Statuses and Explanations

The details of the RETURN_CODE explanations returned in the Android Pos Reply message details are as follows;

RETURN_CODE
STATUS
DESCRIPTION

0

SUCCESS

It's successful transaction.

100

ERROR

It's unsuccessful transaction.

101

FIELD_ERROR

If there is an error in the request messages, this message is returned.

102

AUTHENTICATION_ERROR

Authentication error.

103

LIMIT_ERROR

This error message is returned when the limit is insufficient for payment requests.

104

COMMISSION_ERROR

This message is returned because the commission information is not defined or is incompletely defined.

105

INSERT_ERROR

This message is returned in case of errors encountered in database registration processes.

999

UNKNOWN_ERROR

An unexpected error has occurred.

Last updated