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.
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.
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.
{
"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.
-- 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.
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.
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"
}
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.
{
"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.
{
"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
{
"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."
]
}
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.
{
"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."
]
}
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
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
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
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.