Track a sale for a short link.
Python
from dub import Dub from dub.models import operations with Dub( token="DUB_API_KEY", ) as d_client: res = d_client.track.sale(request={ "customer_external_id": "<id>", "amount": 594903, "event_name": "Invoice paid", "payment_processor": operations.PaymentProcessor.PADDLE, "lead_event_name": "Cloned template 1481267", }) assert res is not None # Handle response print(res)
{ "eventName": "<string>", "customer": { "id": "<string>", "name": "<string>", "email": "<string>", "avatar": "<string>", "externalId": "<string>" }, "sale": { "amount": 123, "currency": "<string>", "paymentProcessor": "<string>", "invoiceId": "<string>", "metadata": {} } }
Default authentication mechanism
A sale was tracked.
The response is of type object.
object
Was this page helpful?