Refport

Track a sale

Records a sale conversion for a click using an API key.

POST
/api/track/sale

Records a sale conversion for a click using an API key.

Authorization

apiKeyAuth
Authorization<token>

API key passed as a Bearer token.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

amount*integer
Range0 < value <= 9007199254740991
clickId*string
Length1 <= length
currency?string
Length3 <= length <= 3
Default"usd"
customerAvatar?string
Formaturi
customerEmail?string
Match^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Formatemail
customerExternalId*string
Length1 <= length <= 100
customerName?string
eventName?string
Lengthlength <= 255
Default"Purchase"
invoiceId?string
metadata?
paymentProcessor?string
Default"custom"

Value in

  • "stripe"
  • "shopify"
  • "polar"
  • "paddle"
  • "revenuecat"
  • "custom"
stripeCustomerId?string
stripePaymentIntentId?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/track/sale" \  -H "Content-Type: application/json" \  -d '{    "amount": 1,    "clickId": "string",    "customerExternalId": "string"  }'
{  "saleId": "string",  "property1": null,  "property2": null}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}