Collections event

Collection events notify you when the status of a payment collection changes. These events help you track incoming payments in real time as customers complete transactions through card, mobile money, or bank transfer methods.

When collection events are sent

Gravv sends collection events when:

  • A collection transaction is initiated and processing begins.
  • The transaction fails due to payment issues or validation errors.
  • The transaction completes successfully and funds are received.

Collection event types

The following event types are available for collections:

Event typeDescription
collection.status.pendingcollection initiated and processing
collection.status.failedcollection failed
collection.status.completedcollection completed successfully

Onramp status values

The onramp_status field in collection events indicates the payment processor status:

Onramp statusCollection statusDescription
initializependingpayment initialization started
transfer_queuedpendingpayment queued for processing
transfer_initializedpendingpayment processing in progress
transfer_failedfailedpayment processing failed
transfer_completedcompletedpayment successfully processed

Collection event structure

The event_data object for collection events contains the following fields:

FieldTypeDescription
card_binstringfirst six digits of card number, only present for card payments
card_exp_monthstringcard expiration month, only present for card payments
card_exp_yearstringcard expiration year, only present for card payments
card_namestringcard product name, only present for card payments
card_typestringcard type: debit or credit, only present for card payments
card_segmentstringcard segment: consumer or commercial, only present for card payments
card_brandstringcard brand: VISA, MASTERCARD, etc., only present for card payments
transaction_idstringunique identifier for the collection transaction
onramp_statusstringpayment processor status
transaction_statusstringcurrent status: pending, failed, or completed
amountstringamount collected
assetstringstablecoin received, either USDC or USDT
networkstringblockchain network where funds were received
referencestringclient reference identifier from the collection request
tx_hashstringblockchain transaction hash, only present when status is completed
remarkstringfailure reason, only present when status is failed

The following is a sample payload for a completed collection event:

{
    "event_data": {
      "card_bin": "411111",
      "card_exp_month": "09",
      "card_exp_year": "45",
      "card_name": "Visa Classic",
      "card_type": "debit",
      "card_segment": "consumer",
      "card_brand": "VISA",
      "transaction_id": "90950347-d40b-4ab9-aa77-f1882750477c",
      "onramp_status": "completed",
      "transaction_status": "completed",
      "amount": "1.20",
      "asset": "USDC",
      "network": "polygon",
      "reference": "trasdfjausdaa",
      "tx_hash": "0x56713ddd7478bbe69925a4aa477d9cb74b56c4c041a304ca3160b2289b6e3a44"
    },
    "tenant_id": "89fa0d5e-3acf-4834-968f-6a9f0186ab59",
    "event_category": "collection",
    "event_type": "collection.status.completed",
    "event_group_id": "90950347-d40b-4ab9-aa77-f1882750477c"
  }

For the required fields in all Gravv webhook payloads, see Webhook payload structure.