3D Payment

Payment with 3D Secure consists of two steps.These are 3D Payment Start and 3D Payment. You can access the url and html content that accesses banks 3D Confirmation page by the 3D Secure Payment Start Service

  • The request is sent with the "return_url" parameter in addition to 3D Payment Start Service that returns the 3D confirmation result.

  • You can redirect you application via the "post_url" parameter that returns from the 3D Secure Payment Start Service

  • The "return_url" parameter that we sent to the 3D Secure Payment Service is posted into designated url

  • You can control the result by posting the incoming parameters from return_url to 3D Secure Payment Service

Start 3D Payment

The return_url parameter is sent differently than the payment process.You can open the 3D confirmation page of banks by the "post_url" or "html_content" parameters that return from the Service.

Request Parameters
Response Parameters
Request
Response
Service Url
Request Parameters

No

Parameter Name

Type

Required

Description

1

amount

decimal

Yes

Amount that draw from credid cart

2

reference_no

string(50)

Yes

Reference no that related with payment transaction

3

return_url

string(256)

Yes

4

domain

string(256)

Yes

Domain informations of application that transaction perform .

5

card_holder

string(50)

No

Informations of card owner.It’s necessary if transaction doesn’t perform with saved card.

6

pan

string

No

Card number. It’s necessary if transaction doesn’t perform with saved card.

7

month

int

No

Expiration date of Month (e.g 8,12) It’s necessary if transaction doesn’t perform with saved card.

8

year

int

No

Expiration date of Year ( e.g 2020,2030). It’s necessary if transaction doesn’t perform with saved card.

9

cvc

string

No

Card security code. It’s necessary if transaction doesn’t perform with saved card.

10

card_hash

string

No

Token information of saved card. It’s necessary if card informations doesn't entered

11

card_holder_phone

string(10)

No

Phone number of card holder

12

card_holder_mail

string(60)

No

Mail address of card holder

13

description

string(140)

No

Decription area that related with transaction

14

instalment

int

No

Information about how many installments will be perform on.

15

agent_id

string(10)

No

If you have a sub agent you can track transaction that comes from which agent as post agent id to the this area.

16

company_amount

decimal

No

If you have a sub agent you can decide how much amount of transaciton will be transferred to your account

17

add_commission

bool

No

You can post true If you want to add transaction commision to amount that draw on card.

18

transaction_type

char(1)

No

Sales or pre provision.1 sales,3 pre provision.Default sales transaction.

19

ratio_code

string(8)

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.

20

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.

21

card_desc

string(100)

No

This area is necessary if card saving operation will perform.

22

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 .

23

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

24

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.

25

subscription_id

string

No

Regular payment code, used with (invoice_no)if you want to recieve manual payment with a already existing regular payment.

26

invoice_no

string

No

Regular payment invoice number.

27

ratio_code_method

char(1)

No

Please contact our customer service if you want more spesific information about this matter.

28

merge_option

bool

No

Please contact our customer service if you want more spesific information about this matter.

29

pos_type

int

No

Please contact our customer service if you want more spesific information about this matter.

30

approved_card

bool

No

Please contact our customer service if you want more spesific information about this matter.

31

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.

32

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.

33

iban

string

No

It should be entered with a country code (ex "TR") with 26 characters in total.

Response Parameters

No

Parameter Name

Type

Description

1

post_url

string

It shows 3D verificatiıon of bank when you redirect this Url

2

html_content

string

It shows 3D verificatiıon of bank when you add this html content to your page instead of post_url

3

token_id

string

Token information of transaction

4

session_id

string

Session information of 3D payment flow

5

object_name

string

tdsinitial_response

6

code

string

See (html status codes)

7

message

string

Transaction result message

