### GET Payment Order Creation Example Source: https://doc.paynet.com.tr/uornek/oedeme-methodlari/ortak-oedeme-sayfasi/oedeme-emri-olusturma/get-methodu An example demonstrating the parameters required for creating a payment order using the GET method. This includes the public key, payer's name and surname, amount, email, and expiration date. ```json { public_key=pbk_pcs_Z3ABiIZq0kjTgfP37MGVQof32muAg name_surname=onurozdemir amount=15 email=ornek_mail@arena.com.tr expire_date=48 } ``` -------------------------------- ### Response Example for Ratio API (JSON) Source: https://doc.paynet.com.tr/servisler/oran/oran-tablosu-sunucu-tabanli This snippet provides an example of a JSON response from the Ratio API. It details bank information, card types, and installment ratios, including commission, campaign details, and descriptions. The response also includes status codes and messages. ```json { "data": [ { "bank_id": "AXSS", "bank_logo": "https://pts-statics.paynet.com.tr/img/banklogo/small/AXSS.png", "bank_name": "Axess", "card_type": "bc", "tds_required": false, "ratio": [ { "ratio": 0.26, "instalment_key": "ji_*", "instalment": 0, "instalment_amount": 0.0, "total_net_amount": 0.00, "total_amount": 0.0, "commision": 0.00, "commision_tax": 0.00, "desc": "Tek Çekim", "is_has_campaign": true, "plus_installment": 2, "post_pone": 1, "campaign_note": "1+2" }, { "ratio": 0.0767, "instalment_key": "ji_*", "instalment": 6, "instalment_amount": 0.0, "total_net_amount": 0.00, "total_amount": 0.0, "commision": 0.00, "commision_tax": 0.00, "desc": "6 Taksit", "is_has_campaign": false, "plus_installment": 0, "post_pone": 0, "campaign_note": "" } ] } ], "tds_required": false, "object_name": "ratio_get", "code": 0, "message": "Başarılı İşlem" } ``` -------------------------------- ### Subscription List Request Example (JSON) Source: https://doc.paynet.com.tr/servisler/abonelik/duzenli-odeme-listesi Example JSON payload for requesting a subscription list. The `datab` and `datbi` parameters specify the date range for the subscription data. ```json { "datab":"01.02.2016", "datbi":"01.02.2016" } ``` -------------------------------- ### BIN Check Service Response Example Source: https://doc.paynet.com.tr/uornek/servisler/kart-saklama/2.saklanmis-kart-verisi-ile-oedeme-alma/bin-kontrol-servisi-v1-paynetj-check_card_bin This snippet demonstrates a successful response from the BIN Check Service. It returns bank identification (`bank_id`, `bank_name`, `bank_logo`), card details (`card_type`, `tds_enable`), and an array of installment options (`data`). Each installment option includes an `instalment_key` for future use, installment count, amounts, commission, and a description. ```json { "bank_id":"AXSS", "bank_logo":"http://localhost:64102/img/banklogo/small/AXSS.png", "bank_name":"Axess", "card_type":"cc", "tds_enable":true, "data":[ { "instalment_key":"ji_EAAAAGINo4rz8dJGeBoy+ItEftZ4QS0qS5xn44NfXj30wd/ZRwL7ZQs9OAKZy5xGY5EaaA==", "instalment":101, "instalment_amount":0.10, "total_amount":10.30, "commision":0.26, "desc":"101 Taksit 101 x 0,10 = 10,30 TL" }, { "instalment_key":"ji_EAAAAPTScfWKuCRfoG7q82ibmozBZHJN8LYZseR0djrTRSsu", "instalment":0, "instalment_amount":10.24, "total_amount":10.24 } ], "object_name":"paynetj.check_card_bin", "code":"0", "message":"Success" } ``` -------------------------------- ### GET /v1/ratio/Get Source: https://doc.paynet.com.tr/servisler/oran/oran-tablosu-sunucu-tabanli Retrieves ratio information, including installment plans and campaign details, for a given BIN. This endpoint is crucial for displaying payment options to users during checkout. ```APIDOC ## GET /v1/ratio/Get ### Description Retrieves ratio information, including installment plans and campaign details, for a given BIN. This endpoint is crucial for displaying payment options to users during checkout. ### Method GET ### Endpoint `/v1/ratio/Get` ### Parameters #### Query Parameters - **bin** (string) - Required - The Bank Identification Number (BIN) to query for ratio information. ### Request Example ```json { "bin": "435508" } ``` ### Response #### Success Response (200) - **data** (array) - An array of objects, where each object represents a bank and its associated ratio details. - **bank_id** (string) - The unique identifier for the bank. - **bank_logo** (string) - The URL to the bank's logo. - **bank_name** (string) - The name of the bank. - **card_type** (string) - The type of card (e.g., 'bc'). - **tds_required** (boolean) - Indicates if TDS (Tax Deducted at Source) is required. - **ratio** (array) - An array of ratio objects detailing installment plans. - **ratio** (decimal) - The ratio for the installment plan. - **instalment_key** (string) - The key identifying the installment plan. - **instalment** (int) - The number of installments. - **instalment_amount** (decimal) - The amount per installment. - **total_net_amount** (decimal) - The total net amount for the plan. - **total_amount** (decimal) - The total amount for the plan. - **commision** (decimal) - The commission amount. - **commision_tax** (decimal) - The commission tax amount. - **desc** (string) - A description of the installment plan (e.g., 'Tek Çekim'). - **is_has_campaign** (boolean) - Indicates if there is a campaign for this plan. - **plus_installment** (int) - Additional installments offered as part of a campaign. - **post_pone** (int) - Number of deferred installments. - **campaign_note** (string) - Notes related to the campaign. - **tds_required** (boolean) - Overall TDS requirement for the response. - **object_name** (string) - The name of the object returned (e.g., 'ratio_get'). - **code** (int) - The response code (0 for success). - **message** (string) - A message indicating the status of the operation (e.g., 'Başarılı İşlem'). #### Response Example ```json { "data": [ { "bank_id": "AXSS", "bank_logo": "https://pts-statics.paynet.com.tr/img/banklogo/small/AXSS.png", "bank_name": "Axess", "card_type": "bc", "tds_required": false, "ratio": [ { "ratio": 0.26, "instalment_key": "ji_*", "instalment": 0, "instalment_amount": 0.0, "total_net_amount": 0.00, "total_amount": 0.0, "commision": 0.00, "commision_tax": 0.00, "desc": "Tek Çekim", "is_has_campaign": true, "plus_installment": 2, "post_pone": 1, "campaign_note": "1+2" }, { "ratio": 0.0767, "instalment_key": "ji_*", "instalment": 6, "instalment_amount": 0.0, "total_net_amount": 0.00, "total_amount": 0.0, "commision": 0.00, "commision_tax": 0.00, "desc": "6 Taksit", "is_has_campaign": false, "plus_installment": 0, "post_pone": 0, "campaign_note": "" } ] } ], "tds_required": false, "object_name": "ratio_get", "code": 0, "message": "Başarılı İşlem" } ``` ### Service URLs - **Canlı Sistem**: `https://api.paynet.com.tr/v1/ratio/Get` - **Test Sistemi**: `https://pts-api.paynet.com.tr/v1/ratio/Get` ``` -------------------------------- ### Subscription List Response Example (JSON) Source: https://doc.paynet.com.tr/servisler/abonelik/duzenli-odeme-listesi Example JSON response for the subscription list endpoint. It includes the object name, a status code, a message, and the data payload containing the subscription list. ```json { "object_name":"subscription_list", "code":0, "message":"Başarılı Islem" } ``` -------------------------------- ### GET /v1/mailorder/create Source: https://doc.paynet.com.tr/uornek/oedeme-methodlari/ortak-oedeme-sayfasi/oedeme-emri-olusturma/get-methodu Creates a payment order using the GET method. Authentication is provided via a public key. All parameters available in the POST method can also be used here. ```APIDOC ## GET /v1/mailorder/create ### Description Creates a payment order using the GET method. Authentication is provided via a public key. All parameters available in the POST method can also be used here. ### Method GET ### Endpoint https://api.paynet.com.tr/v1/mailorder/create ### Parameters #### Query Parameters - **public_key** (string) - Required - Provides authentication to the system. - **pos_type** (int) - Optional - Determines whether to use Paynet's POS or the Company's own POS. Defaults to Paynet POS. - **addcomission_to_amount** (bool) - Optional - Determines whether to add the commission amount to the amount to be withdrawn from the credit card. Defaults to true. - **agent_id** (string) - Optional - If the payment will be transferred to a dealer's account of the company, the dealer code is sent in this field. The dealer must be defined in the Paynet system. - **name_surname** (string) - Required - The full name of the person from whom the payment will be received. - **user_name** (string) - Optional - Information about the user creating the payment order. Not mandatory. - **amount** (decimal) - Required - The payment amount. - **expire_date** (double) - Optional - Used to determine the validity period of the payment URL. Sent in hours. For a 72-hour validity period, send as 72. - **note** (string) - Optional - Description to be shown to the payer on the payment page. - **agent_note** (string) - Optional - Description information that will appear in reports when the payment transaction is made. - **reference_no** (string) - Optional - Reference number to be associated with the payment transaction, such as invoice number, order number. - **succeed_url** (string) - Optional - If the transaction is successful, redirection is made to the URL sent in this parameter. If sent empty, Paynet's default payment success page is displayed. - **error_url** (string) - Optional - If the transaction is unsuccessful, redirection is made to the URL sent in this parameter. If sent empty, Paynet's default payment failure page is displayed. - **confirmation_url** (string) - Optional - If the transaction is successful, the parameters specified in the confirmation_url address below are posted in JSON format to the confirmation_url specified here. - **send_confirmation_email** (bool) - Optional - Defaults to true. Sends an email to the main company's registered Paynet email address if the payment is successful. - **multi_payment** (bool) - Optional - Defaults to true. Allows payment with multiple cards. ### Request Example ``` { "public_key": "pbk_pcs_Z3ABiIZq0kjTgfP37MGVQof32muAg", "name_surname": "onurozdemir", "amount": 15, "email": "ornek_mail@arena.com.tr", "expire_date": 48 } ``` ### Response #### Success Response (200) - **payment_url** (string) - The URL generated for the payment order. #### Response Example ```json { "payment_url": "https://example.com/pay?token=..." } ``` ``` -------------------------------- ### Paynet API Response Example Source: https://doc.paynet.com.tr/oedeme-metotlari/ortak-odeme-sayfasi/paylink-detay This is an example of a response from the Paynet API after a payment attempt. It includes transaction details, company information, and payment specifics. ```json { "company_code": "1001", "agent_id": "1001", "xact_id": "xk_EAAAAK/JIGdb8*YgktzPs0xXs8BL1CXjQb*lxa52PRksw3pJ", "reference_no": "", "email": "info@paynet.com.tr", "user_name": " ", "name_surname": "O*** Ö******", "amount": 120, "currency": "TL" } ``` -------------------------------- ### POST /v1/paynetj/check_bin Source: https://doc.paynet.com.tr/uornek/servisler/kart-saklama/1.oedeme-sirasinda-kart-saklama/1.2 This service returns the bank and installment information for a given BIN number. The 'instalment_key' from the selected installment option should be used in the subsequent 'create_token' service. ```APIDOC ## POST /v1/paynetj/check_bin ### Description This service returns the bank and installment information for a given BIN number. The 'instalment_key' from the selected installment option should be used in the subsequent 'create_token' service. ### Method POST ### Endpoint https://api.paynet.com.tr/v1/paynetj/check_bin ### Parameters #### Request Body - **session_id** (string) - Required - The session information obtained from the Auth service. - **bin** (string) - Required - The first 8 characters of the credit card information. Characters beyond the 8th should not be sent. ### Request Example ```json { "session_id": "js_EAAAAMb2/RMGqozzIWMQWUTL5pJrdQvi/aD5qZ4A1LaDfo8g", "bin": "43550843" } ``` ### Response #### Success Response (200) - **bank_id** (string) - The bank's code in the Paynet system. - **bank_logo** (string) - URL to fetch the bank's logo. - **bank_name** (string) - The name of the bank. - **card_type** (string) - Card type: 'cc' for individual, 'bc' for commercial, 'dc' for debit. - **tds_enable** (boolean) - Indicates if a 3D transaction can be performed with the selected bank. - **data** (array) - Array of installment plans. - **instalment_key** (string) - Installment key, to be used later. - **instalment** (string) - Number of installments. - **instalment_amount** (string) - Amount per installment. - **total_amount** (string) - Total amount to be charged to the credit card. - **commision** (string) - Commission amount. - **desc** (string) - Payment plan description, to be displayed in the interface. - **object_name** (string) - The name of the returned object. - **code** (string) - Response code of the operation. '0' indicates success. - **message** (string) - Message related to the response code. #### Response Example ```json { "bank_id": "AXSS", "bank_logo": "http://localhost:64102/img/banklogo/small/AXSS.png", "bank_name": "Axess", "card_type": "cc", "tds_enable": true, "data": [ { "instalment_key": "ji_EAAAAGINo4rz8dJGeBoy+ItEftZ4QS0qS5xn44NfXj30wd/ZRwL7ZQs9OAKZy5xGY5EaaA==", "instalment": 101, "instalment_amount": 0.10, "total_amount": 10.30, "commision": 0.26, "desc": "101 Taksit 101 x 0,10 = 10,30 TL" }, { "instalment_key": "ji_EAAAAPTScfWKuCRfoG7q82ibmozBZHJN8LYZseR0djrTRSsu", "instalment": 0, "instalment_amount": 10.24, "total_amount": 10.24, "commision": 0.20, "desc": "0 Taksit 0 x 10,24 = 10,24 TL" }, { "instalment_key": "ji_EAAAAN4Aw1tKUlglnCrBgQr+m0maUBwR0ScCTbFXTJeEqGif", "instalment": 3, "instalment_amount": 3.46, "total_amount": 10.37, "commision": 0.31, "desc": "3 Taksit 3 x 3,46 = 10,37 TL" }, { "instalment_key": "ji_EAAAAOT0wNkTexwQ9hDXhP6QIAdWja3VkAQalefn2jW3Ouyj", "instalment": 6, "instalment_amount": 1.73, "total_amount": 10.37, "commision": 0.31, "desc": "6 Taksit 6 x 1,73 = 10,37 TL" } ], "obeject_name": "paynetj_bin", "code": 0, "message": "Başarılı Islem" } ``` ``` -------------------------------- ### GET /v1/transaction/list - İşlem Listesi Source: https://doc.paynet.com.tr/servisler/islem/islem-listesi Paynet üzerinden yapılan işlemleri belirli kriterlere göre listeleyen bir GET isteğidir. Tarih aralığı zorunludur. ```APIDOC ## GET /v1/transaction/list ### Description Paynet'ten yapılan işlemlerin listesini almak için kullanılır. Tarih aralığı zorunlu olarak belirtilmelidir. ### Method GET ### Endpoint https://api.paynet.com.tr/v1/transaction/list ### Parameters #### Query Parameters - **agent_id** (string) - Optional - Paynet bayi kodu - **bank_id** (char) - Optional - Banka kodu - **user_id** (string) - Optional - İşlemi yapan kullanıcı bilgisi - **datab** (date) - Required - Başlangıç Tarihi - **datbi** (date) - Required - Bitiş Tarihi - **show_unsucceed** (bool) - Optional - `true` ise başarılı ve başarısız işlemler getirilir, default `false`. - **untransferred** (bool) - Optional - `mark_transferred` ile transfer edilmiş olarak işaretlenen işlemler hariç tutulur. - **limit** (int) - Optional - Döndürülecek veri sayısı, default 10. - **ending_before** (int) - Optional - Belirtilen index'den önceki limit sayısı kadar kayıt getirir. - **starting_after** (int) - Optional - Belirtilen index'den sonraki limit sayısı kadar kayıt getirir. ### Request Example ```http GET https://api.paynet.com.tr/v1/transaction/list?datab=2023-01-01&datbi=2023-01-31&agent_id=12345 ``` ### Response #### Success Response (200) - **companyCode** (string) - Ana firma kodu - **companyName** (string) - Ana firma adı - **total** (int) - Toplam satır sayısı - **total_count** (int) - Toplam gösterilen satır sayısı - **total_amount** (int) - Toplam işlem tutarı #### Response Example ```json { "companyCode": "PAYNET", "companyName": "Paynet Ödeme Hizmetleri", "total": 150, "total_count": 10, "total_amount": 150000, "transactions": [ { "transactionId": "TXN123456", "date": "2023-01-15T10:30:00Z", "amount": 500, "status": "SUCCESS" } ] } ``` ``` -------------------------------- ### Paynet Subscription Request Example Source: https://doc.paynet.com.tr/servisler/abonelik/duzenli-odeme-detayi This JSON object represents a sample request for initiating a subscription. It requires a unique subscription ID to identify the service or product being subscribed to. ```json { "subscription_id": "3f7ac56a-a23f-4eee-a3ef-a21e3277b1b6" } ``` -------------------------------- ### GET /websites/doc_paynet_tr Source: https://doc.paynet.com.tr/uornek/servisler/islem/islem-listesi Retrieves a list of transactions based on specified criteria. Supports filtering by limit, starting after, and ending before. ```APIDOC ## GET /websites/doc_paynet_tr ### Description Retrieves a list of transactions with options to filter by limit and pagination. ### Method GET ### Endpoint /websites/doc_paynet_tr ### Parameters #### Query Parameters - **limit** (int) - Optional - Gönderilen limit bilgisi - **ending_before** (int) - Optional - Gönderilen ending_before bilgisi - **starting_after** (int) - Optional - Gönderilen starting_after bilgisi - **object_name** (string) - Optional - transaction_list - **has_more** (bool) - Optional - True ise Belirtilen kriterlerde gönderilen satırlardan daha olduğu anlamına gelir. ### Response #### Success Response (200) - **Data** (array) - Transaction data array. - **merchant_id** (string(50)) - İşlemin yapıldığı üye iş yeri numarası - **company_cost_ratio** (float) - Ana firma komisyon oranı. Sadece ana firma tarafından çekilen raporlarda gelir. - **agent_id** (string(10)) - Paynet Bayi kodu - **user_id** (string(10)) - Paynet Kullanici kodu - **xact_note** (string(140)) - İşlem yapılırken gönderilen description - **xact_agent_reference** (string(50)) - İşlem yapılırken girilen referans numarası - **agent_referans_no** (string(50)) - Ana Firma Bayi Kodu. Bayinin ana firmadaki kodu - **agent_name** (string(50)) - Bayi Adı - **xact_id** (string(100)) - Paynet işlem numarası - **is_tds** (bool) - İşlemin 3D secure ile yapılıp / yapılmadığı - **bank_id** (char(4)) - Banka kodu - **bank_name** (string(100)) - Banka adı - **card_no** (string(25)) - Kart numarası - **card_holder** (string(50)) - Kart sahibinin adı - **card_type** (char(2)) - Kart tipi #### Response Example ```json { "limit": 10, "ending_before": null, "starting_after": null, "object_name": "transaction_list", "has_more": false, "Data": [ { "merchant_id": "merchant123", "company_cost_ratio": 0.05, "agent_id": "agent456", "user_id": "user789", "xact_note": "Payment for order 12345", "xact_agent_reference": "REF001", "agent_referans_no": "AGENTREF001", "agent_name": "Example Agent", "xact_id": "XACT987", "is_tds": true, "bank_id": "0001", "bank_name": "Example Bank", "card_no": "**** **** **** 1234", "card_holder": "John Doe", "card_type": "VI" } ] } ``` ``` -------------------------------- ### Subscription Creation Request Example (JavaScript) Source: https://doc.paynet.com.tr/servisler/abonelik/olusturma This JavaScript object represents a sample request payload for creating a subscription. It includes customer details, payment information, and webhook URLs for status updates. Ensure all required fields are populated correctly. ```javascript { "name_surname":"Ozan Manav", "amount":2000, "interval":2, "interval_count":12, "reference_no":"90000543", "begin_date":"2017-08-14T16:44:49.9405776+03:00", "end_user_email":"ozan.manav@arena.com.tr", "end_user_gsm":"5452838997", "agent_id":"48811", "send_mail":false, "send_sms":false, "is_fixed_price":false, "attempt_day_count":"5", "suceed_webhook":"http://test.com/successpage", "error_webhook":"http://test.com/errorpage", "confirmation_webhook":"http://test.com/confirmationpage", "end_user_desc":"90000543 numaralı üyelik" } ``` -------------------------------- ### GET /v1/ratio/Get_public Source: https://doc.paynet.com.tr/uornek/servisler/oran/oran-tablosu-istemci-tarafli Retrieves public ratio information for payment processing. This endpoint allows you to get details about different payment installment options, including commission and tax information. ```APIDOC ## GET /v1/ratio/Get_public ### Description Retrieves public ratio information for payment processing. This endpoint allows you to get details about different payment installment options, including commission and tax information. ### Method GET ### Endpoint /v1/ratio/Get_public ### Parameters #### Query Parameters - **card_type** (string) - Required - The type of card being used for the transaction. - **bank_id** (string) - Required - The unique identifier for the bank. - **total_amount** (number) - Required - The total amount of the transaction. ### Request Example ```json { "card_type": "string", "bank_id": "string", "total_amount": 0.0 } ``` ### Response #### Success Response (200) - **ratios** (array) - An array of ratio objects, each containing installment details. - **ratio** (number) - The ratio for the installment plan. - **instalment_key** (string) - A unique key for the installment plan. - **instalment** (integer) - The number of installments. - **instalment_amount** (number) - The amount for each installment. - **total_net_amount** (number) - The total net amount after deductions. - **total_amount** (number) - The total amount including all charges. - **commision** (number) - The commission charged for the installment plan. - **commision_tax** (number) - The tax on the commission. - **desc** (string) - A description of the installment plan (e.g., "Peşin", "3 Taksit"). - **object_name** (string) - The name of the object returned, "ratio_get". - **code** (integer) - The status code of the operation, 0 for success. - **message** (string) - A message indicating the result of the operation, e.g., "Başarılı İşlem". #### Response Example ```json { "ratios": [ { "ratio": 0.0, "instalment_key": "ji_EAAAAAfC/o5U6574F7rV9gQG2Pq9Q6H2+jS4k9k3sA2E3G4", "instalment": 1, "instalment_amount": 2.0, "total_net_amount": 2.0, "total_amount": 2.0, "commision": 0.04, "commision_tax": 0.00, "desc": "Peşin" }, { "ratio": 0.03, "instalment_key": "ji_EAAAAAvOYWDjZ57GMBr3qbA+0aNHRNLwpyStLeBzeWFzOQgz", "instalment": 3, "instalment_amount": 0.67, "total_net_amount": 1.92, "total_amount": 2.0, "commision": 0.06, "commision_tax": 0.02, "desc": "3 Taksit" } ], "object_name": "ratio_get", "code": 0, "message": "Başarılı İşlem" } ``` ### Service URLs | System | URL | |----------------|-----------------------------------------------------| | **Canlı Sistem** | | | **Test Sistemi** | | ``` -------------------------------- ### GET /v1/ratio/Get Source: https://doc.paynet.com.tr/uornek/servisler/oran/oran-tablosu-sunucu-tabanli Fetches available payment ratios and installment details from the Paynet API. ```APIDOC ## GET /v1/ratio/Get ### Description This endpoint retrieves a list of available payment ratios and their corresponding installment details. It includes information such as commission rates, installment amounts, and descriptions for each ratio option. ### Method GET ### Endpoint `/v1/ratio/Get` ### Parameters #### Query Parameters - **None** ### Request Example *No request body is required for this GET request.* ### Response #### Success Response (200) - **bank_logo** (string) - URL of the bank's logo. - **bank_name** (string) - Name of the bank. - **ratio** (array) - An array of ratio objects, each containing: - **ratio** (number) - The ratio value. - **instalment_key** (string) - A unique key for the installment. - **instalment** (integer) - The number of installments. - **instalment_amount** (number) - The amount per installment. - **total_net_amount** (number) - The total net amount. - **total_amount** (number) - The total amount. - **commision** (number) - The commission fee. - **commision_tax** (number) - The commission tax. - **desc** (string) - Description of the ratio option. - **object_name** (string) - The name of the object returned. - **code** (integer) - The status code of the operation. - **message** (string) - A message indicating the success or failure of the operation. #### Response Example ```json { "bank_logo": "http://localhost:64102/img/banklogo/small/AXSS.png", "bank_name": "Axess", "ratio": [ { "ratio": 0.02, "instalment_key": "ji_EAAAAIi3zzUmsF9+s+onpvYG8g1pSXU5ymrpxEgBh1TyP/dN", "instalment": 0, "instalment_amount": 2.0, "total_net_amount": 1.96, "total_amount": 2.0, "commision": 0.04, "commision_tax": 0.00, "desc": "Peşin" }, { "ratio": 0.03, "instalment_key": "ji_EAAAAAvOYWDjZ57GMBr3qbA+0aNHRNLwpyStLeBzeWFzOQgz", "instalment": 3, "instalment_amount": 0.67, "total_net_amount": 1.92, "total_amount": 2.0, "commision": 0.06, "commision_tax": 0.02, "desc": "3 Taksit" }, { "ratio": 0.03, "instalment_key": "ji_EAAAAJca+t5ymv2WLi8aWuQNpfjyuq92XtgEIPhzLip8N4Jg", "instalment": 6, "instalment_amount": 0.33, "total_net_amount": 1.92, "total_amount": 2.0, "commision": 0.06, "commision_tax": 0.02, "desc": "6 Taksit" }, { "ratio": 0.02, "instalment_key": "ji_EAAAAGam87sdWVgSGJ4FvWiqK/YEwk5P2r3xDFOctGlTin9X7tE0ahdpfeVJA6I6oCW7Qw==", "instalment": 101, "instalment_amount": 0.02, "total_net_amount": 1.96, "total_amount": 2.0, "commision": 0.04, "commision_tax": 0.00, "desc": "Puan Kullanimi" } ], "object_name": "ratio_get", "code": 0, "message": "Başarılı İşlem" } ``` ``` -------------------------------- ### Subscription Creation Response Example Source: https://doc.paynet.com.tr/servisler/abonelik/olusturma This is a sample response from the Paynet API after a subscription creation attempt. It includes a status code and a message indicating the outcome of the operation. A 'code' of 0 typically signifies a successful transaction. ```json { "object_name":"subscription_create", "code":0, "message":"Başarılı Islem" } ``` -------------------------------- ### Subscription Data Example Source: https://doc.paynet.com.tr/servisler/abonelik/duzenli-odeme-detayi This snippet shows a sample JSON structure representing subscription details. It includes fields like plan_id, invoice_id, validation date, amount, transaction ID, and status description. The 'Bekleniyor' status indicates a pending state. ```json { "plan_id": 45310, "invoice_id": -1, "val_date": "28.12.2019 15:26:00", "amount": 100, "xact_id": -1, "status": 0, "status_desc": "Bekleniyor" } ``` -------------------------------- ### Fetch Installment Rates with Paynet.services.installments (JavaScript) Source: https://doc.paynet.com.tr/uornek/oedeme-methodlari/oezellestirilmis-form/servis-parametreleri This service allows you to generate the installment rate table on the client-side. You can call the service using JavaScript libraries and format the response according to your design. The provided example demonstrates how to use the service and set the fetched rates. ```javascript Paynet.services.installments(function (d) { // oranları set edeceğiniz block }); ``` -------------------------------- ### GET /v1/subscription/list Source: https://doc.paynet.com.tr/uornek/servisler/abonelik/duezenli-oedeme-listesi Belirli bir tarih aralığına göre düzenli ödemelerin listesini alır. İsteğe bağlı olarak bayi kodu, limit ve sayfalama parametreleri ile özelleştirilebilir. ```APIDOC ## GET /v1/subscription/list ### Description Bu endpoint, oluşturulan düzenli ödemelerin bir listesini belirli kriterlere göre almanızı sağlar. ### Method GET ### Endpoint `/v1/subscription/list` ### Parameters #### Query Parameters - **datab** (date) - Required - Başlangıç tarihi - **datbi** (date) - Required - Bitiş tarihi - **agent_id** (string) - Optional - Bayi kodu - **limit** (int) - Optional - Döndürülecek maksimum kayıt sayısı - **has_more** (int) - Optional - Belirtilen kriterlerde daha fazla satır olup olmadığını belirtir (True ise daha fazla veri vardır) - **ending_before** (int) - Optional - Belirtilen index'den önceki limit sayısı kadar kayıt getirir. - **starting_after** (int) - Optional - Belirtilen index'den sonraki limit sayısı kadar kayıt getirir. ### Request Example ```json { "datab": "2023-01-01", "datbi": "2023-12-31", "agent_id": "AGENT123", "limit": 50 } ``` ### Response #### Success Response (200) - **object_name** (string) - Dönüş yapılan API'nin nesne adı - **code** (string) - Dönüş sonucunun kodu - **message** (string) - Dönüş sonuç kodunun açıklaması - **data** (list) - Düzenli ödeme listesini içeren dizi #### Response Example ```json { "object_name": "subscription_list", "code": "00", "message": "İşlem başarılı", "data": [ { "subscription_id": "SUB12345", "customer_id": "CUST67890", "amount": 100.50, "currency": "TRY", "status": "active", "created_at": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### BIN Kontrol Servisi Yanıtı (JSON) Source: https://doc.paynet.com.tr/uornek/servisler/kart-saklama/1.oedeme-sirasinda-kart-saklama/1.2 Bu kod bloğu, BIN Kontrol Servisi'nden alınan başarılı yanıtı gösterir. Yanıt, banka bilgileri, kart türü, taksit seçenekleri ve işlem kodunu içerir. 'data' dizisindeki her bir nesne, farklı bir taksit seçeneğini temsil eder ve 'instalment_key' bir sonraki adımda kullanılabilir. ```json { "bank_id": "AXSS", "bank_logo": "http://localhost:64102/img/banklogo/small/AXSS.png", "bank_name": "Axess", "card_type": "cc", "tds_enable": true, "data": [ { "instalment_key": "ji_EAAAAGINo4rz8dJGeBoy+ItEftZ4QS0qS5xn44NfXj30wd/ZRwL7ZQs9OAKZy5xGY5EaaA==", "instalment": 101, "instalment_amount": 0.10, "total_amount": 10.30, "commision": 0.26, "desc": "101 Taksit 101 x 0,10 = 10,30 TL" }, { "instalment_key": "ji_EAAAAPTScfWKuCRfoG7q82ibmozBZHJN8LYZseR0djrTRSsu", "instalment": 0, "instalment_amount": 10.24, "total_amount": 10.24, "commision": 0.20, "desc": "0 Taksit 0 x 10,24 = 10,24 TL" }, { "instalment_key": "ji_EAAAAN4Aw1tKUlglnCrBgQr+m0maUBwR0ScCTbFXTJeEqGif", "instalment": 3, "instalment_amount": 3.46, "total_amount": 10.37, "commision": 0.31, "desc": "3 Taksit 3 x 3,46 = 10,37 TL" }, { "instalment_key": "ji_EAAAAOT0wNkTexwQ9hDXhP6QIAdWja3VkAQalefn2jW3Ouyj", "instalment": 6, "instalment_amount": 1.73, "total_amount": 10.37, "commision": 0.31, "desc": "6 Taksit 6 x 1,73 = 10,37 TL" } ], "obeject_name": "paynetj_bin", "code": 0, "message": "Başarılı Islem" } ``` -------------------------------- ### Paynet Ratio API Response Example Source: https://doc.paynet.com.tr/uornek/servisler/oran/oran-tablosu-istemci-tarafli This JSON object represents a successful response from the Paynet Ratio API. It includes details about the installment options available, such as ratio, number of installments, amounts, commission, and a description. The response also contains metadata like object_name, code, and a success message. ```json { "response": [ { "id": "359284", "type": "RATIO", "inst_list": [ { "ratio":0.00, "instalment_key":"ji_EAAAAAJyP4xM7tY3891TjWfP2G8k1f4j363rG2t73uJb4H7O", "instalment":1, "instalment_amount":2.00, "total_net_amount":2.00, "total_amount":2.0, "commision":0.04, "commision_tax":0.00, "desc":"Peşin" }, { "ratio":0.03, "instalment_key":"ji_EAAAAAvOYWDjZ57GMBr3qbA+0aNHRNLwpyStLeBzeWFzOQgz", "instalment":3, "instalment_amount":0.67, "total_net_amount":1.92, "total_amount":2.0, "commision":0.06, "commision_tax":0.02, "desc":"3 Taksit" }, { "ratio":0.03, "instalment_key":"ji_EAAAAJca+t5ymv2WLi8aWuQNpfjyuq92XtgEIPhzLip8N4Jg", "instalment":6, "instalment_amount":0.33, "total_net_amount":1.92, "total_amount":2.0, "commision":0.06, "commision_tax":0.02, "desc":"6 Taksit" }, { "ratio":0.02, "instalment_key":"ji_EAAAAGam87sdWVgSGJ4FvWiqK/YEwk5P2r3xDFOctGlTin9X7tE0ahdpfeVJA6I6oCW7Qw==", "instalment":101, "instalment_amount":0.02, "total_net_amount":1.96, "total_amount":2.0, "commision":0.04, "commision_tax":0.00, "desc":"Puan Kullanimi" } ] } ], "object_name":"ratio_get", "code":0, "message":"Başarılı İşlem" } ```