---
page_title: Create Order with Payments
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/express-checkout/create-order-with-payments
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fexpress-checkout%2Fcreate-order-with-payments
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# Create Order with Payments



This API supports parameters from both the **Create Order API**  and the **Payments API** .

* To include **Create Order API**  parameters, prefix them with `order.`
  
  * **Example:** `order.metadata.JUSPAY:gateway_reference_id`
* Parameters from the **Payments API**  can be used directly as defined

> **Note**
> If you are a **PCI-compliant merchant** , you can combine the **Create Order API**  and the **Payments API**  into a **single API request** .Refer to the sample request and response below for implementation details.

## Endpoints:
- Sandbox: https://sandbox.juspay.in/txns

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

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string
- Value:  Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: Base64 Encoded Username:Password, Required
## Headers:

#### x-merchantid:
Merchant ID provided by Juspay

Example:-merchant-id
- Tags: String, Required

#### Content-Type:
application/x-www-form-urlencoded
- Tags: String

#### x-routing-id:
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.

> **Warning**
> This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.


- Value: customer_1122
- Tags: String, Required
## Sample Code Snippets:
### Code Snippets:

#### Order + Txns API - Cards Code Snippet:

```order + txns api - cards
curl --location 'https://api.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic Auth of <your-api-key>' \
--data-urlencode 'order.order_id=ord_1590759422' \
--data-urlencode 'order.amount=101550.00' \
--data-urlencode 'order.currency=INR' \
--data-urlencode 'order.customer_id=cst_1590759422' \
--data-urlencode 'order.return_url=https://merchant.in/payments' \
--data-urlencode 'merchant_id=<your-merchant-id>' \
--data-urlencode 'payment_method_type=CARD' \
--data-urlencode 'payment_method=VISA' \
--data-urlencode 'card_number=4242424242424242' \
--data-urlencode 'card_exp_month=10' \
--data-urlencode 'card_exp_year=25' \
--data-urlencode 'name_on_card=Name' \
--data-urlencode 'card_security_code=111' \
--data-urlencode 'save_to_locker=true' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'order.customer_email=customer@gmail.com' \
--data-urlencode 'order.customer_phone=9988665522' \
--data-urlencode 'order.product_id=prod-141833' \
--data-urlencode 'order.description=Sample description' \
--data-urlencode 'order.billing_address_first_name=Juspay' \
--data-urlencode 'order.billing_address_last_name=Technologies' \
--data-urlencode 'order.billing_address_line1=Girija Building' \
--data-urlencode 'order.billing_address_line2=Ganapathi Temple Road' \
--data-urlencode 'order.billing_address_line3=8th Block, Koramangala' \
--data-urlencode 'order.billing_address_city=Bengaluru' \
--data-urlencode 'order.billing_address_state=Karnataka' \
--data-urlencode 'order.billing_address_country=India' \
--data-urlencode 'order.billing_address_postal_code=560095' \
--data-urlencode 'order.billing_address_phone=9988775566' \
--data-urlencode 'order.billing_address_country_code_iso=IND' \
--data-urlencode 'order.shipping_address_first_name=Juspay' \
--data-urlencode 'order.shipping_address_last_name=Technologies' \
--data-urlencode 'order.shipping_address_line1=Girija Building' \
--data-urlencode 'order.shipping_address_line2=Ganapathi Temple Road' \
--data-urlencode 'order.shipping_address_line3=8th Block, Koramangala' \
--data-urlencode 'order.shipping_address_city=Bengaluru' \
--data-urlencode 'order.shipping_address_state=Karnataka' \
--data-urlencode 'order.shipping_address_postal_code=560095' \
--data-urlencode 'order.shipping_address_phone=9962881912' \
--data-urlencode 'order.shipping_address_country_code_iso=IND' \
--data-urlencode 'order.shipping_address_country=India' \
--data-urlencode 'order.metadata.PAYTM%3APROMO_CAMP_ID=xyz' \
--data-urlencode 'order.metadata.PAYTM%3ACUST_ID=1234' \
--data-urlencode 'order.metadata.PAYU%3Aoffer_key=1234' \
--data-urlencode 'order.metadata.PAYU%3Agateway_reference_id=bus' \
--data-urlencode 'order.options.get_client_auth_token=true' \
--data-urlencode 'order.metadata.subvention_amount=90' \
--data-urlencode 'order.metadata.auto_refund_post_success=true'
--data-urlencode 'format=json'

```

#### Order + Txns - Saved Cards Code Snippet:

```order + txns - saved cards
curl --location 'https://api.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic Auth of <your-api-key>' \
--data-urlencode 'order.order_id=ord_1590759422' \
--data-urlencode 'order.amount=101550.00' \
--data-urlencode 'order.currency=INR' \
--data-urlencode 'order.customer_id=cst_1590759422' \
--data-urlencode 'order.return_url=https://merchant.in/payments' \
--data-urlencode 'merchant_id=<your-merchant-id>' \
--data-urlencode 'payment_method_type=CARD' \
--data-urlencode 'payment_method=VISA' \
--data-urlencode "card_token=:card_token" \
--data-urlencode "card_security_code=111" \ #optional field for CVV less supported transactions
--data-urlencode 'save_to_locker=true' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'order.customer_email=customer@gmail.com' \
--data-urlencode 'order.customer_phone=9988665522' \
--data-urlencode 'order.product_id=prod-141833' \
--data-urlencode 'order.description=Sample description' \
--data-urlencode 'order.billing_address_first_name=Juspay' \
--data-urlencode 'order.billing_address_last_name=Technologies' \
--data-urlencode 'order.billing_address_line1=Girija Building' \
--data-urlencode 'order.billing_address_line2=Ganapathi Temple Road' \
--data-urlencode 'order.billing_address_line3=8th Block, Koramangala' \
--data-urlencode 'order.billing_address_city=Bengaluru' \
--data-urlencode 'order.billing_address_state=Karnataka' \
--data-urlencode 'order.billing_address_country=India' \
--data-urlencode 'order.billing_address_postal_code=560095' \
--data-urlencode 'order.billing_address_phone=9988775566' \
--data-urlencode 'order.billing_address_country_code_iso=IND' \
--data-urlencode 'order.shipping_address_first_name=Juspay' \
--data-urlencode 'order.shipping_address_last_name=Technologies' \
--data-urlencode 'order.shipping_address_line1=Girija Building' \
--data-urlencode 'order.shipping_address_line2=Ganapathi Temple Road' \
--data-urlencode 'order.shipping_address_line3=8th Block, Koramangala' \
--data-urlencode 'order.shipping_address_city=Bengaluru' \
--data-urlencode 'order.shipping_address_state=Karnataka' \
--data-urlencode 'order.shipping_address_postal_code=560095' \
--data-urlencode 'order.shipping_address_phone=9962881912' \
--data-urlencode 'order.shipping_address_country_code_iso=IND' \
--data-urlencode 'order.shipping_address_country=India' \
--data-urlencode 'order.metadata.PAYTM%3APROMO_CAMP_ID=xyz' \
--data-urlencode 'order.metadata.PAYTM%3ACUST_ID=1234' \
--data-urlencode 'order.metadata.PAYU%3Aoffer_key=1234' \
--data-urlencode 'order.metadata.PAYU%3Agateway_reference_id=bus' \
--data-urlencode 'order.options.get_client_auth_token=true' \
--data-urlencode 'order.metadata.subvention_amount=90' \
--data-urlencode 'order.metadata.auto_refund_post_success=true'
--data-urlencode 'format=json'

```

#### Order + Txns API - UPI Collect & Mandate Registration Code Snippet:

```order + txns api - upi collect & mandate registration
curl --location 'https://sandbox.juspay.in/txns' \
--header 'x-merchantid: <merchant_id>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic <Api key>' \
--data-urlencode 'order.order_id=o_1698218211' \
--data-urlencode 'order.amount=1' \
--data-urlencode 'order.currency=INR' \
--data-urlencode 'order.customer_id=cust_1698218211' \
--data-urlencode 'order.options.create_mandate=REQUIRED' \
--data-urlencode 'order.mandate.max_amount=5' \
--data-urlencode 'order.mandate.frequency=ASPRESENTED' \
--data-urlencode 'order.mandate.amount_rule=VARIABLE' \
--data-urlencode 'order.mandate.start_date=1698218211' \
--data-urlencode 'order.mandate.start_date=1698218211' \
--data-urlencode 'order.metadata.bank_account_details=[{"bank_account_number": "<bank account>","bank_ifsc":"<ifsc>","juspay_bank_code" : "JP_HDFC"}]' \
--data-urlencode 'order.order_type=<only to be passed if taking TPV, pass 'TPV_PAYMENT'>,' \
--data-urlencode 'order.gateway_id=<gateway_id at Juspay>' \
--data-urlencode 'order.metadata.auto_refund_post_success=true' \
--data-urlencode 'payment_method_type=UPI' \
--data-urlencode 'payment_method=COLLECT' \
--data-urlencode 'txn_type=UPI_COLLECT' \
--data-urlencode 'upi_vpa=<payer vpa>' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'format=json' \
--data-urlencode 'should_create_mandate=true' \
--data-urlencode 'mandate_type=EMANDATE' \
--data-urlencode 'merchant_id=<merchant_id>'

```

