3. Establish Connection

You can obtain a Physical POS connection through this service.

POST {{Base Address}}/api/connection

It will be sufficient to send a request to the address provided above. You can use the 'Base Address' for both the test environment and the live environment as you wish.

Important: To use the Establish Connection service, you must include the 'apikeyprivate' and 'apiclientprivate' parameters in the 'Header' field.

PhysicalAPI Address

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

Parameter
Type
Compulsory
Description

apikeyprivate

string

Yes

The Private Key that you obtained from the merchant panel.

apiclientprivate

string

Yes

The Private Client that you obtained from the merchant panel.

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

{
  "BrandId": 10,
  "ProviderId": 20,
  "RegionId": 1,
  "EndOfDayId": 1,
  "DisplayName": "Uygulama İsmi",
  "IsProd": true,
  "IsReporting": true,
  "IsAsyncPayment": true,
  "IsSocketPayment": true,
  "ServiceParameters": {
    "Key1": "Value", // The Key is returned during the listing process.
    "Key2": "Value", // The Key is returned during the listing process.
    "Key3": "Value", // The Key is returned during the listing process.
    "Key4": "Value" // The Key is returned during the listing process.
  },
  "Name": "Bağlantı İsmi"
}
Parameter
Type
Compulsory
Length
Description
BrandId

int

Yes

-

Bkz: Brand

ProviderId

int

Yes

-

Bkz: Provider

RegionId

int

Yes

-

Bkz: Country/Region

EndOfDayId

int

Yes

-

Bkz: Value

DisplayName

string

No

25

This information is used in situations where the application name, etc., needs to be displayed on the POS device screens.

IsProd

bool

Yes

-

Indicates whether the connection is Live/Test.

IsReporting

bool

Yes

-

Should the connection support reporting functionality?

IsAsyncPayment

bool

Yes

-

Should the connection support the asynchronous payment method?

IsSocketPayment

bool

Yes

-

Should the connection support the payment method under the socket infrastructure?

ServiceParameters

Dictionary<string, string>

Yes

-

The parameters required by the provider you want to connect to (such as Papara, etc.) should be sent as key-value pairs.

Name

string

Yes

100

The custom name you assigned to your connection.

Response returned from the service:

Parameter
Type
Description

Result

object

Returns the details of the service.

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 the value 'true'.

Failed

bool

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

Message

string

If the transaction is erroneous, this is the message related to the error, and it provides language support based on the locale parameter.

ClientMessage

string

It returns the fixed values of the paywall error codes. You can perform mapping.

{
    "result": {
        "status": true
    },
    "failed": false,
    "message": null,
    "clientMessage": null,
    "succeeded": true
}

Last updated