Skip to content
WhatsMarketingDeveloper Hub

Wallet

Your organization's balance and transactions. Read-only through the API: you top up in the panel. It needs the wallet:read permission.

Get the balance

GET/wallet

Balance, currency, whether it is low and an estimate of how long it lasts at the current pace. Needs wallet:read.

Scopes: wallet:read

curl
curl "https://micuenta.whatsmarketing.es/api/v1/wallet" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/wallet', {
  headers: {
    Authorization: `Bearer ${process.env.WM_API_KEY}`,
  },
});
const data = await res.json();
Python
import os, requests

r = requests.get(
    "https://micuenta.whatsmarketing.es/api/v1/wallet",
    headers={"Authorization": f"Bearer {os.environ['WM_API_KEY']}"},
    timeout=30,
)
r.raise_for_status()
data = r.json()
PHP
<?php
$ch = curl_init('https://micuenta.whatsmarketing.es/api/v1/wallet');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);

No response example yet.

List transactions

GET/wallet/transactions

Top-ups, consumption, refunds and adjustments, with filters by type (type), period or dates (from, to) and free search (q). Needs wallet:read.

Scopes: wallet:read

Parameters

NameWhereTypeValues
pagequerynumberdefault: 1 · 1 – …
pageSizequerynumberdefault: 20 · 1 – 100
typequerystringTOPUP · CONSUMPTION · REFUND · ADJUSTMENT · TOPUP_REVERSAL
periodquerystringmonth · 30 · 90 · last_month
fromquerystring
toquerystring
qquerystring0–120 characters
curl
curl "https://micuenta.whatsmarketing.es/api/v1/wallet/transactions?page=1&pageSize=20" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/wallet/transactions?page=1&pageSize=20', {
  headers: {
    Authorization: `Bearer ${process.env.WM_API_KEY}`,
  },
});
const data = await res.json();
Python
import os, requests

r = requests.get(
    "https://micuenta.whatsmarketing.es/api/v1/wallet/transactions?page=1&pageSize=20",
    headers={"Authorization": f"Bearer {os.environ['WM_API_KEY']}"},
    timeout=30,
)
r.raise_for_status()
data = r.json()
PHP
<?php
$ch = curl_init('https://micuenta.whatsmarketing.es/api/v1/wallet/transactions?page=1&pageSize=20');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);

No response example yet.