1. Sale

You can use this service to send an async sale request to your terminals.

POST {{Base Address}}/api/payment/async/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 environment and the production environment.

Important: To use the Async Sales service, you must send the 'apikeyprivate' and 'apiclientprivate' parameters in the 'Header' field.

PhysicalAPI Address

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

Parameter
Type
Compulsory
Description

apikeyprivate

string

Yes

The Private Key obtained from the merchant panel.

apiclientprivate

string

Yes

The Private Client obtained from the merchant panel.

The body information 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
}
Parameter
Type
Compulsory
Length
Description

string

Yes/No

Guid

The identity (ID) information of your terminal.

string

Yes/No

25

Tag code

Guid

Yes

-

The tracking number generated by you for the payment.

decimal

Yes

-

Sales amount

string

No

25

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

string

Yes

-

Bkz: Currency

string

No

150

The callback URL where the payment status is sent.

Bkz: Example

Array<Method>

No

-

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

Customer

No

-

The information of the customer who made the payment.

Array<Product>

Yes

-

Product information

Method Object <Method>

Parameter
Type
Compulsory
Lenght
Description

int

Yes

-

Payment Methods

Customer Object<Customer>

Parameter
Type
Compulsory
Lenght
Description

int

Yes

-

Customer Types

string

Yes/No

50

Customer Name

string

No

50

Customer's second name

string

Yes/No

50

Customer's surname

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

Full address

Product Object<Product>

Parameter
Type
Compulsory
Lenght
Description

string

Yes

75

Product name

int

Yes

-

The product's VAT rate Bkz: Tax Group

int

Yes

-

The product's unit information

Bkz: Unit Codes

string

Yes

-

Bkz: Currency

decimal

Yes

150

Product amount

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

int

Yes

-

Product quantity

The response returned from the service:

Parameter
Type
Description

Result

object

Returns the details from the service 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 'true'.

Failed

bool

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

Message

string

If the transaction is unsuccessful, this is the error message provided, with language support based on the locale parameter.

ClientMessage

string

It returns fixed values for Paywall error codes. You can perform mapping based on these values.

Parameter
Type
Description

Guid

The identifier for 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 type of the last transaction of the Async payment.

Bkz: Payment Type

int

The last status of the async payment Bkz: Payment Status

Last updated