juspay_expresscheckout v0.1.0 Juspay.Wallets

Represents a wallet account that belongs to a customer.

SECURITY

Wallet account is valid only when your wallet provider has granted you permission for POWER WALLET flow. A pre-authenticated or a linked wallet account will have an associated token with it. Such a token is assigned by JusPay and to directly debit from the wallet, you must send this token.

However, to ensure better security JusPay will expire a token within 10 minutes of issuance (issued when you call /wallets list API). Also a token is valid only for single use.

Summary

Functions

Wallets can be listed only in the context of a Customer. This API will return list of linked wallets for a given customer

Refresh wallet API can be used to get the wallet list with updated balance from wallets. Here we make check balance call to each of the linked wallet server and return the response

Functions

list(parameters)

Specs

list(list | map) :: map

Wallets can be listed only in the context of a Customer. This API will return list of linked wallets for a given customer.

Note:

Wallet balance in this response may not be the current balance, last_refreshed field will have the
date when last balance updated. Use refresh wallet API to get updated balance.

Examples

# input in the form of list

iex> Juspay.Wallets.list([customer_id: "guest_user"])

# input in the form of map (works with both string keyed map and atom keyed map)

iex> Juspay.Wallets.list(%{:customer_id => "guest_user"})

# response
[
  %{
    "id"  => "wlt_q23xzki3pazgtezo",
    "object"  => "wallet_account",
    "wallet"  => "MOBIKWIK",
    "token"  => "tok_winysteev9eftrwcv6me",
    "current_balance"  => "250.00",
    "last_refreshed"  => "2016-09-02T08:07:52+0000"
  },
  ...
]
refresh_balance(parameters)

Specs

refresh_balance(list | map) :: map

Refresh wallet API can be used to get the wallet list with updated balance from wallets. Here we make check balance call to each of the linked wallet server and return the response.

## Note:

 Ensure higher read timeout setup for this API call. Multiple network calls will be made in this API call and
 so the response is expected to arrive after some delay.

## Examples

 # input in the form of list

 iex> Juspay.Wallets.refresh_balance([customer_id: "guest_user"])

 # input in the form of map (works with both string keyed map and atom keyed map)

 iex> Juspay.Wallets.refresh_balance(%{:customer_id => "guest_user"})

 # response
 [
   %{
     "id"  => "wlt_q23xzki3pazgtezo",
     "object"  => "wallet_account",
     "wallet"  => "MOBIKWIK",
     "token"  => "tok_winysteev9eftrwcv6me",
     "current_balance"  => "250.00",
     "last_refreshed"  => "2016-09-02T08:07:52+0000"
   },
   ...
 ]