Integration modes
The script can check the order at the button, or only collect and leave the whole decision to your server.
Compare the two modes#
| Submit check | Collect only | |
|---|---|---|
| Turned on by | Default | data-forms="off" |
| At the order button | The script holds the order for a moment and checks it | The script does not touch the button |
| A refused order | Never leaves the page | Reaches your server, which refuses it |
Value for sdk_expect | forms | collect |
Do not confuse these with protection modes, which set whether Antiro’s decisions take effect.
Submit check#
This is the default, and the right choice for most stores. The script holds the order for a moment when the shopper presses the button, then lets it continue. A refused order is never sent.
Collect only#
The script leaves the order button alone, and your server decides every order. Use it if your checkout cannot accept a held submit.
<script
src="https://js.antiro.io/v2/antiro.js"
data-key="pk_xxxxx"
data-forms="off"
async></script> Tell Antiro which mode you use#
Once Antiro knows that your pages run the script, an order that arrives without a reference is treated as suspicious from the very first order. This is what catches bots that post straight to your server. You can say it in two ways:
- For each order: send
sdk_expectwith the order check, asformsorcollect. Any other value is ignored. - For the whole store: choose how the script is installed on the API keys page.
The value sent with an order wins for that order. If you state nothing, Antiro works it out from the orders it receives.
Strict mode#
Strict mode goes one step further: an order that carries no reference at all is refused instead of held for review. A shopper on a page that runs the script always has a reference. Scripts that post orders straight to your server have none.
- For each order: send
sdk_requiredastruetogether withsdk_expect. Withoutsdk_expectit is ignored. - WooCommerce: the plugin’s Strict mode setting, on by default since version 1.2.0.