For the complete documentation index, see llms.txt. This page is also available as Markdown.

2. Paywall Transaction Number

You can perform the payment query using the UniqueCode parameter. UniqueCode is the unique payment tracking number generated by Paywall after the payment initiation and returned in the response.

Payment Query (UniqueCode)

GET {{Private Base Address}}/api/paywall/private/query/by/uniquecode

Important: To use the Payment Query service, you must include the apikeyprivate and apiclientprivate parameters in the Header. PaymentPrivateAPI Address

Required headers and request parameters:

Parameters and Descriptions
Parameter
Type
Compulsory
Description

apikeyprivate

string

Yes

Public Key obtained from the merchant panel.

apiclientprivate

string

Yes

Public Client obtained from the merchant panel.

uniquecode

Guid

Yes

Unique tracking number assigned to the payment by Paywall

Example Code:

using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class Program
{
    private static readonly HttpClient client = new HttpClient();

    private static async Task Main()
    {
        client.DefaultRequestHeaders.Add("apikeyprivate", "%PRIVATEKEY%");
        client.DefaultRequestHeaders.Add("apiclientprivate", "%PRIVATECLIENT%");
        client.DefaultRequestHeaders.Add("uniquecode", "%UniqueCode%");
        var response = await client.GetAsync("{{Private Base Address}}/api/paywall/private/query/by/uniquecode");
        var responseString = await response.Content.ReadAsStringAsync();
        var responseObject = JsonConvert.DeserializeObject<Response>(responseString);
        Console.WriteLine(responseObject.Body.Paywall.StatusName);
    }

    public class Response
    {
        public int ErrorCode { get; set; }
        public bool Result { get; set; }
        public string Message { get; set; }
        public Body Body { get; set; }
    }

    public class Body
    {
        public Paywall Paywall { get; set; }
    }

    public class Paywall
    {
        public int PaymentId { get; set; }
        public int ActivityId { get; set; }
        public bool Status { get; set; }
        public string StatusName { get; set; }
        // Define other properties as needed...
    }
}

The parameters returned by the service are as follows:

Parameter Descriptions
Parameter
Type
Description

PaymentId

int

Payment identifier

UniqueCode

Guid

Unique tracking number generated by Paywall for the payment

MerchantUniqueCode

string

Unique tracking number provided by the merchant at the time of payment initiation

TrackingCode

string

Tracking number provided by the merchant at the time of payment initiation

ActivityId

int

Identifier of the last payment activity

PaymentGatewayId

int

Identifier of the gateway through which the transaction was processed

PaymentGatewayName

string

Name of the gateway through which the transaction was processed

PaymentGatewayProviderName

string

Name of the gateway provider in the system

IsThreeDSecure

bool

Is the transaction 3D secure?

IsNonThreeDSecure

bool

Is the transaction Non-3D secure?

IsInsuranceSecure

bool

Is the transaction insurance-specific (first 8 and last 4 digits)?

IsProvision

bool

Is the transaction pre-authorized?

IsOtp

bool

Is the transaction performed using OTP method?

AnySuccessPayment

bool

Is there any successful sale within the transaction scope?

AnySuccessRefund

bool

Is there any successful refund within the transaction scope?

AnySuccessPartialRefund

bool

Is there any successful partial refund within the transaction scope?

AnySuccessCancel

bool

Is there any successful cancellation within the transaction scope?

Status

boolean

Status of the last activity, true: successful / false: failed

StatusName

string

Payment status

StatusId

int

Payment status identifier

TypeName

string

Type of the last payment activity

TypeId

int

Identifier of the last payment activity type

Installment

int

Installment information

CurrencyId

int

Payment currency identifier

CurrencyName

string

Payment currency

PaymentMethodId

int

Payment method identifier See: Payment Methods

PaymentMethodName

string

Payment method

PaymentChannelId

int

Payment channel identifier See: Payment Channles

PaymentChannelName

string

Payment channel

PaymentTagId

int

Payment tag identifier

PaymentTagName

string

Payment tag

CardNumber

string

Masked card number

CardOwnerName

string

Masked cardholder name

CardBankId

int

Identifier of the card's bank

CardBankName

string

Name of the card's bank

CardBrandId

int

Identifier of the card brand

CardBrandName

string

Name of the card brand

CardTypeId

int

Identifier of the card type

CardTypeName

string

Name of the card type

CardFamilyId

int

Identifier of the card family

CardFamilyName

string

Name of the card family

LastActivityDateTime

DateTime

Date and time of the last transaction related to the payment

PaymentAmount

decimal

Total payment amount

ActivityAmount

decimal

Last transaction amount

Example: If a transaction with a main amount of 1000 TL has a partial refund of 100 TL, this parameter will return 100.

IP

string

IP address to which the transaction was sent

ClientIP

string

IP address of the device used at the time of the transaction

AppliedInterest

bool

Was installment interest applied to the payment?

InterestRate

decimal?

Applied interest rate

CommissionRate

decimal?

Commission information applied by the payment provider

Returns the value you configured in the Paywall panel.

OriginalAmount

decimal

Original payment amount

Example: If the payment amount is 1000 TL and a 100 TL installment interest is applied, resulting in a total charge of 1100 TL, this parameter will return 1000 TL as the original amount before interest was applied.

InterestAmount

decimal?

If applicable, the applied installment interest amount

CommissionAmount

decimal

Commission amount applied to the payment by the payment institution/bank

UsedSavedCard

bool

Was the payment made using a saved card?

UsedTempCard

bool

Was the payment made using a client-side tokenized card?

Activities

List

All actions related to the transaction (Created, Sale Started, Sale Failed, Cancellation Successful, etc.)

IsFullyRefunded

bool

