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.

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
TerminalId

string

Yes/No

Guid

Your terminal's identity (ID) information

TerminalTagCode

string

Yes

25

Label code.

MerchantUniqueCode

Guid

Yes

-

The tracking number created by you for the payment.

Amount

decimal

Yes

-

Sales amount.

DisplayCode

string

No

25

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

CurrencyId

string

Yes

-

Bkz: Currency

CallbackAddress

string

No

150

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

Methods

Array<Method>

No

-

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

Customer

Customer

No

-

The information of the customer for whom the payment is made

Products

Array<Product>

Yes

-

Product information

SkipPrintCustomer

bool

No

-

Customer receipty print out skipping with this param

SkipPrintMerchant

bool

No

-

Merchant receipty print out skipping with this param

SkipPaymentOptionScreen

bool

No

-

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

ReceiptOptions

ReceiptOptions

Hayır

-

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

Method Object<Method>

Parameter
Type
Compulsory
Length
Description
PaymentMethodId

int

Yes

-

Payment Methods

Method Object <ReceiptOptions>

Parameter
Type
Compulsory
Length
Description
TopSupport

bool

Yes

-

Will text be positioned at the top of the receipt?

Top > Text

string

Yes

150

Information to be written at the top of the receipt.

Top > FontSize

int

Yes

2

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

BottomSupport

bool

Yes

-

Will text be positioned at the bottom of the receipt?

Bottom > Text

string

Yes

150

Information to be written at the bottom of the receipt.

Bottom > FontSize

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
Type

int

Yes

-

Customer Types

FirstName

string

Yes/No

50

Customer first name

MiddleName

string

No

50

Customer middle name

LastName

string

Yes/No

50

Customer last name

CompanyName

string

Yes/No

175

Company name

TaxOfficeCode

string

Yes/No

50

Company tax office code

TaxNumber

string

Yes/No

25

Company tax number

Phone

string

No

20

Phone

Email

string

No

100

Email address

Identity

string

Yes/No

20

Identity number

Country

string

No

50

Country

City

string

No

100

City

District

string

No

100

District/Neighborhood

Neighborhood

string

No

100

Street

Address

string

No

255

Street address

Product Object<Product>

Parameter
Type
Compulsory
Length
Description
Name

string

Yes

75

Product Name

TaxGroupId

int

Yes

-

The VAT rate of the product

Bkz: Tax Group

UnitCodeId

int

Yes

-

Product unit information

Bkz: Unit Codes

CurrencyId

string

Yes

-

Bkz: Currency

Amount

decimal

Yes

150

Product amount

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

Quantity

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.

{
    "Result": {
        "PaymentRequestId": "1eb856a8-1d41-49ab-8994-ecee2880d62c",
        "PaymentRequestActivityId": "2015c508-4029-4f6b-b7e2-4bf34a213c41",
        "PaymentRequestActivityTypeId": 1,
        "PaymentStatus": 4
    },
    "Failed": false,
    "Message": null,
    "ClientMessage": null,
    "Succeeded": true
}
Parameter
Type
Description
PaymentRequestId

Guid

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

PaymentRequestActivityId

Guid

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

PaymentRequestActivityTypeId

int

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

PaymentStatus

int

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

Last updated