Paynet API
Search…
3D Payment
Payment with 3D Secure consists of two steps. These are 3D Payment Initial and 3D Payment Charge. With the 3D Payment Initial Service, you will be able to access the url or html content to access the 3D verification pages of the banks.
  • The request is sent with the "return_url" parameter in addition to 3D Payment Initial Service that returns the 3D confirmation result.
  • You can redirect your application via the "post_url" parameter that returns from the 3D Secure Payment Initial Service.
  • The 3D verification result is posted to the url specified in the "return_url" parameter that you send to the 3D Secure Payment Initial Service.
  • You can control the result by posting the incoming parameters from "return_url" to 3D Secure Payment Charge Service.

3D Secure Payment Initial

The return_url parameter is sent differently than the payment process. You can open the 3D verification page of banks by the "post_url" or "html_content" parameters that return from the Service.
Request Parameters
Response Parameters
Request
Response
Service Url
Parameter Name
Type
Required
Description
amount
decimal
Yes
Amount that charges from credit card. (You should use a comma (,) as a decimal seperator.)
reference_no
string
Yes
Reference no that related with the payment transaction. It must be unique.
return_url
string
Yes
URL where the 3D verification result will be posted
domain
string
Yes
This is website that integrated payment api.
agent_reference_no
string
No
Reference code of company's agent.
card_holder
string
No
Informations of card owner. It’s necessary if transaction doesn’t perform by saved card.
pan
string
No
Card number. It’s necessary if transaction doesn’t perform by saved card.
month
int
No
Month of card expiration date (e.g 8, 12). It’s necessary if transaction doesn’t perform by saved card.
year
int
No
Year of card expiration date (e.g 2020, 2030). It’s necessary if transaction doesn’t perform by saved card.
cvc
string
No
Card security code. It’s necessary if transaction doesn’t perform by saved card.
card_hash
string
No
Token information of saved card. It's necessary if transaction performs by saved card.
card_holder_phone
string
No
Phone number of card holder.
card_holder_mail
string
No
Mail address of card holder.
description
string
No
Decription area that related with transaction.
instalment
int
No
Information about how many installments will be perform on.
agent_id
string
No
If you have a sub agent you can track transaction that comes from which agent as post agent id to the this area.
company_amount
decimal
No
If you have a sub agent you can decide how much amount of transaciton will be transferred to your account.
add_commission
bool
No
You can post true If you want to add transaction commision to amount that charged on card.
transaction_type
int
No
Sales or pre provision.1 sales,3 pre provision.Default sales transaction.
ratio_code
string
No
You can see the ratio codes of ratio tables that you can define from the “API rate definitions ” at Paynet.com.tr management screens. Commision’s calculations performs on rate tables that belongs to the rate code that you post. Therefore you can do transactions that you wish which rates perform on.
save_card
bool
No
If you want to save your credit card with payment transactions,you can post this parameter as “true”.If you want to card saving operation,it is necessary to post card_desc and at least one of the card_owner_id or user_unique_id should be posted.
card_desc
string
No
This area is necessary if card saving operation will perform.
user_unique_id
string
No
Unique id that given to user by member workplace.It’s necessary If card saving will perform at first time.Unique value(card_owner_id) assigns to user by Paynet after completion first card saving operation. You must store this value on your system by associating it with your user. Afterwards you should use the card_owner_id variable given by Paynet instead of user_unique_id for the saving
card operations .
card_owner_id
string
No
Unique card holder information that has been generated by Paynet residing on user_unique_id after the first card saving process. This value is also used in subsequent card saving and recieving payment processes.
user_gsm_no
string
No
This parameter is used if you want to make an additional OTP control whilst the card saving procces. Please contact our customer service if you want more specific information about this matter please contact with our support team.
subscription_id
string
No
Regular payment code, used with (invoice_no)if you want to recieve manual payment with a already existing regular payment.
invoice_no
string
No
Regular payment invoice number.
ratio_code_method
char
No
Please contact our customer service if you want more spesific information about this matter.
merge_option
bool
No
Please contact our customer service if you want more spesific information about this matter.
pos_type
int
No
Please contact our customer service if you want more spesific information about this matter.
approved_card
bool
No
Please contact our customer service if you want more spesific information about this matter.
agent_customer_name
string
No
The parameter which you write in this area will be seen as the "Customer's Name". You may write your firm name which you want to be seen by your customer.
is_escrow
bool
No
If you want the transaction to be approved by the company, you must send "true". If the parameter is not sent, it is considered false.
iban
string
No
It should be entered with a country code (ex "TR") with 26 characters in total.
Parameter Name
Type
Description
post_url
string
It shows 3D verification page of bank when you redirect this Url.
html_content
string
It shows 3D verification page of bank when you add this html content to your page instead of post_url
token_id
string
Token information of transaction.
session_id
string
Session information of 3D payment flow.
object_name
string
tdsinitial_response.
code
string
Status code. See more
message
string
Transaction result message.
1
{
2
"return_url": "https://pts-kurumsal.paynet.com.tr/Demo/TDSCharge",
3
"amount": "20",
4
"reference_no": "REF1001",
5
"domain": "paynet.com.tr",
6
"card_holder": "Paynet A.Ş",
7
"pan": "1212121212121212",
8
"month": "12",
9
"year": "23",
10
"cvc": "000"
11
}
Copied!
1
{
2
"token_id": "DF63C3CB-358A-4258-BDDA-522F4D8C5FA8",
3
"session_id": "js_EAAAAFAL6CJHCCqAoll6DRsSqLfUMmn0pcqT6LZiJk6ZX*3G",
4
"post_url": "https://pts-api.paynet.com.tr/v1/paynetjgate/tds_easy?session_id=js_EAAAAFAL6CJHCCqAoll6DRsSqLfUMmn0pcqT6LZiJk6ZX*3G&token_id=DF63C3CB-358A-4258-BDDA-522F4D8C5FA8",
5
"html_content": "<form name=\"paynetForm\" id=\"paynetForm\" method=\"post\" action=\"https://pts-api.paynet.com.tr/v1/paynetjgate/tds_easy\"><input type=\"hidden\" name=\"session_id\" value=\"\"/><input type=\"hidden\" name=\"token_id\" value=\"\"/></form><script type=\"text/javascript\">document.forms[0].submit();</script>",
6
"object_name": "tdsinitial_response",
7
"code": 0,
8
"message": "Başarılı İşlem"
9
}
Copied!

