Postman

postman

To use PayTR APIs, you must have the following information. You can access this information from the Information(Bilgi) page in the PayTR Merchant panel.

-PayTR Merchant ID (merchant_id)
-Merchant Key (merchant_key)
-Merchant Salt (merchant_salt)

Note: This information is completely specific to your store, you should not share it outside.

Installation and Usage

There are 2 pre-prepared files for you to use by Postman. One of them is the PAYTRENV.postman_environment.json file with global definitions, and the other is the PAYTR APIs.postman_collection.json file with API services.

STEP 1 (Installing the Environment File):

-Open the Postman.
-Click on the "Environments" button located in the left menu.
-Click on the Import button.
-Select the file named PAYTRENV.postman_environment.json that you downloaded and import it.
-After selecting the imported environment named PAYTRENV, replace the XXXXXX values in the fields merchant_id, merchant_key, merchant_salt, user_ip and merchant_oid with your own information.

STEP 2 (Installing the Collections File):

-Click on the "Collections" button in the left menu.
-Click the Import button.
-Select the file named PAYTR APIs.postman_collection.json that you have downloaded and import it.
-After clicking on the Collenctions that comes with the PAYTR APIs folder name, we click on the No Environment button at the top right, and select the environment we have just added called PAYTRENV in order to use it in this Collections.

STEP 3 (API Usage Example):

-Select the API service you want to use from the Collections named PayTR APIs. (Example: iFrame API)
-Click the POST Request named get-iframe-token and then click the Body button.
-In addition to the pre-prepared data in the form-data section, there is some global data from the Environment section.
-You can change the values in the form fields in the Request window according to your wishes, and then call the service by clicking the Send button.
-In the Response panel at the bottom of the screen, successful/false outputs will be displayed as a response from the service.

Information About Services

The following information is brief descriptions of the services. You can access detailed information about the services and sample codes via this link.

iFrame API

With this service, the iframe_token value to be used when opening the iFrame payment screen is returned.

Transfer/EFT iFrame API

With this service, the iframe_token value to be used when opening the Transfer/EFT iFrame payment screen is returned.

Link API

PayTR Link; It allows you to receive your payments with one click without the need for integration.

  • You can create payment links for your Service / Product or Invoice / Current collections by using the Link Create Service.

  • You can delete the payment links you have created before by using the Link Delete Service.

  • When a successful payment is made on the payment link you have created, the result of the transaction is notified to the callbak_url you sent for that link in the Create Service.

Not: _If you have not set or do not want to specify callbak_url in the Create service, you do not need to do this integration. This service only requests the callbackurl of the link you sent (if any) in the "Create" service.

  • Link API (SMS/Email) : Using this service, you can send the link of the page to your customer's phone number or mail address.

Direkt API

It is a service that allows you to receive payments with your own payment form as an alternative to the iFrame API. Direkt API çözümünde, The integration of all services to be used in the direct API solution to the structure to be used and the provision of testing processes are carried out by the store. The entire flow, including security in the direct API solution, is under the control and responsibility of the store owner. PayTR reserves the right to reject or approve your request regarding this matter. Integration consists of 2 steps:

  • STEP 1 - Preparing the payment form on your website and sending the information needed for PayTR API.
  • STEP 2 - STEP 2 - Create the Callback URL to Receive Payment Results: Callback URL is the URL of a page on your website where the PayTR system will POST payment results.

Installment Rates Service

When making Direct API integration, the installment rates query API is used to pull the installment rates.Rates can vary daily. For this reason, you can pull these rates daily through the installment rates query API, save them in the database and update them.You can apply these rates according to the product price in installment transactions.

BIN Service

With the BIN inquiry service, you can send a BIN number (The first 6 or 8 digits of the card number) and access the detailed information of the card.

Card Storage API

  • By using this service, you can create a user and a card belonging to the user registered at PAYTR during the payment. The process to be followed should be as follows.
  1. Create your payment page as specified in the Direct API Document.

  2. Add a checkbox in the step where the credit card information is entered, where the user can choose what he wants to register.

  3. If a card is registered in the system for the first time in the name of the user, only the “store_card” parameter is sent in the POST content

  4. If the user has a card previously defined in the system and wants to save a new card, the parameters “utoken” and “store_card” in POST content should be sent together.

