---
page_source: https://juspay.io/in/docs/ec-api/docs/base-integration/consumer-finance-payment
page_title: Consumer Finance Payment
---

## API Version: default


# Consumer Finance Payment



Create a transaction for paying from a consumer finance application.Once you have the response, depending on the “method” attribute, you will have to take the next step. If you receive GET, then take the value in the “URL” attribute and redirect the user to this location. If you receive POST, then “params” attribute will hold a map containing key-value pairs. 

**Supported Payment Methods** 


| Payment Method |
|---|
| ATOME PAYLATER |
| CAPITALFLOAT |
| EPAYLATER |
| GRABPAYPAYLATER |
| HDFC FLEXIPAY |
| ICICI PAYLATER |
| POSTPAY |
| SHOPSE |
| ZESTMONEY |
| PAYTM_POSTPAID |


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

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

## Request Type: 
POST

## Headers:

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

#### 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:
### Sample Request:

#### Request Code Snippet:

```request
curl --location 'https://sandbox.juspay.in/txns' \
--header 'Accept: application/json' \
--header 'Authorization: Basic NEVCNDCOEI0xxxxxxQxMTQ3QkY2Og==' \
--form 'order_id="aditya_kale"' \
--form 'merchant_id="abc"' \
--form 'payment_method_type="CONSUMER_FINANCE"' \
--form 'payment_method="SHOPSE"' \
--form 'redirect_after_payment="true"' \
--form 'format="json"'
```

### Sample Response:

#### Response:
```json
{
  "txn_uuid": "eultUYSbJA5NEbJBD",
  "txn_id": "Test-Order1619519941-1",
  "status": "PENDING_VBV",
  "payment": {
    "authentication": {
      "url": "https://api.juspay.in/v2/pay/start/Test/eultUYSxxxxNEbJBD",
      "method": "GET"
    }
  },
  "order_id": "Order1619519941"
}
```

## Body Parameters:
### Parameters:

#### order_id:
- Description: Id pertaining to the order for which the payment is started.
- Tags: string, Mandatory

#### merchant_id:
- Description: The username associated with Juspay
- Tags: string, Mandatory

#### payment_method_type:
- Description: Must be CONSUMER_FINANCE
- Tags: string, Mandatory

#### payment_method:
- Description: The actual payment method that was selected by the user from the table above.
- Tags: string, Mandatory

#### redirect_after_payment:
- Description: This is a boolean variable and accepts true/false. We recommend that you set this to true. 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: string

#### 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

#### offers:
- Description: The key offers should be passed only when juspay offers are being used. The value for this key can set as the offerID which is received from /v1/offers/list api
- Tags: array of Strings
## API Responses:
### 200:

#### txn_uuid:
- Description: eultUYSbJA5NEbJBD
- Tags: string

#### txn_id:
- Description: Test-Order1619519941-1
- Tags: string

#### status:
- Description: PENDING_VBV
- Tags: string

#### payment:
- Value:
  - **Authentication.method**:
    - Tags: String
  - **Authentication.url**:
    - Tags: String
- Tags: object

#### order_id:
- Description: Order1619519941
- Tags: string
### 400:

#### status:
- Description: invalid_request_error
- Tags: string

#### error_message:
- Description: Payment method cannot be null
- Tags: string

#### error_code:
- Description: missing_payment_method
- Tags: string
