3. 3D Payment Initiation
3D Payment Initiation
POST
{{Base Adres}}/api/paywall/payment/start3d
Sending a request to the address provided above will be sufficient. You should change the 'Base Address' field for both the test environment and the production environment.
Important: In order to use the payment service, you need to send the 'apikeypublic' and 'apiclientpublic' parameters in the 'Header' field.
PaymentAPI Address
Parameter | Type | Required | Description |
---|---|---|---|
apikeypublic | string | Yes | The Public Key obtained from the merchant panel. |
apiclientpublic | string | yes | The Public Client obtained from the merchant panel. |
The parameters that need to be sent to the service are as follows:
Parameter | Type | Required | Description |
---|---|---|---|
Amount | decimal | Yes | Payment basket amount. |
MerchantUniqueCode | string | Yes | The MerchantUniqueCode in the request sent for payment initiation must have the same value. This code is a unique value provided by your side for processing the payment, and it is used to uniquely identify and track a payment for cancellation/refund/payment inquiry operations. Length: 250 Character |
CurrencyId | int | Yes | Currency |
MerchantSuccessBackUrl | string | Yes | The URL address to be sent if the transaction is successful. Length: 250 Character 🔖 FormPost atılır (Sayfanın en aşağısında) |
MerchantFailBackUrl | string | Yes | The URL address to be sent if the transaction fails. Length: 250 Character 🔖 FormPost atılır (Sayfanın en aşağısında) |
Installment | int | Yes | The installment information should be set to 1 for a single payment. |
ClientIP | string | Yes | The IP address of the party performing the transaction. Customer/User/Member, etc. Length: 15 Character |
OwnerName | string | Yes | The first and last name of the cardholder from whom the payment will be received. Uzunluk: 60 karakter |
Number | string | Yes | The card number from which the payment will be received. Uzunluk: 20 karakter |
ExpireMonth | string | Yes | The expiration month of the card from which the payment will be received. |
ExpireYear | string | Yes | The expiration year of the card from which the payment will be received. |
Cvv | string | Yes | The security code of the card from which the payment will be received. |
UniqueCode | string | No | The value corresponding to the card information stored on the provider's side (the identity of card Y stored with company X). |
FullName | string | Yes | The name of the buyer on the merchant's side. |
Phone | string | Yes | The mobile phone number of the buyer on the merchant's side. |
string | Yes | The email address of the buyer on the merchant's side. | |
Country | string | Yes | The country information of the buyer on the merchant's side. |
City | string | Yes | The city information of the buyer on the merchant's side. |
Address | string | Yes | The registered address of the buyer on the merchant's side. |
IdentityNumber | string | Yes | The identification (TCID) number of the buyer on the merchant's side. |
TaxNumber | string | Yes | The tax identification number of the buyer on the merchant's side. |
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 | Yes | The party applying a discount to the product. See: Discount Holder Types |
DiscountType | int | Yes | Discount Type Applied to the Product See: Discount Types |
DiscountValue | decimal | Yes | The discount value applied to the product. If it's Type 1 and the value is 10, it applies 10 (TL/USD/EURO), but if it's Type 2, it applies 10%." |
CargoOwnerType | int | Yes | The party covering the shipping cost for the product. See: Shipping Cost Holder Types |
CargoCurrencyId | int | Yes | The currency of the shipping cost. |
CargoCost | decimal | Yes | The shipping cost |
MemberId | int | Yes/No | This is mandatory for the Marketplace model. It should be filled with the MemberId information from the sub-merchant's PayWall system." |
ChannelId | int | Yes | To help you report the source of requests such as WEB, MOBILE, API, it's essential to send this parameter. If you leave it empty or send 0, you will report it as (Not specified) through the PayWall panel. |
TagId | int | Yes | "You can create custom tags for your payments, allowing you to perform tag-specific analysis in billing and reporting screens. For example: XApp-Mobile, YApp-Web. You can create these tags through the merchant panel. |
Half3D | bool | Yes | This parameter will assist you in finalizing your payments with a special call for financialization. If you send the Half3D parameter as true, your payment will remain in the bank's provisional state until you make the payment completion call. |
Sample to be sent to the service JSON and sample codes is as follows
Response from the service:
Parameter | Type | Description |
---|---|---|
ErrorCode | int | Error code. If the operation is successful, it returns a value of '0'. |
Result | bool | It returns either true or false. If the operation is successful, it returns 'true'. |
Message | string | If the operation encounters an error, this message provides information about the error and offers language support based on the locale parameter. |
Body | nesne | Details of the operation. |
Body:Redirect | string | URL for entering 3D information required for the transaction. You need to proceed with the payment process through this URL. |
Form Post
The parameters sent to the MerchantSuccessBackUrl or MerchantFailBackUrl addresses (Use parameter names as specified below)
Parameter | Type | Required | Description |
---|---|---|---|
date | string | No | Payment date |
status | string | No | Indicates the status of the payment and has a value of
|
errorCode | string | Yes | In case of an unsuccessful payment, it returns the reason for the failed payment from the PayWall error codes. |
errorMessage | string | Yes | In case of payment failure, it returns detailed information regarding the reason for the failure. |
paymentCode | string | No | The PayWall task identifier generated for the payment. |
uniqueCode | string | No | The unique code generated by the merchant (you) for the payment. |
amount | string | No | Payment amount. |
installment | string | No | Payment installment information. |
paymentId | string | No | Payment ID. |
Last updated