---
page_title: Session API Request
product: Juspay Billing
page_source: https://juspay.io/in/docs/juspay-billing/docs/billing/session-api-request
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fjuspay-billing%2Fdocs%2Fbilling%2Fsession-api-request
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/juspay-billing/llms.txt
---

## API Version: default


# Session API Request



Enter API description here...## Endpoints:
- Sandbox: https://sandbox.juspay.in/session

- Production: https://api.juspay.in/session

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
- Value: Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: Base64 Encoded Username:Password, Required
## Headers:

#### x-merchantid:
- Value: mandate_juspay
- Tags: String

#### Content-Type:
- Value: application/json
- Tags: String
## Sample Code Snippets:
### Sample Request:

#### Fixed Plan with Default Plan Debit Date Code Snippet:

```fixed plan with default plan debit date
curl --location 'https://api.juspay.in/session' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <>' \
--data '{
    "order_id": "1777379785",
    "amount": "1.0",
    "customer_id": "cth_rPj21roNSjEbumSy",
    "payment_page_client_id": "stageott",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "options.get_upi_deep_links": true,
    "options.create_mandate": "REQUIRED",
    "mandate.max_amount": "100",
    "metadata.auto_refund_post_success": "true",
    "gateway_id": "100",
    
    "payment_rules": {
        "payment_flows": {
            "billing_creation": {
                "status": "REQUIRED",
                "info": {
                    "plan_id": "sample_fixed_plan"
                }
            }
        }
    }

}'
```

#### Fixed Plan with Custom Plan Debit Date Code Snippet:

```fixed plan with custom plan debit date
curl --location 'https://sandbox.juspay.in/session' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <>' \
--data '{
    "order_id": "1777379785",
    "amount": "1.0",
    "customer_id": "cth_rPj21roNSjEbumSy",
    "payment_page_client_id": "stageott",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "options.get_upi_deep_links": true,
    "options.create_mandate": "REQUIRED",
    "mandate.max_amount": "100",
    "metadata.auto_refund_post_success": "true",
    "gateway_id": "100",
    
    "payment_rules": {
        "payment_flows": {
            "billing_creation": {
                "status": "REQUIRED",
                "info": {
                    "plan_id": "sample_fixed_plan",
                    "rule_info": {
                        "plan_rule_value": 1
                    }
                }
            }
        }
    }

}'
```

#### Variable Amount Plan with Default Debit Date Code Snippet:

```variable amount plan with default debit date
curl --location 'https://sandbox.juspay.in/session' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <>' \
--data '{
    "order_id": "1777379785",
    "amount": "1.0",
    "customer_id": "cth_rPj21roNSjEbumSy",
    "payment_page_client_id": "stageott",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "options.get_upi_deep_links": true,
    "options.create_mandate": "REQUIRED",
    "mandate.max_amount": "100",
    "metadata.auto_refund_post_success": "true",
    "gateway_id": "100",
    "payment_rules": {
        "payment_flows": {
            "billing_creation": {
                "status": "REQUIRED",
                "info": {
                    "plan_id": "sample_fixed_plan",
                    "plan_amount": 20.0
                }
            }
        }
    }
    '
```

#### Variable Plan with Custom Debit Date Code Snippet:

```variable plan with custom debit date
curl --location 'https://sandbox.juspay.in/session' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <>' \
--data '{
    "order_id": "1777379785",
    "amount": "1.0",
    "customer_id": "cth_rPj21roNSjEbumSy",
    "payment_page_client_id": "stageott",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "options.get_upi_deep_links": true,
    "options.create_mandate": "REQUIRED",
    "mandate.max_amount": "100",
    "metadata.auto_refund_post_success": "true",
    "gateway_id": "100",
    "payment_rules": {
        "payment_flows": {
            "billing_creation": {
                "status": "REQUIRED",
                "info": {
                    "plan_id": "sample_fixed_plan",
                    "plan_amount": 20.0,
                    "rule_info": {
                        "plan_rule_value": 1
                    }
                }
            }
        }
    }
    '
```

### Sample Response:

#### Response:
```plaintext
{
    "payment": {
        "authentication": {
            "method": "GET",
            "url": "https://sandbox.juspay.in/v2/pay/start/eulerqa_sandbox/mozFS1mNCmY96k3aHHp?cardIssuerBankName%3DUPI_COLLECT%26cardType%3DUPI%26paymentMethod%3DUPI_COLLECT%26paymentMethodType%3DUPI"
        }
    },
    "status": "PENDING_VBV",
    "txn_uuid": "mozFS1mNCmY96k3aHHp",
    "offer_details": {
        "offers": []
    },
    "order_id": "Ord_1765191076",
    "txn_id": "suc-Ord_1765191076-1"
}
```

## Body Parameters:
### Basic Parameters:

#### amount:
- Value: 1.00
- Tags: String

#### order_id:
- Value: mny_ajdx_132
- Tags: String

#### customer_id:
- Value: cust_12345abcde
- Tags: String

#### customer_phone:
- Value: 9876543210
- Tags: String

#### customer_email:
- Value: dummyemail@gmail.com
- Tags: String

#### payment_page_client_id:
- Value: kotakparivartan
- Tags: String

#### return_url:
- Value: https://moneyview.in
- Tags: String

#### options:
- Value:
  - **Create_mandate**:
    - Value: REQUIRED
    - Tags: String
  - **Get_client_auth_token**:
    - Value: true
    - Tags: Boolean
- Tags: Object

#### metadata:
- Value:
  - **DUMMY:gateway_reference_id**:
    - Value: dummy_test
    - Tags: String
- Tags: Object

#### gateway_id:
- Value: 100
- Tags: String

#### action:
- Value: paymentPage
- Tags: String

#### mandate:
- Value:
  - **Max_amount**:
    - Value: 1000.00
    - Tags: String
- Tags: Object

#### payment_rules:
- Value:
  - **Payment_flows**:
    - Value:
      - **Billing_creation**:
        - Value:
          - **Status**:
            - Value: REQUIRED
            - Tags: String
          - **Info**:
            - Value:
              - **Plan_id**:
                - Value: sample_plan
                - Tags: String
            - Tags: Object
        - Tags: Object
    - Tags: Object
- Tags: Object
## API Responses:
### 200:

#### payment:
- Value:
  - **Authentication**:
    - Value:
      - **Method**:
        - Value: GET
        - Tags: String
      - **Url**:
        - Value: https://api.juspay.in/v2/pay/start/eulerqa_sandbox/mozFS1mNCmY96k3aHHp?cardIssuerBankName%3DUPI_COLLECT%26cardType%3DUPI%26paymentMethod%3DUPI_COLLECT%26paymentMethodType%3DUPI
        - Tags: String
    - Tags: Object
- Tags: Object

#### status:
- Value: PENDING_VBV
- Tags: String

#### txn_uuid:
- Value: mozFS1mNCmY96k3aHHp
- Tags: String

#### offer_details:
- Value:
  - **Offers**:
    - Tags: Array
- Tags: Object

#### order_id:
- Value: Ord_1765191076
- Tags: String

#### txn_id:
- Value: suc-Ord_1765191076-1
- Tags: String


---

## See Also

- [Integration Steps](https://juspay.io/in/docs/juspay-billing/docs/billing/integration-steps)
- [Create Order](https://juspay.io/in/docs/juspay-billing/docs/billing/create-order)
