---
page_source: https://docs.juspay.io/paytm-gateway-configuration/docs/express-checkout/link-wallet
page_title: Link Wallet
---

## API Version: default


# Link Wallet



Completes the authentication and linking process of the wallet with the customer account. OTP received from the `authenticate` API call is forwarded to Juspay using this API for linking the wallet. On successful verification of the OTP, the wallet is linked with the customer object. If failed, then `linked` attribute will remain to be `false`.

Returns the wallet object. ## Endpoints:
- Production: https://api.juspay.in/wallets/{wallet_id}

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

#### Request Code Snippet:

```request
curl -X POST https://api.juspay.in/wallets/$wallet_id \
-u your_api_key: \
-d "command=link"
-d "otp=345678"
```

### Sample Response:

#### Response:
```json
{
  "id": "wlt_q23xzki3pazgtezo",
  "object": "wallet_account",
  "wallet": "MOBIKWIK",
  "token": "tok_winysteev9eftrwcv6me",
  "current_balance": 250,
  "linked": true,
  "last_refreshed": "2016-08-01T08:07:52+0000"
}
```

#### Response - Wallet Linking Error:
```plaintext
{
  "error_message": "OTP is required while linking wallet.",
  "status": "Invalid Request",
  "error_code": "Invalid"
}

```

## Body Parameters:
### Parameters:

#### command:
- Description: Send it as `link` if you want to complete the authentication/linking process.
- Tags: string, Required

#### otp:
- Description: OTP sent by the provider to the customer’s registered mobile number.
- Tags: string
## API Responses:
### 200:

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

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

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

#### token:
- Description: tok_winysteev9eftrwcv6me
- Tags: string

#### current_balance:
- Tags: integer

#### linked:
- Tags: boolean

#### last_refreshed:
- Description: 2016-08-01T08:07:52+0000
- Tags: string
### 400:

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