TR EN


Sale - No 3D Secure



- A Sale transaction is a credit card transaction that immediately charges a customer's credit card.
- Used card can be also saved card, in this case TOKEN must be supplied instead of card information
- To have installments, there is installments parameter can accept values from 1 or more, but to do this procedure, you should know the available predefined installments.


Request parameters
merchant: required
merchant name which you created in your Payfull account.

type: required
Transaction type should be Sale.

total: required
Total amount of the payment EX: 10.23 .

cc_name: required
Card Holder Name

cc_number: required
Card Number 16 digits EX: 4111111111111111

cc_month: required
Card expiry month EX: 05

cc_year: required
Card expiry year EX: 2017

cc_cvc: required
Card cvv/cvc EX: 000

currency: required
Currency can be TRY/USD/EUR/GBP

installments: required
Installments number, for no installment use 1

campaign_id: optional
Set Campaign id if you would like to use extra installments, please check how to get the extra installments and campaign id here

language: required
Response message language can be en / tr

client_ip: required
The client IP who uses the application which sends the request to the API.

payment_title: required
For each sale transaction you have to give a name for it EX: sell cup transaction

bank_id: optional
If you like to use specific bank, this parameter will tell the API about its ID
If there are installments, it will be required

gateway: optional
For each bank there is different gateway in installment mode EX: asseco / iyzico / payU ...etc
if there are installments, it will be required

customer_firstname: required
Firstname of the buyer

customer_lastname: required
Lastname of the buyer

customer_email: required
Email of the buyer

customer_phone: required
Phone number of the buyer

customer_tc: optional
TC number of the buyer

passive_data: optional
This parameter can take any passive data, then API will save it and return it to the caller in the response.
(note:please do not use this to send an important data like card numbers or passwords).

merchant_trx_id: optional
This parameter is for defining and sending a unique id value for the operation. You need to use this value for Transaction Status Information that you generated before.

pre_auth: optional
If this parameter is set to 1, then this transaction will be pre-authorization transaction.

hash: required
Generated hash code on the caller side

To generate the hash code please follow the steps below:
  • - Arrange the parameters alphabetically from A to Z
  • - Create a parameters string which has the length for each parameters with its value side by side
  • - Create the sha256 hash code from the parameters string and pass the merchant password as Shared secret key
  • - Add the hash code to the request parameters


Sale with BKM Express



- You can send sale transaction with BKM Express easily by the following request.
- In this request there is no need to send the card information.
- The first response of this request will be json in failed case, and html in success case.


Request parameters
merchant: required
merchant name which you created in your Payfull account.

type: required
Transaction type should be Sale.

total: required
Total amount of the payment EX: 10.23 .

currency: required
Currency can be TRY/USD/EUR/GBP

installments: required
To make the installments available inside BKM Express hosted page set this parameter to 1 otherwise set it to 0

language: required
Response message language can be en / tr

client_ip: required
The client IP who uses the application which sends the request to the API.

payment_title: required
For each sale transaction you have to give a name for it EX: sell cup transaction

bank_id: required
To have BKM Express transaction you should set parameter to BKMExpress.

return_url: required
The results of BKM Express transaction will be posted to this URL

customer_firstname: required
Firstname of the buyer

customer_lastname: required
Lastname of the buyer

customer_email: required
Email of the buyer

customer_phone: required
Phone number of the buyer

customer_tc: optional
TC number of the buyer

passive_data: optional
This parameter can take any passive data, then API will save it and return it to the caller in the response.

merchant_trx_id: optional
This parameter is for defining and sending a unique id value for the operation. You need to use this value for Transaction Status Information that you generated before.

hash: required
Generated hash code on the caller side

To generate the hash code please follow the steps below:
  • - Arrange the parameters alphabetically from A to Z
  • - Create a parameters string which has the length for each parameters with its value side by side
  • - Create the sha256 hash code from the parameters string and pass the merchant password as Shared secret key
  • - Add the hash code to the request parameters


Sale with Compay



- You need to prepare the relevant parameters to perform the sales operation using Compay.
- You do not need to send card information in this sales process.
- The first response of this request will be json in failed case, and html in success case.


Request parameters
merchant: required
merchant name which you created in your Payfull account.

type: required
Transaction type should be Sale.

total: required
Total amount of the payment EX: 10.23 .

installments: required
Use 1

currency: required
Currency can be TRY/USD/EUR/GBP

language: required
Response message language can be en / tr

client_ip: required
The client IP who uses the application which sends the request to the API.

payment_title: required
For each sale transaction you have to give a name for it EX: sell cup transaction

bank_id: required
To have BKM Express transaction you should set parameter to Compay

return_url: required
The results of BKM Express transaction will be posted to this URL

customer_firstname: required
Firstname of the buyer

customer_lastname: required
Lastname of the buyer

customer_email: required
Email of the buyer

customer_phone: required
Phone number of the buyer

customer_tc: optional
TC number of the buyer

passive_data: optional
This parameter can take any passive data, then API will save it and return it to the caller in the response.

merchant_trx_id: optional
This parameter is for defining and sending a unique id value for the operation. You need to use this value for Transaction Status Information that you generated before.

hash: required
Generated hash code on the caller side

To generate the hash code please follow the steps below:
  • - Arrange the parameters alphabetically from A to Z
  • - Create a parameters string which has the length for each parameters with its value side by side
  • - Create the sha256 hash code from the parameters string and pass the merchant password as Shared secret key
  • - Add the hash code to the request parameters







Sample request


merchant: merchant name
type: Sale
total: 23.02
cc_name: ALI
cc_number: 4111111111111111
cc_month: 09
cc_year: 2024
cc_cvc: 000
currency: TRY
installments: 1
language: tr
client_ip: 192.168.1.1
payment_title: just payemnt title
bank_id: Akbank
gateway: 160
customer_firstname: ALI
customer_lastname: MUHAMAD
customer_email: alitestemail@gmail.com
customer_phone: 5394659832
customer_tc: 12590326514
passive_data: just any passive data
hash: 14339MjuG01015018



Sample Response


{
"type":"Sale",
"status":1,
"transaction_id":"T4U_7dd053f6b8_d9a58906b",
"ErrorMSG":"Success Transaction",
"ErrorCode":"00",
"passive_data":" just any passive data",
"original_currency":"TRY",
"total":23.02,
"currency":"TRY",
"conversion_rate":1,
"bank_id":"Akbank",
"use3d":0,
"installments":1,
"time":"08-09-2016 02:53:25"
}


PHP Example