#### Order + Txns API - UPI Intent & Mandate Registration Code Snippet:

```order + txns api - upi intent & mandate registration
curl --location 'https://sandbox.juspay.in/txns' \
--header 'x-merchantid: <merchant_id>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic <Api key>' \
--data-urlencode 'order.order_id=o_1698225314' \
--data-urlencode 'order.amount=1' \
--data-urlencode 'order.currency=INR' \
--data-urlencode 'order.customer_id=cust_1698225314' \
--data-urlencode 'order.options.create_mandate=REQUIRED' \
--data-urlencode 'order.mandate.max_amount=5' \
--data-urlencode 'order.mandate.frequency=ASPRESENTED' \
--data-urlencode 'order.mandate.amount_rule=VARIABLE' \
--data-urlencode 'order.mandate.start_date=1698225314' \
--data-urlencode 'order.mandate.end_date=1698225417' \
--data-urlencode 'order.metadata.bank_account_details=[{"bank_account_number": "<bank account>","bank_ifsc":"<ifsc>","juspay_bank_code" : "JP_HDFC"}]' \
--data-urlencode 'order.order_type=<only to be passed if taking TPV, pass 'TPV_PAYMENT'> \
--data-urlencode 'order.gateway_id=<gateway_id at Juspay>' \
--data-urlencode 'merchant_id=<merchant_id>' \
--data-urlencode 'payment_method_type=UPI' \
--data-urlencode 'payment_method=PAY' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'format=json' \
--data-urlencode 'txn_type=UPI_PAY' \
--data-urlencode 'sdk_params=true' \
--data-urlencode 'should_create_mandate=true' \
--data-urlencode 'mandate_type=EMANDATE'

```

#### Order + Txns API - TPV NB Code Snippet:

```order + txns api - tpv nb
curl --location 'https://sandbox.juspay.in/txns' \
--header 'Content-Type: application/json' \
--header 'x-merchantid: juspay_test' \
--header 'x-routing-id: customer_1' \
--header 'Authorization: Basic ************' \
--data '{
    "merchant_id": "juspay_test",
    "order.order_id": "test123",
    "order.amount": "1.00",
    "order.metadata.bank_account_details": "[{\"bank_account_number\":\"00011111111623\", \"bank_ifsc\":\"JUS0011222\"},{\"bank_account_number\":\"00011111111623\", \"bank_ifsc\":\"JUS0011222\"}]",
    "order.udf1": "A",
    "order.customer_id": "customer_1",
    "order.order_type": "TPV_PAYMENT",
    "payment_method_type": "NB",
    "payment_method": "JP_DUMMY",
    "format": "json"
}'

```

#### Verify VPA Code Snippet:

```verify vpa
curl --location 'https://api.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Authorization: Basic Auth of <your-api-key>' \
--data-urlencode 'vpa=test123@upi' \
--data-urlencode 'merchant_id=test'
```

#### Order + Txns Net Banking Code Snippet:

```order + txns net banking
curl --location 'https://api.juspay.in/txns' \
--header 'x-merchantid: {{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic Auth of <your-api-key>' \
--data-raw '{
"order.order_id":"1752580106",
"order.amount":"1",
"order.currency":"INR",
"order.customer_id":"cst_1590759422",
"order.return_url":"https://google.com",
"merchant_id":"test",
"payment_method_type":"NB",
"payment_method":"NB_AXIS",
"redirect_after_payment":"true",
"order.customer_email":"customer@gmail.com",
"order.customer_phone":"9988665522",
"order.description":"Sample description",
"order.billing_address_first_name":"Juspay",
"order.billing_address_last_name":"Technologies",
"order.billing_address_line1":"Girija Building",
"order.billing_address_line2":"Ganapathi Temple Road",
"order.billing_address_line3":"8th Block, Koramangala",
"order.billing_address_city":"Bengaluru",
"order.billing_address_state":"Karnataka",
"order.billing_address_country":"India",
"order.billing_address_postal_code":"560095",
"order.billing_address_phone":"9988775566",
"order.billing_address_country_code_iso":"IND",
"order.shipping_address_first_name":"Juspay",
"order.shipping_address_last_name":"Technologies",
"order.shipping_address_line1":"Girija Building",
"order.shipping_address_line2":"Ganapathi Temple Road",
"order.shipping_address_line3":"8th Block, Koramangala",
"order.shipping_address_city":"Bengaluru",
"order.shipping_address_state":"Karnataka",
"order.shipping_address_postal_code":"560095",
"order.shipping_address_phone":"9962881912",
"order.shipping_address_country_code_iso":"IND",
"order.shipping_address_country":"India",
"order.options.get_client_auth_token":"true",
"format":"json"
}
'
```

#### Order + Txns UPI Intent Code Snippet:

```order + txns upi intent
curl --location 'https://api.juspay.in/txns' \
--header 'x-merchantid: {{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic Auth of <your-api-key>' \
--data-raw '{
"order.order_id":"1752580033",
"order.amount":"1",
"order.currency":"INR",
"order.customer_id":"cst_1590759422",
"order.return_url":"https://google.com",
"merchant_id":"test",
"payment_method_type":"UPI",
"payment_method":"UPI_PAY",
"sdk_params":"true",
"upi_app":"com.phonepe.app",
"redirect_after_payment":"true",
"order.customer_email":"customer@gmail.com",
"order.customer_phone":"9988665522",
"order.description":"Sample description",
"order.billing_address_first_name":"Juspay",
"order.billing_address_last_name":"Technologies",
"order.billing_address_line1":"Girija Building",
"order.billing_address_line2":"Ganapathi Temple Road",
"order.billing_address_line3":"8th Block, Koramangala",
"order.billing_address_city":"Bengaluru",
"order.billing_address_state":"Karnataka",
"order.billing_address_country":"India",
"order.billing_address_postal_code":"560095",
"order.billing_address_phone":"9988775566",
"order.billing_address_country_code_iso":"IND",
"order.shipping_address_first_name":"Juspay",
"order.shipping_address_last_name":"Technologies",
"order.shipping_address_line1":"Girija Building",
"order.shipping_address_line2":"Ganapathi Temple Road",
"order.shipping_address_line3":"8th Block, Koramangala",
"order.shipping_address_city":"Bengaluru",
"order.shipping_address_state":"Karnataka",
"order.shipping_address_postal_code":"560095",
"order.shipping_address_phone":"9962881912",
"order.shipping_address_country_code_iso":"IND",
"order.shipping_address_country":"India",
"order.options.get_client_auth_token":"true",
"format":"json"
}
'
```

#### Order + Txns UPI Collect Code Snippet:

```order + txns upi collect
curl --location 'https://api.juspay.in/txns'\
--header 'x-merchantid: {{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic Auth of <your-api-key>' \
--data-raw '{
"order.order_id":"1752579934",
"order.amount":"1",
"order.currency":"INR",
"order.customer_id":"cst_1590759422",
"order.return_url":"https://google.com",
"merchant_id":"test",
"payment_method_type":"UPI",
"payment_method":"UPI_COLLECT",
"upi_vpa":"test123@upi",
"redirect_after_payment":"true",
"order.customer_email":"customer@gmail.com",
"order.customer_phone":"9988665522",
"order.description":"Sample description",
"order.billing_address_first_name":"Juspay",
"order.billing_address_last_name":"Technologies",
"order.billing_address_line1":"Girija Building",
"order.billing_address_line2":"Ganapathi Temple Road",
"order.billing_address_line3":"8th Block, Koramangala",
"order.billing_address_city":"Bengaluru",
"order.billing_address_state":"Karnataka",
"order.billing_address_country":"India",
"order.billing_address_postal_code":"560095",
"order.billing_address_phone":"9988775566",
"order.billing_address_country_code_iso":"IND",
"order.shipping_address_first_name":"Juspay",
"order.shipping_address_last_name":"Technologies",
"order.shipping_address_line1":"Girija Building",
"order.shipping_address_line2":"Ganapathi Temple Road",
"order.shipping_address_line3":"8th Block, Koramangala",
"order.shipping_address_city":"Bengaluru",
"order.shipping_address_state":"Karnataka",
"order.shipping_address_postal_code":"560095",
"order.shipping_address_phone":"9962881912",
"order.shipping_address_country_code_iso":"IND",
"order.shipping_address_country":"India",
"order.options.get_client_auth_token":"true",
"format":"json"
}
'
```

