# Establishing a Checkout Session
source: https://developer.mastercard.com/mastercard-gateway/documentation/integrations-types/hosted-checkout/integrate-hosted-checkout/establishing-a-session/index.md

The first step of a Hosted Checkout transaction is to send an API request to the Mastercard Gateway using the `INITIATE CHECKOUT` operation. The request creates a checkout session in the gateway, and must include:

* Details related to the PAY, AUTHORIZE, or VERIFY transaction you want to create.
* Information about how the Hosted Payment Page must interact with the payer.
* Instructions for completing the Hosted Payment Page process.

Note: For all parameters and request body fields supported for the request, see [Initiate Checkout](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#hosted-checkout).

For general instructions on making an API request from your backend server, see [Making a Server API Request](https://developer.mastercard.com/mastercard-gateway/documentation/getting-started/make-server-api-req/index.md).  

The following example shows a cURL code snippet for the `INITIATE CHECKOUT` request.

```sh
curl --location {{host}}/api/rest/version/100/merchant/<merchant_ID>/session'\
```

```sh
curl --header 'Content-Type: text/plain' \
     --header 'Authorization: Basic <base64-encoded string of "merchant.<merchant ID>:<password>"' \
     --data '{
       "apiOperation": "INITIATE_CHECKOUT",
       "interaction": {
         "operation": "AUTHORIZE",
         "merchant": {
           "name": "<merchant_name>"
         }
       },
       "order": {
         "currency": "USD",
         "amount": "100.00",
         "id": "<order_ID>",
         "description": "<description_of_order>"
       }
     }'
```

Note: For more information about how to generate the API password, see [Setting up API Credentials](https://developer.mastercard.com/mastercard-gateway/documentation/getting-started/set-api-cred/index.md).

A successful `INITIATE CHECKOUT` response contains the `session.id` and `successIndicator` fields. Check the `successIndicator` field value to verify the success or failure of the payment. For details, see [Obtaining the Payment Result](https://developer.mastercard.com/mastercard-gateway/documentation/integrations-types/hosted-checkout/integrate-hosted-checkout/index.md).
