LogoLogo
  • Welcome to Akinon Documentation
  • Products
    • ACC
    • Omnitron
    • Commerce
    • Order Management System (OMS)
    • Instore
    • Integrator
    • Marketplace Dashboard (MPD)
    • Project Zero (PZ)
    • Seller Center
    • Akifast
    • App Maker
  • API Reference
    • Welcome to Akinon API Reference
  • Omnitron
    • Getting Started
    • Integration
      • Product
        • Product
        • Pre-Product
        • Attribute
        • Attribute Value
        • Attribute Set
        • Product Image
      • Price
        • Price List
        • Product Price
        • Currency Unit Table
      • Stock
        • Stock List
        • Product Stock
      • Order
        • Get Orders
        • Search Order
        • Get Order Detail by Order Number
        • Get Order Item Detail
        • Orders ID Detail Integration
        • Orders Waiting to Send to ERP
        • Update Order and Order Item
        • Stock Reservation Release
        • Order Cancellation
        • Cancellation & Refund Pending Orders
        • Order Discount Items
        • Order Status Codes & Cancellation Statuses
      • Migration
        • Getting Started
        • User Migration
        • Address Migration
        • Old Order Migration
        • Old Order Item Migration
        • View Migration Progress
        • Currency Options
    • PIM
      • Attributes & Sets
      • Mapping
      • Localization
      • Media
    • Catalogue
      • Introduction
      • Price List
      • Stock List
      • Catalogue Item
      • Category Trees
      • Product Collection
      • Product Sorting
    • Channels
      • Introduction
      • Payments
      • Customers
    • Order
      • Getting Started
      • Fulfillment
      • Cancellations & Refunds
    • Retail Stores
      • Retail Stores
    • User Management
      • Roles & Permissions
      • Add & Remove
    • Whippy Ware
      • Introduction
      • Stock
      • Stock Lists
      • Stock List Rules
      • Stock Providers
      • Stock Locations
  • Omnitron OpenAPIs
    • Without Server
      • Customers
      • Reporting
      • Deleted Items
      • Pos
      • AttributeValues
      • Attribute Values
      • Providers
      • LDAPProviders
      • Healthcheck
      • LoyaltyTransactions
      • Policies
      • Exports
      • Dashboard
      • AuthTOTP
      • Price Lists
      • ProductPrices
      • Districts
      • Cities
      • Countries
      • Townships
      • PrometheusMetrics
      • Language
      • Content Types
      • Mappings
      • Applications
      • ApplicationPermissions
      • Error Reports
      • MailTemplates
      • UploadLogo
      • SalesChannelMarketPlaceAttributeSetConfig
      • SalesChannelCancellationRequestImage
      • SalesChannelCities
      • SalesChannelCancellationReasons
      • SalesChannelCargoCompany
      • SalesChannelProductImage
      • SalesChannelAttributeConfig
      • SalesChannelAttributeValueConfig
      • SalesChannelTownships
      • SalesChannelCustomers
      • SalesChannelFailedIntegrations
      • SalesChannelGetStockList
      • SalesChannelRetailStore
      • IntegrationActions
      • SalesChannelOrderShippingInfo
      • SalesChannelBatchRequests
      • SalesChannelAddresses
      • SalesChannelMarketPlaceAttributeSet
      • SalesChannelErrorReports
      • SalesChannelCategoryNodes
      • SalesChannelDistricts
      • SalesChannelProductStock
      • SalesChannelExtraProductStock
      • SalesChannelOrders
      • SalesChannelCancellationPlans
      • SalesChannelExtraProductPrices
      • SalesChannelProduct
      • SalesChannelAttributeSchemas
      • SalesChannelProductCategories
      • SalesChannelCancellationRequests
      • SalesChannelMarketPlaceAttributeValue
      • SalesChannelMappedProduct
      • SalesChannelMarketPlaceAttribute
      • SalesChannelOrderItem
      • SalesChannelProductPrice
      • SalesChannelCreateOrder
      • GetPriceList
      • SalesChannelCountries
      • SalesChannelGetPriceList
      • SalesChannelCategoryTree
    • With Server
      • Customers
      • Reporting
      • Deleted Items
      • Pos
      • AttributeValues
      • Attribute Values
      • Providers
      • LDAPProviders
      • Healthcheck
      • LoyaltyTransactions
      • Policies
      • Exports
      • Dashboard
      • AuthTOTP
      • Price Lists
      • ProductPrices
      • Districts
      • Cities
      • Countries
      • Townships
      • PrometheusMetrics
      • Language
      • Mappings
      • Content Types
      • Applications
      • ApplicationPermissions
      • Error Reports
      • MailTemplates
      • UploadLogo
      • SalesChannelMarketPlaceAttributeSetConfig
      • SalesChannelCancellationRequestImage
      • SalesChannelCities
      • SalesChannelCancellationReasons
      • SalesChannelCargoCompany
      • SalesChannelProductImage
      • SalesChannelAttributeConfig
      • SalesChannelAttributeValueConfig
      • SalesChannelTownships
      • SalesChannelCustomers
      • SalesChannelFailedIntegrations
      • SalesChannelGetStockList
      • IntegrationActions
      • SalesChannelRetailStore
      • SalesChannelOrderShippingInfo
      • SalesChannelBatchRequests
      • SalesChannelAddresses
      • SalesChannelMarketPlaceAttributeSet
      • SalesChannelErrorReports
      • SalesChannelDistricts
      • SalesChannelCategoryNodes
      • SalesChannelProductStock
      • SalesChannelExtraProductStock
      • SalesChannelCountries
      • SalesChannelOrders
      • SalesChannelProduct
      • SalesChannelCancellationPlans
      • SalesChannelExtraProductPrices
      • SalesChannelProductCategories
      • SalesChannelAttributeSchemas
      • SalesChannelCancellationRequests
      • SalesChannelMarketPlaceAttributeValue
      • SalesChannelMappedProduct
      • SalesChannelMarketPlaceAttribute
      • SalesChannelOrderItem
      • SalesChannelProductPrice
      • SalesChannelCreateOrder
      • GetPriceList
      • SalesChannelGetPriceList
      • SalesChannelCategoryTree
  • Commerce
    • Users
      • Getting Started
      • User Management & Authentication
      • Password & OTP Operations
      • User Profile & Segment Management
      • User Payment & Card Management
      • User Orders & Cancellations
      • Anonymous User Orders & Cancellations
      • User Support & Conversation
      • Captcha Validation
      • Currency & Akifast Operations
    • Checkout
      • Payment Related
      • Payment Strategy Related
      • Shipping Related
      • Independent Pages
    • Product
    • User Collections
    • Basket
    • Discount
    • Autocomplete
    • Breadcrumb
    • Pretty URLs
    • Menu
    • Widgets
    • Loyalty Accounts
    • Address Migration
    • Index Configuration
    • Favourite Products
    • User Address
    • Data Warehouse
    • Introduction
      • Filtering Parameters
    • Data Warehouse
    • Default
  • OMS
    • Package Services
    • Package Item Services
    • Package Denial Reason Services
    • Order Services
    • Order Item Services
    • Transfer Order Services
    • Transfer Item Services
    • Channel Services
    • Cancellation Plan Services
    • Cancellation Reason Services
    • Address Setup Services
    • City Services
    • District Services
    • Township Services
    • Stock Location Address Services
    • Webhook Setup Services
    • Webhook Event Services
    • Omnitron Order Webhooks
    • Undelivered Webhook Event Services
    • Inventory Discrepancy Services
    • OMS Setup Services
    • UI Settings Services
    • OMS Audit Events Service
    • Customer Address Services
    • Application Settings Services
    • Content Type Services
    • Customer Services
    • Channel Setup Services
    • Demo Data Service
    • Order Execution Plan Services
    • Invoice Services
    • Localization Services
    • Action Log Services
    • Order Log Services
    • Celery Metrics Service
    • Stock Location Services
    • Stock Location Address Services
    • Stock Location Sender Address Services
    • Stock Location Sender Address Setup Services
    • Cargo Company Condition Services
    • Permission Group Services
  • OMS OpenAPIs
    • Package Services
      • Default
    • Transfer Order Services
      • Default
  • Instore
    • Password Reset Services
  • Integrator
    • Projects
    • Flows
    • Logs
  • Seller Center
    • Languages
    • Categories
    • Introduction
    • Products
    • Packages
    • Orders
    • Claims
    • Shipping Methods
  • Akifast
    • Authentication
  • B2B
    • Quotation
    • Basket
    • Division
    • User
    • Staff User
    • Groups
    • Notification
    • Notification Template
  • Flows
    • Shipment Flows
    • Payment Flows
    • SMS Flows
    • Basket Offer Flows
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • POS
  • GET POS
  • POST Create POS
  • GET POS Detail
  • DELETE POS
  • PATCH-PUT Update POS
  • GET Schema Structure
  • Bank
  • GET Banks
  • POST Create Bank
  • GET Bank Detail
  • DELETE Bank
  • PUT-PATCH Update Bank
  • POST Bulk Bank Creation
  • Card Type
  • GET Credit Card Types
  • GET Credit Card Type Detail
  • DELETE Credit Card Type
  • PUT-PATCH Update Credit Card Type
  • POST Create a New Card Type
  • Card
  • GET All Credit Cards
  • GET Card Detail
  • PUT-PATCH Update Card
  • POST Create Card
  • DELETE Credit Card
  • POST Bulk Card Creation
  • Bank Identification Number
  • GET All BINs​
  • GET BIN by ID
  • POST Create BIN
  • DELETE BIN​
  • PATCH Create BIN​
  • Installment
  • GET All Installment Instances
  • GET Installment Detail​
  • PUT-PATCH Update Installment
  • POST Create Installment
  • DELETE Installment
  • Bank Account
  • GET All Bank Accounts
  • GET Bank Account Detail
  • PUT-PATCH Update Bank Account
  • POST Create Bank Account
  • DELETE Bank Account​
  • Payment Option
  • GET All Payment Options
  • GET Payment Option Detail
  • PUT-PATCH Update Payment Option
  • POST Create Payment Option