#### Order + Txns UPI QR Code Snippet:

```order + txns upi qr
curl --location 'https://api.juspay.in/txns' \
--header 'x-merchantid: {{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic Auth of <your-api-key>\
--data-raw '{
"order.order_id":"1752579750",
"order.amount":"1",
"order.currency":"INR",
"order.customer_id":"cst_1590759422",
"order.return_url":"https://google.com",
"merchant_id":"test",
"payment_method_type":"UPI",
"payment_method":"UPI_QR",
"sdk_params":"true",
"redirect_after_payment":"true",
"order.customer_email":"customer@gmail.com",
"order.customer_phone":"9988665522",
"order.description":"Sample description",
"order.billing_address_first_name":"Juspay",
"order.billing_address_last_name":"Technologies",
"order.billing_address_line1":"Girija Building",
"order.billing_address_line2":"Ganapathi Temple Road",
"order.billing_address_line3":"8th Block, Koramangala",
"order.billing_address_city":"Bengaluru",
"order.billing_address_state":"Karnataka",
"order.billing_address_country":"India",
"order.billing_address_postal_code":"560095",
"order.billing_address_phone":"9988775566",
"order.billing_address_country_code_iso":"IND",
"order.shipping_address_first_name":"Juspay",
"order.shipping_address_last_name":"Technologies",
"order.shipping_address_line1":"Girija Building",
"order.shipping_address_line2":"Ganapathi Temple Road",
"order.shipping_address_line3":"8th Block, Koramangala",
"order.shipping_address_city":"Bengaluru",
"order.shipping_address_state":"Karnataka",
"order.shipping_address_postal_code":"560095",
"order.shipping_address_phone":"9962881912",
"order.shipping_address_country_code_iso":"IND",
"order.shipping_address_country":"India",
"order.options.get_client_auth_token":"true",
"format":"json"
}
'
```

#### Order + Txns UPI QR Autopay Code Snippet:

```order + txns upi qr autopay
curl --location 'https://api.juspay.in/txns' \
--header 'x-merchantid: {{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic QjQ5MzIyRjdCMzU0NUFEQjI2N0MyRUFDNjNDRUJGOg==' \
--data-raw '{
"order.order_id":"1752579353",
"order.amount":"1",
"order.currency":"INR",
"order.customer_id":"cst_1590759422",
"order.return_url":"https://google.com",
"merchant_id":"test",
"order.metadata.JUSPAY:gateway_reference_id":"testing",
"payment_method_type":"UPI",
"payment_method":"UPI_QR",
"sdk_params":"true",
"order.options.create_mandate":"REQUIRED",
"order.mandate.amount_rule":"VARIABLE",
"order.mandate.max_amount":"1000.00",
"order.mandate.revokable_by_customer":"true",
"order.mandate.block_funds":"false",
"order.mandate.start_date":"1742213700", 
"order.mandate.end_date":"1914141600",
"order.mandate.frequency":"MONTHLY",
"order.mandate.rule_value":"1",
"order.mandate.rule_type":"ON",
"should_create_mandate":"true",
"mandate_type":"EMANDATE",
"redirect_after_payment":"true",
"order.customer_email":"customer@gmail.com",
"order.customer_phone":"9988665522",
"order.description":"Sample description",
"order.billing_address_first_name":"Juspay",
"order.billing_address_last_name":"Technologies",
"order.billing_address_line1":"Girija Building",
"order.billing_address_line2":"Ganapathi Temple Road",
"order.billing_address_line3":"8th Block, Koramangala",
"order.billing_address_city":"Bengaluru",
"order.billing_address_state":"Karnataka",
"order.billing_address_country":"India",
"order.billing_address_postal_code":"560095",
"order.billing_address_phone":"9988775566",
"order.billing_address_country_code_iso":"IND",
"order.shipping_address_first_name":"Juspay",
"order.shipping_address_last_name":"Technologies",
"order.shipping_address_line1":"Girija Building",
"order.shipping_address_line2":"Ganapathi Temple Road",
"order.shipping_address_line3":"8th Block, Koramangala",
"order.shipping_address_city":"Bengaluru",
"order.shipping_address_state":"Karnataka",
"order.shipping_address_postal_code":"560095",
"order.shipping_address_phone":"9962881912",
"order.shipping_address_country_code_iso":"IND",
"order.shipping_address_country":"India",
"order.options.get_client_auth_token":"true",
"format":"json"
}'
```

#### Order + Txns UPI Intent Autopay Code Snippet:

```order + txns upi intent autopay
curl --location 'https://api.juspay.in/txns' \
--header 'x-merchantid: {{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic MUMxNUI1MzI3NEQ0MkUxODg1RjVBMEFFMjZGNUU4Og==' \
--data-raw '{
"order.order_id":"1752687764",
"order.amount":"1",
"order.currency":"INR",
"order.customer_id":"cst_1590759422",
"order.return_url":"https://google.com",
"merchant_id":"test",
"payment_method_type":"UPI",
"payment_method":"UPI_PAY",
"sdk_params":"true",
"upi_app":"com.phonepe.app",
"order.options.create_mandate":"REQUIRED",
"order.mandate.amount_rule":"VARIABLE",
"order.mandate.max_amount":"1000.00",
"order.mandate.revokable_by_customer":"true",
"order.mandate.block_funds":"false",
"order.mandate.start_date":"1752687764", 
"order.mandate.end_date":"1914141600",
"order.mandate.frequency":"MONTHLY",
"order.mandate.rule_value":"1",
"order.mandate.rule_type":"ON",
"should_create_mandate":"true",
"mandate_type":"EMANDATE",
"redirect_after_payment":"true",
"order.customer_email":"customer@gmail.com",
"order.customer_phone":"9988665522",
"order.description":"Sample description",
"order.billing_address_first_name":"Juspay",
"order.billing_address_last_name":"Technologies",
"order.billing_address_line1":"Girija Building",
"order.billing_address_line2":"Ganapathi Temple Road",
"order.billing_address_line3":"8th Block, Koramangala",
"order.billing_address_city":"Bengaluru",
"order.billing_address_state":"Karnataka",
"order.billing_address_country":"India",
"order.billing_address_postal_code":"560095",
"order.billing_address_phone":"9988775566",
"order.billing_address_country_code_iso":"IND",
"order.shipping_address_first_name":"Juspay",
"order.shipping_address_last_name":"Technologies",
"order.shipping_address_line1":"Girija Building",
"order.shipping_address_line2":"Ganapathi Temple Road",
"order.shipping_address_line3":"8th Block, Koramangala",
"order.shipping_address_city":"Bengaluru",
"order.shipping_address_state":"Karnataka",
"order.shipping_address_postal_code":"560095",
"order.shipping_address_phone":"9962881912",
"order.shipping_address_country_code_iso":"IND",
"order.shipping_address_country":"India",
"order.options.get_client_auth_token":"true",
"format":"json"
}
'
```

#### Order + Txns - UPI Collect Autopay Code Snippet:

```order + txns - upi collect autopay
curl --location 'https://api.juspay.in/txns' \
--header 'x-merchantid: {{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Auth of <your-api-key>' \
--data-raw '{
"order.order_id":"1752685438",
"order.amount":"1",
"order.currency":"INR",
"order.customer_id":"cst_1590759422",
"order.return_url":"https://google.com",
"merchant_id":"test",
"payment_method_type":"UPI",
"payment_method":"UPI_COLLECT",
"upi_vpa":"test123@upi",
"order.options.create_mandate":"REQUIRED",
"order.mandate.amount_rule":"VARIABLE",
"order.mandate.max_amount":"1000.00",
"order.mandate.revokable_by_customer":"true",
"order.mandate.block_funds":"false",
"order.mandate.start_date":"1752685438", 
"order.mandate.end_date":"1914141600",
"order.mandate.frequency":"MONTHLY",
"order.mandate.rule_value":"1",
"order.mandate.rule_type":"ON",
"should_create_mandate":"true",
"mandate_type":"EMANDATE",
"redirect_after_payment":"true",
"order.customer_email":"customer@gmail.com",
"order.customer_phone":"9988665522",
"order.description":"Sample description",
"order.billing_address_first_name":"Juspay",
"order.billing_address_last_name":"Technologies",
"order.billing_address_line1":"Girija Building",
"order.billing_address_line2":"Ganapathi Temple Road",
"order.billing_address_line3":"8th Block, Koramangala",
"order.billing_address_city":"Bengaluru",
"order.billing_address_state":"Karnataka",
"order.billing_address_country":"India",
"order.billing_address_postal_code":"560095",
"order.billing_address_phone":"9988775566",
"order.billing_address_country_code_iso":"IND",
"order.shipping_address_first_name":"Juspay",
"order.shipping_address_last_name":"Technologies",
"order.shipping_address_line1":"Girija Building",
"order.shipping_address_line2":"Ganapathi Temple Road",
"order.shipping_address_line3":"8th Block, Koramangala",
"order.shipping_address_city":"Bengaluru",
"order.shipping_address_state":"Karnataka",
"order.shipping_address_postal_code":"560095",
"order.shipping_address_phone":"9962881912",
"order.shipping_address_country_code_iso":"IND",
"order.shipping_address_country":"India",
"order.options.get_client_auth_token":"true",
"format":"json"
}
'

'

```