3D Secure Payment Charge

The service where the corresponding amount is taken from the credit card as a result of 3D verification. You can complete the payment transfer by posting the "session_id" and "token_id" to the 3D Secure Payment Charge Service via the "return_url" parameter we used in "3D Secure Payment Initial".
Request Parameters
Response Parameters
Request
Response
Service Url
Parameter Name
Type
Required
Description
session_id
string
Yes
Session information of 3D payment flow
token_id
string
Yes
Token information of transaction
transaction_type
int
No
Sales or pre-provision. 1 for "sales", 3 for "pre-provision". Default is "sales".
Parameter Name
Type
Description
id
int
Unique paynet transaction id.
xact_id
string
Reference no that related with payment transaction.
xact_date
Datetime
Hash value of paynet transaction.
transaction_type
int
Type of transaction; 1 for "sales", 3 for "pre-provision".
pos_type
int
Pos type.
is_tds
string
If it's true non-3D Secure transactions will not be performed. If it's false, 3D or non-3D Secure transactions may be performed.
user_id
string
User code.
email
string
Email address.
phone
string
Phone number.
bank_id
string
Bank code.
bank_name
string
Bank name.
instalment
int
Installment information.
ratio
float
Rate of transaction commision.
card_no_masked
string
Card information of masked card.
card_holder
string
Card holder.
amount
decimal
Gross transaction amount.
net_amount
decimal
Amount except commision.
comission
decimal
Commision amount.
comission_tax
decimal
Amount of commision service.
currency
string
Currency.
authorization_code
string
Bank authorization code.
reference_code
string
Bank reference code.
order_id
string
Bank order id.
is_succeed
bool
Whether transaction is success or not. If result true it means amount charged from card.
paynet_error_id
string
Paynet error code.
paynet_error_message
string
Paynet error explanation.
bank_error_id
string
Error code that posted from bank.
bank_error_message
string
Error message that posted from bank.
bank_error_short_desc
string
Error short explanation that posted from bank.
bank_error_long_desc
string
Error long explanation that posted from bank.
agent_reference_no
string
Reference code that posted during request.
campaign_url
string
At the some of the card programs selections of plus installment or postponed intallments can be selected on the another application after transaction.
end_user_comission
decimal
Comission value on "ratio_code" usage.
end_user_ratio
float
Comission rate on "ratio_code" usage.
ratio_code
string
Ratio code.
ratio_code_method
string
Ratio code method.
is_save_card_succeed
bool
Result message shown if undergoing a card saving process.
save_card_result_message
string
Card saving message.
card_owner_id
string
Id that is going to be used in subsequent card saving processes.
card_logo_url
string
Saved card logo.
md_status
string
Bank 3D result code.
object_name
string
Object name.
code
string
Status code. See more
message
string
Transaction result message.
1
{
2
"session_id": "js_EAAAAFAL6CJHCCqAoll6DRsSqLfUMmn0pcqT6LZiJk6ZX*3G",
3
"token_id": "DF63C3CB-358A-4258-BDDA-522F4D8C5FA8"
4
}
Copied!
1
{
2
"is_tds": true,
3
"md_status": 1,
4
"id": 7438118,
5
"xact_id": "xk_EAAAADIJMBHKDhG0bG1f/yItmz1v9cZqMZVHViQJF0VezRKF",
6
"xact_date": "2020-02-25T15:12:48.353769+03:00",
7
"transaction_type": 1,
8
"pos_type": 5,
9
"agent_id": "1001",
10
"user_id": "paynet",
11
"email": null,
12
"phone": null,
13
"instalment": 4,
14
"ratio": 0,
15
"card_no_masked": "435508******4358",
16
"card_holder": "Paynet Ödeme Hizmetleri AŞ",
17
"amount": 6500,
18
"net_amount": 6500,
19
"comission": 0,
20
"comission_tax": 0,
21
"currency": "TRY",
22
"bank_id": "WRLD",
23
"bank_name": "WorldCard",
24
"bank_authorization_code": "159116",
25
"bank_reference_code": "90eb21b1be8044859dc9ab6c00faba89",
26
"bank_order_id": "B72A95279A3D4F54A41A408FB784E77A",
27
"is_succeed": true,
28
"paynet_error_id": "",
29
"paynet_error_message": "",
30
"bank_error_id": "",
31
"bank_error_message": "",
32
"bank_error_short_desc": "",
33
"bank_error_long_desc": "",
34
"reference_no": "857f60cf128ddbf112171522",
35
"xact_transaction_id": "B72A9527-9A3D-4F54-A41A-408FB784E77A",
36
"campaign_url": "",
37
"end_user_comission": 0,
38
"end_user_ratio": 0,
39
"ratio_code": "",
40
"ratio_code_method": "",
41
"is_save_card_succeed": false,
42
"save_card_result_message": "",
43
"card_owner_id": "",
44
"user_unique_id": "",
45
"card_hash": "",
46
"card_bank_id": "",
47
"card_logo_url": "",
48
"company_cost_ratio":"",
49
"company_commission":"",
50
"company_commission_with_tax":"",
51
"company_net_amount":"",
52
"plus_installment":"",
53
"card_type":"",
54
"card_brand_name":"",
55
"object_name": "tdscharge_response",
56
"code": 0,
57
"message": "Başarılı İşlem"
58
}
Copied!
During the tds_charge process, if you can not get a response due to reasons such as connection timeout or execution time out, you can continue the process with the same session_id and token_id until you get a response. If there is a previously successful transaction with the same session_id and token_id, the system returns that transaction. In this case, the result code returns 100 instead of 0, and the result message returns as "Önceki Başarılı İşlem".
Last modified 1yr ago