Payments

Payment Simulation

Payment simulation api you can check the payment request is processable 
and which virtual pos will be used
post/api/v1/payment/simulation

Request body

application_keystring required

It is the key of your application on our environment

campaign_namestring

It is the name of pos campaign you defined in our environment

currencystring

Its default is TRY, if you want to use another currency please send it by ISO Code like USD, EUR

amountinteger required

It must be send in integer format by multipliying original value with 100. For example 1 must be 100, 3.42 must be 342

installment_countstring

Its default is without installment, if you want to make installment please send the installment count as string

inst_periodinteger

Its default is 1, please send the installment period if it is different than 1

card_numberstring

Card number that will use in payment. This data never stores at our database, application logs. It is only directed to payment system.

expire_monthstring

Expire month of the card. Our api acts like card number.

expire_yearstring

Expire year of the card. Please send it in four digits format whole year info not last 2 characters. Our api acts like card number.

card_tokenstring

Card token that will use in payment.

is_3dboolean required

It must be true for 3d payments otherwise non-3d payment. But if you send it false, it doesn't guarantee it will be non-3d. For two reasons, it can be converted to 3d payment. First the card type, debit cards must be 3d. Second case is, if there is no suitable virtual pos to process your non-3d request it will be tried to do as 3d.

hash_datastring required

This is the calculated hash data for this sample payment request. BASE_64_ENCODE( SHA_256( APPLICATION_KEY + CARD_NUMBER + AMOUNT + SECRET_KEY ) )

customer_idstring

Customer id

is_submerchant_paymentboolean

Is payment for sub merchant ?

is_preauthboolean

Is payment pre auth?

modestring

Please send it as 'T' for test purposes, otherwise it will be in production mode.

languagestring

Its default value is tr. If you want to get messages in other languages, please send it. You can find supported languages in the api supported_languages.

is_agricultural_paymentboolean

Is payment for agricultural?

agricultural_codestring

Agricultural payment code. It is required when the payment is agricultural payment

Example request

{
  "application_key": "6e3cdaa3-65df-4eff-aed2-9d74387701dd",
  "campaign_name": "KAMPANYA",
  "currency": "TRY",
  "amount": 1250,
  "installment_count": "1",
  "inst_period": 1,
  "card_number": "4508034508034509",
  "expire_month": "12",
  "expire_year": "2026",
  "card_token": "133356090a864a579a591107cfa08cbd",
  "hash_data": "sadsaas3e412",
  "customer_id": "135",
  "is_submerchant_payment": true,
  "is_preauth": true,
  "mode": "T",
  "language": "tr",
  "is_agricultural_payment": true,
  "agricultural_code": "1"
}

Response

Successful Response

response_codestring

You will get 00 for successful response, otherwise another response code for the error. You can reach the list of response codes on the Response Codes Api

messagestring

Here is the explanation of response code

is_3dboolean

Specifies the payment will be 3d or none 3d

virtual_pos_namestring

This is the name of virtual pos the payment will be processed

virtual_pos_idinteger

This is the name of virtual pos the payment will be processed

expected_cost_ratenumber

Cost rate of payment

expected_cost_amountnumber

Cost amount of payment

expected_customer_ratenumber

Customer rate of payment

Example response

{
  "response_code": "00",
  "message": "Successful Payment",
  "is_3d": true,
  "virtual_pos_name": "Garanti Sanal POS",
  "virtual_pos_id": 35,
  "expected_cost_rate": 1.12,
  "expected_cost_amount": 11.12,
  "expected_customer_rate": 1.12
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.