#### Order + Txns UPI Intent TPV Code Snippet:

```order + txns upi intent tpv
curl --location 'https://api.juspay.in/txns' \
--header 'x-merchantid: {{merchantId}}' \
--header 'x-routing-id: kcustomer_1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Auth of <your-api-key>' \
--data-raw '{
"order.order_id":"1752685644",
"order.amount":"1",
"order.currency":"INR",
"order.customer_id":"cst_1590759422",
"order.return_url":"https://google.com",
"merchant_id":"test",
"payment_method_type":"UPI",
"payment_method":"UPI_PAY",
"sdk_params":"true",
"upi_app":"com.phonepe.app",
"redirect_after_payment":"true",
"order.metadata.bank_account_details":"[{\"bank_account_number\":\"00011111111623\",\"bank_ifsc\":\"JUS0011222\", \"juspay_bank_code\" : \"JP_DUMMY\", \"bank_beneficiary_name\" : \"ABC\"}]",
"order.order_type":"TPV_PAYMENT",
"order.customer_email":"customer@gmail.com",
"order.customer_phone":"9988665522",
"order.description":"Sample description",
"order.billing_address_first_name":"Juspay",
"order.billing_address_last_name":"Technologies",
"order.billing_address_line1":"Girija Building",
"order.billing_address_line2":"Ganapathi Temple Road",
"order.billing_address_line3":"8th Block, Koramangala",
"order.billing_address_city":"Bengaluru",
"order.billing_address_state":"Karnataka",
"order.billing_address_country":"India",
"order.billing_address_postal_code":"560095",
"order.billing_address_phone":"9988775566",
"order.billing_address_country_code_iso":"IND",
"order.shipping_address_first_name":"Juspay",
"order.shipping_address_last_name":"Technologies",
"order.shipping_address_line1":"Girija Building",
"order.shipping_address_line2":"Ganapathi Temple Road",
"order.shipping_address_line3":"8th Block, Koramangala",
"order.shipping_address_city":"Bengaluru",
"order.shipping_address_state":"Karnataka",
"order.shipping_address_postal_code":"560095",
"order.shipping_address_phone":"9962881912",
"order.shipping_address_country_code_iso":"IND",
"order.shipping_address_country":"India",
"order.options.get_client_auth_token":"true",
"format":"json"
}
'

```

#### Order + Txns UPI Collect TPV Code Snippet:

```order + txns upi collect tpv
curl --location 'https://api.juspay.in/txns' \
--header 'x-merchantid: {{merchantId}}' \
--header 'x-routing-id: juspayCustomerId' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Auth of <your-api-key>' \
--data-raw '{
"order.order_id":"1752686514",
"order.amount":"1",
"order.currency":"INR",
"order.customer_id":"cst_1590759422",
"order.return_url":"https://google.com",
"merchant_id":"test",
"payment_method_type":"UPI",
"payment_method":"UPI_COLLECT",
"upi_vpa":"test123@upi",
"redirect_after_payment":"true",
"order.metadata.bank_account_details":"[{\"bank_account_number\":\"00011111111623\",\"bank_ifsc\":\"JUS0011222\", \"juspay_bank_code\" : \"JP_DUMMY\", \"bank_beneficiary_name\" : \"ABC\"}]",
"order.order_type":"TPV_PAYMENT",
"order.customer_email":"customer@gmail.com",
"order.customer_phone":"9988665522",
"order.description":"Sample description",
"order.billing_address_first_name":"Juspay",
"order.billing_address_last_name":"Technologies",
"order.billing_address_line1":"Girija Building",
"order.billing_address_line2":"Ganapathi Temple Road",
"order.billing_address_line3":"8th Block, Koramangala",
"order.billing_address_city":"Bengaluru",
"order.billing_address_state":"Karnataka",
"order.billing_address_country":"India",
"order.billing_address_postal_code":"560095",
"order.billing_address_phone":"9988775566",
"order.billing_address_country_code_iso":"IND",
"order.shipping_address_first_name":"Juspay",
"order.shipping_address_last_name":"Technologies",
"order.shipping_address_line1":"Girija Building",
"order.shipping_address_line2":"Ganapathi Temple Road",
"order.shipping_address_line3":"8th Block, Koramangala",
"order.shipping_address_city":"Bengaluru",
"order.shipping_address_state":"Karnataka",
"order.shipping_address_postal_code":"560095",
"order.shipping_address_phone":"9962881912",
"order.shipping_address_country_code_iso":"IND",
"order.shipping_address_country":"India",
"order.options.get_client_auth_token":"true",
"format":"json"
}
'

```

#### Order + Txns EMI Code Snippet:

```order + txns emi
curl --location 'https://sandbox.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-routing-id: customer_1122' \
--header 'Authorization: Basic ODYwQ0M4RTg2ODYxxxxxQUUwNTk0Og==' \
--data-urlencode 'order.order_id=ord_159075942' \
--data-urlencode 'order.amount=101550.00' \
--data-urlencode 'order.currency=INR' \
--data-urlencode 'order.customer_id=cst_1590759422' \
--data-urlencode 'order.return_url=https://merchant.in/payments' \
--data-urlencode 'merchant_id=merchant_success' \
--data-urlencode 'payment_method_type=CARD' \
--data-urlencode 'payment_method=VISA' \
--data-urlencode 'card_number=4242424242424242' \
--data-urlencode 'card_exp_month=10' \
--data-urlencode 'card_exp_year=25' \
--data-urlencode 'name_on_card=Name' \
--data-urlencode 'card_security_code=111' \
--data-urlencode 'save_to_locker=true' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'order.customer_email=customer@gmail.com' \
--data-urlencode 'order.customer_phone=9988664522' \
--data-urlencode 'order.product_id=prod-141833' \
--data-urlencode 'order.description=Sample description' \
--data-urlencode 'order.billing_address_first_name=Juspay' \
--data-urlencode 'order.billing_address_last_name=Technologies' \
--data-urlencode 'order.billing_address_line1=Girija Building' \
--data-urlencode 'order.billing_address_line2=Ganapathi Temple Road' \
--data-urlencode 'order.billing_address_line3=8th Block, Koramangala' \
--data-urlencode 'order.billing_address_city=Bengaluru' \
--data-urlencode 'order.billing_address_state=Karnataka' \
--data-urlencode 'order.billing_address_country=India' \
--data-urlencode 'order.billing_address_postal_code=560095' \
--data-urlencode 'order.billing_address_phone=9988775566' \
--data-urlencode 'order.billing_address_country_code_iso=IND' \
--data-urlencode 'order.shipping_address_first_name=Juspay' \
--data-urlencode 'order.shipping_address_last_name=Technologies' \
--data-urlencode 'order.shipping_address_line1=Girija Building' \
--data-urlencode 'order.shipping_address_line2=Ganapathi Temple Road' \
--data-urlencode 'order.shipping_address_line3=8th Block, Koramangala' \
--data-urlencode 'order.shipping_address_city=Bengaluru' \
--data-urlencode 'order.shipping_address_state=Karnataka' \
--data-urlencode 'order.shipping_address_postal_code=560095' \
--data-urlencode 'order.shipping_address_phone=9962881912' \
--data-urlencode 'order.shipping_address_country_code_iso=IND' \
--data-urlencode 'order.shipping_address_country=India' \
--data-urlencode 'order.metadata.PAYTM%3APROMO_CAMP_ID=xyz' \
--data-urlencode 'order.metadata.PAYTM%3ACUST_ID=1234' \
--data-urlencode 'order.metadata.PAYU%3Aoffer_key=1234' \
--data-urlencode 'order.metadata.PAYU%3Agateway_reference_id=bus' \
--data-urlencode 'order.options.get_client_auth_token=true' \
--data-urlencode 'order.metadata.subvention_amount=90' \
--data-urlencode 'order.metadata.auto_refund_post_success=true' \
--data-urlencode 'format=json' \
--data-urlencode 'is_emi=true' \
--data-urlencode 'emi_bank=HDFC' \
--data-urlencode 'emi_tenure=3' \
--data-urlencode 'emi_type=STANDARD_EMI'
```

