2. Non-Secure
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.
POST
{{Base Adres}}/api/paywall/payment/startdirect
The example JSON and sample codes to be sent to the service are as follows.
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": 1.00,
"MerchantUniqueCode": "22123222256226225",
"Half2D": false,
"ClientIP": "0.0.0.0",
"CurrencyId": 1,
"Installment": 1,
"ChannelId": 0,
"TagId": 0,
"EndOfTheDay": 1,
"RegionId": 1,
"ProviderBased": false,
"ProviderKey": "providerkey",
"MarketPlace": {
"BasketAmount": 1.00
}
},
"Card":{
"OwnerName":"Iyzico Kartı",
"Number":"5528790000000008",
"ExpireMonth":"12",
"ExpireYear":"2030",
"Cvv":"123",
"UniqueCode":"",
"TempCardToken": "",
"Partner": { // Nullable
"PartnerBased": false,
"PartnerIdentity": ""
},
"CardSave": {
"Nickname": "Kredi kartım",
"RelationalId1": "userid19283746",
"RelationalId2": "",
"RelationalId3": "",
"Save": true
}
},
"Customer":{
"FullName":"FullName",
"Phone":"5336662211",
"Email":"[email protected]",
"Country":"Country",
"City":"City",
"Address":"Address",
"IdentityNumber":"IdentityNumber",
"TaxNumber":"TaxNumber"
},
"Products":[{
"ProductId": "ProductId",
"ProductName": "ProductName",
"ProductCategory": "ProductCategory",
"ProductDescription": "ProductDescription",
"ProductAmount": 1.0,
"MemberId": 0,
"DiscountOwnerType": 0,
"DiscountType": 0,
"DiscountValue": 0,
"CargoType": 0,
"CargoCurrencyId": 0,
"CargoCost": 0,
"MemberCustomCommission": false,
"MemberCommission": 0,
"MemberEarningCalculated": false,
"MemberEarning": 0
}]
}
Main Directory: PaymentDetail
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
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
OwnerName
string
Yes/No
The full name of the cardholder from whom the payment will be collected. Length: 60 characters
Number
string
Yes/No
The card number from which the payment will be collected.
Length: 20 characters
ExpireMonth
string
Yes/No
The expiration month of the card from which the payment will be collected.
ExpireYear
string
Yes/No
The expiration year of the card from which the payment will be collected.
Cvv
string
Yes/No
The security code of the card from which the payment will be collected.
UniqueCode
string
Yes/No
The identity information related to the saved card. It is returned by Paywall during the save and listing process.
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
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.
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>
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
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": 2095851,
"ActivityId": 4220860,
"UniqueCode": "1f1f6a46-d860-4282-9346-9807fb1de440",
"MerchantUniqueKey": "3ef9ef3f-5cc8-46bf-84ee-03f665c698c6",
"PaymentGatewayId": 1262,
"PaymentGatewayName": "correctaccount",
"PaymentGatewayProviderName": "Provider",
"Card": {
"Saved": false,
"UniqueCode": ""
}
},
"Error": {
"ProviderErrorCode": null,
"ProviderErrorMessage": null,
"BankErrorCode": null,
"BankErrorMessage": null
}
}
}
Last updated