---
page_title: Create Wallet
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/express-checkout/create-wallet
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fexpress-checkout%2Fcreate-wallet
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 Wallet



Wallet account can be created only for an existing customer. Please use `POST /customers` API to create customer objects as needed.

Creating the wallet with `command=authenticate` parameter will trigger an OTP which will be used for linking the wallet thereby enabling direct debit authorization. You also have the option of deferring the authentication to a later point of time by omitting the `command=authenticate` parameter. In case you decide to defer it, Please use the `authenticate` and `link` API to authenticate and link the wallet. ## Endpoints:
- Sandbox: https://sandbox.juspay.in/customers/{customer_id}/wallets

- Production: https://api.juspay.in/customers/{customer_id}/wallets

## Request Type: 
POST

## Authorization:

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

* Username: API Key obtained from Juspay dashboard
* Password: Empty string
- Value:    <p>Example:- <br> Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==</p>
- Tags: Base64 Encoded Username:Password, Mandatory
## 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 -X POST https://api.juspay.in/customers/$customer_id/wallets \
-u your_api_key: \
-H 'x-routing-id: customer_1122'\
-d "gateway=MOBIKWIK" \
-d "command=authenticate"

```

### Sample Response:

#### With Mobile Number:
```json
{
  "id": "wlt_yvuidaocnaupkvz3",
  "object": "wallet_account",
  "wallet": "MOBIKWIK",
  "token": null,
  "current_balance": null,
  "linked": false,
  "last_refreshed": null,
  "metadata": {
    "mobile_number": "9999999999"
  },
  "gateway_reference_id": null
}
```

#### Response:
```json
{
  "id": "wlt_q23xzki3pazgtezo",
  "object": "wallet_account",
  "wallet": "MOBIKWIK",
  "token": null,
  "current_balance": null,
  "linked": false,
  "last_refreshed": null
}
```

## Path Parameters:

#### customer_id:
Customer Id
- Value: Example:- cust387465
- Tags: String, Mandatory
## Body Parameters:
### Parameters:

#### gateway:
- Description: Name of the gateway supplying the wallet.
- Tags: string, Required

#### command:
- Description: Send it as `authenticate` if you want to start the authentication/linking process as soon as the wallet gets created.
- Tags: string

#### mobile_number:
- Description: Mobile number against which wallet has to be linked. The param can be used if the customer wants to link a different number than the one registered at merchant.
- Tags: string

#### gateway_reference_id:
- Description: Required in case of multiple MID setup
- Tags: string

#### client_auth_token:
- Description: Required for client side authentication
- Tags: string
## API Responses:
### 200:

#### id:
- Description: wlt_q23xzki3pazgtezo
- Tags: string

#### object:
- Description: wallet_account
- Tags: string

#### wallet:
- Description: MOBIKWIK
- Tags: string

#### token:

#### current_balance:

#### linked:
- Tags: boolean

#### last_refreshed:

#### metadata.mobile_number:
- Tags: String

#### gateway_reference_id:
- Tags: String
### 400:

#### object:
- Description: {}
- Tags: object


---

## See Also

- [List Wallets](https://juspay.io/in/docs/api-reference/docs/express-checkout/list-wallets)
- [Authenticate](https://juspay.io/in/docs/api-reference/docs/express-checkout/authenticate)