#### Order + Txns QR TPV Code Snippet:

```order + txns qr tpv
curl --location 'https://api.juspay.in/txns' \
--header 'x-merchantid: {{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'x-routing-id: customer_1122' \
--header 'Authorization: Basic <your-api-key>' \
--data-raw '{
  "order.order_id":"1752579750",
  "order.amount":"1",
  "order.currency":"INR",
  "order.customer_id":"cst_1590759422",
  "order.return_url":"https://google.com",
  "merchant_id":"test",
  "payment_method_type":"UPI",
  "payment_method":"UPI_QR",
  "order.order_type":"TPV_PAYMENT",
  "order.metadata.bank_account_details":"[{\"bank_account_number\":\"XXXXXX1162\",\"bank_ifsc\":\"SBIN0007225\",\"juspay_bank_code\":\"JP_SBI\",\"bank_beneficiary_name\":\"John Doe\"},{\"bank_account_number\":\"XXXXXXXX5441\",\"bank_ifsc\":\"HDFC0001961\",\"juspay_bank_code\":\"JP_HDFC\",\"bank_beneficiary_name\":\"Jane Smith\"}]",
  "sdk_params":"true",
  "redirect_after_payment":"true",
  "order.customer_email":"customer@gmail.com",
  "order.customer_phone":"9988665522",
  "order.description":"Sample description",
  "order.billing_address_first_name":"Juspay",
  "order.billing_address_last_name":"Technologies",
  "order.billing_address_line1":"Girija Building",
  "order.billing_address_line2":"Ganapathi Temple Road",
  "order.billing_address_line3":"8th Block, Koramangala",
  "order.billing_address_city":"Bengaluru",
  "order.billing_address_state":"Karnataka",
  "order.billing_address_country":"India",
  "order.billing_address_postal_code":"560095",
  "order.billing_address_phone":"9988775566",
  "order.billing_address_country_code_iso":"IND",
  "order.shipping_address_first_name":"Juspay",
  "order.shipping_address_last_name":"Technologies",
  "order.shipping_address_line1":"Girija Building",
  "order.shipping_address_line2":"Ganapathi Temple Road",
  "order.shipping_address_line3":"8th Block, Koramangala",
  "order.shipping_address_city":"Bengaluru",
  "order.shipping_address_state":"Karnataka",
  "order.shipping_address_postal_code":"560095",
  "order.shipping_address_phone":"9962881912",
  "order.shipping_address_country_code_iso":"IND",
  "order.shipping_address_country":"India",
  "order.options.get_client_auth_token":"true",
  "format":"json"
}'
```

### Sample Request and Response:

#### 200 Response - Cards/UPI Collect:
```json
{
  "order_id": "ord_1590759422",
  "status": "PENDING_VBV",
  "payment": {
    "authentication": {
      "url": "https://api.juspay.in/v2/pay/start/MID/moz3BDvrJSbBzuqFiw1?cardIssuerBankName%3DAxisBank%26cardType%3DDEBIT%26paymentMethod%3DVISA%26paymentMethodType%3DCARD",
      "method": "GET"
    }
  },
  "txn_uuid": "moz3BDvrJSbBzuqFiw1",
  "offer_details": {
    "offers": []
  },
  "txn_id": "MID-ord_1590759422-1"
}

```

#### 200 Response - Order + Txns Saved Cards:
```plaintext
{"success":false,"message":"No Data found for the given path"}
```

#### 200 Response - UPI Intent with Mandate Registration:
```plaintext
{
  "order_id": "o_1698225298",
  "status": "PENDING_VBV",
  "payment": {
    "sdk_params": {
      "scheme": "mandate",
      "uri_params": {
        "amrule": "MAX",
        "tn": "Debit%20Money%20For%20UPI%20Autopay",
        "validityend": "26072024",
        "mode": "00",
        "mn": "JUSPAY",
        "cu": "INR",
        "pn": "merchant name",
        "purpose": "14",
        "tid": "YJP11gsqszvoufocmozutWhEydEimxersay",
        "pa": "merchant vpa",
        "am": "5.00",
        "orgid": "000000",
        "validitystart": "25102023",
        "recur": "ASPRESENTED",
        "tr": "mido16982252981",
        "mc": "6xx1",
        "mam": "1.00"
      }
    },
    "authentication": {
      "url": "https://sandbox.juspay.in/v2/pay/start/mid/mozutWhEydEimxersay?cardIssuerBankName%3DPAY%26cardType%3DUPI%26paymentMethod%3DPAY%26paymentMethodType%3DUPI",
      "method": "GET"
    }
  },
  "txn_uuid": "mozutWhEydEimxersay",
  "offer_details": {
    "offers": []
  },
  "txn_id": "mid-o_1698225298-1"
}

```

#### 200 Response - TPV Intent:
```plaintext
{
    "order_id": "mandateJuspay_1727354822",
    "status": "PENDING_VBV",
    "payment": {
        "sdk_params": {
            "scheme": "FILTERED",
            "uri_params": {
                "tn": "FILTERED",
                "mode": "FILTERED",
                "mn": "JUSPAY",
                "cu": "INR",
                "pn": "FILTERED",
                "tid": "FILTERED",
                "pa": "FILTERED",
                "am": "500.00",
                "tr": "mozekx85fkTvZ4BRVBK",
                "mc": "7322"
            }
        },
        "authentication": {
            "url": "https://sandbox.juspay.in/v2/pay/start/simpl/mozekx85fkTvZ4BRVBK?cardIssuerBankName%3DPAY%26cardType%3DUPI%26paymentMethod%3DPAY%26paymentMethodType%3DUPI",
            "method": "GET"
        }
    },
    "txn_uuid": "mozekx85fkTvZ4BRVBK",
    "offer_details": {
        "offers": []
    },
    "txn_id": "s-mandateJuspay_1727354822-1"
}

```

#### 200 Response - TPV Collect:
```plaintext
{
    "order_id": "1727353428",
    "status": "PENDING_VBV",
    "payment": {
        "authentication": {
            "url": "https://sandbox.juspay.in/v2/pay/start/kotaksecurities/moz9sjMcDYKzNfDqp77?cardIssuerBankName%3DCOLLECT%26cardType%3DUPI%26paymentMethod%3DCOLLECT%26paymentMethodType%3DUPI",
            "method": "GET"
        }
    },
    "txn_uuid": "moz9sjMcDYKzNfDqp77",
    "offer_details": {
        "offers": []
    },
    "txn_id": "kotaksecurities-1727353428-1"
}

```

#### 200 Response - TPV NB:
```plaintext
{
    "order_id": "1727353510",
    "status": "PENDING_VBV",
    "payment": {
        "authentication": {
            "url": "https://sandbox.juspay.in/v2/pay/start/kotaksecurities/moznpcLq8FqMyZN6J1q?cardIssuerBankName%3DJP_DUMMY%26cardType%3DNB%26paymentMethod%3DJP_DUMMY%26paymentMethodType%3DNB",
            "method": "GET"
        }
    },
    "txn_uuid": "moznpcLq8FqMyZN6J1q",
    "offer_details": {
        "offers": []
    },
    "txn_id": "kotaksecurities-1727353510-1"
}

```

#### 200 Response - Order+Txns UPI Intent:
```plaintext
{
   "payment": {
       "sdk_params": {
           "mam": "1.00",
           "tr": "UHD545K0016EX9",
           "merchant_vpa": "bill@hdfcbank",
           "customer_last_name": "Technologies",
           "tn": "Pay",
           "mcc": "7399",
           "merchant_name": "UJPV2",
           "currency": "INR",
           "amount": "1.00",
           "customer_first_name": "Juspay"
       },
       "authentication": {
           "method": "GET",
           "url": "https://sandbox.in/in/v2/pay/start/test/mozqRLTT4TwvpVespoj?cardIssuerBankName%3DUPI_PAY%26cardType%3DUPI%26paymentMethod%3DUPI_PAY%26paymentMethodType%3DUPI"
       }
   },
   "status": "PENDING_VBV",
   "txn_uuid": "mozqRLTT4TwvpVespoj",
   "juspay": {
       "client_auth_token": "tkn_978d185c26ac4a7aba3edae68f8d8274",
       "client_auth_token_expiry": "2025-07-15T06:29:56Z"
   },
   "offer_details": {
       "offers": []
   },
   "order_id": "1752560096",
   "txn_id": "test-1752560096-1"
}

```

#### 200 Response - Order+Txns UPI Collect:
```plaintext
{"success":false,"message":"No Data found for the given path"}
```

