4. 3D Payment
When you send a request to the PayWall 3D payment service, a PayWall payment agent link is returned in the response if the request is successful. You must open this link in your application; it redire
POST
{{Base Adres}}/api/paywall/payment/start3d
Example JSON payload and sample code to be sent to the service are as follows.
apikeypublic
string
Yes
The Public Key obtained from the merchant panel.
apiclientpublic
string
Yes
The Public Client obtained from the merchant panel.
Paywall Request Payload
{
"PaymentDetail": {
"Amount": 1.00,
"MerchantUniqueCode": "22123222256226225",
"TrackingCode": "TrackingCode1",
"Half3D": false,
"MerchantSuccessBackUrl": "https://domain.com/callback",
"MerchantFailBackUrl": "https://domain.com/callback",
"ClientIP": "0.0.0.0",
"CurrencyId": 1,
"Installment": 1,
"ChannelId": 0,
"TagId": 0,
"PayWatch": null,
"PayWatchMultipleSupport": false,
"PayWatchMultiple": null,
"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
}]
}
Root Directory: PaymentDetail
Amount
decimal
Yes
Total amount of the payment basket.
MerchantUniqueCode
string
Yes
Must be the same value as the MerchantUniqueCode sent in the payment initiation request. This code is a unique identifier assigned by you for the transaction. It is used to uniquely identify and track a payment in Cancel/Refund/Payment Inquiry operations.
Length: 250 characters
TrackingCode
string
No
Can be used as a secondary tracking number on your side for the payment. You can use this parameter to send additional information that needs to be associated with the MerchantUniqueCode.
Important note: This is not unique and can be repeated. If uniqueness is required, it must be managed on your side.
MerchantSuccessBackUrl
string
Yes
The address to which the 3D screen will be redirected via FormPost for a successful transaction. Length: 250 characters See: Review
MerchantFailBackUrl
string
Yes
The address to which the 3D screen will be redirected via FormPost for a failed transaction. Length: 250 characters See: Review
Installment
int
Yes
Installment information; 1 must be sent for a single payment.
Half3D
bool
No
This parameter enables you to finalize payments with a custom call. If you send the Half3D parameter as true, the payment will remain in pre-authorization at the bank until you make the completion call.
ClientIP
string
Yes
IP address of the party performing the transaction. This could be the customer, user, member, etc. Length: 15 characters
TagId
int?
No
Used when you want to apply tagging to your payments.
ChannelId
int?
No
Used when you want to differentiate the channels through which your payments are transmitted to Paywall.
EndOfTheDay
int?
No
This is an end-of-day value. If you want your payment to be processed only through providers that support "Next Day" settlements among the connected providers, you must send this parameter with a value.
See: Review
RegionId
short?
No
This parameter allows you to specify the country under which the payment should be processed by the providers. If not specified, your payment will be treated as 'Global'.
ProviderBased
bool
No
Used when you decide on your side which provider the payment should be routed through.
ProviderKey
string
Yes/No
The provider key through which you want your payment to be processed.
MarketPlace > BasketAmount
decimal
No
Used within the scope of a marketplace.
PayWatch > Watch
bool?
No
Should the payment be monitored with PayWatch?
PayWatch > PaymentStatus[]
List<int>
Yes/No
Under which conditions should the payment be monitored?
PayWatch > ActionId
short
Yes/No
Action to be taken as a result of the monitoring. See: Review
PayWatch > WebhookAddress
string
Yes/No
When the monitoring action is set as a Webhook, the address to which the notification will be sent.
PayWatch > WatchMin
short
Yes/No
How many minutes after the payment should monitoring start?
Min: 5 Max: 20
PayWatchMultipleSupport
bool
No
Should the payment be monitored with multi-rule PayWatch?
PayWatchMultiple > Watch
bool
Yes/No
Should the payment be monitored with PayWatch Multi?
PayWatchMultiple > Jobs[] > PaymentStatus[]
List<int>
Yes/No
Under which conditions should the payment be monitored?
PayWatchMultiple > Jobs[] > ActionId
short
Yes/No
Action to be taken as a result of the monitoring See: Review
PayWatchMultiple > Jobs[] > WebhookAddress
string
Yes/No
When the monitoring action is set to Webhook, the address where the notification will be sent.
PayWatchMultiple > Jobs[] > WatchMin
short
Yes/No
How many minutes after the payment should monitoring start?
Min: 2 Max: 20
Root Directory: Card
OwnerName
string
Yes/No
Full name of the cardholder from whom the payment will be collected.
Length: 60 characters
Number
string
Yes/No
Card number from which the payment will be collected. Length: 20 characters
ExpireMonth
string
Yes/No
Expiration month of the card from which the payment will be collected.
ExpireYear
string
Yes/No
Expiration year of the card from which the payment will be collected.
Cvv
string
Yes/No
Security code of the card from which the payment will be collected.
UniqueCode
string
Yes/No
Identifier of the saved card. Returned by Paywall during card saving and listing operations.
TempCardToken
string
Yes/No
This parameter should be used when you want to process a payment with a temporary saved card (Client-Side Tokenization).
Partner? > PartnerBased
bool?
Yes/No
This parameter is used when cards are structured based on a partner model.
Partner? > PartnerIdentity
string
Yes/No
When cards are structured based on a partner model, this is your company's partnership identifier in Paywall. You can obtain this information from the Paywall panel.
CardSave? > Save
bool
Yes/No
If you want the card to be saved upon a successful payment, this should be sent as True during the transaction. When True is sent, the other parameters under the CardSave object will be taken into account.
CardSave? > Nickname
string
Yes/No
Alias of the card.
CardSave? > RelationalId1
string
Yes/No
The association value of the card.
CardSave? > RelationalId2
string
Yes/No
The second (hierarchical/tree structure) association value of the card.
CardSave? > RelationalId3
string
Yes/No
The third (hierarchical/tree structure) association value of the card.
Root Directory: Customer
FullName
string
Yes
First name of the buyer on the merchant side.
Phone
string
Yes
Mobile phone number of the buyer on the merchant side.
string
Yes
Email address of the buyer on the merchant side.
Country
string
Yes
Country information of the buyer on the merchant side.
City
string
Yes
City information of the buyer on the merchant side.
Address
string
Yes
Registered address of the buyer on the merchant side.
IdentityNumber
string
No
Identification number (TCKN) of the buyer on the merchant side.
TaxNumber
string
No
Tax identification number of the buyer on the merchant side.
Root 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
Party applying the discount to the product See:Discount Owner Types
DiscountType
int
No
Type of discount applied to the product See: Discount Types
DiscountValue
decimal
No
Discount value applied to the product. If the Type is 1 and the value is 10, a 10 (TL/USD/EURO) discount is applied. However, if the Type is 2, a 10% discount is applied.
CargoType
int
No
Shipping type of the product See: Shipping Types
CargoCurrencyId
int
No
Currency of the shipping cost.
CargoCost
decimal
No
Shipping cost
MemberId
int?
Yes/No
Required for the Marketplace model. Must be filled with the MemberId of the sub-merchant in the Paywall system
MemberEarningCalculated
bool?
Yes/No
Within the scope of the marketplace, if you have calculated the sub-merchant's payout yourself, you must send this parameter as true
MemberEarning
decimal?
Yes/No
Within the scope of the marketplace, if you have calculated the sub-merchant’s payout yourself, you must report the payout amount to Paywall using this parameter
MemberCustomCommission
bool
Yes/No
Within the scope of the marketplace, this parameter is used if you want to specify a commission for the sub-merchant specific to this sale.
MemberCommission
decimal?
Yes/No
Within the scope of the marketplace, this is the parameter used to send the commission value when you want to specify a commission for the sub-merchant specific to this sale.
Paywall Response
ErrorCode
int
Error code. Returns a value of '0' if the transaction is successful.
Result
bool
Returns a value of true or false. Returns true if the transaction is successful.
Message
string
If the transaction fails, this is the message describing the error. It provides language support based on the locale parameter.
Body
object
If the transaction fails, this is the code corresponding to the error.
{
"ErrorCode": 0,
"Result": true,
"Message": "Success",
"Body": {
"Message": null,
"RedirectUrl": "https://dev-payment-agent.itspaywall.com/paywall/callback?UniqueNumber=xxxxxx-xxxxxxx-xxxxxxx-xxxxxx",
"Payment": {
"PaymentId": 1918272,
"ActivityId": 3820721,
"UniqueCode": "87e30149-817b-42cf-a8a8-81af2af5722b",
"MerchantUniqueKey": "96aaa33633aaaa3aaaaa3aa2aa2322a2aaaa4a21331a234aas33aaaa3aasa"
}
}
}
Last updated