# Session Initiation POST /shops/:uuid/pos_sessions Initiating the payment session is the first step of the financing process with Inbank. After the session is created it is possible to submit the credit application linking the UUID of the payment session to it. Use POST /shops/:uuid/pos_session request to initiate a session. The response includes the identifier of the payment session - pos_session_uuid and the URL to which the customer is to be redirected - redirect_url. For your convenience, we have listed the minimal data set which needs to be passed to Inbank. Endpoint: POST /partner/v2/shops/{shop_uuid}/pos_sessions Security: bearerAuth ## Path parameters: - `shop_uuid` (string, required) Example: "a93f1f44-d5dd-4469-bfcc-c1de9e969213" ## Request fields (application/json): - `general` (object) - `general.product_code` (string, required) Reference to product code. - `general.salesperson_reference` (string) First name and last name of the sales person as it should appear on reports. - `general.total_amount` (number, required) Total amount to be paid by customer (should include shipping, packaging and discount). - `general.currency` (string, required) Currency code in uppercase. For example: - EUR - PLN - CZK - `general.locale` (string, required) Language - country codes, for example: - et-ET - lv-LV - pl-PL - cs-CS - `general.valid_until` (string) The point in time when the payment session is to expire. E.g. 2021-02-17T11:10:00+02:00. After this time, the customer will not be able to complete the financing procedure. - `customer_data` (object) Data used to pre-fill credit application fields regarding the customer. - `customer_data.identity_code` (string) Identity code, for example: - Estonia: 37811120001 - Latvia: 220475-19895 - Poland: 05070603892 - Czechia: 7512239613 - `customer_data.first_name` (string) E.g. John - `customer_data.last_name` (string) E.g. Smith - `customer_data.gender` (string) Enum: "f", "m" - `customer_contact_data` (object) Data used to pre-fill credit application fields regarding customer contact information. - `customer_contact_data.email` (string) E.g. john.smith@session.pos - `customer_contact_data.mobile` (string) For example: - Estonia: 51231412 - Latvia: 22850000 - Poland: 536396869 - Czechia: 721015851 - `customer_contact_data.phone` (string) For example: - Estonia: 6123123 - Latvia: 66939000 - Poland: 6123123 - Czechia: 226288988 - `customer_address_data` (object) Data used to pre-fill credit application fields regarding customer address. - `customer_address_data.country` (string) Enum: "EE", "LV", "LT", "RU", "FI", "SE", "NO", "PL", "CZ", "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CY", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "ET", "FK", "FO", "FJ", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LB", "LS", "LR", "LY", "LI", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PT", "PR", "QA", "RE", "RO", "RW", "SH", "KN", "LC", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "GS", "ES", "LK", "SD", "SR", "SJ", "SZ", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW" - `customer_address_data.zip_code` (string) E.g. 03309 - `customer_address_data.city` (string) E.g. TALLINN - `customer_address_data.street` (string) E.g. PAE TEE - `customer_address_data.parish` (string) E.g. RAE - `customer_address_data.house` (string) E.g. 16 - `customer_address_data.apartment` (string) E.g. 12 - `customer_address_data.township` (string) E.g. RAE KÜLA - `customer_address_data.county` (string) E.g. HARJU MAAKOND - `credit_application_data` (object) Credit application related attributes that a merchant can pass, and Inbank can use to pre-fill applications in e-POS. - `credit_application_data.period` (integer) E.g. 12 - `credit_application_data.payment_day` (integer) E.g. 4 - `credit_application_data.monthly_income` (number) E.g. 4222.11 - `credit_application_data.dependants` (integer) E.g. 0 - `credit_application_data.monthly_household_costs` (number) E.g. 0.0 - `credit_application_data.income_source` (string) E.g. pension - `credit_application_data.down_payment_amount` (number) E.g. 0.0 - `user_ip` (string) Customer browser IP address as seen by e-shop. - `integration_info` (object) Information about the technical environment of the partner side integration, e.g. "ecom_platform":"string", "module":"string" - `integration_info.ecom_platform` (string) E.g. magento - `integration_info.module` (string) E.g. inbank-2.1.0 - `additional_data` (object) Container for additional data that e-shops can pass to e-POS dialogs (pre-filling forms). Any keys are allowed. - `origin` (object, required) - `origin.value` (string, required) Type of the integration method. Available option: redirect_integration Enum: "redirect_integration" - `purchase` (object) - `purchase.purchase_reference` (string, required) Unique identifier of the shopping cart or order in the e-shop (i.e. order ID). - `purchase.description` (string) Textual description of the order or shopping cart, meaningful for the customer. - `purchase.additional_details` (object) Any additional details about the order that are not covered with predefined parameters. - `purchase.items` (array) Array of items in the order/shopping cart. - `purchase.items.item_reference` (string) Unique item ID in the e-shop, inventory code etc. - `purchase.items.type` (string) Item type. Some types require additional information/validations. Enum: "product", "service", "vehicle" - `purchase.items.description` (string) Textual name of the item. - `purchase.items.quantity` (string) Quantity of items in this row. - `purchase.items.amount` (string) Price of item(s) on this row (row sum). - `purchase.items.serial_number` (string) Serial number of the purchased item. - `purchase.items.url` (string) Link to the purchased item. - `purchase.items.image_url` (string) Link to an image of the purchased item. - `purchase.items.additional_details` (object) Additional details for vehicle purchases - `purchase.items.vehicle_vin` (string) Vehicle identification number of the purchased vehicle. - `purchase.items.vehicle_licence_plate` (string) License plate of the purchased vehicle. - `purchase.items.vehicle_make` (string) Brand of the purchased vehicle. - `purchase.items.vehicle_model` (string) Model of the purchased vehicle. - `purchase.items.vehicle_registration_date` (string) Registration date of the purchased vehicle. - `purchase.merchant` (object) Array of items containing information about the merchant supplying the purchase. - `purchase.merchant.merchant_name` (string) Name of the merchant who is associated with a particular purchase. - `purchase.merchant.merchant_registry_code` (string) Merchant's registry code, consisting of eight to eleven digits. - `purchase.merchant.merchant_order_reference` (string) Order reference of the merchant. - `purchase.merchant.merchant_domain_name` (string, required) URL of the merchant. This is the URL of the partner website from which purchases are done. - `purchase.merchant.merchant_mcc_code` (string) 4-digit merchant category code listed in ISO 18245 for retail financial services. This code is used to classify a business by the type of goods or services it provides. - `partner_urls` (object) - `partner_urls.return_url` (string, required) Partner defined URL to which the customer should be redirected after credit application dialog. - `partner_urls.cancel_url` (string, required) Partner defined URL to which the customer should be redirected in case they deliberately cancelled the credit application dialog. - `partner_urls.callback_url` (string, required) URL for sending server-to-server callback messages about session status changes. ## Response 201 fields (application/json): - `uuid` (string) Identifier of the POS session. Store this identifier at the order metadata for later usage. Example: "5e3a459a-aada-4d81-b6ad-09cb9483c8bf" - `status` (string) The status of the POS session. Example: "pending" - `redirect_url` (string) The link to which the client is to be redirected to complete the financing process in the e-POS environment. Example: "https://demo-epos.inbank.ee/session/5e3a459a-aada-4d81-b6ad-09cb9483c8bf" ## Response 401 fields (application/json): - `message` (string) Unauthorized Example: "unauthorized" ## Response 403 fields (application/json): - `message` (string) Unauthorized access Example: "User is not authorized to access this resource with an explicit deny" ## Response 404 fields (application/json): - `message` (string) Not Found Example: "not_found" ## Response 422 fields (application/json): - `message` (string) Unprocessable Entity ## Response 500 fields (application/json): - `message` (string) Internal server error Example: "internal_server_error"