3. Non-Secure (Insurance)

The Direct Payment service initiates the payment collection process from the card information as soon as you send the request and returns the transaction result within the response.

Direct Payment (Insurance)

POST {{Base Adres}}/api/paywall/payment/startdirect/insurance

Important: To use the payment service, you must send the parameters apikeypublic and apiclientpublic in the 'Header' field.

PaymentAPI Address

The example JSON and sample codes to be sent to the service are as follows.

Parameter
Type
Compulsory
Description

apikeypublic

string

Yes

The Public Key you obtained from the merchant panel.

apiclientpublic

string

Yes

The Public Client you obtained from the merchant panel.

Paywall Request Payload

{
    "PaymentDetail": {
        "Amount": 4.44,
        "MerchantUniqueCode": "{{$guid}}",
        "CurrencyId": 1,
        "MerchantSuccessBackUrl": "https://itspaywall.com/successful",
        "MerchantFailBackUrl": "https://itspaywall.com/unsuccessful",
        "Installment": 1,
        "ChannelId": 0,
        "TagId": 0,
        "ClientIP": "1.1.1.1"
    },
    "Card": {
        "OwnerName": "test",
        "CardNoFirst": "41197901",
        "CardNoLast": "6389",
        "InquiryValue": "17654932298",
        "ExpireMonth": "03",
        "ExpireYear": "2030",
        "UniqueCode": "",
        "cardSave": {
            "nickname": "test karti",
            "relationalId1": "007",
            "relationalId2": "",
            "relationalId3": "",
            "save": false
        }
    },
    "Customer": {
        "FullName": "FullName",
        "Phone": "5555555555",
        "Email": "[email protected]",
        "Country": "Country",
        "City": "City",
        "Address": "Address",
        "IdentityNumber": "IdentityNumber",
        "TaxNumber": "TaxNumber"
    },
    "Products": [
        {
            "MemberId": 0,
            "ProductId": "ProductId",
            "ProductName": "ProductName",
            "ProductCategory": "ProductCategory",
            "ProductDescription": "ProductDescription",
            "ProductAmount": 4.44
        }
    ]
}

Main Directory: PaymentDetail

Parameter
Type
Compulsory
Description

Amount

decimal

Yes

Payment cart amount.

MerchantUniqueCode

string

Yes

It must be the same value as the MerchantUniqueCode in the request sent to initiate the payment. This code is the unique value assigned to the transaction by you. It is used to uniquely identify and track a payment for cancellation, refund, or payment inquiry operations.

Length: 250 characters

CurrencyId

int

Yes

Currency Bkz: Review

Installment

int

Yes

Installment information should be sent as 1 for a single payment.

Half2D

bool

No

It is the parameter that will assist you in finalizing your payments through a special call. If you send the Half2D parameter as true, your payment will remain in provisional status at the bank until you make the payment completion call.

ClientIP

string

Yes

The IP information of the party performing the transaction, such as the customer/user/member, etc. Length: 15 characters

TagId

int?

No

It is used when you want to apply tagging to your payments.

ChannelId

int?

No

It is used when you want to separate the channels through which your payments are sent to Paywall.

EndOfTheDay

int?

No

It is the end-of-day value. You should send this parameter as filled when you want only the "Next Day" payments to pass through the providers among the linked providers. Bkz: Review

RegionId

short?

No

It is the parameter that allows you to specify which country's providers you want your payment to pass through. If not specified, your payment will be processed as 'Global'.

ProviderBased

bool

No

It is used when you have decided on your own which provider should handle your payment.

ProviderKey

string

Yes/No

The provider key through which you want your payment to be processed.

MarketPlace > BasketAmount

decimal

No

It is used within the marketplace scope.

Main Directory: Card

Parameter
Type
Compulsory
Description

OwnerName

string

Yes/No

The full name of the cardholder from whom the payment will be collected. Length: 60 characters

CardNoFirst

string

Yes/No

The first 8 digits of the card number

Length: 20 characters

CardNoLast

string

Yes/No

The last 4 digits of the card number

InquiryValue

string

Yes/No

The user's TCKN number or tax identification number

UniqueCode

string

Yes/No

Identity information associated with the registered card. Returned by Paywall during saving and listing.

