🛰️
xPay.Stream
  • 📡xPay.Stream
  • 📌Prerequisites
  • Authentication API
  • Wallets
    • Create Wallet
    • Update Wallet
    • Get Wallet Info
    • Search Wallets
  • Billing
    • Create Bill
    • Cancel Bill
    • Get Bill Info
    • Search Bills
  • Transactions
    • 〰️Preview Transaction
    • ✔️Broadcast Transaction
    • 🔎Search Transactions
  • Notifications
    • Webhook
    • Email Alerts
Powered by GitBook
On this page
  1. Wallets

Update Wallet

You can update an existing wallet's tag

PreviousCreate WalletNextGet Wallet Info

Last updated 9 months ago

API Endpoint

POST


Request Headers:

Authorization: Bearer

Content-Type: application/json Request Body:

{
    "wallet":"<existing_wallet_uuid>",
    "tag" : "<your_new_tag>"
}

Success Response

{
    "success": {
        "message": "Wallet Saved",
        "data": {
            "uuid": "<wallet_uuid>",
            "tag": "<your_new_tag>"
        }
    },
    "uuid": "597edb5b-9e6a-4cd2-a5c5-9cce5d0a2efb"
}

curl 'https://apis.xpay.stream/client/wallets/save'    \
  -H 'Content-Type: application/json'                  \
  -H 'Authorization: Bearer <access_token>'            \
  --data-raw '{"wallet":"<uuid>","tag":"<tag>"}'              
// npm i cross-fetch
const fetch = require("cross-fetch");

const API_URL = "https://apis.xpay.stream/client/wallets/save";

const method = "POST";

const headers = { 
    "Content-Type": "application/json",
    "Authorization": "Bearer <access_token>"
};

const body = JSON.stringify({
    wallet: "<existing_wallet_uuid>", 
    tag: "<your_tag>"
});

fetch(API_URL, { headers, body, method })
.then(async res =>  await res.json())
.then(result => {
    if(result.error)
        console.log("Wallet Update Error", result);
    if(result.success)
        console.log("Wallet Updated", result);
})
.catch((err) => {
    console.error("Wallet Update API Exception", err);
});

/client/wallets/save
<access_token>