Skip to content

Cashback Events

cashback.created

Fired when a transaction matches a clipped deal, airdrop, or loyalty program redemption and a cashback reward is triggered.

This event will be emitted as soon as the transaction processing pipeline calculates a reward, event if the underlying financial transaction is still pending.

This is delivered out so that Publishers can notify their memberbases immediately about incoming rewards they have earned. You should, however, refrain from fully granting the member any rewards until you receive a cashback.cleared event.

Cashback events will always contain a reference to the source which produced them. You can use this source in your application or frontend to augment transactions you show to members with the deal information correlated to cashback.

json
{
  "event_id": "evt_abc123",
  "timestamp": "2024-01-15T10:30:00Z",
  "type": "cashback.created",
  "cashback_transaction_id": "cbtx_xyz789",
  "amount": 500,
  "currency": "GBP",
  "transaction_id": "tx_def456",
  "transaction_ref": "txn_98765",
  "source": {
    "type": "clip",
    "clip_id": "dclip_abc123"
  }
}
FieldTypeDescription
cashback_transaction_idstringUnique ID for this cashback record
amountintegerCashback amount in minor units
currencystringISO 4217 currency code
transaction_idstringInternal transaction ID
transaction_refstringYour external_id from the ingested transaction
sourceobjectWhat triggered the cashback (see below)

Source Variants

Clip - triggered by a clipped deal:

json
{
  "type": "clip",
  "clip_id": "dclip_abc123"
}

Airdrop - triggered by an airdrop campaign:

json
{
  "type": "airdrop",
  "airdrop_id": "airdrop_abc",
  "variant_id": "var_001",
  "creative_id": "dc_xyz"
}

Loyalty program redemption - triggered by reaching a loyalty program threshold:

json
{
  "type": "loyalty-program-redemption",
  "loyalty_program_id": "lp_abc123",
  "redemption_id": "lpr_xyz789",
  "external_id": "sc_ext_001"
}

cashback.cleared

Fired when a pending cashback has settled (the underlying transaction cleared) and the Platform has posted the cashback transaction. Use this as a signal that the Platform will deliver the cashback and you can mark the cashback associated with your member's transactions as settled.

json
{
  "event_id": "evt_def456",
  "timestamp": "2024-01-16T08:00:00Z",
  "type": "cashback.cleared",
  "cashback_transaction_id": "cbtx_xyz789",
  "transaction_id": "tx_def456",
  "transaction_ref": "txn_98765"
}
FieldTypeDescription
cashback_transaction_idstringThe cashback record that cleared
transaction_idstringInternal transaction ID
transaction_refstringYour external_id from the ingested transaction

cashback.reverted

Fired when a cashback is reversed. This can happen if the underlying transaction was refunded/reverted or if the Platform revokes the reward for some reason.

json
{
  "event_id": "evt_ghi789",
  "timestamp": "2024-01-17T12:00:00Z",
  "type": "cashback.reverted",
  "cashback_transaction_id": "cbtx_xyz789",
  "transaction_id": "tx_def456",
  "transaction_ref": "txn_98765"
}

Fields are identical to cashback.cleared.