Was this helpful?

  1. Omnitron
  2. Channels

Payments

The Omnitron module where the payments and their configurations are stored. POS, Bank,Card, CardType, MultiCurrencyCard, BinNumber, Installment, PaymentOption and BankAccount models are in the payments application. Virtual POS settings to be used on webshop and mobile platforms, management of bank settings, defining new card types and management of their settings, payment options such as credit-card, cash-register etcCredit and debit card settings can be managed using different checkout providers through the payments application.

POS

Stores the settings of the virtual POS you will use on your website or mobile application. It can be accessed from the Sales Channels > Payment Management > Add/Edit POS Integration menu on the Omnitron panel.

Potential Responses

201 Created
400 Bad Request
404 Not Found
405 Method Not Allowed
406 Not Acceptable

GET POS

Retrieves attribute values from the POS table. Gets the filter parameters with {omnitron.payments.resources.filters.PosFilter} in PosFilter as query parameters. Supports pagination by inheriting ViewSet from ListModelMixin with query parameters of page=X and limit=Y.

Path: /api/v1/pos/

Filters: Filtering can only be done with channel, id and modified_date.

Example: ?channel=1

Response

{
   "count": 1,
   "next": "/api/v1/pos/?page=2",
   "previous": null,
   "results": [
       {
           "pk": 1,
           "name": " Test Garanti Pay",
           "slug": "gpay",
           "gateway": "omnicore.libs.payment_gateways.gpay.GPayGateway",
           "config": {
               "auth": {
                   "password": "111111",
                   "merchant_id": "111111",
                   "terminal_id": "111111",
                   "prov_username": {
                       "oos": "oos",
                       "refund": "refund"
                   }
               },
               "mode": "TEST",
               "version": "v0.01",
               "store_key": "111111",
               "refund_url": "https://sanalposprovtest.garanti.com.tr/VPServlet",
               "company_name": "AAA",
               "timeout_period": 300
           },
           "resource_url": "https://sanalposprovtest.garanti.com.tr/servlet/gt3dengine",
           "three_d_resource_url": null,
           "channel": 1,
           "gateway_display": "Gpay",
           "modified_date": "2022-02-10T06:28:55.575801Z",
           "created_date": "2022-02-10T06:28:55.575773Z"
       }
   ]
}