#### 200 Response - Order+Txns Netbanking:
```plaintext
{
   "payment": {
       "authentication": {
           "method": "GET",
           "url": "https://sandbox.in/in/v2/pay/start/testIN/moz4YMM98epGonoem4q?cardIssuerBankName%3DNB_AXIS%26cardType%3DNB%26paymentMethod%3DNB_AXIS%26paymentMethodType%3DNB"
       }
   },
   "status": "PENDING_VBV",
   "txn_uuid": "moz4YMM98epGonoem4q",
   "juspay": {
       "client_auth_token": "tkn_4926bb9e959b483ab6c6aa0acc241584",
       "client_auth_token_expiry": "2025-07-15T06:15:01Z"
   },
   "offer_details": {
       "offers": []
   },
   "order_id": "1752559201",
   "txn_id": "testIN-1752559201-1"
}

```

#### 200 Response - Verify VPA:
```plaintext
{
   "status": "VALID",
   "customer_name": "Verified",
   "vpa": "test123@upi",
   "mandate_details": {
       "is_handle_supported": true
   }
}

```

#### 200 Response - Order + UPI Collect TPV:
```plaintext
{"success":false,"message":"No Data found for the given path"}
```

#### 200 Response - Order + Txns UPI Intent Autopay:
```plaintext
{
   "payment": {
       "sdk_params": {
           "uri_params": {
               "mode": "04",
               "fam": "1.0",
               "mc": "7322",
               "mam": "1.0",
               "tr": "testHSBCIN-1752683423-1",
               "mn": "Subscription%20for%20Juspay%20Test",
               "pa": "test123@upi",
               "validityend": "28082030",
               "tn": "Juspay%20Technologies%20Pvt%20Ltd.",
               "recur": "MONTHLY",
               "cu": "INR",
               "recurtype": "ON",
               "mid": "testHSBCIN",
               "recurvalue": "1",
               "rev": "Y",
               "amrule": "MAX",
               "block": "N",
               "txnType": "CREATE",
               "purpose": "14",
               "tid": "moz7KJg5WMiwk9evHRm",
               "pn": "Test",
               "am": "1.0",
               "orgid": "000000",
               "validitystart": "16072025"
           },
           "scheme": "mandate"
       },
       "authentication": {
           "method": "GET",
           "url": "https://api-dev.dms.gbm.hsbc.com/in/v2/pay/start/testHSBCIN/moz7KJg5WMiwk9evHRm?cardIssuerBankName%3DUPI_PAY%26cardType%3DUPI%26paymentMethod%3DUPI_PAY%26paymentMethodType%3DUPI"
       }
   },
   "status": "PENDING_VBV",
   "txn_uuid": "moz7KJg5WMiwk9evHRm",
   "juspay": {
       "client_auth_token": "tkn_f49d947f096d4a748e715c90f84e68f6",
       "client_auth_token_expiry": "2025-07-16T16:45:23Z"
   },
   "offer_details": {
       "offers": []
   },
   "order_id": "1752683423",
   "txn_id": "testHSBCIN-1752683423-1"
}

```

#### 200 Response - Order + Txns - UPI Collect Autopay:
```plaintext
{
   "payment": {
       "authentication": {
           "method": "GET",
           "url": "https://api-dev.dms.gbm.hsbc.com/in/v2/pay/start/testHSBCIN/moz3foFieBmBdEbFFKo?cardIssuerBankName%3DUPI_COLLECT%26cardType%3DUPI%26paymentMethod%3DUPI_COLLECT%26paymentMethodType%3DUPI"
       }
   },
   "status": "PENDING_VBV",
   "txn_uuid": "moz3foFieBmBdEbFFKo",
   "juspay": {
       "client_auth_token": "tkn_ac21ef54311b44f4ac2097b712c10688",
       "client_auth_token_expiry": "2025-07-16T17:18:47Z"
   },
   "offer_details": {
       "offers": []
   },
   "order_id": "1752685427",
   "txn_id": "testHSBCIN-1752685427-1"
}

```

#### 200 Response - Order + Txns UPI QR Autopay:
```plaintext
{
   "payment": {
       "sdk_params": {
           "uri_params": {
               "mode": "13",
               "fam": "1.0",
               "mc": "7322",
               "mam": "1.0",
               "tr": "test-1752685319-1",
               "mn": "Subscription%20for%20Juspay%20Test",
               "pa": "test123@upi",
               "validityend": "28082030",
               "tn": "Juspay%20Technologies%20Pvt%20Ltd.",
               "recur": "MONTHLY",
               "cu": "INR",
               "recurtype": "ON",
               "mid": "test",
               "recurvalue": "1",
               "rev": "Y",
               "amrule": "MAX",
               "block": "N",
               "txnType": "CREATE",
               "purpose": "14",
               "tid": "mozsdMooNQQfBY4d6oL",
               "pn": "HSBC%20India%20test",
               "am": "1.0",
               "orgid": "000000",
               "validitystart": "16072025"
           },
           "scheme": "mandate"
       },
       "authentication": {
           "method": "GET",
           "url": "https://sandbox.juspay.in/v2/pay/start/hsbcintest/mozsdMooNQQfBY4d6oL?cardIssuerBankName%3DUPI_QR%26cardType%3DUPI%26paymentMethod%3DUPI_QR%26paymentMethodType%3DUPI"
       }
   },
   "status": "PENDING_VBV",
   "txn_uuid": "mozsdMooNQQfBY4d6oL",
   "juspay": {
       "client_auth_token": "tkn_6dad4e8792674f679c5f0fb7789be007",
       "client_auth_token_expiry": "2025-07-16T17:16:59Z"
   },
   "offer_details": {
       "offers": []
   },
   "order_id": "1752685319",
   "txn_id": "test-1752685319-1"
}

```

#### 200 Response - Order + Txns UPI QR:
```plaintext
{
   "payment": {
       "sdk_params": {
           "mam": "1.00",
           "tr": "UHD52IM0016EXZ",
           "merchant_vpa": "billdesk@bank",
           "customer_last_name": "Technologies",
           "tn": "Pay",
           "mcc": "7399",
           "merchant_name": "UJPV2",
           "currency": "INR",
           "amount": "1.00",
           "customer_first_name": "Juspay"
       },
       "authentication": {
           "method": "GET",
           "url": "https://sandbox.in/in/v2/pay/start/testIN/mozfKSLvTUw9SGbMa99?cardIssuerBankName%3DUPI_QR%26cardType%3DUPI%26paymentMethod%3DUPI_QR%26paymentMethodType%3DUPI"
       }
   },
   "status": "PENDING_VBV",
   "txn_uuid": "mozfKSLvTUw9SGbMa99",
   "juspay": {
       "client_auth_token": "tkn_e70a5265525141b695ba270ca3bb232b",
       "client_auth_token_expiry": "2025-07-15T06:32:10Z"
   },
   "offer_details": {
       "offers": []
   },
   "order_id": "1752560230",
   "txn_id": "testIN-1752560230-1"
}

```

#### 200 Response - Order + Txns EMI:
```plaintext
{
    "payment": {
        "authentication": {
            "method": "GET",
            "url": "https://sandbox.juspay.in/v2/txns/consent/porter/mozjhkCV7iRGQPTFVNq?cardIssuerBankName%3DAXIS%26cardType%3DCREDIT%26paymentMethod%3DVISA%26paymentMethodType%3DCARD"
        }
    },
    "status": "PENDING_VBV",
    "txn_uuid": "mozjhkCV7iRGQPTFVNq",
    "juspay": {
        "client_auth_token": "tkn_98d19e40f4784a718ca3b2f7f960fe95",
        "client_auth_token_expiry": "2025-07-30T16:25:40Z"
    },
    "offer_details": {
        "offers": []
    },
    "order_id": "ord_159075942",
    "txn_id": "ord_159075942-1"
}
```

#### 400 Response - Order + Txns Netbanking:
```plaintext
{
   "error_message": "Bad request.",
   "status": "ERROR",
   "error_code": "Bad request.",
   "error_info": {
       "user_message": "Bad request.",
       "fields": [
           {
               "field_name": "merchant_id",
               "reason": "Field required but not passed."
           }
       ],
       "request_id": "9dd3037e-9f37-42dc-b439-f68e465fbc7f",
       "href": "NA",
       "developer_message": "Failed while parsing your request.",
       "code": "MISSING_MANDATORY_PARAMETER",
       "category": "USER_ERROR"
   }
}

```

