# Payment

Customers are able to do non-installment, in installments and saving card payment transactions without using 3D verification. Direct payment amount is charged from credit card without 3D verification.&#x20;

{% hint style="warning" %}
You should perform basic authentication with secret\_key to use payment service. [See more](https://doc.paynet.com.tr/english/what-i-need)
{% endhint %}

{% hint style="warning" %}
You must be authorized to use this service since 3D verification doesn’t perform on this service. You can contact your sales representative about this issue.
{% endhint %}

{% hint style="success" %}
<https://api.paynet.com.tr/v2/transaction/payment>
{% endhint %}

{% tabs %}
{% tab title="Request Parameters" %}

| Parameter                | 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.                                                                                                                                                                                                                                                                                                                                                    |
| **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 for "sales", 3 for "pre-provision". Default is "sales".                                                                                                                                                                                                                                                                                                                                              |
| **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 required 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 saved 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 issue.                                                                                                                                                                                                                                                                                                                                   |
| **pos\_type**            | int     | No       | Please contact our customer service if you want more spesific information about this issue.                                                                                                                                                                                                                                                                                                                                   |
| **approved\_card**       | bool    | No       | Please contact our customer service if you want more spesific information about this matter.                                                                                                                                                                                                                                                                                                                                  |
| **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.                                                                                                                                                                                                                                                                                   |
| {% endtab %}             |         |          |                                                                                                                                                                                                                                                                                                                                                                                                                               |

{% tab title="Response Parameters" %}

| Parameter                       | 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**           | int      | Type of transaction; 1for sales, 3 for pre-provision                                                                                               |
| **pos\_type**                   | int      | Pos type                                                                                                                                           |
| **agent\_id**                   | string   | Agent code                                                                                                                                         |
| **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 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                                                                                                                                   |
| **currency**                    | string   | Currency                                                                                                                                           |
| **bank\_authorization\_code**   | string   | Bank authorization code                                                                                                                            |
| **bank\_reference\_code**       | string   | Bank reference code                                                                                                                                |
| **bank\_order\_id**             | string   | Bank order number                                                                                                                                  |
| **is\_succeed**                 | bool     | Whether transaction is success or not.If result true it means amount draw from card                                                                |
| **code**                        | string   | Http status code                                                                                                                                   |
| **message**                     | string   | Transcation result message                                                                                                                         |
| **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 code that posted from bank                                                                                                                   |
| **bank\_error\_short\_desc**    | string   | Error code that posted from bank                                                                                                                   |
| **bank\_error\_long\_desc**     | string   | Error code that posted from bank                                                                                                                   |
| **reference\_no**               | string   | Reference code that posted during request                                                                                                          |
| **xact\_transaction\_id**       | string   | Guid transaction code of that transaction, cancellation of this transaction,this area get same guid value during the refund transactions           |
| **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                                                                                    |
| **user\_unique\_id**            | string   | Customers unique id number                                                                                                                         |
| **card\_hash**                  | string   | Card information that has been made a token                                                                                                        |
| **card\_bank\_id**              | string   | Saved card bank id                                                                                                                                 |
| **card\_logo\_url**             | string   | Saved card logo                                                                                                                                    |
| {% endtab %}                    |          |                                                                                                                                                    |

{% tab title="Request" %}

```c
{
    "amount": 12.5,
    "reference_no": "REF1000",
    "domain": "paynet.com.tr",
    "card_holder": "Paynet A.Ş",
    "pan": "1212121212121212",
    "month": "8",
    "year": "2026",
    "cvc": "000"
}

```

{% endtab %}

{% tab title="Response" %}

```c
{
    "id": 20490**,
    "xact_id": "**_EAAAAEBAN9wUFv0GvZ37KeP0ggCz*SafLumQCPN2Z1EDrs**",
    "xact_date": "2018-12-14T13:33:53.1227309+03:00",
    "transaction_type": 1,
    "pos_type": 6,
    "agent_id": "20077",
    "user_id": "PaynetApi",
    "email": null,
    "phone": null,
    "instalment": 0,
    "ratio": 0.02,
    "card_no_masked": "435508******4358",
    "card_holder": "TEST TEST",
    "amount": 12.5,
    "net_amount": 12.25,
    "comission": 0.25,
    "comission_tax": 0,
    "currency": "TRY",
    "bank_id": "ZDGR",
    "bank_name": "Maximum",
    "bank_authorization_code": "aut-7044",
    "bank_reference_code": "ref-7044",
    "bank_order_id": "order-7044",
    "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": "deneme11",
    "xact_transaction_id": "20490**",
    "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": "payment_response",
    "code": 0,
    "message": "Başarılı İşlem"
}
```

{% endtab %}

{% tab title="Service Url" %}

| Sistem          | Url                                                                                                      |
| --------------- | -------------------------------------------------------------------------------------------------------- |
| **Live System** | <https://api.paynet.com.tr/v2/transaction/payment>                                                       |
| **Test System** | [https://pts-api.paynet.com.tr/v2/transaction/payment](https://api.paynet.com.tr/v2/transaction/payment) |
| {% endtab %}    |                                                                                                          |
| {% endtabs %}   |                                                                                                          |

{% hint style="success" %}
You can get transaction result whether success or not as checking is\_succeed parameter.If is\_succeed parameter return true result is success. [For more information about error codes](https://doc.paynet.com.tr/genel-bilgiler/hata-kodlari).
{% endhint %}

{% hint style="info" %}
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 **reference\_no** until you get an answer . The system returns the transaction if there is a previous successful transaction with the same **reference\_no**. In this case, the result code returns 100 instead of 0, and the result message is returned as "Önceki Başarılı İşlem".
{% endhint %}

{% hint style="info" %}
Look[ here](https://doc.paynet.com.tr/genel-bilgiler/sikca-sorulan-sorular/kart-saklama-suereci-hakkinda) for more information about card saving process.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.paynet.com.tr/english/api-integration/payment-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