POST Create POS

Adds a new record to the POS table. Verified with PosSerializer. Returns HTTP400 if data is not available. Returns HTTP406 if there is an error or incompatibility at the service layer during the registration process.

Path: /api/v1/pos/

{
   "name": "POS",
   "slug": "POS",
   "gateway": "omnicore.libs.payment_gateways.dummypay.DummyPayGateway",
   "config": {
               "three_d_enabled": false,
               "fail_on_void": false,
               "auth": {},
               "fail_on_refund": false
           },
   "resource_url": "https://dummypay.net/",
   "three_d_resource_url": "https://dummypay.net/",
   "channel": 1
}

Response

The success response status is HTTP201 and the response body contains the generated POS information HTTP400 and HTTP406 response statuses mean that the POS object was not created.

Status 201
{
   "pk": 11,
   "name": "POS",
   "slug": "POS",
   "gateway": "omnicore.libs.payment_gateways.dummypay.DummyPayGateway",
   "config": {
       "three_d_enabled": false,
       "fail_on_refund": false,
       "fail_on_void": false,
       "auth": {}
   },
   "resource_url": "https://dummypay.net/",
   "three_d_resource_url": "https://dummypay.net/",
   "channel": 1,
   "gateway_display": "Dummypay",
   "modified_date": "2023-01-13T11:08:43.792169Z",
   "created_date": "2023-01-13T11:08:43.792140Z"
}

Errors

Status 400
{
   "non_field_errors": [
       "The fields slug, channel must make a unique set."
   ]
}
Status 406
{
   "non_field_errors": "{"username": ["This field is required."], "store_key": ["This field is required."], "password": ["This field is required."], "client_id": ["This field is required."]}",
   "error_code": "pos_100_2"
}

GET POS Detail

Retrieves the object of the corresponding primary key from the POS table. If it cannot find the object, it returns HTTP404.

Path: /api/v1/pos/{id}/

Returns POS information with the provided ID.

Response

Successful response status is HTTP200 and response BODY is the details of the object.


{
           "pk": 1,
           "name": " Test Garanti Pay",
           "slug": "gpay",
           "gateway": "omnicore.libs.payment_gateways.gpay.GPayGateway",
           "config": {
               "auth": {
                   "password": "111111",
                   "merchant_id": "111111",
                   "terminal_id": "111111",
                   "prov_username": {
                       "oos": "oos",
                       "refund": "refund"
                   }
               },
               "mode": "TEST",
               "version": "v0.01",
               "store_key": "111111",
               "refund_url": "https://sanalposprovtest.garanti.com.tr/VPServlet",
               "company_name": "AAA",
               "timeout_period": 300
           },
           "resource_url": "https://sanalposprovtest.garanti.com.tr/servlet/gt3dengine",
           "three_d_resource_url": null,
           "channel": 1,
           "gateway_display": "Gpay",
           "modified_date": "2023-01-13T11:08:43.792169Z",
           "created_date": "2023-01-13T11:08:43.792140Z"
}

DELETE POS

Path: /api/v1/pos/{id}/

Permanently deletes POS with the provided ID.

Response: Only returns status 204 in response

PATCH-PUT Update POS

Path: /api/v1/pos/{id}/

POS information with the provided ID is updated.

Request

{
    "Pk":1,
    "name":"DummyPay",
    "Slug":"dummy-pay",
    "gateway":"omnicore.libs.payment_gateways.dummypay.DummyPayGateway",
    "Config":{
        "Three_d_enabled":false,
        "Fail_on_void":false,
        "Fail_on_refund":false
    },
    "resource_url":"https://dummypay.net/",
    "three_d_resource_url":"https://dummypay.net/",
    "Channel":1,
    "gateway_display":"Dummypay"
}

Response

{
    "Pk":10,
    "name":"DummyPay",
    "Slug":"dummy-pay",
    "gateway":"omnicore.libs.payment_gateways.dummypay.DummyPayGateway",
    "Config":{
        "Three_d_enabled":false,
        "Fail_on_refund":false,
        "Fail_on_void":false,
        "Auth":{}
    },
    "resource_url":"https://dummypay.net/",
    "three_d_resource_url":"https://dummypay.net/",
    "Channel":1,
    "gateway_display":"Dummypay",
    "modified_date": "2023-01-13T11:37:10.547812Z",
    "created_date": "2023-01-13T11:08:43.792140Z"
}

Errors

-- OR 406
{
    "non_field_errors": "Channel: Shop of Pos: dummy_pos cannot change.",
    "error_code": "pos_100_3"
}
-- OR 406
{
   "non_field_errors": [
       "The fields slug, channel must make a unique set."
   ]
}
-- OR 406
{
   "non_field_errors": "{"username": ["This field is required."], "store_key": ["This field is required."], "password": ["This field is required."], "client_id": ["This field is required."]}",
   "error_code": "pos_100_2"
}

GET Schema Structure

Path: /api/v1/pos/schema/

Returns the schema structure for the POS endpoint.

