Paynet API
1.0.1
1.0.1
  • Başlarken
  • Nasıl Erişirim?
  • Neye İhtiyacım var?
  • Hazır Altyapılar
  • Ödeme Metotları
    • API Entegrasyonu
      • Ödeme
      • 3D ile ödeme
    • Hazır Form
    • Özelleştirilebilir Form
      • Event Parametreleri
      • Servis Parametreleri
    • PayLink
      • PayLink Oluşturma
        • POST Metodu
        • confirmation_url'e Post Edilen Parametreler
      • PayLink Detay
      • PayLink Listeleme
      • PayLink Durum Güncelleme
  • SERVİSLER
    • İşlem
      • Ödeme Onaylama
      • Finansallaştırma
      • Ödeme Kontrol
      • İşlem Detay
      • İşlem Listesi
      • İşlem İşaretleme
      • İşlem Bilgi Ekleme
      • İşlem Slip
      • İmza Yükle
      • Ödeme Raporu
      • Escrow Durum Güncelleme
    • İptal/İade
      • İade
      • İade Listesi
      • Ön Otorizasyon İptal
      • Finansallaştırma İptal
    • Oran
      • Oran Tablosu(Sunucu Tabanlı)
      • Oran Tablosu(İstemci Taraflı)
      • Oran Tipi Düzenleme
      • Oran Tipi Silme
      • Oran Tanımlama
    • Bayi
      • Auto Login
      • Login
      • Bayi Kontrol
      • Limit
    • Abonelik
      • Oluşturma
      • Detay
      • Listeleme
      • Durum Güncelleme
      • Tutar Güncelleme
      • Tekrar Gönder
      • Kart Bilgisi Listesi
      • Kart Etiket Bilgisi Güncelleme
      • Kart Bilgisi Silme
      • Kart İlişkilendirme
      • Kart Ekleme
        • Kart ekleme başlatma
        • Kart ekleme tamamlama
      • Kart Bilgisi Sıra Düzenleme
      • Kart Bilgisi Filtreleme
      • Fatura oluşturma
      • Fatura Listesi
      • Fatura Durum Güncelleme
      • Fatura Tutar Güncelleme
      • Plan Tutar Güncelleme
      • Toplu Fatura Durum Güncelleme
      • Fatura Ödeme Girişimi Listesi
      • Manuel Çekim
    • Kart Saklama
      • Kart Bilgisi Saklama
      • Kart Silme
      • Kart Açıklaması Güncelleme
      • Kart Listesi
      • OTP Gönderme
      • OTP Kontrol
    • Cari Hesap Entegrasyonu
    • Fatura
    • Başvuru
      • Başvuru Oluşturma
      • Başvuru Çekme
      • Form Tipine Bağlı Dokümanlar
  • GENEL BİLGİLER
    • Banka Kodları
    • Taksit Kodları
    • Hata Kodları
      • HTTP Status Kodlar
      • Hata Tipleri
      • Dönüş Kodları
    • Veri Tipleri
      • Status
      • Kart Tipi
      • İşlem Tipi
    • Test Kartları
    • Örnek Projeler
    • Sıkça Sorulan Sorular
      • Kart Saklama Süreci Hakkında
  • English
    • What I need ?
    • API Integration
      • Payment
      • 3D Payment
    • Card Save
      • Card Information Saving
      • Deleting Card
      • Card Description Update
      • Card List
      • Sending OTP
      • OTP Control
    • Transaction
      • Payment Confirmation
      • Financialization
      • Payment Check
      • Transaction Details
      • Transaction List
      • Transaction Marking
      • Adding Transaction Information
      • Transaction Slip
      • Upload Signature
      • Payment Report
      • Escrow Status Update
    • Cancellation/Refund
      • Refund
      • Refund List
      • Pre-Authorization Cancellation
      • Financialization Cancellation
    • Agent
      • Auto Login
Powered by GitBook
On this page
  1. English
  2. Transaction

Payment Confirmation

v1/transaction/charge

PreviousTransactionNextFinancialization

Last updated 3 years ago

The service that the credit card payment process is finalized and the relevant amount is withdrawn from the credit card.This service is initializes by Paynet.js or Paynet-custom.js in custom form and embedded form integrations. To use this service, session_id and token_id information that Paynet.js posted to your server are required.

You should perform basic authentication with secret_key to use payment service.

https://api.paynet.com.tr/v1/transaction/charge

Parameter Name

Type

Required

Description

session_id

string

Yes

Parameter that Paynet.js attacht to your form.

token_id

string

Yes

Parameter that Paynet.js attacht to your form.

amount

string

Yes

