Akinon Release Notes (05/12/2025) are now live! Click here to learn what's new.
LogoLogo
API Reference
  • Home
  • Quick Start
  • Tutorials
  • Technical Guides
  • Release Notes
  • Glossary
  • Welcome to Akinon Technical Guides
  • ACC
    • ACC CLI
    • Create Application via CLI
    • Deploy Environment Variables
    • App Store for Developers
  • Omnitron
    • Product Types
    • Product Categorization
    • Splitting a Merged Order Item
  • Commerce
    • Shipping Rules Calculator
    • Data Source Shipping Options
    • Attribute Based Shipping Options
    • Filtering Products
    • Conversation & Messages
    • Sitemap Configuration
    • Weight-Based Product Sales
    • Group Attribute Sets
    • Contract Management
    • Find in Store for Whippy Ware
    • Plugins
    • Remote Price
    • E-mail Templates
    • Loyalty Accounts
    • Search Structure
    • User Segmentation & Rules
    • Promotions
  • OMS
    • Getting Started with OMS
    • Basic Setup
    • Scenarios
    • Capacity Feature
    • Package Management
      • Packages
      • Transfer
      • States
    • Commands
      • Packages
        • Package Command Parameters
        • DeAllocate Package Reservations Command
        • Channel Based Complete Packaging without Shipment Command
        • Complete Packaging with Shipment Command
        • Complete Packaging without Shipment Command
        • Package Refuse with Denial Reason Command
        • Product Not Found & Wrong Product Command
        • Product Not Found & Wrong Product Command Advanced
        • Package Packed for Refund Command
        • Block The Package For Action Command
        • Unblock the Package For Action Command
        • Update The Package’s Invoice
        • Manual Planning Command
      • Transfer
        • Transfer Order Advanced Command
        • Product for Transfer Not Found & Wrong Product Command
        • Transfer Delivered Command
        • Transfer Dispatch Command
        • Transfer Ready for Dispatch Command
        • Transfer Out Of Stock
      • Shipment
        • Shipment Order Command
        • Package Advanced Shipment Command
        • Ship The Package Command
        • Ship The Package without Shipment Integration Command
        • Update The Package’s Shipment Status Command
        • Update Shipment Info of Package Command
    • Inventory Locations & Engine
      • Properties & Domain Relation
      • Customization
      • Inventory Engine
    • Fulfillment
      • Shipments
      • Invoice Integration
    • Webhooks
      • Webhook Examples
        • Order Webhook
        • Package Webhook
        • Shipment Webhook
        • Stock Location Webhook
        • Transfer Webhook
    • Integrating OMS with Seller Center
  • Instore
    • Getting Started
    • Cash Register Integration
    • OTP (One Time Password) Process
    • Services
      • Password Reset Services
  • Marketplace Dashboard
    • N11 Marketplace Setup Configurations
    • Trendyol Marketplace Setup Configurations
    • Walmart Marketplace Setup Configurations
    • Amazon Marketplace Setup Configurations
    • Hepsiburada Marketplace Setup Configurations
  • Project Zero
    • Django
      • Basic Setup
      • Project Structure
        • Templates & Components
        • Private Dependencies
        • Omnife Project Submodule
        • Webpack
        • ESLint Rules
        • Bundles
        • Multilanguage & Translation
        • Environmental File
        • Custom Error Pages
        • Icon Font
      • Page Types
        • Static Pages & Flatpages
        • Account Page
          • Template Rendering in Account Pages
          • Forms & Validation
        • Basket Page
          • Redux Basket State
          • Basket Page - View
        • Checkout
          • Redux Checkout State
          • View & Template Rendering
          • Masking & Validation
      • Theming & Styling
      • Widgets
      • SEO Management
      • Extending Project Zero
    • Next.js
      • Basic Setup
      • Deployment
      • Static Assets
      • Plugins
      • Widgets
      • Icons
      • Localization
      • SEO Management
      • Advanced Usage
      • Data Fetching
        • Client
          • Account
          • Address
          • Basket
          • Checkout
          • Misc
          • Product
          • User
          • Wishlist
        • Server
          • Category
          • Flat Page
          • List
          • Menu
          • Product
          • SEO
          • Special Page
          • Widget
  • App Maker
    • Setup Your Environment
    • Plugin Quickstart
    • Create Project
    • Setup Existing Project
    • Deploy Project
    • Users and Roles
    • Add Public Key
    • App Maker CLI
    • Create App on Stores
      • Creating App on Apple App Store
      • Creating App on Google Play Store
    • Mobile App Framework
      • Configuration
      • Framework
      • Project Structure
        • Structure
        • Data Containers
        • Pages
      • Dependency Integration
        • Plugins
        • Akinon Plugin Adapter
  • Akifast
    • HPP
      • Getting Started
      • Authorization
      • Payment Session Creation
        • Key Points Before Creating a Payment Session
        • Creating Payment Session
        • Redirecting to the Payment Page
        • Errors Encountered During Payment Session Creation
      • Merchant Services
        • Shipping Query URL
        • Agreement Query URL
        • Other URLs
  • B2B
    • Getting Started
    • B2B Setup
  • Adds-on
    • Invoicer
      • Introduction
      • Invoice & Pay On Delivery Service
  • Channel App Template
    • Introduction
    • Installation and Usage
    • Development Steps
      • Folder Structure
      • Starting Step
      • Encoding the Sales Channel
        • Introduction
        • Setup
        • Products
        • Product Price
        • Product Stock
        • Product Image
        • Orders
        • Product Data
      • Adding a New Command to Akinon
      • Listening for External Requests
    • Architecture
      • Introduction
      • Integration
      • Services (Flows)
        • Introduction
        • Product Service
        • Price Service
        • Stock Service
        • Image Service
        • Order Service
  • Multi Regional Settings
    • Multi Regional Settings
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • i. User Allocation​
  • ii. Basket Feature and Amount Parameter​
  • iii. Provision of Agreements for the Merchant​
  • iv. Provision of Delivery Options​
  • v. Notification for Successful Payment Result​
  • vi. State Diagram of the Payment Session​

