Create a new wallet

Creates a new wallet with the provided friendly name. The currency selected for the wallet is based on the incorporation country of the merchant account.

HTTP Request

POST /walletaccounts/v1/wallets

Authorization

Roles: Merchant

Request body

Content-Type: application/json

{
    "friendlyName": "string"
}

Response

{
    "iban": "string",
    "walletId": "int",
    "amount": "number",
    "isPrimary": "bool",
    "created": "datetime",
    "swiftCode": "string",
    "available": "number",
    "branchCode": "string",
    "hasIssuedCard": "bool",
    "currencyCode": "string",
    "friendlyName": "string?"
}

Example

let access_token = '';
let data = {
    "friendlyName": "Expenses - 2018"
};
let host = "https://uat-api.vivapayments.com";

fetch(`${host}/walletaccounts/v1/wallets`, {
    method: "POST",
    headers: {
        "Authorization": `Bearer ${access_token}`,
        "Content-Type": "application/json; charset=utf-8"
    },
    body: JSON.stringify(data),
});