Skip to main content

Select Wallet

Select a specific wallet for your delivery partner account. This wallet will be used for all transactions and balance checks.

Endpoint

PATCH /v1/delivery-partners/{dpID}/wallet/select

Headers

HeaderTypeDescriptionRequired
x-client-idStringYour clientID✅ Yes
x-client-secretStringYour clientSecret✅ Yes
Content-TypeStringapplication/json✅ Yes

Path Parameters

ParameterTypeDescriptionRequired
dpIDStringYour delivery partner ID✅ Yes

Request Body

FieldTypeDescriptionRequired
walletIDStringID of wallet to select✅ Yes

Example Request

curl --location --request PATCH 'https://stage-platform-exlr8.exlr8now.com/v1/delivery-partners/YOUR_DP_ID/wallet/select' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-client-secret: YOUR_CLIENT_SECRET' \
--header 'Content-Type: application/json' \
--data '{
"walletID": "YOUR_WALLET_ID"
}'

Response

Successful Response

{
"dpVendorID": "daa30819-8150-4490-b20f-65b75cb148ba",
"dpName": "Demo Intl Test Dp",
"businessName": "Demo Intl Test Dp",
"gstNumber": "",
"panNumber": "",
"dpType": "B2B",
"dpStatus": "Active",
"registeredOfficeAddress": "",
"registeredState": "Karnataka",
"registeredPincode": "560036",
"correspondenceAddress": "",
"correspondenceState": "",
"correspondencePincode": "",
"country": "IN",
"accountName": "",
"accountNumber": "",
"bankName": "",
"branchAddress": "",
"ifscCode": "",
"businessHeadName": "",
"businessHeadEmail": "",
"businessHeadPhone": "",
"pocName": "Demo Intl Test Dp",
"pocEmail": "[email protected]",
"pocPhone": "",
"escalationPocName": "",
"escalationPocEmail": "",
"escalationPocPhone": "",
"isSubDpManagementAllowed": true,
"sendNewIDPassword": true,
"dpDepth": 0,
"dpAncestryChain": null,
"parentDpID": "",
"selectedCreditLineID": "",
"selectedWalletID": "dee25d63-b110-48ee-9140-e9bf1649a06b",
"applicableCurrencies": ["INR", "USD", "SGD", "AED"],
"dbsVirtualPrivateBankAccountNumber": "",
"createdAt": "2025-09-09T07:53:08.681Z",
"updatedAt": "2025-12-09T08:31:13.37Z",
"selectedWallet": {
"walletID": "dee25d63-b110-48ee-9140-e9bf1649a06b",
"currency": "INR",
"balance": 12498908.2263
}
}

Response Fields

Delivery Partner Information

FieldTypeDescription
dpVendorIDStringUnique DP vendor identifier
dpNameStringDP name
businessNameStringBusiness name
gstNumberStringGST number
panNumberStringPAN number
dpTypeStringDP type (B2B/B2C)
dpStatusStringDP status
registeredOfficeAddressStringRegistered office address
registeredStateStringRegistered state
registeredPincodeStringRegistered pincode
correspondenceAddressStringCorrespondence address
correspondenceStateStringCorrespondence state
correspondencePincodeStringCorrespondence pincode
countryStringCountry code
accountNameStringBank account name
accountNumberStringBank account number
bankNameStringBank name
branchAddressStringBank branch address
ifscCodeStringIFSC code
businessHeadNameStringBusiness head name
businessHeadEmailStringBusiness head email
businessHeadPhoneStringBusiness head phone
pocNameStringPOC name
pocEmailStringPOC email
pocPhoneStringPOC phone
escalationPocNameStringEscalation POC name
escalationPocEmailStringEscalation POC email
escalationPocPhoneStringEscalation POC phone
isSubDpManagementAllowedBooleanSub-DP management allowed
sendNewIDPasswordBooleanSend new ID/password
dpDepthNumberDP depth in hierarchy
dpAncestryChainArrayDP ancestry chain
parentDpIDStringParent DP ID
selectedCreditLineIDStringSelected credit line ID
selectedWalletIDStringSelected wallet ID
applicableCurrenciesArrayApplicable currencies
dbsVirtualPrivateBankAccountNumberStringDBS virtual bank account number
createdAtStringCreation timestamp
updatedAtStringLast update timestamp
selectedWalletObjectSelected wallet details

Selected Wallet Fields

FieldTypeDescription
walletIDStringWallet identifier
currencyStringWallet currency
balanceNumberCurrent balance

Error Responses

Wallet Not Found

{
"error": "wallet not found",
"errCode": "RECORD_NOT_FOUND"
}

Invalid Wallet ID

{
"error": "invalid wallet ID",
"errCode": "INVALID_REQUEST"
}

Use Cases

1. Currency Selection

Select a wallet in a specific currency for transactions.

2. Balance Management

Switch to a wallet with sufficient balance for orders.

3. Multi-Currency Support

Handle different currencies by selecting appropriate wallets.

Integration Example

// Example: Select a wallet
async function selectWallet(dpID, walletID) {
try {
const response = await fetch(
`${baseUrl}/delivery-partners/${dpID}/wallet/select`,
{
method: "PATCH",
headers: {
"x-client-id": clientId,
"x-client-secret": clientSecret,
"Content-Type": "application/json",
},
body: JSON.stringify({
walletID: walletID,
}),
}
);

if (!response.ok) {
const error = await response.json();
throw new Error(`API Error: ${error.error}`);
}

const result = await response.json();
console.log("Wallet selected:", result.selectedWallet);
return result;
} catch (error) {
console.error("Error selecting wallet:", error);
throw error;
}
}

Best Practices

  1. Validate Wallet ID: Ensure the wallet ID exists before selecting
  2. Check Balance: Verify sufficient balance in the selected wallet
  3. Error Handling: Handle cases where wallet selection fails
  4. Logging: Log wallet selection for audit trails