1. Sale

You can use this service to send a sync sale request to your terminals.

POST {{Base Address}}/api/payment/sync/sale

It will be sufficient to send a request to the address provided above. You can use the 'Base Address' as desired for both the Test and Production environments.

circle-info

Important: To use the Sync Sale service, you need to send the 'apikeyprivate' and 'apiclientprivate' parameters in the 'Header' section.

PhysicalAPI Address

The header information required to be sent to the service is as follows:

Parameter
Type
Compulsory
Description

apikeyprivate

string

Yes

The Private Key obtained from your merchant panel.

apiclientprivate

string

Yes

The Private Client obtained from your merchant panel.

The body information that needs to be sent to the service is as follows:

{
    "TerminalId": "38e895c3-1a9a-4b73-8816-8557d1d031d6",
    // "TerminalTagCode": "",
    "MerchantUniqueCode": "{{$guid}}",
    "DisplayCode": "Kişisel Bakım",
    "Amount": 22,
    "CurrencyId": 1,
    "Methods": [
        {
            "PaymentMethodId": 1
        },
        {
            "PaymentMethodId": 2
        }
    ],
    "CallbackAddress": "https://webhook.site/276d912e-090e-461a-aad5-5f137ab03cf4",
    "SplitPaymentSupport": false,
    "Customer": {
        "Type": 1,
        "FirstName": "eda",
        "MiddleName": "seda",
        "LastName": "meda",
        "CompanyName": "",
        "TaxOfficeCode": "",
        "TaxNumber": "",
        "Phone": "",
        "Email": "",
        "Identity": "11111111110",
        "Country": "Türkiye",
        "City": "İstanbul",
        "District": "Mesela",
        "Neighborhood": "Öyle",
        "Address": "Tam sokağın ortası"
    },
    "Products": [
        {
            "Name": "Saç Tıraşı",
            "TaxGroupId": 10,
            "UnitCodeId": 1,
            "Amount": 22,
            "Quantity": 1,
            "PaymentMethodId": 2
        }
    ],
    "SkipPrintCustomer": false,
    "SkipPrintMerchant": false
    "SkipPaymentOptionScreen": false,
    "ReceiptOptions": { // Opsiyonal
        "TopSupport": true,
        "Top": {
            "Text": "Üst başlık",
            "FontSize": 10
        },
        "BottomSupport": true,
        "Bottom": {
            "Text": "Alt başlık",
            "FontSize": 50
        }
    }
}
Parameter
Type
Compulsory
Length
Description

string

Yes/No

Guid

Your terminal's identity (ID) information

string

Yes

25

Label code.

Guid

Yes

-

The tracking number created by you for the payment.

decimal

Yes

-

Sales amount.

string

No

25

The payment code that will be displayed on the terminal at the time the payment is shown.

string

Yes

-

Bkz: Currency

string

No

150

The feedback address where we report the payment status. Bkz: Example

Array<Method>

No

-

You can specify which payment methods you want to be supported using these parameters

Customer

No

-

The information of the customer for whom the payment is made

Array<Product>

Yes

-

Product information

bool

No

-

Customer receipty print out skipping with this param

bool

No

-

Merchant receipty print out skipping with this param

bool

No

-

The card transaction details screen (e.g., installments) is not displayed during the payment process.

ReceiptOptions

Hayır

-

Ödeme sonrasında çıkacak fiş için özel ayarlamalar

Method Object<Method>

Parameter
Type
Compulsory
Length
Description

int

Yes

-

Payment Methods

Method Object <ReceiptOptions>

Parameter
Type
Compulsory
Length
Description

bool

Yes

-

Will text be positioned at the top of the receipt?

string

Yes

150

Information to be written at the top of the receipt.

int

Yes

2

The size of the information to be written at the top of the receipt.

bool

Yes

-

Will text be positioned at the bottom of the receipt?

string

Yes

150

Information to be written at the bottom of the receipt.

int

Yes

2

The size of the information to be written at the bottom of the receipt.

Customer Object<Customer>

Parameter
Type
Compulsory
Length
Description

int

Yes

-

Customer Types

string

Yes/No

50

Customer first name

string

No

50

Customer middle name

string

Yes/No

50

Customer last name

string

Yes/No

175

Company name

string

Yes/No

50

Company tax office code

string

Yes/No

25

Company tax number

string

No

20

Phone

string

No

100

Email address

string

Yes/No

20

Identity number

string

No

50

Country

string

No

100

City

string

No

100

District/Neighborhood

string

No

100

Street

string

No

255

Street address

Product Object<Product>

Parameter
Type
Compulsory
Length
Description

string

Yes

75

Product Name

int

Yes

-

The VAT rate of the product

Bkz: Tax Group

int

Yes

-

Product unit information

Bkz: Unit Codes

string

Yes

-

Bkz: Currency

decimal

Yes

150

Product amount

Note: The total of the product amounts must equal the sales amount.

int

Yes

-

Product quantity

The response returned by the service:

Parameter
Type
Description

Result

object

The service returns the details in the response.

ErrorCode

int

Error code. If the transaction is successful, it returns a value of '0'.

Succeeded

bool

It returns a true or false value. If the transaction is successful, it returns a value of 'true'.

Failed

bool

It returns a true or false value. If the transaction is unsuccessful, it returns a value of 'true'.

Message

string

If the transaction is erroneous, it returns the error message specified, offering language support according to the locale parameter.

ClientMessage

string

It returns the fixed values of Paywall error codes. You can map them.

Parameter
Type
Description

Guid

The identity information of the Async payment in Paywall. It should be stored.

Guid

It is the identity information of the last transaction of the Async payment.

int

It is the transaction type of the last Async payment. Bkz: Payment Type

int

The last status of the asynchronous payment. Bkz: Payment Status

Last updated