{
    "name": "Schema",
    "description": "",
    "renders": [
        "application/json",
        "text/html",
        "text/csv",
        "application/xls",
        "application/xml"
    ],
    "parses": [
        "application/json",
        "application/x-www-form-urlencoded",
        "multipart/form-data"
    ],
    "actions": {
        "POST": {
            "pk": {
                "type": "integer",
                "required": false,
                "read_only": true,
                "label": "ID"
            },
            "name": {
                "type": "string",
                "required": true,
                "read_only": false,
                "label": "Name",
                "max_length": 64
            },
            "slug": {
                "type": "string",
                "required": true,
                "read_only": false,
                "label": "Slug"
            },
            "gateway": {
                "type": "choice",
                "required": true,
                "read_only": false,
                "label": "Gateway",
                "choices": [
                    {
                        "display_name": "alpha",
                        "value": "omnicore.libs.payment_gateways.alpha.AlphaGateway"
                    },
                ]
            },
            "config": {
                "type": "json field",
                "required": false,
                "read_only": false,
                "label": "Config",
                "choices": {
                    "fiba_credit": {
                        "client_id": {
                            "type": "string",
                            "required": true,
                            "read_only": false,
                            "label": "Client Id",
                            "max_length": 64
                        },
                        "client_secret": {
                            "type": "string",
                            "required": true,
                            "read_only": false,
                            "label": "Client Secret Key",
                            "max_length": 64
                        },
                        ...
            },
            "resource_url": {
                "type": "url",
                "required": true,
                "read_only": false,
                "label": "Resource url",
                "max_length": 200
            },
            "three_d_resource_url": {
                "type": "url",
                "required": false,
                "read_only": false,
                "label": "Three d resource url",
                "max_length": 200
            },
            "channel": {
                "type": "pk field",
                "required": true,
                "read_only": false,
                "label": "Channel"
            },
            "gateway_display": {
                "type": "method field",
                "required": false,
                "read_only": true,
                "label": "Gateway display"
            },
            "modified_date": {
                "type": "datetime",
                "required": false,
                "read_only": true,
                "label": "Modified date"
            },
            "created_date": {
                "type": "datetime",
                "required": false,
                "read_only": true,
                "label": "Created date"
            }
        }
    },
    "filters": {
        "id": {
            "type": "NumberFilter",
            "lookup_types": [
                "exact",
                "gt",
                "gte",
                "lt",
                "lte"
            ]
        },
        "channel": {
            "type": "ModelChoiceFilter",
            "lookup_types": [
                "exact"
            ]
        },
        "modified_date": {
            "type": "DateFilter",
            "lookup_types": [
                "exact",
                "gt",
                "gte",
                "lt",
                "lte",
                "date"
            ]
        },
        "pk": {
            "type": "NumberFilter",
            "lookup_types": [
                "exact",
                "gt",
                "gte",
                "lt",
                "lte"
            ]
        }
    },
    "ordering": "__all__"
}

Bank

Permits bank definitions on Omnitron. It can be accessed from the Sales Channels > Payment Managements > Banks menu on Omnitron.

Potential Responses

201 Created
400 Bad Request
404 Not Found
405 Method Not Allowed
406 Not Acceptable 

GET Banks

Path: /api/v1/banks/

Returns the recorded banks in Omnitron.

Response

{
    "count": 29,
    "next": "http://localhost:8000/api/v1/banks/?page=2",
    "previous": null,
    "results": [
        {
            "pk": 2,
            "name": "Türkiye Finans Katılım Bankası",
            "slug": "turkiye-finans-katlm-bankas",
            "logo": null,
            "channel": 1,
            "modified_date": "2017-02-01T14:18:17.752654Z",
            "created_date": "2017-02-01T14:18:17.752631Z"
        },
…
}

Filters

Filtering can only be made with channel, ID and modified_date.

/api/v1/banks/?channel=1

Response


{
   "count": 1,
   "next": "/api/v1/banks/?page=2",
   "previous": null,
   "results": [
       {
           "pk": 1,
           "name": "Test Bank",
           "slug": "test-bank",
           "logo": null,
           "channel": 1,
           "modified_date": "2017-02-01T14:18:17.752654Z",
           "created_date": "2017-02-01T14:18:17.752631Z"
       }]
}
  

POST Create Bank

Path: /api/v1/banks/

Adds a new record to the Bank table. It is validated with BankSerializer. If the data is not suitable, it returns HTTP400. If there is an error or non-compliance in the service layer during the recording process, it returns HTTP406.

{
   "name": "Test Bank",
   "slug": "test-bank",
   "logo": null,
   "channel": 1
}  

Response

HTTP 200

{
   "pk": 2,
   "name": "Test Bank",
   "slug": "test-bank",
   "logo": null,
   "channel": 1,
    "modified_date": "2023-01-13T13:28:34.304746Z",
    "created_date": "2023-01-13T13:28:34.304708Z"
}

Errors

{
    "non_field_errors": [
        "The fields slug, channel must make a unique set."
    ]
}

GET Bank Detail

Path: /api/v1/banks/{id}/

Returns bank information with the provided ID.

Response

{
   "pk": 2,
   "name": "Test Bank",
   "slug": "test-bank",
   "logo": null,
   "channel": 1,
   "modified_date": "2023-01-13T13:28:34.304746Z",
   "created_date": "2023-01-13T13:28:34.304708Z"
}

DELETE Bank

Path: /api/v1/banks/{id}/

Permanently deletes banks with the provided ID.

Response

Only returns status 204 in response.

PUT-PATCH Update Bank

Path: /api/v1/banks/{id}/

Permits changes to banks with the provided ID.

{
   "name": "Edited Test Bank",
   "slug": "test-bank",
   "logo": null,
   "channel": 1
}

Response

{
   "pk": 2,
   "name": "Edited Test Bank",
   "slug": "test-bank",
   "logo": null,
   "channel": 1,
   "modified_date": "2023-01-13T13:31:55.092127Z",
   "created_date": "2023-01-13T13:31:29.377205Z"
}

Errors

HTTP 400
{
    "non_field_errors": [
        "The fields slug, channel must make a unique set."
    ]
}
-- OR HTTP 406
{
    "non_field_errors": "Channel: Test Edited of Bank: test-bank cannot change.",
    "error_code": "bank_100_2"
}

POST Bulk Bank Creation

Path: /api/v1/banks/bulk_create/?channel_id={channel_id}

Permits the bulk creation of banks with the CSV file. It is mandatory to provide channel ID as a query parameter. The fields in BankSerializer must be present in the CSV file. The logo must be expressed within the URL.

{
    filename: csv_file.csv
}

Response

{
    "<name>": "<Creation status>"
}

Card Type

Used for the type identification of the cards to be defined on Omnitron. It can be accessed from the Sales Channels > Payment Management > Card Types menu on Omnitron.

Potential Responses

201 Created
400 Bad Request
404 Not Found
405 Method Not Allowed
406 Not Acceptable

GET Credit Card Types

Path: /api/v1/card_types/

Returns the card types registered on Omnitron.

Filters

Filtering can only be done with channel, ID and modified_date.

/api/v1/card_types/?channel=1

Response

{
   "count": 1,
   "next": "http://{customer_omnitron_url}/api/v1/card_types/?page=2",
   "previous": null,
   "results": [
       {
           "pk": 1,
           "name": "Bonus",
           "slug": "bonus",
           "logo": "http://logo.url",
           "channel": 1,
           "modified_date": "2017-02-01T14:18:17.763175Z",
           "created_date": "2017-02-01T14:18:17.763148Z"
       }]
}

GET Credit Card Type Detail

Path: /api/v1/card_types/{id}/

Returns card types with the provided ID.

Response

{
   "pk": 1,
   "name": "Bonus",
   "slug": "bonus",
   "logo": "http://logo.url.jpg",
   "channel": 1,
   "modified_date": "2017-02-01T14:18:17.763175Z",
   "created_date": "2017-02-01T14:18:17.763148Z"
}   

DELETE Credit Card Type

Path: /api/v1/card_types/{id}/

Permanently deletes card types with the provided ID.

Response

Only returns status 204 in response

PUT-PATCH Update Credit Card Type

Path: /api/v1/card_types/{id}/

Updates card types with the provided ID.


{
   "pk": 1,
   "name": "Bonus-v2",
   "slug": "bonus",
   "channel": 1
}
   

Response


{
   "pk": 1,
   "name": "Bonus-v2",
   "slug": "bonus",
   "logo": "http://logo.url",
   "channel": 1
}
   

Errors

{
   "logo": [
       "The submitted data was not a file. Check the encoding type on the form."
   ]
}
-- OR
{
    "non_field_errors": [
        "The fields slug, channel must make a unique set."
    ]
}
-- OR HTTP 406
{
    "non_field_errors": "Channel: test of CardType: test cannot change.",
    "error_code": "card_type_100_2"
}

POST Create a New Card Type

Adds a new record to the CardType table. Validated with CardTypeSerializer. Returns HTTP400 if data is not available. Returns HTTP406 if there is an error or incompatibility at the service layer during the recording process.

Path: /api/v1/card_types/


{
   "name": "New Type",
   "slug": "new-type",
   "logo": "<logo file>",
   "channel": 1
}

Response

HTTP 200


{
   "pk": 2,
   "name": "New Type",
   "slug": "new-type",
   "logo": "http://logo.url",
   "channel": 1,
    "modified_date": "2023-01-13T14:30:39.534199Z",
    "created_date": "2023-01-13T14:30:39.534173Z"
}

Response

HTTP 400


{
   "logo": [
       "The submitted data was not a file. Check the encoding type on the form."
   ]
}
-- OR
{
    "non_field_errors": [
        "The fields slug, channel must make a unique set."
    ]
}

Card

Used to define and process cards that can be used in sales channels on Omnitron. Creating a card firstly requires the creation of a card type, POS and the bank to which it will be linked. It can be accessed from the Sales Channels > Payment Management > Card Settings menu on the Omnitron panel.

Potential Responses

201 Created
400 Bad Request
404 Not Found
405 Method Not Allowed
406 Not Acceptable

GET All Credit Cards

Path: /api/v1/cards/

Returns all cards registered in the system.

Filters

Location: Omnitron.payments.resources.filters.CardFilter

Filtering can be performed with all fields available in the Card model.

Example: ?name=Bonus&bank=2

Response


{
   "count": 1,
   "next": null,
   "previous": null,
   "results": [
       {
           "pk": 1,
           "name": "Bonus",
           "bank": 2,
           "card_type": 1,
           "card_payment_type": "credit",
           "cash_payment": 10,
           "installment_payment": 2,
           "slug": "bonus",
           "three_d_payment": 10,
           "is_commerce_card": false,
           "channel": 1,
           "modified_date": "2017-02-01T14:18:17.776010Z",
           "created_date": "2017-02-01T14:18:17.775977Z"
       }
   ]
}

GET Card Detail

Path: /api/v1/cards/{id}/

Returns card information with the provided ID.

Response


{
   "pk": 1,
   "name": "Bonus",
   "bank": 2,
   "card_type": 1,
   "card_payment_type": "credit",
   "cash_payment": 10,
   "installment_payment": 2,
   "slug": "bonus",
   "three_d_payment": 10,
   "is_commerce_card": false,
   "channel": 1,
   "modified_date": "2017-02-01T14:18:17.776010Z",
   "created_date": "2017-02-01T14:18:17.775977Z"
}

PUT-PATCH Update Card

Path: /api/v1/cards/{id}/

Updates the card information with the provided ID.


{
   "pk": 1,
   "name": "New Card",
   "bank": 2,
   "card_type": 1,
   "card_payment_type": "credit",
   "cash_payment": 10,
   "installment_payment": 2,
   "slug": "new-card",
   "three_d_payment": 10,
   "is_commerce_card": false,
   "channel": 1
}

Response

{
   "pk": 1,
   "name": "New Card",
   "bank": 2,
   "card_type": 1,
   "card_payment_type": "credit",
   "cash_payment": 10,
   "installment_payment": 2,
   "slug": "new-card",
   "three_d_payment": 10,
   "is_commerce_card": false,
   "channel": 1,
   "modified_date": "2023-01-16T07:35:04.404826Z",
   "created_date": "2023-01-16T07:25:39.965970Z"
}

Response / 400


{
   "non_field_errors": [
       "The fields slug, channel, bank, card_type must make a unique set.",
       "The fields bank, card_type, card_payment_type must make a unique set."
   ]
}

Response / 406


{
   "non_field_errors": "Card: <bank> <card_tpye> <bank_slug> <channel_name> incompatible.",
   "error_code": "card_100_2"
}

POST Create Card

Adds a new record to the card table. Verified with CardSerializer. Returns HTTP400 if data is not available. Returns HTTP406 if there is an error or incompatibility at the service layer during the registration process.

Path: /api/v1/cards/


{
   "name": "new",
   "bank": 2,
   "card_type": 1,
   "card_payment_type": "debit",
   "cash_payment": 10,
   "installment_payment": 2,
   "slug": "new",
   "three_d_payment": 10,
   "is_commerce_card": false,
   "channel": 1
}

Response / 201

{
   "pk": 2,
   "name": "new",
   "bank": 2,
   "card_type": 1,
   "card_payment_type": "debit",
   "cash_payment": 10,
   "installment_payment": 2,
   "slug": "new",
   "three_d_payment": 10,
   "is_commerce_card": false,
   "channel": 1,
   "modified_date": "2023-01-16T07:25:39.965998Z",
   "created_date": "2023-01-16T07:25:39.965970Z"
}

Response / 400

{
   "non_field_errors": [
       "The fields slug, channel, bank, card_type must make a unique set.",
       "The fields bank, card_type, card_payment_type must make a unique set."
   ]
}

Response / 406

{
   "non_field_errors": "Card: <bank> <card_tpye> <bank_slug> <channel_name> incompatible.",
   "error_code": "card_100_2"
}

DELETE Credit Card

Path: /api/v1/cards/{id}/

Permanently deletes cards with the provided ID.

Returns status 204 in response.

POST Bulk Card Creation

Path: /api/v1/cards/{id}/bulk_create/

Used to bulk create BIN numbers for cards with the provided ID. The CSV file is a single column and contains the BIN number. For this process, it uses the bulk_create function of BinNumberService.

{
    filename: csv_file.csv
}

Response

{
    "<bin_number>": "<Creation status>" 
}

HTTP 406

{
    "non_field_errors": "File not found please provide an appropriate file",
    "error_code": "file_100_1"
}

Bank Identification Number

The BIN that can be shopped within sales channels are defined. Each BIN is linked to a card. The match is made when the card information is entered in the sales channels. When we enter the details of a card on the Sales Channels>Payment Management>Card Settings page on the Omnitron panel, the bottom of the opened page displays a table with the title Card BIN Numbers.

Potential Responses

201 Created
400 Bad Request
404 Not Found
405 Method Not Allowed
406 Not Acceptable

GET All BINs​

Path: /api/v1/bin_numbers/

Returns all BIN numbers registered on Omnitron.

Filters

Filters can be applied to bin_number_length (6 or 8) in addition to all fields on the serializer. E.g.: ?card=1

Response


{
   "count": 1,
   "next": "http://{customer_omnitron_url}/api/v1/bin_numbers/?page=2",
   "previous": null,
   "results": [
       {
           "pk": 1,
           "bin_number": "524659",
           "card": 5,
           "is_active": true,
           "channel": 1,
           "modified_date": "2017-02-01T14:18:17.782154Z",
           "created_date": "2017-02-01T14:18:17.782137Z"
       }]
}

GET BIN by ID

Path: /api/v1/bin_numbers/{id}/

Returns BIN numbers with the provided ID.

Response


{
   "bin_number": "524659",
   "card": 5,
   "is_active": false,
   "channel": 1,
   "bin_number_length": "6",
   "modified_date": "2017-02-01T14:18:17.782154Z",
   "created_date": "2017-02-01T14:18:17.782137Z"
}

POST Create BIN

Path: /api/v1/bin_numbers/

It is used to create BIN numbers.


{
   "bin_number": "123452",
   "card": 5,
   "is_active": true,
   "channel": 1
}

Response / 200


{
   "pk": 724,
   "bin_number": "123452",
   "card": 5,
   "is_active": true,
   "channel": 1,
   "bin_number_length": "6",
   "modified_date": "2023-01-16T10:03:28.949597Z",
   "created_date": "2023-01-16T10:03:28.949570Z"
}

Response / 400


{
   "non_field_errors": [
       "The fields bin_number, channel must make a unique set."
   ]
}

Response / 406


{
   "non_field_errors": "Channel: <channel_name> <card_name> channel incompatible.",
   "error_code": "bin_number_100_3"
}

DELETE BIN​

Path: /api/v1/bin_numbers/{id}/

Deletes BIN numbers with the provided ID. Returns status 204 in response.

PATCH Create BIN​

Path: /api/v1/bin_numbers/{id}/

Updates the bin_number information with the provided ID.

{
    "bin_number": "123454",
    "card": 5,
    "is_active": true,
    "channel": 1
}

Response

{
    "pk": 724,
    "bin_number": "123454",
    "card": 5,
    "is_active": true,
    "bin_number_length": "6",
    "channel": 1,
    "modified_date": "2023-01-16T10:05:53.338918Z",
    "created_date": "2023-01-16T10:03:28.949570Z"
}

Installment

Used for installments with the cards registered on Omnitron. Covers concepts such as the number of installments and late interest. When we enter the details of a card on the Sales Channels > Payment Management > Card Settings page on the Omnitron panel, the bottom of the opened page displays a table with the title “Term Commission Rates”.

Potential Responses

201 Created
400 Bad Request
404 Not Found
405 Method Not Allowed
406 Not Acceptable

GET All Installment Instances

Path: /api/v1/installments/

Returns all installment instances.

Filters

Filters can be applied via card, installment_count, interest_rate and is_active. E.g.: ?card=1

Response

{
   "count": 1,
   "next": "http://{customer_omnitron_url}/api/v1/installments/?page=2",
   "previous": null,
   "results": [
       {
           "pk": 1,
           "card": 1,
           "installment_count": 1,
           "label": "In Advance",
           "interest_rate": "0.000000",
           "is_active": true,
           "config": {},
           "translations": null,
           "modified_date": "2017-02-01T14:18:17.787615Z",
           "created_date": "2017-02-01T14:18:17.787596Z"
       }]
}

GET Installment Detail​

Path: /api/v1/installments/{id}/

Returns installments with the provided ID.

Response

{
   "pk": 1,
   "card": 1,
   "installment_count": 1,
   "label": "In Advance",
   "interest_rate": "0.000000",
   "is_active": true,
   "config": {},
   "translations": null,
   "modified_date": "2017-02-01T14:18:17.787615Z",
   "created_date": "2017-02-01T14:18:17.787596Z"
}

PUT-PATCH Update Installment

Path: /api/v1/installments/{id}/

Updates installments with the provided ID.

{
   "card": 1,
   "installment_count": 1,
   "label": "Spot Price",
   "interest_rate": "0.000000",
   "is_active": true,
   "config": {},
   "translations": null
}

Response

{
   "pk": 1,
   "card": 1,
   "installment_count": 1,
   "label": "Spot Price",
   "interest_rate": "0.000000",
   "is_active": true,
   "config": {},
   "translations": null,
   "modified_date": "2023-01-16T13:02:55.275401Z",
   "created_date": "2023-01-16T11:35:18.523510Z"
}

Response / 400


{
   "label": [
       "This field is required."
   ]
}

Response / 406


{
   "non_field_errors": "Installment: 1 already exists.",
   "error_code": "installment_100_1"
}

POST Create Installment

Creates installment objects.

Path: /api/v1/installments


{
   "card": 1,
   "installment_count": 99,
   "label": "99 installment",
   "interest_rate": "0.000000",
   "is_active": true,
   "config": {},
   "translations": null
}

Response / 201


{
   "pk": 74,
   "card": 1,
   "installment_count": 99,
   "label": "99 installment",
   "interest_rate": "0.000000",
   "is_active": true,
   "config": {},
   "translations": null,
   "modified_date": "2023-01-16T11:35:18.523546Z",
   "created_date": "2023-01-16T11:35:18.523510Z"
}

Response / 400


{
   "label": [
       "This field is required."
   ]
}

Response / 406


{
   "non_field_errors": "Installment: 1 already exists.",
   "error_code": "installment_100_1"
}

DELETE Installment

Path: /api/v1/installments/{id}

Deletes installments with the provided ID. Returns status 204 in response.

Bank Account

A BankAccount instance must be created for payments by bank transfer. When we enter the details of a bank on the Sales Channels > Payment Management > Banks menu on the Omnitron panel, the opened page displays a table with the title Bank Accounts.

Potential Responses

201 Created
400 Bad Request
404 Not Found
405 Method Not Allowed
406 Not Acceptable

GET All Bank Accounts

Path: /api/v1/bank_accounts/

Lists all registered bank accounts by sort_order.

Filters

Filtering can be done by ID, bank, IBAN and channel. E.g.: ?channel=1&bank=1

Response


{
   "count": 1,
   "next": null,
   "previous": null,
   "results": [
       {
           "pk": 1,
           "bank": 3,
           "slug": "account",
           "holder_name": "Company Name",
           "iban": "tr00000000000",
           "is_active": true,
           "sort_order": 0,
           "description": "Bank",
           "channel": 1,
           "modified_date": "2023-01-16T13:54:53.704234Z",
           "created_date": "2023-01-16T13:38:30.442930Z"
       }
   ]
}

GET Bank Account Detail

Path: /api/v1/bank_accounts/{id}/

Returns bank accounts with the provided ID.

Response


{
   "pk": 1,
   "bank": 3,
   "slug": "account",
   "holder_name": "Company Name",
   "iban": "tr00000000000",
   "is_active": true,
   "sort_order": 0,
   "description": "Bank",
   "channel": 1,
   "modified_date": "2023-01-16T13:54:53.704234Z",
   "created_date": "2023-01-16T13:38:30.442930Z"
}

PUT-PATCH Update Bank Account

Updates an existing bank account object with a given body.

Path: /api/v1/bank_accounts/{pk}/

Body

{
    "bank": 3,
    "slug": "new_slug",
    "holder_name": "New Holder1",
    "iban": "tr00000000000",
    "is_active": true,
    "sort_order": 0,
    "description": "New Bank Account",
    "channel": 1
}

or

{
    "holder_name": "New Holder2"
}

Response / 200

{
    "pk": 1,
    "bank": 3,
    "slug": "new_slug",
    "holder_name": "New Holder1",
    "iban": "tr00000000000",
    "is_active": true,
    "sort_order": 0,
    "description": "New Bank Account",
    "channel": 1,
    "modified_date": "2023-01-16T13:52:30.812893Z",
    "created_date": "2023-01-16T13:38:30.442930Z"
}

Response / 400

{
   "non_field_errors": [
       "The fields slug, channel must make a unique set.",
       "The fields iban, channel must make a unique set."
   ]
}

Response / 406

{
   "non_field_errors": "Channel: <channel_name> Bank <bank_name> channel incompatible.",
   "error_code": "bank_account_101"
}
-- OR
{
    "non_field_errors": "Channel: Unified of BankAccount: tr00000000000 cannot change.",
    "error_code": "bank_account_102"
}

POST Create Bank Account

Creates a new bank account object.

Path: `/api/v1/bank_accounts/``

Body


{
   "bank": 3,
   "slug": "new_slug",
   "holder_name": "New Holder",
   "iban": "tr00000000000",
   "is_active": true,
   "sort_order": 0,
   "description": "New Bank Account",
   "channel": 1
}

Response / 201

{
    "bank": 3,
    "slug": "new_slug",
    "holder_name": "New Holder",
    "iban": "tr00000000000",
    "is_active": true,
    "sort_order": 0,
    "description": "New Bank Account",
    "channel": 1,
    "modified_date": "2023-01-16T13:54:53.704234Z",
    "created_date": "2023-01-16T13:38:30.442930Z"
}

Response / 400

{
   "non_field_errors": [
       "The fields slug, channel must make a unique set.",
       "The fields iban, channel must make a unique set."
   ]
}

Response / 406

{
   "non_field_errors": "Channel: <channel_name> Bank <bank_name> channel incompatible.",
   "error_code": "bank_account_101"
}

DELETE Bank Account​

Path: /api/v1/bank_accounts/{id}/

Updates the is_active field of bank accounts with the provided ID to False. Returns status 204 in response.

Payment Option

Used to create and list payment options for the sales channels on Omnitron. It can be accessed from Sales Channels > Payment Management > Payment Options on the Omnitron panel.

Potential Responses

201 Created
400 Bad Request
404 Not Found
405 Method Not Allowed
406 Not Acceptable

GET All Payment Options

Path: /api/v1/payment_options/

Returns all payment option objects.

Filters

Filtering can be made via the channel, slug, name, payment_type and is_active fields. E.x: ?slug=ödeme-seceneği&name=ödemeseceneği

Filters are managed via omnitron.payments.resources.filters.PaymentOptionFilter class.

Response

{
   "count": 2,
   "next": null,
   "previous": null,
   "results": [
       {
           "PK": 2,
           "name": "Credit Card",
           "slug": "credit_card",
           "payment_type": "credit_card",
           "sort_order": 0,
           "is_active": false,
           "config": {},
           "translations": null,
           "channel": 1,
           "modified_date": "2023-01-16T13:54:53.704234Z",
           "created_date": "2023-01-16T13:38:30.442930Z"
       },
       {
           "PK": 3,
           "name": "Remintment",
           "slug": "remintment",
           "payment_type": "funds_transfer",
           "sort_order": 2,
           "is_active": true,
           "config": {
               "pos_slug": "ME",
               "rule": {
                   "params": {},
                   "klass": "omnishop.payments.rules.StoredCardRequiredRule"
               }
           },
           "translations": null,
           "channel": 1,
           "modified_date": "2023-01-16T13:54:53.704234Z",
           "created_date": "2023-01-16T13:38:30.442930Z"
       }
   ]
}

GET Payment Option Detail

Path: /api/v1/payment_options/{id}/

Returns the payment options with the provided ID.

Response


{
   "PK": 2,
   "name": "Credit Card",
   "slug": "credit_card",
   "payment_type": "credit_card",
   "sort_order": 0,
   "is_active": false,
   "config": {},
   "translations": null,
   "channel": 1,
   "modified_date": "2022-03-28T13:33:51.859441Z",
   "created_date": "2017-02-01T14:46:02.110133Z"
}

PUT-PATCH Update Payment Option

Path: /api/v1/payment_options/{id}/

Updates the payment options with the provided ID.

{
   "PK": 2,
   "name": "Debit Card",
   "slug": "debit_card",
   "payment_type": "credit_card",
   "sort_order": 0,
   "is_active": false,
   "config": {},
   "translations": null,
   "channel": 1
}

Response

{
   "PK": 2,
   "name": "Debit Card",
   "slug": "debit_card",
   "payment_type": "credit_card",
   "sort_order": 0,
   "is_active": false,
   "config": {},
   "translations": null,
   "channel": 1,
   "modified_date": "2023-01-17T06:09:11.965773Z",
   "created_date": "2023-01-17T06:09:11.965748Z"
}

Response / 400

{
   "non_field_errors": [
       "The fields slug, channel must make a unique set."
   ]
}

Response / 406

{
    "non_field_errors": "Channel: test of PaymentOption new-option cannot change.",
    "error_code": "payment_option_101"
}

POST Create Payment Option

Used to create new payment option objects. HTTP 400 and HTTP 406 responses may be returned if the request body is not compatible.

Path: /api/v1/payment_options/

{
   "name": "New Option",
   "slug": "new-option",
   "payment_type": "credit_card",
   "sort_order": 0,
   "is_active": false,
   "config": {},
   "translations": null,
   "channel": 1
}

Response / 201

{
   "PK": 4,
   "name": "New Option",
   "slug": "new-option",
   "payment_type": "credit_card",
   "sort_order": 0,
   "is_active": false,
   "config": {},
   "translations": null,
   "channel": 1,
   "modified_date": "2023-01-17T06:09:11.965773Z",
   "created_date": "2023-01-17T06:09:11.965748Z"
}

Response / 400

{
   "non_field_errors": [
       "The fields slug, channel must make a unique set."
   ]
}
PreviousIntroductionNextCustomers

Last updated 16 days ago

Was this helpful?