13. Payment Inquiry
Payment Inquiry
Payment Inquiry
GET
{{Base Address}}/api/paywall/private/query
apikeyprivate
string
Yes
The Public Key obtained from the merchant panel.
apiclientprivate
string
Yes
The Public Client obtained from the merchant panel.
merchantuniquecode
string
Yes
The unique tracking code provided by your side for the payment.
Example codes:
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("merchantuniquecode", "%MerchantUniqueCode%");
var response = await client.GetAsync("{{Private Base Address}}/api/paywall/private/query");
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...
}
}
Response From The service:
PaymentId
int
Payment ID
ActivityId
int
Payment Last Transaction ID
Status
boolean
Last Transaction Status, true: successful / false: unsuccessful
StatusName
string
Payment Status
StatusId
int
Payment Status ID
TypeName
string
Payment Last Transaction Type
TypeId
int
Payment Last Transaction Type Identifier
Installment
int
Installment Information
CurrencyId
int
Payment Currency Identifier
CurrencyName
string
Payment Currency
PaymentMethodId
int
Payment Method Identifier
PaymentMethod
string
Payment Method
PaymentChannelId
int
Payment Channel Identifie
PaymentChannelName
string
Payment Channel
PaymentTagId
int
Payment Tag Identifier
PaymentTagName
string
Payment tag
{
"ErrorCode": 0,
"Result": true,
"Message": "",
"Body": {
"Paywall": {
"PaymentId": 329659,
"ActivityId": 355097,
"Status": true,
"StatusName": "Başarılı",
"StatusId": 4,
"TypeName": "İade",
"TypeId": 2,
"Installment": 1,
"CurrencyId": 1,
"CurrencyName": "TRY",
"PaymentMethodId": 1,
"PaymentMethodName": null,
"PaymentChannelId": 6,
"PaymentChannelName": "Checkout",
"PaymentTagId": 0,
"PaymentTagName": null,
"CardNumber": "552879******0008",
"CardOwnerName": "tes test",
"CardBankName": "T.HALK BANKASI A.Ş.",
"CardBrandName": "Master Card",
"CardTypeName": "Credit",
"CardFamilyName": "Paraf",
"LastActivityDateTime": "2023-04-10T04:05:10.8722766",
"PaymentAmount": 1.00,
"ActivityAmount": 1.00,
"IP": "3.94.21.171"
}
}
}
Last updated