Request
{
"return_url": "https://pts-kurumsal.paynet.com.tr/Demo/TDSCharge",
"amount": "20",
"reference_no": "REF1001",
"domain": "paynet.com.tr",
"card_holder": "Paynet A.Ş",
"pan": "1212121212121212",
"month": "12",
"year": "23",
"cvc": "000"
}
Response
{
"token_id": "DF63C3CB-358A-4258-BDDA-522F4D8C5FA8",
"session_id": "js_EAAAAFAL6CJHCCqAoll6DRsSqLfUMmn0pcqT6LZiJk6ZX*3G",
"post_url": "https://pts-api.paynet.com.tr/v1/paynetjgate/tds_easy?session_id=js_EAAAAFAL6CJHCCqAoll6DRsSqLfUMmn0pcqT6LZiJk6ZX*3G&token_id=DF63C3CB-358A-4258-BDDA-522F4D8C5FA8",
"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>",
"object_name": "tdsinitial_response",
"code": 0,
"message": "Başarılı İşlem"
}

Do 3D Payment Transaction

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 Service via the "return_url" parameter we used in "Start 3D Payment ".

Request Parameters
Response Parameters
Request
Response
Service Url
Request Parameters

Parameter Name

Type

Required

Description

session_id

string

Yes

Session information of 3D paymnet flow

token_id

string

Yes

Token information of transaction

transaction_type

char(1)

No

Sales or pre-provision. 1 sales ,3 pre-provision.It's default transaction type

Response Parameters

Parameter Name

Type

Description

id

int

single paynet transaction id

xact_id

string

Reference no that related with payment transaction

xact_date

Datetime

Hash value of paynet transaction

transaction_type

char(1)

Type of transaction,sales, pre provision

pos_type

int

Pos type

is_tds

string

If it's true it can not do transaction without 3D.If it's false ,it can do transaction with 3D or without 3D

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

İnstallment informations

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 draw 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 message that posted from bank

bank_error_long_desc

string

Error mesage 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 +installment or postponed intallments can be selected on the another applications 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

Http status code

message

string

Transaction result message

Request

{
"session_id": "js_EAAAAFAL6CJHCCqAoll6DRsSqLfUMmn0pcqT6LZiJk6ZX*3G",
"token_id": "DF63C3CB-358A-4258-BDDA-522F4D8C5FA8"
}
Response

{
"is_tds": true,
"md_status": 1,
"id": 7438118,
"xact_id": "xk_EAAAADIJMBHKDhG0bG1f/yItmz1v9cZqMZVHViQJF0VezRKF",
"xact_date": "2020-02-25T15:12:48.353769+03:00",
"transaction_type": 1,
"pos_type": 5,
"agent_id": "1001",
"user_id": "paynet",
"email": null,
"phone": null,
"instalment": 4,
"ratio": 0,
"card_no_masked": "435508******4358",
"card_holder": "Paynet Ödeme Hizmetleri AŞ",
"amount": 6500,
"net_amount": 6500,
"comission": 0,
"comission_tax": 0,
"currency": "TRY",
"bank_id": "WRLD",
"bank_name": "WorldCard",
"bank_authorization_code": "159116",
"bank_reference_code": "90eb21b1be8044859dc9ab6c00faba89",
"bank_order_id": "B72A95279A3D4F54A41A408FB784E77A",
"is_succeed": true,
"paynet_error_id": "",
"paynet_error_message": "",
"bank_error_id": "",
"bank_error_message": "",
"bank_error_short_desc": "",
"bank_error_long_desc": "",
"reference_no": "857f60cf128ddbf112171522",
"xact_transaction_id": "B72A9527-9A3D-4F54-A41A-408FB784E77A",
"campaign_url": "",
"end_user_comission": 0,
"end_user_ratio": 0,
"ratio_code": "",
"ratio_code_method": "",
"is_save_card_succeed": false,
"save_card_result_message": "",
"card_owner_id": "",
"user_unique_id": "",
"card_hash": "",
"card_bank_id": "",
"card_logo_url": "",
"company_cost_ratio":"",
"company_commission":"",
"company_commission_with_tax":"",
"company_net_amount":"",
"plus_installment":"",
"card_type":"",
"card_brand_name":"",
"object_name": "tdscharge_response",
"code": 0,
"message": "Başarılı İşlem"
}

If you cant get any response from reason of connection timeout or execution time during the tds_charge.You can keep transaction going with the same session_id and tokend_id till get response.If system has an success transaction with same session_id and token_id ,system returns that transaction.In this case result code returns 100 instead of 0 and result message return as “Önceki Başarılı İşlem”.