Registered Card Payment Steps to follow:

  1. The registered card list of the user making the payment is taken and listed in front of the user.

  2. The user selects the card to pay from among the listed cards.

  3. The require_cvv parameter of the card selected by the user is checked, and if it is 1, the field to enter CVV is displayed .

  4. ctoken information of the card selected by the user and utoken information of the user are sent in the payment request.

  • Registered Card List In the payment form, you can list the registered cards of that user by sending a request to this service with the "utoken" information previously obtained from the new card registration service in order to show the registered cards of the user.

  • Deleting a Registered Card In order to delete a registered card information of the user, you must send the "utoken, ctoken, merchant_id, paytr_token" information to this service and make a request.

  • Recurring Payment from Registered Card With the Recurring Payment service from a Registered Card, you can receive payments at any time or at intervals with the registered card information of the user.

  1. Create the payment request block with the values ​​specified in the Recurring Payment step. The payment process will occur as a result of the request you send to the service with the registered card information over the structure you create yourself. For this reason, there is no need to create a form to interact with the user.

  2. Transactions will take place as Non3D (Non Secure). Your user will not take any additional action or request any information during the process (Non3D authorizations must be open in your store in order to use it).

  3. From the Registered Card List service, you need to access the "ctoken" data of the registered card by using the "utoken" data of the user to whom the payment will be made. Afterwards, you must forward this and all other fields specified in the document to the relevant service in POST.

Platform Transfer Request

Using the PayTR Marketplace Solution, the owners of the marketplace platform, in cases where there is more than one seller's product in the same basket, partial refunds, subsequent changes in the order amount, different commissions to different sellers, etc. They can freely meet their every need.

Transfer Instruction Steps to follow:

1. STEP Platform Transfer Instruction: The information specified in the document should be sent to the relevant service.

Note: The merchant must send the request via the Transfer API until 10:00 at the latest on the date of payment. Requests sent later will be processed the next day.

2. STEP Receiving Transfer Instruction Results (Optional): PayTR system notifies you to the address you specified in the "Platform Transfer Result Notification URL(Platform Transfer Sonucu Bildirim URL)" section on the PayTR Merchant Panel > Settings (Ayarlar) page after the transfer transactions are concluded.

Returning Payments List With this service, a transfer request has been made but you can access the list of returned payments due to the buyer account error. Returned payments are processed as a balance to a subaccount for your store. You can use the "Returning Payments - Send From Account" service to resend these returned payments.

Returning Payments Send From Account With this service, a transfer request has been made but you can send a payment request for the returning payments due to the buyer account error. Returned payments are processed as a balance to a subaccount for your store. You can access the list of these reimbursed payments with the “Returning Payments - List API” service.

Returning Payments Callback After the transfer request you create from the returned payments, you receive a Success response, and your request to send from the account is received successfully by the PayTR system.The PayTR system will process your request in an average of 5 minutes, check the trans_info content you send, and make the transfers. If incorrect information is detected during the check, the relevant transaction is marked as unsuccessful. The resulting result is notified by POST to the address you defined as PayTR Merchant Panel > Settings (Ayarlar) > Platform Transfer Result Callback URL (Platform Transfer Sonucu Bildirim URL) in JSON format.

Refund API

Using this service, you can make a refund for part or all of the amount of the order. For this, the order number, the amount to be returned and other requested information in the document must be sent to the relevant service by POST method.

Status Inquiry API

You can access the status of merchant transactions made. You can view the returns if there are any. Status inquiry service is divided into two categories as Merchant Status Inquiry and Marketplace Status Inquiry.

BKM Express iFrame API

Using the BKM Express service, you can receive payments through cards registered in the BKM Express system.BKM Express Integration automatically appears on the payment screen in the iFrame payment method. However, when performing BKM Express integration in Direct API solution, $payment_type = "bex" must be sent.

Transaction Detail

You can access the details of the sales and return transactions made within the date duration (3 days maximum) using that service

Test Card Information

Test card information is valid for Direct API solution. In the iFrame API payment method, test card information is automatically received. In addition; You can send the name-surname and expiry date in the value you want in the test process.

Card information Values Description
Card Name PAYTR TEST You can send it any way you want.
Cart No 4355 0843 5508 4358 This value is required.
Expiration 12 / 24 You can send it any way you want.
CVV 000 This value is required


Card information Values Description
Card Name PAYTR TEST You can send it any way you want.
Cart No 5406 6754 0667 5403 This value is required.
Expiration 12 / 24 You can send it any way you want.
CVV 000 This value is required.


Card information Values Description
Card Name PAYTR TEST You can send it any way you want.
Cart No 9792 0303 9444 0796 This value is required.
Expiration 12 / 24 You can send it any way you want.
CVV 000 This value is required.


You can access the PayTR Collection and ENV file that you can use on Postman via the link.