### Create Invoice Response Example Source: https://docs.atmos.uz/index Example response from the Atmos.uz API after creating an invoice. It includes the store ID, a unique payment ID, an invoice token, and a URL to the payment page. The status object indicates the success of the operation. ```json { "store_id": 3, "payment_id": 272, "token": "9Y53Bh_hFirZgxxFqBTwtA==", "url": "https://checkout.atmos.uz/ru/invoice?id=9Y53Bh_hFirZgxxFqBTwtA==", "status": { "code": "OK", "description": "Success" } } ``` -------------------------------- ### Access Token Response Example Source: https://docs.atmos.uz/index Example JSON response when successfully obtaining an access token. It includes the access token, refresh token, and the expiration time in seconds. ```json { "access_token": "string", "refresh_token": "string", "expires_in": 1234 } ``` -------------------------------- ### Callback API Response Examples (JSON) Source: https://docs.atmos.uz/index These JSON examples illustrate successful and failed responses from a merchant's billing system to the ATMOS Callback API. A successful response requires a status of 1 and an HTTP 200 OK status code. ```json { "status": 1, "message": "Успешно" } ``` ```json { "status": 0, "message": "Инвойс с номером 123 отсутствует в системе" } ``` -------------------------------- ### Transaction Creation Response Example Source: https://docs.atmos.uz/index This is an example JSON response for the transaction creation API call. It includes payload details such as transaction ID, status, amount, card information, commission details, and redirect URIs. The status object provides a code and message for the operation's success or failure. ```json { "payload": { "id": 735, "status": 1, "rrn": "420810227278", "type": "DEFAULT", "amount": 10000, "card": { "id": 923, "status": true, "masked_pan": "419525********1540", "masked_card_holder": "NAME TEST", "card_type": "VISA", "date_created": "2024-11-20 16:20:19", "date_updated": "2024-11-20 16:20:19", "verified_state": "PENDING", "card_region": "DOMESTIC" }, "api_id": 1, "card_id": 923, "external_id": "fce222d7-2f5a-4052-9170-b68c30bd9890", "mps_ext_id": "BhOEry3oY7G5hHtNTFABHiCLsfQ=", "status_ps": "Approved", "result_code": "Approved", "app_code": "249138", "masked_pan": "419525********1540", "client_ip_addr": "192.168.200.01", "date_created": "2024-11-20 16:20:19", "date_updated": "2024-11-20 16:20:19", "redirect_uri": "https://ecomm.kapital24.uz:2443/ecomm2/ClientHandler?trans_id=BhOEry3oY7G5hHtNTFABHiCLsfQ%3D", "ofd_redirect_uri": "https://ofd.atmos.uz/api/ofd/blBlR3p1RmVlS0pQSHY4QjRlM1k3UT09", "store_id": 3, "upper_commission": 100, "lower_commission": 0, "ofd_commission_uri": "https://ofd.atmos.uz/api/ofd/SDRxWDc3ejc0cmZYQmlDT3BGMVFmQT09" }, "status": { "code": 0, "message": "Success", "trace_id": "673dc5f3080d8074fd3a272cb3d0c365" } } ``` -------------------------------- ### Card Actualization Status Response Example Source: https://docs.atmos.uz/index Example JSON response from the card actualization status check endpoint. Contains the request status, masked personal identification number, and request metadata including creation date and time. ```json { "code": 200, "message": null, "payload": { "ext_id": "example_ext_id", "masked_pinfl": "3210xxxxxxx067", "status": "SUCCESSFUL", "request_date": "2024-11-26 16:11:47" } } ``` -------------------------------- ### Create Invoice Request (cURL) Source: https://docs.atmos.uz/index Example of creating an invoice using cURL. This POST request sends invoice details like store ID, amount, and items to the Atmos.uz API endpoint. It requires an authorization token and specifies item details for the transaction. ```shell curl -X POST 'https://apigw.atmos.uz/checkout/invoice/create' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ \ "request_id": "1231312312", \ "store_id": 3, \ "expiration_time": 10, \ "expiration_date": "2024-07-11T11:12:12", \ "account": "DFSDF", \ "amount": 100000, \ "success_url": "https://atmos.uz", \ "items": [ \ { \ "items_id": "1", \ "name": "book 1", \ "amount": 50000, \ "quantity": 3, \ "details": { \ "name": "some key", \ "values": "some value" \ } \ }, \ { \ "items_id": "2", \ "name": "service", \ "amount": 50000, \ "details": { \ "name": "some key 2", \ "values": "some value 2" \ } \ } \ ] \ }' ``` -------------------------------- ### Create Bulk Payment Transaction - cURL Request Source: https://docs.atmos.uz/index cURL command example for creating bulk transactions via Atmos UZ API. Demonstrates authentication with Bearer token and proper JSON payload structure for multiple payments. ```bash curl --request POST \ --url https://apigw.atmos.uz/merchant/bulk/pay/create \ --header 'Authorization: ' \ --header 'Content-Type: application/json' \ --data '{ "store_id": , "params": [ { "account": "user_1", "amount": 50000, "details": "Для услуги 1" }, { "account": "user_1", "amount": 100000, "details": "Для услуги 1" } ] }' ``` -------------------------------- ### Create Invoice Request (HTTP) Source: https://docs.atmos.uz/index Example of creating an invoice using raw HTTP. This POST request sends invoice details to the Atmos.uz API, including store ID, expiration, amount, and item specifics. The request requires an authorization header and a JSON content type. ```http POST https://apigw.atmos.uz/checkout/invoice/create HTTP/1.1 Host: https://apigw.atmos.uz Authorization: Bearer Content-Type: application/json { "request_id": "1231312312", "store_id": 3, "expiration_time": 10, "expiration_date": "2024-07-11T11:12:12", "account": "DFSDF", "amount": 100000, "success_url": "https://atmos.uz", "items": [ { "items_id": "1", "name": "book 1", "amount": 50000, "quantity": 3, "details": { "name": "some key", "values": "some value" } }, { "items_id": "2", "name": "service", "amount": 50000, "details": { "name": "some key 2", "values": "some value 2" } } ] } ``` -------------------------------- ### Confirm Transaction Request (HTTP) Source: https://docs.atmos.uz/index This example shows the equivalent HTTP request for confirming a transaction via the Atmos.uz API. It specifies the POST method, endpoint, headers, and the transaction ID in the request body. The response provides confirmation details. ```http POST https://apigw.atmos.uz/mps/pay/transaction/apply HTTP/1.1 Host: apigw.atmos.uz Content-Type: application/json Authorization: Bearer { "transaction_id": 59 } ``` -------------------------------- ### MPS Transaction Creation Response Example Source: https://docs.atmos.uz/index This JSON object represents a successful response after creating a transaction with the Atmos Uzbekistan MPS API. It contains details about the transaction, card information, processing status, and commission details. ```json { "payload": { "id": 735, "status": 1, "rrn": "420810227278", "type": "DEFAULT", "amount": 10000, "card": { "id": 929, "status": true, "masked_pan": "419525********1540", "masked_card_holder": "ANDREY PAK", "card_type": "VISA", "date_created": "2024-11-21 16:00:15", "date_updated": "2024-11-21 16:00:15", "verified_state": "PENDING", "card_region": "DOMESTIC" }, "api_id": 1, "card_id": 929, "external_id": "fce222d7-2f5a-4052-9170-b68c30bd9890", "mps_ext_id": "EueYPCDKlXDhyE9chwPzPcHO89s=", "status_ps": "Approved", "result_code": "Approved", "app_code": "249138", "masked_pan": "419525********1540", "client_ip_addr": "192.168.200.01", "date_created": "2024-11-21 16:00:15", "date_updated": "2024-11-21 16:00:15", "redirect_uri": "https://ecomm.kapital24.uz:2443/ecomm2/ClientHandler?trans_id=EueYPCDKlXDhyE9chwPzPcHO89s%3D", "ofd_redirect_uri": "https://ofd.atmos.uz/api/ofd/blBlR3p1RmVlS0pQSHY4QjRlM1k3UT09", "store_id": 3, "upper_commission": 100, "lower_commission": 0, "ofd_commission_uri": "https://ofd.atmos.uz/api/ofd/SDRxWDc3ejc0cmZYQmlDT3BGMVFmQT09" }, "status": { "code": 0, "message": "Success", "trace_id": "673f12bff4d74919c7fcd40ef4dd24ce" } } ``` -------------------------------- ### Pre-confirm Payment Transaction - cURL Request Source: https://docs.atmos.uz/index cURL command example for pre-applying a payment transaction to the Atmos payment gateway. Demonstrates how to send POST request with Bearer token authentication and JSON payload containing card token, store ID, and transaction ID. ```bash curl --request POST \ --url https://apigw.atmos.uz/merchant/pay/pre-apply \ --header 'Authorization: ", "store_id": 0000, "transaction_id": 00000 }' ``` -------------------------------- ### Pre-confirm Payment Transaction - JSON Response Source: https://docs.atmos.uz/index Example successful response from the pre-apply endpoint containing transaction ID and server status object with status code and description message in Russian. ```json { "transaction_id": 202072, "result": { "code": "OK", "description": "Нет ошибок" } } ``` -------------------------------- ### Payment Page Integration Source: https://docs.atmos.uz/index Instructions on how to use the Atmos.uz payment page, suitable for mobile applications with webview support. ```APIDOC ## Atmos.uz Payment Page ### Description The payment page offers a convenient and secure way to handle payments, especially within mobile applications using webview. It involves creating a transaction draft and then redirecting the user to the payment page. ### Method POST (for creating transaction draft), GET (for redirecting to payment page) ### Endpoint - Transaction Creation: `/merchant/pay/create` - Payment Page: `https://checkout.pays.uz/invoice/get` (production) or `http://test-checkout.pays.uz/invoice/get` (test) ### Parameters #### Request Body (for `/merchant/pay/create`) - **storeId** (string) - Required - Unique ID of your store. - **amount** (string) - Required - Payment amount. - **account** (string) - Required - Payment identifier. - **currency** (string) - Required - Currency code (e.g., 'UZS'). - **description** (string) - Optional - Payment description. #### Query Parameters (for Payment Page URL) - **storeId** (string) - Required - Unique ID of your store. - **transactionId** (string) - Required - ID of the transaction created in the previous step. - **redirectLink** (string) - Optional - URL for redirection after payment. ### Request Example (Transaction Creation - conceptual) ```json { "storeId": "YOUR_STORE_ID", "amount": "10000", "account": "ORDER_12345", "currency": "UZS", "description": "Payment for goods" } ``` ### Request Example (Payment Page URL) `https://test-checkout.pays.uz/invoice/get?storeId=1111&transactionId=222222&redirectLink=http://site.com` ### Response #### Success Response (200) for Transaction Creation - **transactionId** (string) - The ID of the created transaction. - **paymentUrl** (string) - The URL to redirect the user to for payment. #### Response Example (Transaction Creation) ```json { "transactionId": "ABCDEF123456", "paymentUrl": "https://test-checkout.pays.uz/invoice/get?storeId=1111&transactionId=ABCDEF123456&redirectLink=http://site.com" } ``` ``` -------------------------------- ### Create MPS Transaction (HTTP) Source: https://docs.atmos.uz/index This HTTP request snippet shows how to initiate a transaction with the Atmos Uzbekistan MPS API. It specifies the POST method, host, and includes headers for API key and authorization, along with a JSON body containing transaction parameters. ```http POST /mps/pay/transaction/create HTTP/1.1 Host: apigw.atmos.uz apikey: Authorization: Bearer Content-Type: application/json { "pan": "4278310021875430", "expiry": "2508", "amount": 10000, "transaction_id": 1, "card_name": "TEST", "cvc2": "680", "client_ip_addr": "192.168.200.01", "ext_id": "64bedd41-f21b-4298-aa88-1206107670b8" } ``` -------------------------------- ### Get Transaction Details (MPS) using HTTP Request Source: https://docs.atmos.uz/index This snippet illustrates the HTTP GET request for fetching transaction details from the Atmos Uz MPS API. It specifies the endpoint with a placeholder for the transaction ID and requires an 'Authorization' header. The returned data includes various transaction attributes and status codes. ```http GET /mps/pay/transaction/get/52 HTTP/1.1 Host: apigw.atmos.uz apikey: Authorization: Bearer Content-Type: application/json ``` -------------------------------- ### GET /mps/pay/card/{id} Source: https://docs.atmos.uz/index Retrieves details of a previously bound card. ```APIDOC ## GET /mps/pay/card/{id} ### Description Returns details for a card previously bound to the service. ### Method GET ### Endpoint `https://apigw.atmos.uz/mps/pay/card/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the card. #### Response #### Success Response (200) - **payload** (object) - Object with card details. - **payload.card** (object) - Object with card information. - **payload.card.id** (integer) - Card ID. - **payload.card.status** (boolean) - Card binding status. - **payload.card.masked_pan** (string) - Masked card number. - **payload.card.masked_card_holder** (string) - Masked cardholder name. - **payload.card.card_type** (string) - Card type. - **payload.card.date_created** (string) - Date of card binding creation. - **payload.card.date_updated** (string) - Date of card binding update. - **payload.card.verified_state** (string) - Card verification state. - **payload.card.status_3ds** (string) - 3DS status. - **payload.card.card_region** (string) - Card registration region. - **payload.card.store_id** (integer) - Partner ID. - **payload.card_id** (integer) - Card ID in the system. - **status** (object) - Operation status object. - **status.code** (integer) - Operation status code. - **status.message** (string) - Operation status message. - **status.trace_id** (string) - Operation trace identifier. #### Response Example ```json { "payload": { "card": { "id": 928, "status": true, "approved": true, "masked_pan": "427831********5430", "masked_card_holder": "TEST", "card_type": "VISA", "date_created": "2024-11-21 10:58:12", "date_updated": "2024-11-21 10:58:12", "verified_state": "FAILED", "status_3ds": "FAILED", "card_region": "ONUS", "store_id": 1 }, "card_id": 928 }, "status": { "code": 0, "message": "Success", "trace_id": "65dd6c72a94bfe3856d7f821e8ac37eb" } } ``` ``` -------------------------------- ### GET /hold/{id} Source: https://docs.atmos.uz/index Retrieves data for a previously created hold operation. Requires an access token for authorization. ```APIDOC ## GET /hold/{id} ### Description Retrieves data for a previously created hold operation. ### Method GET ### Endpoint `/hold/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the transaction. #### Query Parameters None #### Request Body None ### Request Example ``` GET /hold/{id} HTTP/1.1 Authorization: Bearer Content-Type: application/json Host: apigw.atmos.uz ``` ### Response #### Success Response (200) - **result** (object) - An object containing the server response status. - **store_transaction** (object) - An object with details about the transaction. - **success_trans_id** (integer) - The permanent number of a successful transaction. - **trans_id** (integer) - The transaction number. - **store** (object) - An object with merchant data. - **id** (integer) - The merchant ID. - **name** (string) - The merchant name. - **desc** (string) - Merchant description. - **logo** (any) - Merchant logo URL. - **ga_id** (any) - Google Analytics ID. - **terminal_id** (string) - The ID of the terminal used for the transaction. - **account** (string) - The payment identifier. - **amount** (integer) - The transaction amount in tiins. - **confirmed** (boolean) - Whether the transaction is confirmed. - **prepay_time** (integer) - The timestamp of the pre-confirmation. - **confirm_time** (integer) - The timestamp of the confirmation. - **label** (object) - An object with invoice number and metadata. - **type_id** (integer) - The type ID of the label. - **label_ru** (string) - Label in Russian. - **label_uz** (string) - Label in Uzbek. - **label_en** (string) - Label in English. - **details** (string) - Transaction details. - **commission_value** (string) - Commission value in tiins. - **commission_type** (string) - Service field. - **total** (integer) - The total transaction amount. - **card_id** (string) - The card token. - **status_code** (string) - Service field. - **status_message** (string) - The transaction status. #### Response Example ```json { "result": { "code": "OK", "description": "Нет ошибок" }, "store_transaction": { "success_trans_id": 000001, "trans_id": 12345, "store": { "id": 0001, "name": "XXXXX", "desc": "", "logo": null, "ga_id": null }, "terminal_id": "0000001", "account": "12345", "amount": 5000000, "confirmed": true, "prepay_time": 1656325395000, "confirm_time": 1656325681944, "label": { "type_id": 64, "label_ru": "Номер инвойса", "label_uz": "Invoys raqami", "label_en": "Number of Invoice" }, "details": "", "commission_value": "0", "commission_type": "0", "total": 5000000, "card_id": "", "status_code": "0", "status_message": "Success" } } ``` ``` -------------------------------- ### POST /mps/pay/transaction/apply Source: https://docs.atmos.uz/index Confirms a previously created and verified transaction. This endpoint is used to finalize a transaction after initial setup. ```APIDOC ## POST /mps/pay/transaction/apply ### Description Confirms a previously created and verified transaction. This endpoint is used to finalize a transaction after initial setup. ### Method POST ### Endpoint https://apigw.atmos.uz/mps/pay/transaction/apply ### Parameters #### Query Parameters None #### Path Parameters None #### Request Body - **transaction_id** (integer) - Required - The identifier of the created transaction. ### Request Example ```json { "transaction_id": 59 } ``` ### Response #### Success Response (200) - **payload.id** (integer) - Transaction identifier. - **payload.status** (integer) - Transaction status. - **payload.rrn** (string) - Transaction reference number. - **payload.type** (string) - Transaction type. - **payload.amount** (integer) - Transaction amount. - **payload.card.id** (integer) - Card identifier. - **payload.card.status** (boolean) - Card status. - **payload.card.masked_pan** (string) - Masked card number. - **payload.card.masked_card_holder** (string) - Masked cardholder name. - **payload.card.card_type** (string) - Card type (e.g., VISA). - **payload.card.date_created** (string) - Card creation date. - **payload.card.date_updated** (string) - Card update date. - **payload.card.verified_state** (string) - Card verification state (e.g., VERIFIED). - **payload.card.card_region** (string) - Card region (e.g., DOMESTIC). - **payload.api_id** (integer) - API identifier. - **payload.card_id** (integer) - Card identifier. - **payload.external_id** (string) - External identifier. - **payload.mps_ext_id** (string) - MPS system identifier. - **payload.status_ps** (string) - Payment system status (e.g., Approved). - **payload.result_code** (string) - Result code (e.g., Approved). - **payload.app_code** (string) - Application code. - **payload.masked_pan** (string) - Masked card number. - **payload.client_ip_addr** (string) - Client IP address. - **payload.date_created** (string) - Transaction creation date. - **payload.date_updated** (string) - Transaction update date. - **payload.ofd_redirect_uri** (string) - URI for OFD redirect. - **payload.store_id** (integer) - Partner identifier. - **payload.upper_commission** (integer) - Upper commission value. - **payload.lower_commission** (integer) - Lower commission value. - **payload.ofd_commission_uri** (string) - URI for OFD commission. - **status.code** (integer) - Status code (0 indicates a successful request). - **status.message** (string) - Status message. - **status.trace_id** (string) - Request trace identifier. #### Response Example ```json { "payload": { "id": 735, "status": 4, "rrn": "420810227278", "type": "DEFAULT", "amount": 10000, "card": { "id": 923, "status": true, "masked_pan": "419525********1540", "masked_card_holder": "NAME TEST", "card_type": "VISA", "date_created": "2024-11-20 16:20:19", "date_updated": "2024-11-20 16:20:19", "verified_state": "VERIFIED", "card_region": "DOMESTIC" }, "api_id": 1, "card_id": 923, "external_id": "fce222d7-2f5a-4052-9170-b68c30bd9890", "mps_ext_id": "BhOEry3oY7G5hHtNTFABHiCLsfQ=", "status_ps": "Approved", "result_code": "Approved", "app_code": "249138", "masked_pan": "419525********1540", "client_ip_addr": "192.168.200.01", "date_created": "2024-11-20 16:20:19", "date_updated": "2024-11-20 16:20:19", "ofd_redirect_uri": "https://ofd.atmos.uz/api/ofd/blBlR3p1RmVlS0pQSHY4QjRlM1k3UT09", "store_id": 3, "upper_commission": 100, "lower_commission": 0, "ofd_commission_uri": "https://ofd.atmos.uz/api/ofd/SDRxWDc3ejc0cmZYQmlDT3BGMVFmQT09" }, "status": { "code": 0, "message": "Success", "trace_id": "673dc5f3080d8074fd3a272cb3d0c365" } } ``` ``` -------------------------------- ### ATMOS Payment Widget Integration (HTML & JavaScript) Source: https://docs.atmos.uz/index This snippet shows how to integrate the ATMOS payment widget into a merchant's website. It includes the necessary script tag and a JavaScript call to initialize the widget with various parameters like store ID, amount, and redirect URLs. ```html
``` -------------------------------- ### Authorization - Get Token Source: https://docs.atmos.uz/index Obtain a bearer token for API authentication. This token is required for all subsequent API requests and has a validity period. ```APIDOC ## POST /token ### Description Obtain a bearer token for API authentication. This token is required for all subsequent API requests and has a validity period. ### Method POST ### Endpoint `https://apigw.atmos.uz/token` ### Query Parameters - **grant_type** (string) - Required - Must be 'client_credentials' ### Headers - **Authorization** (string) - Required - Basic Base64(consumer-key:consumer-secret) ### Request Example ```bash curl --location --request POST 'https://apigw.atmos.uz/token?grant_type=client_credentials' \ --header 'Authorization: Basic Base64(consumer-key:consumer-secret)' ``` ### Response #### Success Response (200) - **access_token** (string) - The obtained bearer token. - **scope** (string) - The scope of the token. - **token_type** (string) - The type of token, usually 'Bearer'. - **expires_in** (integer) - The token's validity period in seconds. #### Response Example ```json { "access_token": "", "scope": "am_application_scope default", "token_type": "Bearer", "expires_in": 2525 } ``` ``` -------------------------------- ### POST /checkout/invoice/create Source: https://docs.atmos.uz/index Creates a payment in the system with payment via the web interface (payment page). The URL of the payment page will be provided in the server response. ```APIDOC ## POST /checkout/invoice/create ### Description Creates a payment in the system with payment via the web interface (payment page). The URL of the payment page will be provided in the server response. ### Method POST ### Endpoint https://apigw.atmos.uz/checkout/invoice/create ### Parameters #### Query Parameters None #### Request Body - **request_id** (string) - Required - Unique identifier of the request - **store_id** (integer) - Required - Partner identifier - **expiration_time** (integer) - Optional - Time until invoice expiration in minutes - **expiration_date** (string) - Optional - Invoice expiration date and time in YYYY-MM-DDTHH:MM:SS format - **account** (string) - Required - Partner payment identifier - **amount** (integer) - Required - Amount in "tiyn" (100 tiyn = 1 UZS) - **success_url** (string) - Required - Redirect URL upon successful payment - **items** (array) - Required - List of goods or services - **items[].items_id** (string) - Required - Item or service identifier - **items[].name** (string) - Required - Item or service name - **items[].amount** (integer) - Required - Amount for item or service in "tiyn" - **items[].quantity** (integer) - Optional - Quantity of the item or service (if applicable) - **items[].details** (object) - Optional - Details of the item or service - **items[].details.name** (string) - Optional - Name of the detail key - **items[].details.values** (string) - Optional - Value of the detail key ### Request Example ```json { "request_id": "1231312312", "store_id": 3, "expiration_time": 10, "expiration_date": "2024-07-11T11:12:12", "account": "DFSDF", "amount": 100000, "success_url": "https://atmos.uz", "items": [ { "items_id": "1", "name": "book 1", "amount": 50000, "quantity": 3, "details": { "name": "some key", "values": "some value" } }, { "items_id": "2", "name": "service", "amount": 50000, "details": { "name": "some key 2", "values": "some value 2" } } ] } ``` ### Response #### Success Response (200) - **store_id** (integer) - Partner identifier - **payment_id** (integer) - Payment identifier - **token** (string) - Invoice token - **url** (string) - Link to the invoice for opening in a browser - **status** (object) - Response status - **code** (string) - Status code - **description** (string) - Status description #### Response Example ```json { "store_id": 3, "payment_id": 272, "token": "9Y53Bh_hFirZgxxFqBTwtA==", "url": "https://checkout.atmos.uz/ru/invoice?id=9Y53Bh_hFirZgxxFqBTwtA==", "status": { "code": "OK", "description": "Success" } } ``` ``` -------------------------------- ### Get Bound Card Details Source: https://docs.atmos.uz/index Retrieves details for a previously bound card using its identifier. This endpoint is useful for checking the status and information of a card that has been linked to the service. ```curl curl --location 'https://apigw.atmos.uz/mps/pay/card/32' \ --header 'Authorization: Bearer ' ``` ```http GET /mps/pay/card/32 HTTP/1.1 Host: apigw.atmos.uz Authorization: Bearer ``` -------------------------------- ### Atmos.uz Payment Widget Parameters Source: https://docs.atmos.uz/index This section outlines the parameters required for integrating the Atmos.uz payment widget. ```APIDOC ## Atmos.uz Payment Widget Parameters ### Description Parameters for embedding the Atmos.uz payment widget into your website. ### Method Not Applicable (Widget integration) ### Endpoint Not Applicable (Widget integration) ### Parameters #### Query Parameters - **parent_id** (string) - Required - ID of the HTML element to embed the widget into. - **store_id** (string) - Required - Your store ID. - **account** (string) - Required - Payment identifier (arbitrary string). - **terminal_id** (string) - Optional - ID of the terminal, if any. - **success_redirect** (string) - Required - URL to redirect to after successful payment. - **fail_redirect** (string) - Required - URL to redirect to upon failed payment. - **version** (string) - Optional - Widget version. - **amount** (string) - Required - Payment amount in Tiyins. - **details** (string) - Optional - Payment details (arbitrary string). - **lang** (string) - Optional - Widget language (e.g., 'en', 'ru', 'uz'). - **key** (string) - Required - Authorization key. - **theme** (string) - Optional - Widget color theme. ``` -------------------------------- ### Get Transaction Information Source: https://docs.atmos.uz/index Retrieves information about a previously created, confirmed, or closed transaction. This method is also used to check the status if the initial payment request did not return a result. ```HTTP POST /merchant/pay/get HTTP/1.1 Content-Type: application/json Authorization: Bearer Host: apigw.atmos.uz Content-Length: 47 { "store_id": 0001, "transaction_id": 51827 } ``` ```cURL curl --request POST \ --url https://apigw.atmos.uz/merchant/pay/get \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ \ "store_id": 0001, \ "transaction_id": 51827 \ }' ``` -------------------------------- ### GET /mps/pay/transaction/get/{id} Source: https://docs.atmos.uz/index Retrieves detailed information about a specific transaction from the ATMOS system. Returns transaction status, card details, payment system status, and 3DS authentication details. ```APIDOC ## GET /mps/pay/transaction/get/{id} ### Description Retrieves detailed information about a specific transaction from the ATMOS payment system. ### Method GET ### Endpoint https://apigw.atmos.uz/mps/pay/transaction/get/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - Transaction identifier (e.g., 52) #### Request Headers - **Authorization** (string) - Required - Bearer - **apikey** (string) - Required - - **Content-Type** (string) - Required - application/json ### Response #### Success Response (200) - **payload** (object) - Transaction data object - **id** (integer) - Transaction identifier - **status** (integer) - Transaction status - **rrn** (string) - Retrieval Reference Number - **type** (string) - Transaction type (e.g., DEFAULT) - **amount** (integer) - Transaction amount in tiyin - **api_id** (integer) - API ID - **card_id** (integer) - Card identifier - **external_id** (string) - External transaction ID - **mps_ext_id** (string) - MPS external ID - **status_ps** (string) - Payment system status - **result_code** (string) - Result code - **app_code** (string) - Application code - **masked_pan** (string) - Masked card number - **client_ip_addr** (string) - Client IP address - **date_created** (string) - Creation date - **date_updated** (string) - Last update date - **redirect_uri** (string) - Redirect URI for 3DS - **ofd_redirect_uri** (string) - OFD redirect URI - **store_id** (integer) - Store identifier - **upper_commission** (integer) - Upper commission - **lower_commission** (integer) - Lower commission - **status** (object) - Operation status object - **code** (integer) - Status code (0 = Success) - **message** (string) - Status message - **trace_id** (string) - Operation trace identifier #### Response Example ```json { "payload": { "id": 235, "status": 6, "rrn": "417310203285", "type": "DEFAULT", "amount": 100000, "api_id": 2, "card_id": 220, "external_id": "checkout_32157", "mps_ext_id": "JEpQ9xa98OhSPPHLRIExPZBlufQ=", "status_ps": "Accepted (for reversal)", "result_code": "Accepted", "app_code": "999284", "masked_pan": "419525********1783", "client_ip_addr": "10.228.1.26", "date_created": "2024-06-21 05:38:25", "date_updated": "2024-06-21 05:38:57", "redirect_uri": "https://ecomm.kapital24.uz:2443/ecomm2/ClientHandler?trans_id=JEpQ9xa98OhSPPHLRIExPZBlufQ%3D", "ofd_redirect_uri": "https://ofd.atmos.uz/api/ofd/bjhMWnRWaDNxb2NWMHRGL2hLMXlYQT09", "store_id": 3, "upper_commission": 0, "lower_commission": 0 }, "status": { "code": 0, "message": "Success", "trace_id": "673f1773cdc429d9cdb5bc0b0d982291" } } ``` ``` -------------------------------- ### POST /checkout/card-bind/create Source: https://docs.atmos.uz/index Initiates the card binding process through the checkout flow, allowing users to bind cards via a redirect URL. ```APIDOC ## POST /checkout/card-bind/create ### Description Initiates the card binding process through the checkout flow, allowing users to bind cards via a redirect URL. ### Method POST ### Endpoint `https://apigw.atmos.uz/checkout/card-bind/create` ### Parameters #### Path Parameters (None specified) #### Query Parameters (None specified) #### Request Body - **request_id** (string) - Required - Unique request identifier - **store_id** (integer) - Required - ID of the partner - **account** (string) - Required - Account identifier - **success_url** (string) - Required - URL to redirect to upon successful binding ### Request Example ```json { "request_id": "1231312312", "store_id": 3, "account": "DFSDF", "success_url": "https://atmos.uz" } ``` ### Response #### Success Response (200) - **store_id** (integer) - ID of the partner - **payment_id** (integer) - Payment identifier - **token** (string) - A token generated for the binding process - **url** (string) - The URL to redirect the user to for card binding - **status** (object) - Object with status details - **status.code** (string) - Status code (e.g., "OK") - **status.description** (string) - Status description (e.g., "Success") - **status.trace_id** (string) - Trace ID for the operation #### Response Example ```json { "store_id": 3, "payment_id": 272, "token": "9Y53Bh_hFirZgxxFqBTwtA==", "url": "https://checkout.atmos.uz/bind?id=9Y53Bh_hFirZgxxFqBTwtA==", "status": { "code": "OK", "description": "Success", "trace_id": "6602952bd44ca285f56c38255f2c1e15" } } ``` ```