The amount parameter sent to this service is compared with the amount that set with the data-amount parameter when starting the payment process in embedded form or custom forms integration. If the amounts do not match, the payment process cannot be completed and the payment service returns an error. The amount sent to this service should be the same as the amount that set with data-amount in embedded form integration, and the amount set with dataamount in custom forms integration should be multiplied by 100.

transaction_type

char

Yes

Sale or pre-authorization. 1 for sale, 3 for pre-authorisations. The default value is sale.

add_comission_amount

bool

Yes

It is compared with the value that set with the dataadd_commission_amount parameter when starting the payment process in embedded form or custom forms integration. If the values do not match, the payment process cannot be completed, the payment service returns an error.

ratio_code

string

Yes

When starting the payment process in embedded form or custom forms integrations, it is compared with the value that set with the dataratio_code parameter. If the values do not match, the payment process cannot be completed, the payment service returns an error. If the ratio code will not be used, this parameter can be sent as an empty string.

installments

string

Yes

When starting the payment process embedded or custom form integrations, it is compared with the value set with the data-installments parameter. If the values do not match, the payment process cannot be completed, the payment service returns an error. If installment limitation will not be used with this parameter, the value of the parameter can be sent as an empty string.

no_instalment

bool

Yes

When starting the payment process in embedded form or custom form integrations, it is compared with the value set with the data-no_instalment parameter. If the values do not match, the payment process cannot be completed, the payment service returns an error.This value can be set as true or false.

tds_required

bool

Yes

When starting the payment process in embedded form or custom form integrations, it is compared with the value set with the data-tds_required parameter. If the values do not match, the payment process cannot be completed, the payment service returns an error.This value can be set as true or false.

reference_no

string

No

A reference number to be sent by you to associate with the transaction, such as order number, invoice number. If you send the reference number with a unique value, you can check the status of the transaction through the check transaction service, in cases where you cannot get a response from the charge transaction service. In this way, we will be protected from duplicate transaction. In the example below, the session_id and token_id are taken and sent to the payment confirmation service.

is_escrow

bool

No

If you want the transaction to be approved by the company, you should send "true". If the parameter has not been sent, "false" is accepted.

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

iban

string

No

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

Parameter Name

Type

Description

id

string

Transaction Id.

xact_id

string

Encrypted Transaction Id.

xact_date

datetime

Transaction Date.

transaction_type

char

1: sale

pos_type

char

5: Paynet POS

is_tds

bool

If the transaction performed with 3D,this value return as true.

agent_id

string

Paynet agent code of the dealer that performed the transaction.

user_id

string

Returns default as PaynetJ.

email

string

Mail address.

phone

string

Phone number.

bank_id

char

The bank's code in the Paynet system.

bank_name

string

The bank's name in the Paynet system.

campaign_url

string

The url showing the banks' plus installment and installment postpone selection screen. Call us for more detail information.

instalment

int

ratio

float

Rate that used during transaction.

ratio_code

string

Ratio code that used during transaction.

card_no_masked

string

Masked card number.

card_holder

string

Card owner.

amount

decimal

Amount that withdrawn from credit card.

net_amount

decimal

Amount without commission.

comission

decimal

Comission.

comission_tax

decimal

Comission tax.

end_user_commission

decimal

End user comission.

end_user_ratio

float

User ratio code that used during checkout.

currency

char

Currency.

authorization_code

string

Bank confirmation code.

reference_code

string

Bank reference code.

order_id

string

Bank order no.

user_unique_id

string

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 saved card operations.

card_owner_id

string

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.

card_hash

string

Hash value of card number.

card_bank_id

string

The code of the stored card in the Paynet system.

card_logo_url

string

Logo image of the card.

is_succeed

bool

It returns true if the transaction successful. If the transaction is successful, it returns as http 200 and and is_succeed return as true. If the bank does not approve transaciton, it returns http 200 and is_succed return as false is_save_card_succeed: Returns true if the card save operation is successful. Its default value is false.

is_save_card_succeed

bool

Returns true if the card save operation is successful. Its default value is false.

save_card_result_message

string

Result message of card save operation.

paynet_error_id

string

Paynet system error code.

paynet_error_message

string

Paynet system error code.

bank_error_id

string

Bank error code.

bank_error_message

string

Bank error message.

bank_error_short_desc

string

Bank error message.

bank_error_long_desc

string

Bank error message

agent_reference_no

string

Reference number that used in the payment process. It is same as with reference_no.

object_name

string

Transaction.

code

string

message

string

System message.

ratio_code_method

string

Please contact our support team for more detailed information.

md_status

int

