Ad Budget Replenishment

Introduction

Running ads on Meta, Google, TikTok, and other platforms requires rapid budget top-ups to keep campaigns running without interruption. This use case is targeted towards digital businesses — e-commerce, gaming, apps, and content platforms — that need to ensure ad accounts and operational budgets are always funded.
For example, a mobile gaming company running user acquisition campaigns across Meta, Google, and TikTok needs to ensure that when an ad account balance drops, funds are automatically moved from available balances to keep campaigns live.

Example

Let's say you are a digital business running advertising campaigns on Meta, Google, and TikTok across multiple markets. Your ad spend fluctuates daily, and a single unfunded ad account can stall an entire market's growth campaign. You need a system that detects low balances and moves funds instantly — without manual intervention.
The high-level user journey looks like the following:
  1. You receive a balances.CHANGED webhook alerting that your Meta ad account balance has dropped below a threshold.
  2. You query all available balances to find the best funding source using Query Account Balance
    API
    .
  3. You initiate a transfer with automatic FX conversion using Create a Payout
    API
    .
  4. You confirm fund arrival via another balances.CHANGED webhook.

Building it with WorldFirst

Detecting low balances via webhooks
Set up webhook subscriptions for
balances.CHANGED
events. When your ad account balance drops below a defined threshold, your system receives an instant notification with the account ID, previous balance, and new balance. This eliminates the need for polling and enables real-time response.
Finding the best funding source
Call Query Account Balance
API
across all accounts and currencies to identify which accounts have surplus funds. Consider the FX cost of converting between currencies — sometimes a slightly lower balance in the target currency is more cost-effective than converting from a larger balance in another currency.
Transferring funds with auto-FX
Call Create a Payout
API
with the source account, target account, and amount. If the source and target currencies differ, the transfer automatically includes FX conversion at a competitive rate. For RTP-supported currencies, the transfer completes instantly.
Confirming arrival via webhooks
Once the transfer completes and funds arrive in the ad account, another balances.CHANGED webhook confirms the credit. Your system can then verify the new balance and resume any paused campaigns automatically.