Payment Receiving Service

Payment Receiving Service

Method
API URL
Parameters

POST

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

JSON File

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

Payment Receive Service Request Message Parameters

Parameters
Type
Compulsory
Description

MERCHANT

string

Yes

It is a unique identity information that you can see specific to 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 operation is sent by POSTing in JSON format.

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.

REPEAT

int

Yes

The number of repetitions.

TRIES_COUNT

string

Yes

The number of retry attempts.

START_DATE

string

Yes

Recurring payment start date

CARDS

Parameters
Type
Compulsory
Description

CC_NUMBER

string

Yes

It is the 16-digit card number information of the card on which the payment will be made.

EXP_MONTH

string

Yes

It is the month information of the 2-digit expiration date of the card on which the payment will be made.

EXP_YEAR

string

Yes

It is the 4-digit expiry date of the card, on which the payment will be made, and the year.

CC_CVV

string

Yes

It is the 3-digit security code information on the back of the card where the payment will be made.

CC_OWNER

string

Yes

It is the name and surname information of the card holder to whom the payment will be made.

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.

CLIENT_IP

string

Yes

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

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":"ORDER_REF_NUMBER",
        "ORDER_AMOUNT":"100.00",
        "REPEAT": 5,
        "TRIES_COUNT": 3,
        "START_DATE": "2022-09-06"
    },
    "Cards" : [
        {
        "CC_NUMBER":"4531444531442283",
        "EXP_MONTH":"12",
        "EXP_YEAR":"2026",
        "CC_CVV":"111",
        "CC_OWNER":"TEST USER"
        },
        {
        "CC_NUMBER":"4531444531442283",
        "EXP_MONTH":"12",
        "EXP_YEAR":"2026",
        "CC_CVV":"111",
        "CC_OWNER":"TEST USER"
        }
    ],
    "Customer" : {
        "FIRST_NAME":"Firstname",
        "LAST_NAME":"Lastname",
        "MAIL":"[email protected]",
        "PHONE":"1122356600",
        "CITY":"Istanbul",
        "STATE":"Kağıthane",
        "ADDRESS":"Merkez Mahallesi, Ayazma Cd. No:37/91 Papirus Plaza Kat:5, 34406",
        "CLIENT_IP":"123.44.66.38"
    }
}

                                            
                                        

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

Payment Receiving Service Reply Message Parameters

Parameters
Type
Compulsory
Description

STATUS

string

Yes

Status Information.

RETURN_CODE

string

Yes

The status of the balance query is the code information.

RETURN_MESSAGE

string

Yes

It is the status message information as a result of the balance inquiry process.

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

If the value of the STATUS parameter is SUCCESS and the value of the RETURN_CODE parameter is 0 in the Payment Receive service response message, it indicates that the Payment Receive service has been performed successfully.

Transaction Result Notification

The result of each repetition of the payment is reported to the BACK_URL address, which is among the payment receiving service request message parameters, by POSTing it in JSON format with the following values.

                                            
{
  "RETURN_CODE": "0",
  "RETURN_MESSAGE": "",
  "ORDER_REF_NUMBER": "212",
  "REPEAT_NUMBER": "1",
  "REPEAT_ORDER_REF_NUMBER": "e4dbfa5e-f0f4-45df-9c43-72ecade89f47507161",
}

Last updated