#### 400 Response - Order + Txns UPI Intent:
```plaintext
{
   "error_message": "[order id] cannot be null",
   "status": "invalid_request_error",
   "error_code": "blank",
   "error_info": {
       "user_message": "Cannot process your request. Please contact support team for assistance.",
       "fields": [
           {
               "field_name": "order_id",
               "reason": "Missing field."
           }
       ],
       "request_id": "566a070b-dfde-45f8-9eac-44e5d7326615",
       "href": "NA",
       "developer_message": "Missing order id. Please pass order_id or order payload.",
       "code": "MISSING_MANDATORY_PARAMETER",
       "category": "USER_ERROR"
   }
}


```

#### 400 Response - Order + Txns UPI Collect:
```plaintext
{
   "error_message": "[order id] cannot be null",
   "status": "invalid_request_error",
   "error_code": "blank",
   "error_info": {
       "user_message": "Cannot process your request. Please contact support team for assistance.",
       "fields": [
           {
               "field_name": "order_id",
               "reason": "Missing field."
           }
       ],
       "request_id": "aeadb086-7237-4d43-97e9-eb6b8876b843",
       "href": "NA",
       "developer_message": "Missing order id. Please pass order_id or order payload.",
       "code": "MISSING_MANDATORY_PARAMETER",
       "category": "USER_ERROR"
   }
}


```

#### 400 Response - Order + Txns UPI QR:
```plaintext
{
   "error_message": "Bad request.",
   "status": "ERROR",
   "error_code": "Bad request.",
   "error_info": {
       "user_message": "Bad request.",
       "fields": [
           {
               "field_name": "merchant_id",
               "reason": "Field required but not passed."
           }
       ],
       "request_id": "7d774497-3a1b-4557-a2fb-c1df7454ceb6",
       "href": "NA",
       "developer_message": "Failed while parsing your request.",
       "code": "MISSING_MANDATORY_PARAMETER",
       "category": "USER_ERROR"
   }
}


```

#### 400 Response - Verify VPA:
```plaintext
{
   "error_message": "Invalid request.",
   "status": "error",
   "error_code": "invalid_request",
   "error_info": {
       "user_message": "VPA Validation Failed, make sure you have passed a valid VPA.",
       "fields": [
           {
               "field_name": "vpa",
               "reason": "Validation failed."
           }
       ],
       "request_id": "e7584364-d605-44a3-81b1-793abce3345c",
       "href": "NA",
       "developer_message": "VPA Validation Failed, make sure you have passed a valid VPA.",
       "code": "INVALID_INPUT",
       "category": "USER_ERROR"
   }
}



```

#### 400 Response - Order + Txns - UPI Intent Autopay:
```plaintext
{
   "error_message": "Bad request.",
   "status": "ERROR",
   "error_code": "Bad request.",
   "error_info": {
       "user_message": "Bad request.",
       "fields": [
           {
               "field_name": "merchant_id",
               "reason": "Field required but not passed."
           }
       ],
       "request_id": "e462d27b-efd1-4e48-8680-fe2869abc4ff",
       "href": "NA",
       "developer_message": "Failed while parsing your request.",
       "code": "MISSING_MANDATORY_PARAMETER",
       "category": "USER_ERROR"
   }
}

```

#### 400 Response - Order + Txns - UPI Collect Autopay:
```plaintext
{
   "error_message": "Bad request.",
   "status": "ERROR",
   "error_code": "Bad request.",
   "error_info": {
       "user_message": "Bad request.",
       "fields": [
           {
               "field_name": "merchant_id",
               "reason": "Field required but not passed."
           }
       ],
       "request_id": "e462d27b-efd1-4e48-8680-fe2869abc4ff",
       "href": "NA",
       "developer_message": "Failed while parsing your request.",
       "code": "MISSING_MANDATORY_PARAMETER",
       "category": "USER_ERROR"
   }
}


```

#### 400 Response - Order + Txns UPI QR Autopay:
```plaintext
{
   "error_message": "Start date passed is invalid",
   "status": "ERROR",
   "error_code": "INVALID_START_DATE",
   "error_info": {
       "user_message": "INVALID_START_DATE",
       "fields": [
           {
               "field_name": "mandate.start_date",
               "reason": "Invalid Value"
           }
       ],
       "request_id": "990c9426-5845-482d-b915-bc5ed201e3ab",
       "href": "NA",
       "developer_message": "Start date passed is invalid",
       "code": "INVALID_INPUT",
       "category": "USER_ERROR"
   },
   "status_id": -1
}

```

#### 400 Response - Order + UPI Intent TPV:
```plaintext
{
   "error_message": "Can't find a suitable gateway to process the transaction",
   "status": "Bad Request",
   "error_code": "invalid_request_error",
   "error_info": {
       "user_message": "Gateway not found to process the transaction request.",
       "request_id": "5838122d-fad2-4569-82e4-d03ca5913430",
       "href": "NA",
       "developer_message": "No functional gateways after filtering for validationType TPV",
       "code": "GATEWAY_NOT_FOUND",
       "category": "CONFIG_ERROR"
   }
}

```

#### 400 Response - Order + UPI Collect TPV:
```plaintext
{
   "error_message": "Bad request.",
   "status": "ERROR",
   "error_code": "Bad request.",
   "error_info": {
       "user_message": "Bad request.",
       "fields": [
           {
               "field_name": "merchant_id",
               "reason": "Field required but not passed."
           }
       ],
       "request_id": "e462d27b-efd1-4e48-8680-fe2869abc4ff",
       "href": "NA",
       "developer_message": "Failed while parsing your request.",
       "code": "MISSING_MANDATORY_PARAMETER",
       "category": "USER_ERROR"
   }
}


```

#### 200 Response - Order+Txns QR TPV:
```plaintext
{
    "payment": {
        "sdk_params": {
            "tr": "Sir04r8m32MmfE",
            "merchant_vpa": "irctc167525.rzp@rxairtel",
            "customer_last_name": "",
            "mcc": "4112",
            "merchant_name": "Autope",
            "pgIntentUrl": "upi://pay?am=10.00&cu=INR&mc=4112&mode=04&pa=irctc167525.rzp@rxairtel&pn=Autope&tn=IRCTCAutoPe&tr=Sir04r8m32MmfE",
            "currency": "INR",
            "amount": "10.00",
            "customer_first_name": ""
        },
        "authentication": {
            "method": "GET",
            "url": "https://api.juspay.in/v2/pay/start/paypal-juspay/mozkwHXtTUbMPtVJJNf?cardIssuerBankName%3DUPI_QR%26cardType%3DUPI%26paymentMethod%3DUPI_QR%26paymentMethodType%3DUPI"
        }
    },
    "status": "PENDING_VBV",
    "txn_uuid": "mozkwHXtTUbMPtVJJNf",
    "offer_details": {
        "offers": []
    },
    "order_id": "1777366435",
    "txn_id": "paypal-juspay-1777366435-1"
}
```

## Body Parameters:
### Basic Parameters:

#### order.order_id:
- Description: Unique Identifier for the order. Should be Alphanumeric with character length less than 21.

Example:-order-id-9876580
- Value: value
- Tags: String, Required

#### order.amount:
- Description: Amount that the customer has to pay. Will accept stringified double or integer values with upto two decimal places. For example, "100.15" and "100" are valid input but "100.1532" is not valid.
- Tags: Double, Required

#### order.customer_id:
- Description: It is the ID with which merchant refers to a customer object. This id is used to access the stored payment methods, allow EMI transactions and setup subscriptions.In case of guest login it should be an empty string.

Example:-customer-id-007
- Tags: String

#### order.customer_email:
- Description: Email address of the customer. If the backend gateway requires it, then you must send this value.

Example:-[test@gmail.com](mailto:test@gmail.com)
- Tags: String

#### order.customer_phone:
- Description: Mobile number or fixed line number of the customer. If the backend gateway requires it, then you must send this value.

Example:-

9999999912
- Tags: String

#### order.currency:
- Description: ISO string of the currency. Use INR for Indian Rupee. Among other accepted values are EUR, USD, GBP. Default value: INR
- Tags: String

#### order.return_url:
- Description: A fully qualified URL which the customer will be redirected after payment completion. It is also required to provide the control back to SDK after the completion of transaction. This URL shouldn't contain any query parameters or Ip address. This URL takes higher precedence over the common return URL configured in your account settings.

