1. Initiate Payment

You can initiate your partial payment process through this service. It allows multiple card payments for a single cart.

Initiate Payment

POST {{Base Adres}}/api/paywall/payment/start/split

Important: To use the partial payment initiation service, you must include the parameters apikeypublic and apiclientpublic in the Header section.

PaymentAPI Address

Parameter
Type
Compolsory
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.

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

{
    "PaymentDetail": {
        "Amount": 200.00,
        "MerchantUniqueCode": "{{$guid}}",
        "CurrencyId": 1,
        "Installment": 1,
        "CallbackAddress": "https://webhook.site/6dbedd75-2e39-47cf-a389-4a2e4b1afdd4", // sadece rollback senaryosu için 
        "ClientIP": "1.1.1.1",
        "Half2D": false,
        "ProviderBased": false,
        "ProviderKey": "test",
        "PosBased": false,
        "PosId": 4712,
        "AutoRollback": false // İşlemlerden herhangi biri başarısız olursa, başarılı olanlar geri çekilsin mi?
    },
    "CardModel": 1, // 1: Ecommerce | 2: Insurance
    "Payments": [
        {
            "Customer": {
                "FullName": "FullName",
                "Phone": "5336662211",
                "Email": "[email protected]",
                "Country": "Country",
                "City": "City",
                "Address": "Address",
                "IdentityNumber": "11111111111",
                "TaxNumber": "TaxNumber"
            },
            "Product": {
                "ProductId": "ProductId",
                "ProductName": "ProductName",
                "ProductCategory": "ProductCategory",
                "ProductDescription": "ProductDescription",
                "ProductAmount": 150
            },
            "Card": {
                "OwnerName": "Card Owner 1",
                "Number": "5528790000000007", // CardModel 1 için
                "ExpireMonth": "12", // CardModel 1 için
                "ExpireYear": "2026", // CardModel 1 için
                "Cvv": "000", // CardModel 1 için
                "CardNoFirst": "", // CardModel 2 için
                "CardNoLast": "", // CardModel 2 için
                "IdentityNumber": "" // CardModel 2 için
            }
        },
        {
            "Customer": {
                "FullName": "FullName",
                "Phone": "5336662211",
                "Email": "[email protected]",
                "Country": "Country",
                "City": "City",
                "Address": "Address",
                "IdentityNumber": "11111111111",
                "TaxNumber": "TaxNumber"
            },
            "Product": {
                "ProductId": "ProductId",
                "ProductName": "ProductName",
                "ProductCategory": "ProductCategory",
                "ProductDescription": "ProductDescription",
                "ProductAmount": 50
            },
            "Card": {
                "OwnerName": "Card Owner 2",
                "Number": "5528790000000008", // CardModel 1 için
                "ExpireMonth": "12", // CardModel 1 için
                "ExpireYear": "2027", // CardModel 1 için
                "Cvv": "000", // CardModel 1 için
                "CardNoFirst": "", // CardModel 2 için
                "CardNoLast": "", // CardModel 2 için
                "IdentityNumber": "" // CardModel 2 için
            }
        }
    ]
}

Root Directory

Parameter
Type
Compolsory
Description

PaymentDetail

PaymentDetail

Yes

The JSON object where the payment details will be placed.

CardModel

int

Yes

The card method through which the payment will be collected. Types

Payments

List<Payment>

Yes

A JSON object in the form of a list containing the payments to be collected under the partial payment process.

Root Directory: PaymentDetail

Parameter
Type
Compolsory
Description

Amount

string

Yes

The total amount to be collected in the payment transaction.

MerchantUniqueCode

decimal

Yes

A unique code defined specifically for the merchant.

CurrencyId

string

Yes

Represents the currency in which the transaction will be carried out. Currency

Installement

integer

Yes

Indicates the number of installments selected by the customer in their payment plan.

CallbackAddress

string

Yes

The address to which the system will send the result information after the transaction is completed.

ClientIP

string

Yes

Represents the IP address of the user performing the transaction.

Half2D

bool

No

This parameter supports you in finalizing your payments with a separate request. If you send the Half2D parameter as true, the payment will remain in authorization at the bank until you make the finalization call.

ProviderBased

bool

No

This is used when you decide on your side which provider your payment should be processed through.

ProviderKey

string

Conditional

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

PosBased

bool

No

It is used when you decide on your side which provider your payment should be processed through.

PosId

int

Conditional

It is the connection ID number of the provider through which you want your payment to be processed. This can be found in the list of connected providers obtained from the Paywall panel.

AutoRollback

bool

No

Should successful partial payments be automatically rolled back if any of the partial transactions fail?

Root Directory: Payments

Parameter
Type
Compolsory
Description

Customer > FullName

string

Yes

Customer full name

Customer > Phone

string

Yes

Customer phone number

Customer > Email

string

Yes

Customer email address

Customer > Country

string

Yes

Customer country

Customer > City

string

Yes

Customer city information

Customer > Address

string

No

Customer address information

Customer > IdentityNumber

string

No

Customer identification information

Customer > TaxNumber

string

No

Customer tax number information

Product > ProductId

string

Yes

Sold product identification information

Product > ProductName

string

Yes

Sold product name

Product > ProductCategory

string

Yes

Category information of the sold product

Product > ProductDescription

string

No

Description information of the sold product

Product > ProductAmount

decimal

Yes

Amount information of the sold product

Note: The total amount of all products must equal the main amount

Card > OwnerName

string

Conditional

Cardholder name

Card > Number

string

Conditional

Card number

Card > IdentityNumber

string

Conditional

Cardholder identification information

Card > CardNoFirst

string

Conditional

First 8 digits of the card

Card > CardNoLast

string

Conditional

Last 4 digits of the card

Card > ExpireMonth

string

Conditional

Card expiration month information

Card > ExpireYear

string

Conditional

Card expiration year information

Card > Cvv

string

Conditional

Card CVV information

Response returned from the service:

Parameter
Type
Description

ErrorCode

int

Error code. Returns '0' if the operation is successful.

Result

bool

Returns true if the operation is successful, and false if it fails.

Message

string

Contains information or an error message related to the operation.

Body

json

Detailed information related to the batch payment transaction.

Response returned from the service: Body

Parameter
Type
Description

SplitPaymentId

int

Partial payment identification information

MerchantUniqueCode

string

The unique tracking number you provide at the initiation of the partial payment.

Status

int

Partial payment status information

Payments

List<Payment>

Detailed information for each transaction processed within the partial payment.

Example Code:

{
    "ErrorCodeType": 1,
    "ErrorMessage": null,
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "SplitPaymentId": 238,
        "MerchantUniqueCode": "65451a10-7e26-4df7-9149-7d6d3d35de56",
        "Status": 5,
        "Payments": [
            {
                "PaymentId": 4045720,
                "UniqueCode": "90d0b03e-3ab8-418a-aedb-6d808437d43d",
                "MerchantUniqueCode": "0c4f61e1-4ee7-4ad3-868a-f7b3e0558434",
                "IsSuccessful": true,
                "StatusMessage": "Success",
                "Error": null
            },
            {
                "PaymentId": 4045721,
                "UniqueCode": "5db8b112-6554-48ab-b4f8-9e7b3f85393b",
                "MerchantUniqueCode": "6a3c7464-5f9d-4ef3-a8cb-66e17327d743",
                "IsSuccessful": false,
                "StatusMessage": "Failed",
                "Error": null
            }
        ]
    }
}

Last updated