Wallet

Create a client wallet

Changed on

This POST endpoint creates a new wallet for your own client account, in the requested currency. <br> To use this endpoint, you need to provide the currency_code as a JSON parameter in the Request Body. It must be an ISO 4217 currency code, such as USD, EUR or MXN. <br> A client can hold at most one wallet per currency, so the operation is idempotent: if you already have a wallet in the requested currency, that existing wallet is returned unchanged with a 200 status code instead of 201, and its balance reflects the current balance. <br> Newly created wallets start with a zero balance and can be funded through top-ups, pay-ins or wallet transfers. Client wallets are listed by the GET operation on /payout/account/balance. <br> A client wallet in a currency you have not funded payouts from before may need to be linked to a liquidity provider by MassPay before it can fund payouts; contact your account manager after creating one.

post/wallet

Request

Headers

Idempotency-Keystring

Unique key to prevent duplicate processing

Request body

currency_codestring required

Currency the wallet is denominated in, using the ISO 4217 format. Case-insensitive.

Example request

{
  "currency_code": "EUR"
}

Response

You already have a wallet in the requested currency; the existing wallet is returned and nothing is created.

tokenstring required

Prefixed wallet identifier. User wallets use the usr_wlt_ prefix and client wallets use the clnt_wlt_ prefix.

type'USER_FUNDS' | 'CLIENT_FUNDS' required

Type of wallet: USER_FUNDS when created for a user, CLIENT_FUNDS when created for the client account.

user_tokenstring

Token representing the user who owns the wallet. Present only for USER_FUNDS wallets.

currency_codestring required

Currency the wallet balance is stored in, using the ISO 4217 format.

balancenumber required

The wallet's current balance in currency_code. Zero for a newly created wallet.

activeboolean required

An indicator whether the wallet is active.

client_paying_feesboolean required

An indicator whether the fees for payouts using this wallet are paid by a client wallet. If false, the user pays the fees. Always false for CLIENT_FUNDS wallets.

fee_wallet_tokenstring

Token of your client wallet that pays the fees for payouts using this wallet. Present only when client_paying_fees is true and the fee-paying wallet belongs to the authenticated client.

Example response

{
  "token": "usr_wlt_9e5a349e-8d10-4a0b-9d8f-6b3f2a1c4d7e",
  "type": "USER_FUNDS",
  "user_token": "usr_59a9ccce-0280-4207-9200-891c9109915c",
  "currency_code": "MXN",
  "active": true,
  "client_paying_fees": true,
  "fee_wallet_token": "clnt_wlt_ba4275f2-bae1-488d-9d6f-20af1cd83574"
}

Changes