Example:-[https://shop.merchant.com](https://shop.merchant.com)
- Tags: String

#### merchant_id:
- Description: ID of the merchant_account that you hold with us.
- Tags: String, Required

#### payment_method_type:
- Description: Depending on type of payment to be processed.
- Value:  CARD, NB, UPI
- Tags: String, Required

#### payment_method:
- Description: One of VISA/MASTERCARD/MAESTRO/AMEX/RUPAY. This is usually inferred from the card number itself and we will take care of this if you are unable to provide this from your end.
- Tags: String

#### card_token:
- Description: A valid card token obtained using /card/list API. If you send this parameter, then card_number, name_on_card, card_exp_year, card_exp_month fields are not required. If the token is generated using the /card/tokenize API, card_number, name_on_card, card_exp_year, card_exp_month and card_security_code fields are not required.
- Tags: String, Required

#### card_number:
- Description: A valid credit/debit card number
- Tags: String, Required

#### name_on_card:
- Description: Card holder name. Should contain alphabetical characters only.
- Tags: String

#### card_exp_year:
- Description: Represent the expiry year of the card as YY (two digits only)
- Tags: String, Required

#### card_exp_month:
- Description: Represent the expiry month of the card as MM (two digits only)
- Tags: String, Required

#### card_security_code:
- Description: CVV of the card. Usually three digits. Optional for all VISA saved cards, SODEXO saved cards, and saved cards of select issuing banks of MASTERCARD
- Tags: String, Required

#### save_to_locker:
- Description: This is a boolean variable and accepts true/false. If set to true, then the card will be saved in locker when the transaction is successful. Else, the card will not be saved. Only applicable for international cards.
- Tags: Boolean, Required

#### tokenize:
- Description: This is a boolean variable and accepts true/false. If set to true, then the card will be tokenised when the transaction is successful. Only applicable for domestic cards
- Tags: Boolean, Required

#### redirect_after_payment:
- Description: This is a boolean variable and accepts true/false. We recommend that you set this to true and use the redirection flow. If set to true, then the user is redirected to the return_url configured for the order. If set to false, then the user will be stopped at the response page from the gateway. Your client should be able to read the page/title to infer that the user has completed the transaction.
- Tags: Boolean, Required

#### format:
- Description: If it is set to json, then the response will be HTTP 200 with a JSON formatted text. Otherwise, the response is HTTP 302 with the Location attribute having the destination URL.
- Tags: String, Required

#### order.metadata.auto_refund_post_success:
- Description: Set it to true if you want to auto initiate refunds once the transaction is successful. For example, if you are doing refundable penny drop transactions for authentication/tokenization
- Tags: String, Required

#### sdk_params:
- Description: This is default parameter required.
- Tags: String, Required

#### upi_app:
- Description: Package name of the UPI app used by customer to make a payment
- Tags: String, Required

#### upi_vpa:
- Description: Virtual Payment Address of the customer. Required for UPI Collect and TPV Collect.
- Tags: String, Required

#### txn_type:
- Description: Type of UPI transaction (e.g., UPI_COLLECT, UPI_PAY). Needed in UPI Collect and Intent Mandate flows.
- Tags: String, Required
### UPI Mandate Parameters:

#### should_create_mandate:
- Description: Set to "`true`" to create mandate during transaction.
- Value: value
- Tags: Boolean, Required

#### mandate_type:
- Description: Type of mandate (e.g.,`EMANDATE`). Required when registering mandates.
- Value:   EMANDATE
- Tags: String, Required

#### order.options.create_mandate:
- Description: `REQUIRED` / `OPTIONAL`. Indicates if mandate creation must be enforced.
- Tags: String, Required

#### order.mandate.max_amount:
- Description: Maximum allowable debit under mandate.
- Tags: String, Required

#### order.mandate.amount_rule:
- Description: `FIXED` or `VARIABLE`  defines how the amount is treated under the mandate.
- Tags: String, Optional

#### order.mandate.frequency:
- Description: Frequency of mandate debit (e.g., `MONTHLY`, `ASPRESENTED`).
- Value:  MONTHLY, ASPRESENTED
- Tags: String, Optional

#### order.mandate.start_date:
- Description: Timestamp when mandate becomes active.
- Tags: Timestamp, Optional

#### order.mandate.end_date:
- Description: Timestamp when mandate ends.
- Tags: Timestamp, Optional

#### order.mandate.rule_value:
- Description: > **Note**
> **Value representing execution interval based on frequency:** 
> 
> * **WEEKLY** : `1`to `7`
>   
>   * Where`1`represents Monday and`7`represents Sunday
> * **FORTNIGHTLY** : 1 to 16
>   
>   * **First half of the month:**  Execution days range from`1`to `15`.
>   * **Second half of the month:**  Starting from the 16th, execution days range from 1 to the end of the month.
> * **MONTHLY** , **BIMONTHLY** , **QUARTERLY** , **HALFYEARLY** , **YEARLY** : `1`to `31`
> * **Not required**  for `ONETIME`, `DAILY`, or `ASPRESENTED`
> * **Gateway-specific behavior** :
>   
>   * **Razorpay** : `rule_value` considered is the **last day**  of the week/month/year
>   * **Paytm** : `rule_value` considered is **today’s date/day**


- Tags: String, Optional

#### order.mandate.rule_type:
- Description: Rule to trigger recurring debit (ON, BEFORE, AFTER).
- Tags: String, Optional

#### order.mandate.revokable_by_customer:
- Description: If true, mandate can be revoked by the customer.
- Tags: Boolean, Optional

#### order.mandate.block_funds:
- Description: If true, blocks funds during mandate creation.
- Tags: Boolean, Optional

#### order.metadata.JUSPAY:gateway_reference_id:
- Description: Juspay's internal gateway reference.
- Tags: String, Optional

#### order.metadata.bank_account_details:
- Description: Required for TPV flows. Contains account no, IFSC, Juspay bank code.
- Tags: Array, Conditional

#### order.order_type:
- Description: Set to TPV_PAYMENT to enable TPV validation.
- Tags: String, Optional

#### is_emi:
- Description: Default is false. Set it to true if the user wishes to perform an EMI transaction on the given card.
- Tags: Boolean

#### emi_bank:
- Description: Represents the bank that issued the cardless EMI. Value must be one of the entries mentioned under EMI Bank in the support matrix below.Bank code can be referred [here](https://docs.juspay.in/emi/docs/emi/emi-bank-details).
- Tags: String

#### emi_tenure:
- Description: The tenure of the EMI in number of months.
- Tags: Integer

#### emi_type:
- Description: The type of EMI ie STANDARD_EMI
- Tags: String
## API Responses:
### 200:

#### order_id:
- Description: :order_id
- Tags: String

#### txn_id:
- Tags: String, Mandatory

#### status:
- Description: PENDING_VBV
- Tags: String

#### payment:
- Value:
  - **Authentication.method**:
    - Tags: String
  - **Authentication.url**:
    - Tags: String
  - **Sdk_params**:
    - Value:
      - **Tr**:
        - Tags: String
      - **Tid**:
        - Tags: String
      - **Merchant_vpa**:
        - Tags: String
      - **Merchant_name**:
        - Tags: String
      - **Mcc**:
        - Tags: String
      - **Amount**:
        - Tags: String
    - Tags: object
- Tags: Object

#### txn_uuid:
- Description: :txn_uuid
- Tags: String

#### offer_details:
- Value:
  - **Offers**:
    - Description: Offer ID’s passed in transaction
    - Tags: Array of Strings
- Tags: Object
### 400:

#### status:
- Description: error
- Tags: String

#### error_message:
- Description: invalid_card_number
- Tags: String, Mandatory

#### error_code:
- Description: invalid_request
- Tags: String, Mandatory



## API Latency Guidelines




#### **What is API Latency?** 



Time taken by the server to respond to the API request.


#### **Average API Percentile Metrics and Recommended Timeout** 



* **TP50 (s)** : This represents the median latency, meaning 50% of all requests are completed in this time or less. It indicates the typical performance experienced by the majority of users.
* **TP90 (s)** : This value shows that 90% of requests are completed within this time, leaving 10% of requests that take longer. It gives insight into the performance for a broader set of users, beyond the median.
* **TP99 (s)** : This value indicates that 99% of requests finish within this time, with only 1% of requests taking longer. It helps identify outlier cases where latency may become an issue for a small group of users.
* **TP99.9 (s)** : This metric captures extreme latency outliers, where only 0.1% of requests take longer than this value. It's useful for understanding edge cases where performance degrades for very few users.
* **TP99.99 (s)** : This measures the most rare and severe performance outliers, where just 0.01% of requests exceed this time. Monitoring this helps in addressing the rarest and most critical latency issues that may impact user experience in exceptional scenarios.
  
  
  |  Transaction Percentile |  Latency (s) |
  |---|---|
  |  TP50 (s)em | 0.0198 |
  |  TP90 (s) | 0.290 |
  |  TP99 (s) | 0.429 |
  |  TP99.9 (s) | 0.429 |
  | Recommended Timeout | 1 |

---

## See Also

- [Transaction ID based and Instant refund](https://juspay.io/in/docs/api-reference/docs/express-checkout/transaction-id-based-and-instant-refund)
- [Create MOTO Order with Payments](https://juspay.io/in/docs/api-reference/docs/express-checkout/create-moto-order-with-payments)
