Skip to main content
POST
/
api
/
events
/
sale
Track Sale
curl --request POST \
  --url https://api.example.com/api/events/sale

Endpoint

POST https://track.taap.it/api/events/sale

Authentication

Request Body

FieldTypeRequiredDescription
trackingIdstringThe ta_tid from the cookie or URL parameter
customerobjectCustomer information
customer.externalIdstringYour internal user/customer ID
customer.emailstringCustomer’s email address
customer.firstnamestringCustomer’s first name
customer.lastnamestringCustomer’s last name
customer.phoneNumberstringCustomer’s phone number
customer.avatarUrlstringURL to customer’s avatar image
amountnumberTransaction amount in currency units (not cents)
currencystringISO 4217 currency code (e.g., eur, usd)
metadataobjectAdditional custom data (key-value pairs)
Amount format: Use currency units, not cents.
  • 29.99 for €29.99
  • 2999 would be interpreted as €2999

Examples

curl -X POST https://track.taap.it/api/events/sale \
  -H "Authorization: Bearer taapit_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "trackingId": "rLnWe1uz9t282v7g",
    "customer": {
      "externalId": "user_123",
      "email": "[email protected]"
    },
    "amount": 99.99,
    "currency": "eur",
    "metadata": {
      "orderId": "order_456",
      "plan": "pro"
    }
  }'

Response

{
  "ok": true
}

Currency Codes

Use standard ISO 4217 currency codes:
CurrencyCode
Euroeur
US Dollarusd
British Poundgbp
Japanese Yenjpy
Swiss Francchf
Canadian Dollarcad
Australian Dollaraud

Error Codes

HTTP CodeErrorDescription
400Invalid payloadRequest body validation failed
400Missing customer.externalIdRequired field not provided
401Invalid API keyAPI key is invalid or revoked
401Hostname not in allowed listOrigin not whitelisted (client-side)
403This click does not belong to your workspacetrackingId is for a different workspace
404Click not found for this trackingIdtrackingId doesn’t exist or has expired