v5

OpenAPI 3.1.0Proprietary2026-08-011476181.4 MB
Webhooks

Card transaction

Webhook that is called on every state transition of a card CardTransaction. Fires when an authorization is approved (CARD_TRANSACTION.AUTHORIZED), as clearings settle against it (CARD_TRANSACTION.PARTIALLY_SETTLED, CARD_TRANSACTION.SETTLED), when settled funds are returned (CARD_TRANSACTION.REFUNDED), and when a pull or confirmation fails (CARD_TRANSACTION.EXCEPTION). The payload carries the full CardTransaction resource.

This endpoint should be implemented by clients of the Grid API.

Authentication

The webhook includes a signature in the X-Grid-Signature header that allows you to verify that the webhook was sent by Grid. To verify the signature:

  1. Get the Grid public key provided to you during integration
  2. Decode the base64 signature from the header
  3. Create a SHA-256 hash of the request body
  4. Verify the signature using the public key and the hash

If the signature verification succeeds, the webhook is authentic. If not, it should be rejected.

postWebhookcard-transaction

Payload

idstring required

Unique identifier for this webhook delivery (can be used for idempotency)

type'CARD_TRANSACTION.AUTHORIZED' | 'CARD_TRANSACTION.PARTIALLY_SETTLED' | 'CARD_TRANSACTION.SETTLED' | 'CARD_TRANSACTION.REFUNDED' | 'CARD_TRANSACTION.EXCEPTION' required

Type of webhook event in OBJECT.EVENT dot-notation. The part before the dot identifies the resource, the part after identifies the event. This lets consumers route purely on type without inspecting data.status.

timestampstring date-time required

ISO 8601 timestamp of when the webhook was sent

Example payload

{
  "id": "Webhook:019542f5-b3e7-1d02-0000-000000000007",
  "timestamp": "2025-08-15T14:32:00Z",
  "data": {
    "id": "CardTransaction:019542f5-b3e7-1d02-0000-000000000100",
    "cardId": "Card:019542f5-b3e7-1d02-0000-000000000010",
    "customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
    "platformCustomerId": "18d3e5f7b4a9c2",
    "issuerTransactionToken": "lithic_txn_b81c2a4f",
    "merchant": {
      "descriptor": "BLUE BOTTLE COFFEE SF",
      "mcc": "5814",
      "country": "US"
    },
    "authorizedAmount": {
      "amount": 12550,
      "currency": {
        "code": "USD",
        "name": "United States Dollar",
        "symbol": "$",
        "decimals": 2
      }
    },
    "settledAmount": {
      "amount": 12550,
      "currency": {
        "code": "USD",
        "name": "United States Dollar",
        "symbol": "$",
        "decimals": 2
      }
    },
    "refundedAmount": {
      "amount": 12550,
      "currency": {
        "code": "USD",
        "name": "United States Dollar",
        "symbol": "$",
        "decimals": 2
      }
    },
    "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002",
    "pullSummary": {
      "count": 2,
      "totalAmount": 1500
    },
    "settlementSummary": {
      "count": 1,
      "totalAmount": 1500
    },
    "authorizedAt": "2026-05-08T14:30:00Z",
    "lastEventAt": "2026-05-08T15:42:11Z",
    "createdAt": "2026-05-08T14:30:00Z",
    "updatedAt": "2026-05-08T15:42:11Z"
  }
}

Response

Webhook received successfully