Tagada Radar
Tagada Radar is a small script you install on every page where you sell. It reports the website and page a customer is on, and gives each payment a proof of its origin. TagadaPay matches that origin with the websites declared for your store.Radar is enabled on request, account by account. Until your account is enabled, nothing changes and you have nothing to install. Ask your account manager: we enable Radar first in observe mode, where payments are never refused, check together that every website you sell on is declared, and only then turn on enforcement, with notice.
Tagada Radar is not Stripe Radar. The
requireAction: "radar" step of a payment is the fraud check of a processor, described in Accept a payment with your own cart. Tagada Radar reports the origin of the payment, and it works whichever processor you use.How it works
- Radar loads on your page with your publishable key.
- Radar reports the page to
POST /v1/radar/tokens. The website is theOriginyour browser sends, never something the page says. - Your checkout sends the token when it confirms the payment.
- TagadaPay checks the token: its signature, its expiry, that it was never used, that it comes from the same website and the same account as the payment.
Before you start
You need:- a publishable key (
tpk_live_…ortpk_test_…) of your store; - every website you sell on declared for your store, including separate checkout domains. A website is declared when it is allowed for the store’s publishable key: your verified custom domains and your funnel addresses are added for you when a funnel is saved.
Install
Script tag
Once Radar is enabled on your account, add this inside the<head> of every page, including product, cart and checkout pages:
window.TagadaRadar.
npm
Shopify
Add the script tag totheme.liquid, inside <head>. If your checkout runs on a separate domain, install it there too.
WooCommerce
Add the script tag through your theme header or a header-scripts plugin, so that it loads on every page, including checkout.TagadaPay hosted checkout and funnels
Studio pages hosted by TagadaPay load Radar themselves at the moment of payment, once your account is notoff. You still install it on your own pages that send customers to them if you want those pages reported.
Send the token with the payment
Headless SDK
If the Radar script tag is on the page, the token is attached for you when your account is notoff.
Your own checkout with core-js
Read the token just before you confirm:getToken().
Server-to-server payments
A payment your server confirms with its own key has no browser origin to check. Radar does not check it and does not refuse it.Subscription renewals
A renewal has no page and no customer present. It is not checked and never refused, and it stays linked to the original purchase. You have nothing to send.API
code is one of website_not_declared, network_error, request_rejected, invalid_response or invalid_publishable_key.
Check your installation
Setdebug: true, or add data-debug="true" to the script tag, then open your browser console. You should see:
off:
In test mode (
tpk_test_…) the same rule applies: a website counts as declared when the test key allows it. localhost does not, unless the key lists it.
Errors
Underenforce, refused confirms answer HTTP 403 with one of these codes:
A request from a website the key does not allow is refused earlier, with
permission_denied and param: "Origin", on every route of the API. On POST /v1/radar/tokens it also leaves the website on your store’s list. Radar’s script reads it as website_not_declared.
These are platform refusals, not card declines: no processor was called. Do not ask your customer to try another card: fix the cause, then ask them to try again. The payment stays open and can be confirmed with a new token.
What Radar collects
Radar does not read card details, and it does not read what your customers type into forms. Mention it in your privacy policy as a payment security and fraud prevention tool.
Content Security Policy
If your site sets a Content Security Policy, allow:FAQ
I have several websites. What do I do?
I have several websites. What do I do?
Declare each of them for your store, and install Radar on each. The publishable key is the same.
Does Radar slow down my website?
Does Radar slow down my website?
No. The script loads asynchronously and weighs under 5 KB, so it does not block your page from displaying.
What happens if an ad blocker stops Radar?
What happens if an ad blocker stops Radar?
getToken() fails and the confirm goes without a token. Under observe the payment runs and the absence is recorded. Under enforce the payment is refused with radar_token_missing: show your customer a message asking them to allow your site.Can I load Radar only on the checkout page?
Can I load Radar only on the checkout page?
Payments work if Radar runs on the page that confirms the payment, but install it on every page: the website list then shows everywhere you sell.
