Onramp

Onramp transaction updated

Triggered when the onramp.transaction.updated webhook event is emitted. Your API will receive a POST request at the webhook URL you configured.

postWebhookonrampTransactionUpdated

Headers

X-Webhook-Signature, string required

HMAC-SHA256 signature supplied on every webhook delivery. The signature is computed from the raw request body using the webhook secret supplied during creation of the webhook subscription.

Webhook receivers can cryptographically verify this header before processing the event to ensure the authenticity of the webhook delivery.

Refer to the verify signatures documentation to learn details about the full payload and the exact verification algorithm.

X-Hook0-Signature is deprecated and will eventually be removed. Use X-Webhook-Signature going forward. Both headers are sent with identical values and use the same verification algorithm and webhook secret.

This scheme applies to webhook delivery (outbound POSTs from CDP to your endpoint), not to inbound CDP API requests.

X-Hook0-Signature, string required

HMAC-SHA256 signature supplied on every webhook delivery. The signature is computed from the raw request body using the webhook secret supplied during creation of the webhook subscription.

Webhook receivers can cryptographically verify this header before processing the event to ensure the authenticity of the webhook delivery.

Refer to the verify signatures documentation to learn details about the full payload and the exact verification algorithm.

X-Hook0-Signature is deprecated and will eventually be removed. Use X-Webhook-Signature going forward. Both headers are sent with identical values and use the same verification algorithm and webhook secret.

This scheme applies to webhook delivery (outbound POSTs from CDP to your endpoint), not to inbound CDP API requests.

Payload

union required

Webhook payload for all onramp transaction events (created, updated, success, failed). Shape depends on transaction type — standard flow (guest checkout / authorized) uses OnrampTransactionPayload, Headless API (Apple Pay / Google Pay) uses OnrampOrderPayload. Distinguish by presence of orderId (Headless) vs transactionId (standard).

OnrampTransactionPayload required

Webhook payload for standard onramp transactions (guest checkout and authed flow). Serialized from the OnrampTransaction proto via protojson with eventType appended.

OR
OnrampOrderPayload required

Webhook payload for Headless Onramp API orders (Apple Pay / Google Pay). Serialized from the OnrampOrder proto via protojson with eventType appended.

Example payload

{
  "eventType": "onramp.transaction.updated",
  "transactionId": "1f087a54-ff1f-62e8-9f85-aa77ac0499a5",
  "status": "ONRAMP_TRANSACTION_STATUS_IN_PROGRESS",
  "purchaseCurrency": "USDC",
  "purchaseNetwork": "ethereum",
  "purchaseAmount": {
    "currency": "USD",
    "value": "5.00"
  },
  "paymentTotal": {
    "currency": "USD",
    "value": "5.00"
  },
  "paymentTotalUsd": {
    "currency": "USD",
    "value": "5.00"
  },
  "paymentSubtotal": {
    "currency": "USD",
    "value": "5.00"
  },
  "coinbaseFee": {
    "currency": "USD",
    "value": "5.00"
  },
  "networkFee": {
    "currency": "USD",
    "value": "5.00"
  },
  "exchangeRate": {
    "currency": "USD",
    "value": "5.00"
  },
  "txHash": "0x",
  "createdAt": "2025-09-02T02:34:13Z",
  "completedAt": "0001-01-01T00:00:00Z",
  "country": "US",
  "userId": "4132b63ee21128686458155b28570289",
  "paymentMethod": "CARD",
  "walletAddress": "0xe0512E358C347cc2b1A42d057065CE642068b7Ba",
  "type": "ONRAMP_TRANSACTION_TYPE_BUY_AND_SEND",
  "userType": "USER_TYPE_GUEST",
  "partnerUserRef": "example_user_ref",
  "failureReason": "FAILURE_REASON_UNSPECIFIED",
  "errorCode": "ERROR_CODE_UNSPECIFIED",
  "partnerId": "1f1c19e8-d0e9-6443-b706-92a4d033d043"
}

Response

Webhook received and processed successfully.

Changes

Webhooks have no change history: a webhook is keyed by its event name rather than a path and method, so no recorded change can name it.