get https://api.juspay.in/customers//wallets#list
Wallets can be listed only in the context of a Customer. This API will return the list of wallets (in object format) which may or may not be linked. If a wallet is linked, a token is generated for it, and can be used immediately for a direct debit transaction.
If a wallet is not linked, and a direct debit is enabled by the provider for your setup, you can activate the same for customers using the Authenticate and Link APIs.
Response Parameters for the List API: (click to open table)
Parameter | Type | Description |
---|---|---|
object | String | "list" |
list: [{...},{...},..] | Array | An array of Wallet Objects (see table below) |
total | Int | Total wallets set against customer_id |
offset | Int | Offset from start (default is 0) |
count | Int | Count of wallet objects to be included in response Default is same as 'total' |
The elements returned in the list array are Wallet Objects, that provide details of each wallet of a customer. (click to open table)
Wallet Object:
Parameter | Type | Description |
---|---|---|
id | String | The unique identifier generated by Juspay for a particular wallet |
object | String | Must be "wallet_account" |
wallet | String | Name of the Wallet Provider |
token | String | One time token used to initiate a wallet transaction (expires after 15 minutes) |
current_balance | String | The balance available in the wallet as of the last refresh update. Available only for linked wallets. |
linked | boolean | If true, wallet is linked with the respective customer account. Merchant can then use the given token to debit directly from the wallet. |
last_refreshed | String | Represents the date & time when the balance was updated last. |
metadata:wwwwwww {param1, param2,...} | Object | Custom key-value sets can be passed here. Example: {"mobile_number": "9999999999"} |
gateway_reference_id | String | Unique string identifier for the gateway supplying the wallet. Required in case of multiple MID setup |
NOTE: For linked wallets, the balance in the response may not be the current balance. The last_refreshed field represents the date & time when the balance was updated last. Use Refresh wallet API to update the balance for individual wallets. This results in a network call to the wallet provider and hence the response might be slow.