3D payment confirmation transaction result.

company_cost_ratio

float

Value of Parent company service fee.

company_commission

decimal

The amount of service fee to be charged to the parent company as a result of this transaction.

company_commission_with_tax

decimal

As a result of this transaction, the amount of service fee with VAT, to be deducted to the parent company.

company_net_amount

decimal

Net amount to pay parent company.

plus_installment

string

Plus installment count.

card_type

char

card_brand_name

string

Brand of Card Bank (VISA, MASTERCARD, AMEX).

{
    "session_id": "js_*****FBWZ/****/tZjhkI8ecXG3HsTm8H76A6I1apMT*****",
    "token_id": "3C72FBF6-****-****-****-CA2CE9AAE900",
    "reference_no": "",
    "transaction_type": 1,
    "add_comission_amount": "true",
    "no_instalment": "false",
    "tds_required": "true",
    "installments": "0,3,6,8,9",
    "ratio_code": "",
    "amount": 1256000
}
{
    "id": 2526145,
    "xact_id": "xk_EAAAAFZ59jeB/zqMRhd0yygDgbCmqfeCJCPOmJSNDIIxBYQ5",
    "xact_date": "2020-01-30T14:38:44.6478544+03:00",
    "transaction_type": 1,
    "pos_type": 5,
    "is_tds": true,
    "agent_id": "1001",
    "user_id": "PaynetApi",
    "email": null,
    "phone": null,
    "bank_id": "AXSS",
    "bank_name": "Axess",
    "instalment": 0,
    "ratio": 0.025,
    "card_no_masked": "435508******4358",
    "card_holder": "TEST",
    "amount": 80,
    "net_amount": 78,
    "comission": 2,
    "comission_tax": 0,
    "currency": "TRY",
    "authorization_code": "aut-1022",
    "reference_code": "ref-1022",
    "order_id": "order-1022",
    "is_succeed": true,
    "paynet_error_id": "",
    "paynet_error_message": "",
    "bank_error_id": "",
    "bank_error_message": "",
    "bank_error_short_desc": "",
    "bank_error_long_desc": "",
    "agent_reference_no": "1000",
    "xact": "2526145",
    "campaign_url": "",
    "end_user_comission": 0,
    "end_user_ratio": 0,
    "ratio_code": "",
    "ratio_code_method": "",
    "is_save_card_succeed": true,
    "save_card_result_message": "Kart saklama islemi basarili",
    "card_owner_id": "2ce0bd9d-aeb3-4af0-9dd6-cf294e72f9cb",
    "user_unique_id": "31",
    "card_hash": "pch_Ie_StuwWK-dFd6H6FtZpWeqs-xq-",
    "card_bank_id": "AXSS",
    "company_cost_ratio":
"0.1",
    "company_commission":""

    "company_commission_with_tax":
    "company_net_amount":""
    "plus_installment":""

    "card_type":""
    "card_brand_name":""
    "card_logo_url": "https://pts-statics.paynet.com.tr/img/banklogo/small/AXSS.png",
    "md_status": -1,
    "object_name": "transaction",
    "code": 0,
    "message": "Başarılı İşlem"
}

System

URL

Live System

https://api.paynet.com.tr/v1/transaction/charge

Test System

​https://pts-api.paynet.com.tr/v1/transaction/charge

In the example below, the session_id and token_id are taken and sent to the payment confirmation service.

<?php  
			
$secret_key = "sck_pcs_rMnxDSW/43243434/YAzXXXXXXXXXXXX";
$PostURL = "https://pts-api.paynet.com.tr/v1/transaction/charge";
			
$session_id = $_REQUEST["session_id"];
$token_id 	= $_REQUEST["token_id"];
			
	
$params = array(
 'session_id' => $session_id,
 'token_id' => $token_id,
 'transaction_type' => 1, 
 'amount' => '1500',
 'add_comission_amount' => false,
 'ratio_code' => '',
 'installments' => '',
 'no_instalment' => false,
 'tds_required' => true
);
			
$options = array(
			'http' => array(
					'header'  =>"Accept: application/json; charset=UTF-8\r\n".
					"Content-type: application/json; charset=UTF-8\r\n".
					"Authorization: Basic ".$secret_key,
					'method'  => 'POST',
					'content' => json_encode($params),
					'ignore_errors' => true
					),
			);
			
$context  = stream_context_create($options);
$result = json_decode(@file_get_contents($PostURL, false, $context));
			
if($result->is_succeed == true)
{
  echo "Başarılı";
}
else
{
  echo "Başarısız";
}
			
?>

Installment count.

System result code .

Card Type.

See more
See More
See more
See More