Skip to main content

Webhooks Overview

Webhooks allow you to track the status of payments and order lifecycle events in your application. They provide real-time notifications for various events like checkout, NFT minting, and order fulfillment.

Event Types

Checkout webhooks track the full order lifecycle with these event types: Quote Phase
  • orders.quote.created - Triggered when a new order is created
  • orders.quote.updated - Triggered when order details are modified
Payment Phase
  • orders.payment.succeeded - Triggered when payment is successfully processed
  • orders.payment.failed - Triggered when payment fails
Delivery Phase
  • orders.delivery.initiated - Triggered when delivery begins
  • orders.delivery.completed - Triggered when delivery succeeds
  • orders.delivery.failed - Triggered when delivery fails

Setting Up Webhooks

1

Create an Endpoint Route

Using a standard nodejs API server, create an endpoint.
You can test locally by installing ngrok and creating a routed endpoint to a specified port. > Note: Use ngrok only for testing. In production, ensure your endpoint is properly secured with HTTPS and appropriate access controls.
2

Configure the Endpoint

Your endpoint should:
  • Handle POST requests only
  • Parse webhook events from the request body
  • Respond with a 200 status code to acknowledge receipt
Your server must return a 2xx HTTP status quickly so the webhook is marked as delivered.
Example handler:
Don’t be strict with payload validations as Crossmint may add new fields to the webhooks as products evolve.
Your server must return a 2xx HTTP status quickly so the webhook is marked as delivered.
3

Review Example Webhook Responses

Every Checkout webhook (orders.*) is delivered as { actionId, type, data }:
  • actionId — the order identifier
  • type — the event name (for example, orders.delivery.completed)
  • data — the complete order object, identical to the Get Order API response
The fields inside data.lineItems depend on the order execution mode. exact-out orders (for example, NFT purchases) carry callData (when present) and quantity. exact-in orders (for example, token or memecoin purchases) carry executionParams and maxSlippageBps.
4

Add Pre & Post Processing

Add your pre and post processing logic when setting up your webhook listener. For example, you can call back to your database when a certain id has succeeded or even use Sendgrid or EmailJS to send an email to a recipient when a mint completes.
5

Configure in Crossmint Console

  1. Navigate to the Webhooks page in the console
  2. Click Add Endpoint
  3. Enter your endpoint URL
  4. Select the webhook events to receive
  5. Click Create
Add webhook endpoint UI
6

Verify Webhook Signatures

For security, verify webhook signatures using the signing secret from your endpoint details page:
Screenshot of webhooks status UI
See the Verify Webhooks guide for implementation details.

Testing Webhooks

  1. Use test card number 4242 4242 4242 4242 for successful payments
  2. Use 4000 0000 0000 4954 to test payment failures
  3. Monitor webhook deliveries in the Console