In-App Ads - Banner Ads (WebView)
For service introduction and console setup instructions, In-app ad introduction documentplease refer to.
This is an ad library that can display banner ads in WebView.
Get started
The banner ad API can be used in Toss app 5.241.0 or later.
5.241.0 or later
Supported
Banner ads available
Below 5.241.0
Not supported
Banner ad API unavailable
During development, use test ad IDs.
Banner ad - list type
ait-ad-test-banner-id
Banner ad - feed type
ait-ad-test-native-image-id
API reference
Overview
TossAds.initialize
Initializes the banner ad SDK. It must be called once before displaying ads.
TossAds.attachBanner
Attaches a banner ad to a specific DOM element. Style presets (theme, tone, variant) are applied, and the returned object's destroy() method can be used to remove the banner.
TossAds.destroyAll
Removes all initialized banner slots.
Each API isSupported() property lets you check whether the feature is available in the current environment.
Event flow
Initializing the banner ad SDK (initialize)
Initializes the banner ad SDK. The initialization process runs asynchronously, and completion is delivered via a callback. You must initialize it once before using ads, and it is recommended to call it only once in the app's top-level component.
Signature
Parameters
options ·
TossAdsInitializeOptionsAn options object passed when initializing the SDK. You can set callbacks for initialization success/failure.
options.callbacks ·
{ onInitialized?: () => void; onInitializationFailed?: (error: Error) => void; }An object that defines callbacks invoked during SDK initialization.
options.callbacks.onInitialized ·
() => voidCalled when SDK initialization completes successfully.
options.callbacks.onInitializationFailed ·
(error: Error) => voidCalled when SDK initialization fails. The failure reason is passed as
Errorobject.
TossAdsInitializeOptions
Properties
isSupported() => boolean
In the current runtime environment
TossAds.initializeThis function checks whether the feature is available. You must check support before calling the ad SDK initialization.
Example
Banner ad attachment (attachBanner)
Attaches a banner ad to a specific DOM element. Style presets (theme, tone, variant) are applied, and the returned object's destroy() method can be used to remove the banner.
TossAds.initializeYou must initialize the SDK by calling this first before use.
Signature
Parameters
adGroupId · Required ·
stringThe ad group ID. Enter the value issued in the console.
target · Required ·
string | HTMLElementThe DOM element to attach the ad to.
HTMLElementYou can pass the object directly, or pass a CSS selector string.options ·
TossAdsAttachBannerOptionsAn options object for configuring the banner style and ad event callbacks.
options.theme ·
'auto' | 'light' | 'dark'Sets the banner theme. The default is
'auto'and it automatically switches according to the system dark mode setting.options.tone ·
'blackAndWhite' | 'grey'Sets the banner background tone. The default is
'blackAndWhite'.options.variant ·
'expanded' | 'card'Sets the banner format. The default is
'expanded'.options.callbacks ·
AttachBannerCallbacksAn object of callbacks that can receive ad lifecycle events.
options.callbacks.onAdRendered ·
(payload) => voidCalled when ad rendering is complete.
options.callbacks.onAdImpression ·
(payload) => voidCalled when the ad becomes visible to the user's screen.
options.callbacks.onAdViewable ·
(payload) => voidCalled when ad exposure is recorded and revenue is generated.
options.callbacks.onAdClicked ·
(payload) => voidCalled when the ad is clicked.
options.callbacks.onNoFill ·
(payload) => voidCalled when there are no ads to display.
options.callbacks.onAdFailedToRender ·
(payload) => voidCalled when ad rendering fails.
TossAdsAttachBannerOptions
TossAds.attachBanner This is the option type for the function.
theme
'auto' | 'light' | 'dark'
'auto'
Theme setting. autoautomatically switches according to system dark mode
tone
'blackAndWhite' | 'grey'
'blackAndWhite'
Background color tone
variant
'card' | 'expanded'
'expanded'
Banner format. cardhas left and right padding + border-radius applied
callbacks
TossAdsBannerSlotCallbacks
-
Ad event callbacks
TossAdsAttachBannerResult
TossAds.attachBanner This is the return type of the function.
destroy(): Removes the attached banner. It is recommended to call this when the component unmounts to prevent memory leaks.
TossAdsBannerSlotCallbacks
These are banner ad event callbacks.
onAdRendered: The ad has been rendered.onAdImpression: The ad has been displayed on screen.onAdViewable: Ad exposure has been recorded. (Revenue generation point)onAdClicked: The user clicked the ad.onAdFailedToRender: Ad rendering failed.onNoFill: There are no ads to display.
TossAdsBannerSlotEventPayload
Banner ad event payload.
slotId: Generated slot IDadGroupId: Ad group IDadMetadata: Ad metadata (creativeId, requestId)
TossAdsBannerSlotErrorPayload
Banner ad error payload.
Return value
TossAdsAttachBannerResult Returns an object. You can remove the banner by calling the destroy() method.
Properties
isSupported() => boolean
In the current runtime environment
TossAds.attachBannerThis function checks whether the feature is available. You must check support before attaching a banner ad.
Example
Banner ad error payload.
Remove all banner slots (destroyAll)
Removes all initialized banner slots.
Signature
Properties
isSupported() => boolean
In the current runtime environment
TossAds.destroyAllThis function checks whether the feature is available. It can be used to check support before removing all banner ad instances.
Example
Usage patterns
Initialization timing
It is best to initialize the SDK only once at app start. Initialization is recommended at the following times:
When the app's top-level component (App.tsx) mounts
Before entering the first screen that will display ads
Container size settings
The ad container must be set to the correct size.
Memory management
You can prevent memory leaks by removing the banner when the component unmounts.
TossAds.attachBanneris destroy() Since it returns an object that includes the method, just call it during cleanup.
Error handling
Always onInitializationFailedand onAdFailedToRender callback to prepare for errors.
Reusable custom hook
It's convenient to separate it into a custom hook when using banner ads across multiple screens.
useTossBanner
A hook that handles SDK initialization and banner attachment together.
Example usage
Note:
useTossBannerIt is safe to call from multiple components. If already initialized, it will not attempt duplicate initialization.
Ad Policy
Toss Ads SSP Policy
Please strictly follow the policy below. Violations may restrict ad exposure.
Even if not specified in this policy, actions that artificially induce ad impressions, clicks, or performance, or mislead users, may be considered policy violations.
All partners must comply with the service termination policy if the service is terminated due to policy violations.
UI/UX degradation
Designing the UI to blur the distinction between ads and content, induce ad consumption or clicks unrelated to user intent, or interfere with normal service use
Disguising ads as "recommended services", "financial tips", etc.
Changing the color or font of ad units outside the Toss Ads guide
Arbitrarily modifying the ad title, label, CTA copy, and design
A structure that places ads adjacent to user interaction elements (buttons, gameplay areas, etc.) so that unintended clicks occur
Placing two or more ads of the same format on the same screen
A dead-end structure that makes it difficult for users to exit the screen normally or go back to the previous screen
A structure that makes it difficult for users to distinguish between the functions of the ad and the service CTA
A structure that makes it difficult to notice or access the CTA needed for normal service use
Ads must always retain the "Ad" label
All ad UIs must use web-based standard components
Prohibited to design UI/UX that artificially drives ad performance or harms the user experience
Tampering with ad call behavior
Changing or bypassing the SDK's default event flow or ad call method
Tampering with SDK Click / Impression events
Calling ads with custom logic without going through the ad SDK, or implementing them by bypassing SDK events
Blocking or abnormally controlling the Back button to prevent users from exiting the screen normally or navigating back
Prohibited to tamper with the structure of SDK default events (Click / Impression)
No external API calls outside the SDK
Abnormal traffic and performance manipulation
Distorting traffic and ad performance through automated or artificial methods
Periodically refreshing the ad area
Activities that artificially generate performance (clicks, impressions, etc.)
If abnormal patterns based on traffic quality are detected, ads may be restricted, penalized, or settlement withheld
Reward-based / engagement-based click prompting
Providing rewards or benefits at the same time as an ad click
"Rewards provided immediately after clicking the ad"
"Points provided when you click the ad"
Prohibited to directly tie ad consumption to rewards
Prohibited to use click-rewarding copy or event tie-ins
Ad hiding or overlap
Intentionally hiding ads or obscuring them with other UI elements so users cannot clearly recognize their presence
• Transparent ad
• Inserting ad DOM behind another card UI
• Ads must have a clearly verifiable visible state
UX / Product Principle operating guidelines
Ads must also follow Toss's UX principles.
Toss Principle
Application criteria
Example
Simplicity
Ads must be clear and understandable without additional explanation
Use clear CTAs such as "View now" and "View ad"
Clear Action
Users should be able to predict what action will occur after clicking the ad
Show a disclosure message when redirecting or opening a new window
No Deception (UX Red Rule)
Ads should not appear at unexpected moments, in unexpected forms, or in unexpected locations
No full-screen banner immediately upon entering the service
Value First
Ads should not interfere with the customer's service goals
No ad insertion during payment / account opening flows
Usage restrictions and sanctions
If an Apps in Toss ad placement or service violates this policy, sanctions may be applied.
Restriction procedure
Restrictions are generally applied in stages according to the accumulated degree of violations. However, depending on the type or severity of the violation, a single violation may result in an immediate 30-day suspension or permanent suspension.
※ Violations confirmed at the same time are treated as a single violation regardless of the number of violation slots. If violations are confirmed separately afterward, the violation count accumulates.

Handling of improper revenue
Revenue generated through policy violations, invalid traffic, or other improper means may be considered improper revenue.
If improper revenue is confirmed, payment may be withheld or denied for that amount, and amounts already paid may also be recovered.
Appeal procedure
If you receive a notice of usage restriction Apply for an appeal within 30 daysYou can.
Appeal materials can be submitted through Channel Talk.
Submitted materials will be reviewed according to internal standards, and additional materials may be requested if needed.
Review may take about one business week.
Regarding appeal applications review focusing on whether the sanction was appropriateand sanctions will not be lifted merely because the violation has been corrected or a recurrence prevention plan has been submitted.
Sanctions may be lifted if the submitted appeal materials show that the violation forming the basis for the sanction is not substantiated, or that there is a clear error in the sanction decision.
In cases of repeated or serious violations, service use may be permanently restricted.
Test
During development, be sure to use a test ad ID. Testing with a real ad ID may be considered a policy violation and may result in penalties.
The WebView banner ad test ID is Get startedcan be found in
Please make sure to check the following items before release.
Check whether the ad loads properly.
Check whether clicking takes you to the intended screen.
Check whether the back action works properly.
Check whether it does not interfere with payment or authentication flows.
Frequently asked questions
Last updated
Was this helpful?