Use this for anything without a built-in connection: Gumroad, PayPal, Shopify, your own billing.
Create a key under Setup → API keys & AI agents. Payment keys start with dpk_, only work for that site, and can’t read analytics.
curl https://YOUR-DATAPENNY-URL/api/v1/payments \
-H "Authorization: Bearer dpk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction_id": "order_1042",
"amount": 29.99,
"currency": "USD",
"datapenny_visitor_id": "VISITOR_ID_FROM_THE_BROWSER",
"email": "mira@example.com"
}'
Fields
| Field | Notes |
|---|---|
transaction_id |
Required. Sending the same id twice doesn’t count the sale twice. |
amount |
Required, in major units: 29.99, not 2999. |
currency |
Required. An ISO code such as USD or INR. |
datapenny_visitor_id |
The visitor. visitor_id and datafast_visitor_id work too. |
email, name |
The buyer. An email also helps match the sale to a visitor. |
customer_id |
Your id for the customer. |
subscription_id |
Links renewals to the first payment. |
renewal |
true for a scheduled charge. |
upgrade |
true for a plan change or more seats. |
refunded |
true to record a full refund of this transaction. |
timestamp |
ISO 8601, unix seconds or milliseconds. Defaults to now. |
The answer
{ "ok": true, "transaction_id": "order_1042", "attribution": "metadata", "visitor_id": "…" }
attribution says how the sale was matched: metadata, return, subscription, customer, identify, timing or none.
Keys belong on your server. Calls from a browser are refused.