Docs
العربية Get your keys

Quickstart

Connect a custom store in four steps. You need an Antiro account and access to your store's pages and server code.

On this page

Get your keys#

Open API keys in the dashboard. Your store uses two keys. If one is missing, create it there:

  • The publishable key (pk_…) goes in your pages.
  • The secret key (bf_…) stays on your server. It is shown only once, so save it when you create it.

Add the script#

Paste this tag into every page that has an order form, and replace pk_xxxxx with your publishable key. The script finds the form on its own and checks the order when the shopper presses the order button.

Your order page
<script
  src="https://js.antiro.io/v2/antiro.js"
  data-key="pk_xxxxx"
  async></script>

Check the order on your server#

The script adds a hidden field named antiro_token to the form. Before you accept an order, send it to Antiro with the value of that field.

Your server
curl https://api.antiro.io/v1/assessments \
  -H "X-API-Key: $ANTIRO_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "session_token": "<antiro_token>",
    "order_id": "1042",
    "phone": "0661234567"
  }'

Act on the decision#

The action field of the answer tells you what to do:

actionWhat to do
allowAccept the order.
reviewHold the order until your team has checked it.
blockRefuse the order.

Next steps#

Search by topic, field name or status code.