Was this helpful?

  1. Akifast
  2. HPP
  3. Payment Session Creation

Key Points Before Creating a Payment Session

A payment session can be created in the Akifast system with or without an associated Akinon User. If a merchant initiates a session for an Akinon user, the payment session becomes exclusive to that particular Akinon user.

When conducting transactions with a logged-in Akinon User, the Akinon User's access token must be set in the Akinon-User-Access-Token header.

i. User Allocation​

While creating a payment session, the following points regarding user allocation should be noted:

If none of the parameters representing the user are defined in the request, the payment session is created in visitor mode. This session will be allocated to the first user logging in on the hosted payment page. The relevant parameters, listed in order of priority, are:

  1. Akinon-User-Access-Token: Only this parameter is considered if all parameters representing the user are defined.

  2. session_owner_id: For the use of this parameter, the Akinon-User-Access-Token parameter must not be defined.

  3. merchant_customer_id: For the use of this parameter, Akinon-User-Access-Token and session_owner_id parameters must not be defined.

  4. merchant_customer_email: This parameter is auxiliary. If no user is found in the system with merchant_customer_id, the email address is used.

If only the Akinon-User-Access-Token parameter, representing the user, is defined, the created payment session is allocated to the user associated with Akinon-User-Access-Token.

  • This session can be used by the user on the hosted payment page without logging in again.

  • The simultaneous defining of Akinon-User-Access-Token and session_owner_id parameters is not necessary. If defined, and the user ID associated with Akinon-User-Access-Token is not the same as the value defined in session_owner_id, the system returns an error.

If only the session_owner_id parameter, representing the user, is defined, and a user with this ID is found in the system, the created payment session is allocated to that user.

  • With this session on the hosted payment page, only the relevant user's email address can be used for login.

  • The user is directed to the HPP where they can enter the OTP code.

  • After the first successful login, no further login is required.

  • If the user is not found, the system returns an error.

If only the merchant_customer_id parameter, representing the user, is defined, the payment session is allocated to that user if they exist in the system.

  • With this session on the hosted payment page, only the relevant user's email address can be used for login.

  • The user is directed to a page where they can enter the OTP code directly.

  • After the first successful login, no further login is required.

  • If the user is not found, the system returns an error.

  • If no user is found, the merchant_customer_email parameter is assigned to the payment session as the user. On the hosted payment page, if a user with the email address exists in the system, the OTP login screen is displayed; otherwise, the registration screen opens. If the merchant_customer_email parameter is not sent, the payment session is created in visitor mode. If a different user logs into the system than the one specified in the merchant_customer_email parameter, an error will be returned.

ii. Basket Feature and Amount Parameter​

Key points to know about the basket feature and amount parameter are outlined below.

  • To use this feature, the basket parameter in the request must be created in the format specified in the request parameters table.

  • If both amount and basket parameters are defined, the total amount calculated in the basket must be equal to the amount parameter sent; otherwise, an error will occur during the creation of the payment session.

  • Objects sent in the discounts parameter within the basket parameter have a negative impact on the total amount, as they represent discounts.

iii. Provision of Agreements for the Merchant​

For agreements to be viewable on the hosted payment page, the merchant must prepare two different services in their own system.

The mandatory service URLs for the merchant must be defined with validation. According to this validation, either the agreements_iframe_url field must be filled, or both query_agreement_types_url and query_agreements_url fields must be filled together.

  • query_agreement_types_url: Service URL where agreement types will be provided.

  • query_agreements_url: Service URL where agreement will be provided.

  • agreements_iframe_url: Iframe URL where agreement will be provided.

iv. Provision of Delivery Options​

For delivery options to be queried and displayed based on the user's selected address on the hosted payment page, the merchant must prepare a service in their own system.

The mandatory service URL for the merchant must be defined in the following parameter.

  • query_shipping_option_url: Service URL where delivery options will be provided based on the user's address.

v. Notification for Successful Payment Result​

For the payment flow to be successfully completed, the merchant must prepare a service in their own system to handle notification requests.

The mandatory service URL for the merchant must be defined in the following parameter.

  • notification_url: Service URL that will feed the merchant's system with information about the successful payment result. If an error is encountered when sending the notification request and receiving a response from the system, it will not be resent; instead, it will be canceled.

vi. State Diagram of the Payment Session​

  • When the payment session is created, the status of the session is marked as ACTIVE. If no transaction is performed within a one-hour process, the status value is marked as EXPIRED through jobs.

  • If a successful payment transaction is made, the status value is changed from ACTIVE to COMPLETED.

  • If notification to the merchant cannot be provided after a successful payment, the status value is changed from ACTIVE to QUARANTINE.

  • While the status of the payment session is QUARANTINE, jobs attempt to provide notification to the merchant at certain intervals. If unsuccessful, the status value is changed from QUARANTINE to WAITING_FOR_VOID.

  • While the status of the payment session is WAITING_FOR_VOID, if a successful void operation occurs, the status value is changed to FAILED_AFTER_VOID. The system will attempt to void the payment up to 10 times, and if it fails after the 10th attempt, the payment session will be flagged for manual review.

  • While the status of the payment session is WAITING_FOR_VOID, if unsuccessful void operations occur, the status value is changed to MANUAL_REVIEW. The merchant can then review the session in the Merchant Dashboard or receive an email notification.

PreviousPayment Session CreationNextCreating Payment Session

Last updated 23 days ago

Was this helpful?