Skip to main content

Event: card.transaction

Sent when a card transaction has been processed and a settlement fee has been charged.

Payload

{
  "transactionId": "txn_abc123",
  "cardId": "card_xyz789",
  "amount": 5000,
  "currency": "USD",
  "fee": 25
}
FieldTypeDescription
transactionIdstringUnique transaction identifier
cardIdstringCard that was charged
amountnumberTransaction amount in minor units (cents)
currencystringISO 4217 currency code
feenumberSettlement fee charged in minor units (cents)

Response

Your endpoint must return a 2xx status code within 30 seconds to acknowledge receipt. Any non-2xx response or timeout triggers the retry policy.
Status codeMeaning
200Event received and processed
202Event received, will process asynchronously
Any non-2xxDelivery failed — will retry

Example handler

app.post("/webhooks/contro", (req, res) => {
  const eventType = req.headers["x-contro-event"];

  if (eventType === "card.transaction") {
    const { transactionId, cardId, amount, currency, fee } = req.body;
    // Record the transaction and fee in your system
  }

  res.status(200).send("OK");
});