🔐Authorization
TempToken
POST {{Base Adres}}/api/paywall/temptoken
apikeypublic
string
Yes
The Public Key you have obtained from the merchant panel.
apiclientpublic
string
Yes
The Public Client you have obtained from the merchant panel.
The parameters that need to be sent to the service are as follows:
boolean
Yes
Will the token be used for card storage on the client side?
boolean
Yes
Will the token be used for performing 3D transactions on the client side?
int
Yes
How long will the token be valid?
A value between 0 and 30 minutes can be defined.
The sample JSON and code snippets to be sent to the service are as follows:
{
"ClientCardSave": true,
"ThreeDSession": false,
"ExpiryMin": 30
}using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
class Program
{
static readonly HttpClient client = new HttpClient();
static async Task Main()
{
var url = "{{MemberBaseAddress}}/api/paywall/member";
var data = new
{
IsSubMerchant = true,
MemberType = 1,
MemberExternalId = "111aa11135552244413",
MemberName = "Intranet Technology",
MemberTitle = "Intranet Technology Yazılım A.S",
MemberTaxOffice = "Besiktas",
MemberTaxNumber = "4651176935",
MemberIdentityNumber = "11111111110",
MemberEmail = "[email protected]",
MemberPhone = "5554443322",
MemberAddress = "test adresi",
ContactName = "Member Name",
ContactLastname = "Lastname",
BankAccounts = new[]
{
new {
CurrencyId = 1,
Title = "Ünvan",
Iban = "TR370006400012345678987654"
}
},
ValueDate = new
{
CalculationType = 1,
CalculationValue = 10,
Commission = 10
}
};
var json = JsonConvert.SerializeObject(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");
content.Headers.Add("apikeypublic", "%PUBLICKEY%");
content.Headers.Add("apiclientpublic", "%PUBLICCLIENT%");
var response = await client.PostAsync(url, content);
if (response.IsSuccessStatusCode)
{
var responseBody = await response.Content.ReadAsStringAsync();
dynamic result = JsonConvert.DeserializeObject(responseBody);
Console.WriteLine($"ErrorCode: {result.ErrorCode}");
Console.WriteLine($"Result: {result.Result}");
Console.WriteLine($"Message: {result.Message}");
if (result.Body != null)
{
dynamic body = result.Body;
Console.WriteLine($"Id: {body.Id}");
Console.WriteLine($"IsSubMerchant: {body.IsSubMerchant}");
Console.WriteLine($"MemberType: {body.MemberType}");
Console.WriteLine($"MemberExternalId: {body.MemberExternalId}");
Console.WriteLine($"MemberName: {body.MemberName}");
Console.WriteLine($"MemberTitle: {body.MemberTitle}");
Console.WriteLine($"MemberTaxOffice: {body.MemberTaxOffice}");
Console.WriteLine($"MemberTaxNumber: {body.MemberTaxNumber}");
Console.WriteLine($"MemberEmail: {body.MemberEmail}");
Console.WriteLine($"MemberPhone: {body.MemberPhone}");
Console.WriteLine($"MemberAddress: {body.MemberAddress}");
Console.WriteLine($"ContactName: {body.ContactName}");
Console.WriteLine($"ContactLastname: {body.ContactLastname}");
Console.WriteLine($"InsertDateTime: {body.InsertDateTime}");
}
}
}
}The parameters returned from the service are as follows:
ErrorCode
int
Error code. Returns the value '0' if the operation is successful.
Result
bool
Returns a value of either true or false. If the operation is successful, it returns true.
Message
string
If the operation fails, this is the message describing the error. It provides language support based on the locale parameter.
Body
object
Transaction detail information.
Last updated