TempCardToken

string

Yes/No

It is the parameter to be used when you want to receive payment with a temporary saved card (Client-Side Tokenization).

Partner? > PartnerBased

bool?

Yes/No

It is the parameter to be used when you set up cards based on a partner model.

Partner? > PartnerIdentity

string

Yes/No

When you set up cards based on a partner model, this is your company's partnership ID in Paywall. You can obtain this information from the Paywall panel.

CardSave? > Save

bool

Yes/No

At the time of payment, if the card should be saved upon successful payment, True should be sent. When True is sent, the other parameters under the CardSave object are taken into account.

CardSave? > Nickname

string

Yes/No

It is the nickname for the card.

CardSave? > RelationalId1

string

Yes/No

It is the relationship value of the card.

CardSave? > RelationalId2

string

Yes/No

It is the second (tree structure) relationship value of the card.

CardSave? > RelationalId3

string

Yes/No

It is the third (tree structure) relationship value of the card.

Main Directory: Customer

Parameter
Type
Compulsory
Description

FullName

string

Yes

The name of the recipient on the merchant side.

Phone

string

Yes

The mobile phone number of the recipient on the merchant side.

Email

string

Yes

The email address of the recipient on the merchant side.

Country

string

Yes

The country information of the recipient on the merchant side.

City

string

Yes

The city information of the recipient on the merchant side.

Address

string

Yes

The registered address of the recipient on the merchant side.

IdentityNumber

string

No

The identity (TCKN) number of the recipient on the merchant side.

TaxNumber

string

No

The tax identification number of the recipient on the merchant side.

Main Directory: Product<Array>

Parameter
Type
Compulsory
Description

ProductId

string

Yes

Product ID.

ProductName

string

Yes

Product name.

ProductCategory

string

Yes

Product category.

ProductDescription

string

Yes

Product description.

ProductAmount

decimal

Yes

Product price information.

DiscountOwnerType

int

No

The party applying the discount to the product Bkz: Discount Owner Types

DiscountType

int

No

The type of discount applied to the product.

Bkz: Discount Types

DiscountValue

decimal

No

The discount value applied to the product. If Type 1 and the value is 10, it applies 10 (TL/USD/EUR), but if it's Type 2, it applies a 10% discount.

CargoType

int

No

The shipping type for the product.

Bkz: Kargo Tipleri

CargoCurrencyId

int

No

The currency of the shipping cost.

CargoCost

decimal

No

Shipping cost.

MemberId

int?

Yes/No

It is mandatory for the Marketplace model. It must be filled with the MemberId information of the sub-merchant in the Paywall system.

MemberEarningCalculated

bool?

Yes/No

In the marketplace scope, if you have calculated the sub-merchant's entitlement, you should send this parameter as true.

MemberEarning

decimal?

Yes/No

In the marketplace scope, if you have calculated the sub-merchant's entitlement, you should send this parameter with the entitlement value to Paywall.

MemberCustomCommission

bool

Yes/No

In the marketplace scope, this is the parameter used if you want to specify a commission for the sub-merchant for this particular sale.

MemberCommission

decimal?

Yes/No

In the marketplace scope, this is the parameter where the commission value is sent if you want to specify a commission for the sub-merchant for this particular sale.

Paywall Response

Parameter
Type
Description

ErrorCode

int

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

Result

bool

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

Message

string

If the operation is faulty, this is the message indicating the error, providing language support according to the locale parameter.

Body

object

If the operation is faulty, this is the code specified for the error.

{
    "ErrorCodeType": 1,
    "ErrorMessage": null,
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Payment": {
            "PaymentId": 2090323,
            "ActivityId": 4201860,
            "UniqueCode": "142e9761-9591-4b33-a61f-a2f81f9cc1ec",
            "MerchantUniqueKey": "0da34f8a-4eb5-4ce4-8c0f-7ffdad5fce6b",
            "PaymentGatewayId": 4023,
            "PaymentGatewayName": "VakıfBankinsurance",
            "PaymentGatewayProviderName": "Vakıfbank"
        },
        "Error": {
            "ProviderErrorCode": null,
            "ProviderErrorMessage": null,
            "BankErrorCode": null,
            "BankErrorMessage": null
        }
    }
}

Last updated