Skip to content

After a player completes a purchase while supporting a creator, send the transaction to Nexus from your backend so it can be attributed and reported. Authenticate with your program-scoped private key.

FieldTypeNotes
codestringA previously validated creator code
transactionIdstringMust be unique. Use a receipt or order id from your PSP
subtotalintegerPass minor units (USD 9.99 → 999)
currencyenumISO code (USD, EUR, JPY, …)
descriptionstringSKU or product descriptor
transactionDateRFC3339 stringTimestamp of purchase in ISO format
FieldTypeNotes
playerIdstringStrongly recommended. Ties purchases to the same player. Pseudonymize (GUID or hashed id); no PII.
playerNamestringOptional, may also be pseudonymized. Shown to creators if present.
metricsobjectOptional but crucial for program analytics (see below).
POST/attributions/transactions
Terminal window
curl -X POST "$NEXUS_BASE_URL/attributions/transactions" \
-H "Content-Type: application/json" \
-H "X-SHARED-SECRET: $NEXUS_PRIVATE_KEY" \
-d '{
"code": "thesearing",
"subtotal": 199,
"currency": "USD",
"description": "bundle_100_gems",
"transactionId": "order-123",
"transactionDate": "2025-10-16T13:01:44.000Z",
"playerId": "6f10c7f4-psd-123",
"playerName": "CoolGuy1",
"metrics": {
"joinDate": "2017-07-22T17:32:28Z",
"conversion": {
"lastPurchaseDate": "2025-01-22T17:32:28Z",
"totalSpendToDate": {
"total": 12999,
"currency": "USD"
}
}
}
}'

The response is 200 OK and indicates the attribution was accepted.

Metrics are optional in the request but crucial for reporting. They power insights such as:

  • new player acquisition
  • reactivation of churned players
  • conversion from free to paid users
  • long-term creator influence (LTV impact)
  • SKU-based revenue share analytics

If you have access to this data at time of purchase, include it. Otherwise you can add fields later once available.

playerId is not part of metrics, but every outcome above depends on it. Nexus counts a player as Converted at most once ever, and treats a later gap as a Repeat Reactivation only by checking that player’s own history. Both need a stable identifier to attach that history to, so send metrics and playerId together or the reporting they feed stays incomplete.