initial release
onchainRefund
onchainRefund.completed
Changelog for the onchainRefund.completed webhook, sent when an on-chain refund settles on-chain and returns stablecoin to the cardholder’s destination.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Changelog for the onchainRefund.completed webhook, sent when an on-chain refund settles on-chain and returns stablecoin to the cardholder’s destination.
| Field | Type | Description |
|---|---|---|
amountUnit | string | The unit of amount. Always cents. |
onchainRefund.completed webhook. Rain triggers this webhook when an on-chain refund settles on-chain, returning stablecoin to the cardholder’s destination. Rain sends this event to on-chain refund (Real Time Funding) tenants.| Field | Type | Description |
|---|---|---|
id | string | Webhook ID |
resource | string | Always "onchainRefund" |
action | string | Always "completed" |
version | string | The webhook version |
body.id | string | Unique identifier for the on-chain refund |
body.transactionId | string | ID of the refund transaction this refund settles |
body.userId | string (optional) | ID of the cardholder receiving the refund. Omitted when not associated with a user |
body.amount | number | Refund amount in minor units (cents) |
body.asset | string | Stablecoin being returned (e.g., USDC) |
body.chainId | string | Decimal chain ID the refund settles on (e.g., 84532 for Base Sepolia) |
body.destinationKind | string | Where the refund is sent. AUTHPULL_SOURCE returns funds to the cardholder’s source wallet; COLLATERAL_CONTRACT returns funds to the collateral contract |
body.status | string | Lifecycle status of the refund. Always SETTLED for this event |
body.transactionHash | string | On-chain settlement transaction hash of the settled refund |
body.settledAt | string | ISO 8601 timestamp when the refund settled on-chain |
body.createdAt | string | ISO 8601 timestamp when the refund was created |
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"resource": "onchainRefund",
"action": "completed",
"version": "1.0.0",
"body": {
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"transactionId": "d4e5f6a7-b8c9-0123-def0-234567890123",
"userId": "e5f6a7b8-c9d0-1234-ef01-345678901234",
"amount": 2599,
"asset": "USDC",
"chainId": "84532",
"destinationKind": "COLLATERAL_CONTRACT",
"status": "SETTLED",
"transactionHash": "0x4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b",
"settledAt": "2026-02-13T10:31:45.000Z",
"createdAt": "2026-02-13T10:30:00.000Z"
}
}