Information on whether the transaction has been fully canceled/refunded.

RemainingRefundAmount

decimal

Total refundable amount. This amount decreases as partial refunds are made.

PaymentExternalAuthCode

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

PaymentExternalOrderId

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

PaymentExternalTransId

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

PaymentExternalHostReference

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

PaymentExternalMerchantId

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

Payment Query (UniqueCode) V2

GET {{Private Base Address}}/api/paywall/private/query/v2/by/uniquecode

Important: To use the Payment Query service, you must include the apikeyprivate and apiclientprivate parameters in the Header. PaymentPrivateAPI Address

Required headers and request parameters:

Parameters and Descriptions
Parameter
Type
Compulsory
Description

apikeyprivate

string

Yes

Public Key obtained from the merchant panel.

apiclientprivate

string

Yes

Public Client obtained from the merchant panel.

uniquecode

Guid

Yes

Unique tracking number assigned to the payment by Paywall

Example Code:

The parameters returned by the service are as follows:

Parameter Descriptions
Parameter
Type
Descriptions

PaymentId

int

Payment identifier

UniqueCode

Guid

Unique tracking number generated by Paywall for the payment

MerchantUniqueCode

string

Unique tracking number provided by the merchant at the time of payment initiation

TrackingCode

string

Tracking number provided by the merchant at the time of payment initiation

ActivityId

int

Identifier of the last payment activity

PaymentGatewayId

int

Identifier of the payment gateway through which the transaction was processed

PaymentGatewayName

string

Name of the payment gateway through which the transaction was processed

PaymentGatewayProviderName

string

Provider name of the payment gateway in the system

IsThreeDSecure

bool

Is the transaction 3D secure?

IsNonThreeDSecure

bool

Is the transaction Non-3D secure?

IsInsuranceSecure

bool

Is the transaction secured with insurance (first 8 and last 4 digits)?

IsProvision

bool

Is the transaction pre-authorized (provisioned)?

IsOtp

bool

Is the transaction performed using OTP method?

AnySuccessPayment

bool

Is there any successful sale within the transaction scope?

AnySuccessRefund

bool

Is there any successful refund within the transaction scope?

AnySuccessPartialRefund

bool

Is there any successful partial refund within the transaction scope?

AnySuccessCancel

bool

Is there any successful cancellation within the transaction scope?

Status

boolean

Status of the last activity, true: successful / false: failed

StatusName

string

Payment status

StatusId

int

Payment status identifier

TypeName

string

Type of the last payment activity

TypeId

int

Identifier of the last payment activity type

Installment

int

Installment information

CurrencyId

int

Payment currency identifier

CurrencyName

string

Payment currency

PaymentMethodId

int

Payment method identifier

See: Payment Methods

PaymentMethodName

string

Payment method

PaymentChannelId

int

Payment channel identifier See: Payment Channels

PaymentChannelName

string

Payment channel

PaymentTagId

int

Payment tag identifier

PaymentTagName

string

Payment tag

CardNumber

string

Masked card number

CardOwnerName

string

Masked cardholder name

CardBankId

int

Identifier of the card's bank

CardBankName

string

Name of the card's bank

CardBrandId

int

Identifier of the card brand

CardBrandName

string

Name of the card brand

CardTypeId

int

Identifier of the card type

CardTypeName

string

Name of the card type

CardFamilyId

int

Identifier of the card family

CardFamilyName

string

Name of the card family

LastActivityDateTime

DateTime

Date and time of the last transaction related to the payment

PaymentAmount

decimal

Total payment amount

ActivityAmount

decimal

Last transaction amount

Example: If a transaction with a total amount of 1000 TL has a partial refund of 100 TL, this parameter will return 100.

IP

string

IP address to which the transaction was sent

ClientIP

string

IP address of the device used to initiate the payment

AppliedInterest

bool

Was an installment interest applied to the payment?

InterestRate

decimal?

Applied interest rate

CommissionRate

decimal?

Commission applied by the payment provider

Returns the value you configured in the Paywall panel.

OriginalAmount

decimal

Original payment amount

Example: If the payment is 1000 TL and after applying a 100 TL installment interest the charged amount becomes 1100 TL, this parameter will return 1000 TL as the original amount before interest was applied.

InterestAmount

decimal?

If applicable, the applied installment interest amount

CommissionAmount

decimal

Commission amount applied to the payment by the payment institution/bank

UsedSavedCard

bool

Was the payment made using a saved card?

UsedTempCard

bool

Was the payment made using a client-side tokenized card?

Activities

List

All actions related to the transaction (Created, Sale Started, Sale Failed, Cancellation Successful, etc.)

IsFullyRefunded

bool

Information on whether the transaction has been fully canceled/refunded.

RemainingRefundAmount

decimal

Total refundable amount. This amount decreases as partial refunds are made.

PaymentExternalAuthCode

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

PaymentExternalOrderId

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

PaymentExternalTransId

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

PaymentExternalHostReference

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

PaymentExternalMerchantId

string

For this parameter to be populated, the provider (Bank/PF) must return a value.

FirstActivityDateTime

DateTime

The date of the first activity of the payment

PendingProvisionClose

bool

Is the pre-authorization closure pending?

PosType

int

POS type of the activity

DayCount

int

POS day count of the activity

Commission

decimal

Commission rate applied to the activity

Interest

decimal

Interest rate applied to the activity

OriginalAmount

decimal

Original amount of the activity

InterestAmount

decimal

Interest amount applied to the activity

AppliedInterest

bool

Was interest applied to the activity?

AfterPartialRefundOriginalAmount

decimal

Remaining original amount after partial refund

IsPartialRefund

bool

Does the activity belong to a partial refund transaction?

Last updated