Creating Payment Session
Method: POST
Path: /processor/payment-sessions
Requests can be sent with Akinon-User-Access-Token
or without a token.
Query Parameters
amount
number
required
Total amount of products in the basket.
currency
currency
optional
Currency of the payment session. If not provided, default is set to TRY.
order_id
string
required
Unique ID created for the order of the products in the basket.
conversation_id
string
optional
Conversation number to be sent by the merchant, boomerang value.
order_date
string
required
Order date.
cancel_url
string
required
URL redirected when the order is canceled or after an unsuccessful payment transaction.
success_url
string
required
URL redirected after a successful payment transaction.
notification_url
string
required
URL to inform the merchant after a successful payment process.
query_shipping_option_url
string
required
URL where shipping information will be queried.
query_agreements_url
string
If the agreements_iframe_url field is empty, this field is mandatory
URL where agreements will be queried.
query_agreement_types_url
string
If the agreements_iframe_url field is empty, this field is mandatory
URL where agreement types will be queried.
agreements_iframe_url
string
If the query_agreements_url and query_agreement_types_url fields are empty, this field is mandatory
If both query_agreements_url and query_agreement_types_url fields are empty, this field is required for querying agreement types in an iframe.
preauth
boolean
optional
Determines whether the payment transaction is pre-authorized. Default is false.
enable_installments
boolean
optional
Used for applying installments if available. Default is true.
merchant_customer_id
string
optional
Customer identification number belonging to the merchant. If defined, ownership of the payment session is determined.
merchant_customer_phone_number
string
optional
Customer phone number belonging to the merchant.
merchant_customer_email
string
optional
Customer email address belonging to the merchant.
basket
object
optional
Basket holding selected products during the payment session.
basket.basket_id
string
required
Basket identification number.
basket.total_product_amount
number
required
Total amount of products in the basket.
basket.total_discount_amount
number
required
Total discount amount applied to the products in the basket.
basket.total_amount
number
required
Calculated total amount of products in the basket.
basket.currency
currency
optional
Currency of the product added to the basket. If not provided, default is set to TRY.
basket.basket_items[0].sku
string
required
Stock code of the product.
basket.basket_items[0].basket_item_id
string
required
Unique identification number for each product in the basket.
basket.basket_items[0].unit_price
number
required
Unit price of each product in the basket.
basket.basket_items[0].quantity
long
required
Quantity of each product in the basket.
basket.basket_items[0].price
number
required
Calculated amount of each product in the basket.
basket.basket_items[0].name
string
required
Name of each product in the basket.
basket.basket_items[0].image_url
string
optional
URL of the image of each product in the basket.
basket.discounts[0].description
string
optional
Description of the discount applied to the products in the basket.
basket.discounts[0].amount
number
required
Percentage of the discount applied to the products in the basket.
session_owner_id
string
optional
User ID present in the Akinon system. If defined, the payment session is allocated only for this user.
Example Request
Response Parameters
merchant_id
string
Merchant's identity number to which the session is directed during creation.
customer_id
string
Identification information belonging to the customer.
amount
number
The total amount of products in the basket.
currency
currency
The currency of the payment session.
description
string
Detailed description of the products added to the basket.
order_id
string
Unique ID created for the order of the products added to the basket.
cvv_required
boolean
Information about whether the CVV value of the card needs to be used.
order_date
string
Order date.
cancel_url
string
URL redirected when the order is canceled or after an unsuccessful payment transaction.
success_url
string
URL redirected after a successful payment transaction.
query_shipping_option_url
string
URL where shipping information will be queried.
query_agreements_url
string
URL where agreements will be queried.
query_agreement_types_url
string
URL where agreement types will be queried.
agreements_iframe_url
string
Iframe URL where agreement types will be queried.
shipping_address
string
Key indicating the address to which the shipment will be sent.
billing_address
string
Key indicating the address to which the invoice will be sent.
shipping_option_key
string
Unique identification number for shipments.
shipping_amount
number
Shipping amount.
total_amount
number
Total amount of shipping and products in the basket.
preauth
boolean
Determines whether the payment transaction is pre-authorized. Default is false.
is_threed
boolean
Determines whether the payment transaction is carried out with 3D. Default is false.
enable_installments
boolean
Used for applying installments if available. Default is true.
session_token
string
A unique key created for the session.
transaction_token
string
A unique key created for the session.
akinon_user_id
string
Identification number created for the Akinon user.
created_date
string
Date when the session is created.
expiry_date
string
Date when the session will expire.
status
enum
Session status.
merchant_customer_id
string
Customer identification number belonging to the merchant.
merchant_customer_phone_number
string
Customer phone number belonging to the merchant.
merchant_customer_email
string
Customer email address belonging to the merchant.
basket
object
The basket that holds the selected products and discounts during the payment session.
basket.basket_id
string
The identification number of the basket.
basket.total_product_amount
number
Total amount of products in the basket.
basket.total_discount_amount
number
Total discount amount applied to the products in the basket.
basket.total_amount
number
Calculated total amount of products in the basket.
basket.currency
currency
Currency of the product added to the basket. If not provided, TRY is assigned by default.
basket.basket_items[0].sku
string
Stock code of the product.
basket.basket_items[0].basket_item_id
string
Unique identification number for each product in the basket.
basket.basket_items[0].unit_price
number
Unit price of each product in the basket.
basket.basket_items[0].quantity
long
Quantity of each product in the basket.
basket.basket_items[0].price
number
Calculated amount of each product in the basket. (quantity*unit_price)
basket.basket_items[0].name
string
Name of each product in the basket.
basket.basket_items[0].image_url
string
URL of the image of each product in the basket.
basket.discounts[0].description
string
Description of the discount applied to the products in the basket.
basket.discounts[0].amount
number
Percentage of the discount applied to the products in the basket.
session_owner_email
string
If filled, indicates that the related payment session belongs only to this user.
Example Response
Last updated
Was this helpful?