Skip to main content

Introduction

This page introduces you to how Webhooks work.

info

Please be aware that this endpoint requires a Manage Webhooks API Key.

Webhook event request format​

webhook.json
{
	"id": "b3252825-bb48-4a5e-8c99-69ea8e4db0d9",
	"group_id": "5a7f4ef3-3d82-4606-9b27-ff50ad2789f3",
	"webhook_id": "ea3455f8-5b1d-46f0-b08d-a9ce459c8a84",
	"event_type": "transaction.initiate",
	"data": {},
	"created_at": "2026-07-28T15:11:16.975339432Z"
}

Possible data values​

Transaction​

Triggered by: transaction.initiate, transaction.pending, transaction.decline, transaction.settlement, transaction.void, transaction.refund, transaction.authorized, transaction.captured, transaction.authorization_expired, transaction.authorization_expiring,

transaction_webhook.json
{
	"id": "b3252825-bb48-4a5e-8c99-69ea8e4db0d9",
	"group_id": "5a7f4ef3-3d82-4606-9b27-ff50ad2789f3",
	"webhook_id": "ea3455f8-5b1d-46f0-b08d-a9ce459c8a84",
	"event_type": "transaction.initiate",
	"data": {
		"id": "c05861f0-6384-414d-b837-0ed71cefbbe5",
		"group_id": "5a7f4ef3-3d82-4606-9b27-ff50ad2789f3",
		"gateway": "revere_pay",
		"processor_id": "<processor_id>",
		"processor_name": "NO AFFILIATE",
		"processor_type": "revere_pay",
		"transaction_type": "sale",
		"payment_method": "card",
		"payment_details": {
			"card": {
				"brand": "Visa",
				"card_type": "debit",
				"first_six": "411111",
				"last_four": "1111",
				"customer_name": "James Testington",
				"expiration_date": "29/11",
				"avs": "not available",
				"cvv": "no match",
				"issued_country": "US"
			}
		},
		"amounts": {
			"requested_amount": 3000,
			"authorized_amount": 3000,
			"captured_amount": 3000,
			"included_tax_amount": 300,
			"included_shipping_amount": 1000
		},
		"currency": "USD",
		"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sed lacus ac mi gravida euismod.",
		"source": "api",
		"order_id": "98765",
		"po_number": "12345",
		"email_receipt": false,
		"email_address": "test@example.com",
		"billing_address": {
			"first_name": "James",
			"last_name": "Testington",
			"company": "James' Company",
			"city": "Scranton",
			"line_1": "Slough Avenue",
			"line_2": "1725",
			"subdivision": "PA",
			"postal_code": "18505",
			"country": "US",
			"email": "test@example.com"
		},
		"shipping_address": {
			"first_name": "James",
			"last_name": "Testington",
			"company": "James' Company",
			"city": "Scranton",
			"line_1": "Slough Avenue",
			"line_2": "1725",
			"subdivision": "PA",
			"postal_code": "18505",
			"country": "US"
		},
		"form_external_id": "",
		"form_entry_id": "",
		"subscription_id": "",
		"plan_id": "",
		"custom_fields": {},
		"response_code": "SUCCESS",
		"response_text": "confirmed",
		"status": "pending",
		"created_at": "2026-07-28T15:11:16.975339432Z"
	},
	"created_at": "2026-07-28T15:11:16.975339432Z"
}

Customer​

Triggered by: customer.create, customer.update

customer_webhook.json
{
	"id": "3e90b4f9-d1c1-4ca2-a0b5-3ba827d0032a",
	"group_id": "fb0d2186-c6d4-4bb6-bbac-b10f48a4c1a3",
	"webhook_id": "a9a73b7c-bb78-463d-9be9-605ba4a967fd",
	"event_type": "customer.create",
	"data": {
		"cards": [
			{
				"billing_address": {
					"city": "Scranton",
					"country": "US",
					"line_1": "Slough Avenue",
					"line_2": "1725",
					"postal_code": "12345",
					"subdivision": "PA"
				},
				"brand": "Visa",
				"card_category": "PERSONAL",
				"card_id": "ac605fb6-31fb-4728-94c3-23d229384179",
				"card_on_file": true,
				"card_type": "debit",
				"commercial": false,
				"created_at": "2026-06-30T13:15:15.868554Z",
				"expiration": "12/29",
				"first_six": "411111",
				"holder_name": "John Doe",
				"issuer": "Visa Sandbox",
				"issuer_country": "US",
				"last_four": "1111",
				"regulated": true,
				"updated_at": "2026-06-30T13:15:15.868554Z"
			}
		],
		"created_at": "2026-06-30T13:12:38.209392Z",
		"email": "test@emailtest.com",
		"first_name": "John",
		"group_id": "<group_id>>",
		"id": "b81a3ceb-62bd-4429-8dce-51add08d70b0",
		"last_name": "Doe",
		"updated_at": "2026-06-30T13:12:38.209392Z"
	},
	"created_at": "2026-06-30T13:12:38.209392Z"
}

Triggered by: customer.card.create

card_webhook.json
{
	"id": "74b089c8-c755-4200-ad87-46a5bf9abf63",
	"group_id": "fb0d2186-c6d4-4bb6-bbac-b10f48a4c1a3",
	"webhook_id": "a9a73b7c-bb78-463d-9be9-605ba4a967fd",
	"event_type": "customer.card.create",
	"data": {
		"billing_address": {
			"city": "Scranton",
			"country": "US",
			"line_1": "Slough Avenue",
			"line_2": "1725",
			"postal_code": "12345",
			"subdivision": "PA"
		},
		"brand": "Visa",
		"card_category": "PERSONAL",
		"card_id": "d926c2cf-a314-4e21-9720-3cd4ea7193de",
		"card_on_file": true,
		"card_type": "debit",
		"commercial": false,
		"created_at": "2026-06-30T13:30:49.439116Z",
		"customer_id": "4d44d71a-f82f-4bdc-94e3-9df031b5f70d",
		"expiration": "12/29",
		"first_six": "411111",
		"holder_name": "John Doe",
		"issuer": "Visa Sandbox",
		"issuer_country": "US",
		"last_four": "1111",
		"regulated": true,
		"updated_at": "2026-06-30T13:30:49.439116Z"
	},
	"created_at": "2026-06-30T13:30:49.439116Z"
}

Account Updater​

Triggered by: account_updater

Sent when the Account Updater updates a customer's saved card with new details from the card's issuing bank.

account_updater_webhook.json
{
	"id": "5e0b7f2a-9c41-4d8e-b6a3-2f7d1c9e4b58",
	"group_id": "fb0d2186-c6d4-4bb6-bbac-b10f48a4c1a3",
	"webhook_id": "a9a73b7c-bb78-463d-9be9-605ba4a967fd",
	"event_type": "account_updater",
	"data": {
		"customer_id": "4d44d71a-f82f-4bdc-94e3-9df031b5f70d",
		"card_id": "d926c2cf-a314-4e21-9720-3cd4ea7193de",
		"update_type": "number-update",
		"event_id": "8f3a6c1e-2b7d-4e90-a5c4-6d1b9f0e7a23",
		"previous": {
			"brand": "Visa",
			"last_four": "1111",
			"expiration": "12/26"
		},
		"updated": {
			"brand": "Visa",
			"last_four": "4242",
			"expiration": "12/29"
		}
	},
	"created_at": "2026-12-03T09:15:42.118204Z"
}
FieldDescription
update_typenumber-update: the card number changed. expiration-update: the expiration date changed. contact-cardholder: the saved card details may be out of date, contact the customer. account-closed: the card account is closed, the card can no longer be charged.
event_idThe same for every delivery of one card update. The same update can be delivered more than once, so use it to skip duplicates.
previousThe card before the update.
updatedThe card after the update.

Proration​

Triggered by: proration.created, proration.applied, proration.voided

proration_created_webhook.json
{
	"id": "b3252825-bb48-4a5e-8c99-69ea8e4db0d9",
	"group_id": "5a7f4ef3-3d82-4606-9b27-ff50ad2789f3",
	"webhook_id": "ea3455f8-5b1d-46f0-b08d-a9ce459c8a84",
	"event_type": "proration.created",
	"data": {
		"id": "0f1c5e64-6b41-4a35-9a4e-2f5f0b7d1a90",
		"customer_id": "8c2f0d51-7b13-4a2e-9f60-1d4c8b7a5e39",
		"subscription_id": "eef1b240-6e4d-42f7-93ea-873d165aa696",
		"plan_id": "6f8df983-62a1-4d36-85fd-2e37114fa694",
		"trigger": "amount_change",
		"behavior": "create_prorations",
		"status": "pending",
		"change_date": "2026-04-14T00:00:00Z",
		"billing_period_start": "2026-04-11T00:00:00Z",
		"billing_period_end": "2026-04-18T00:00:00Z",
		"days_remaining": 4,
		"days_in_period": 7,
		"old_amount": 20000,
		"new_amount": 30000,
		"credit_amount": 11429,
		"charge_amount": 17143,
		"net_amount": 5714,
		"currency": "USD",
		"created_at": "2026-04-14T09:12:44.512331Z"
	},
	"created_at": "2026-04-14T09:12:44.512331Z"
}
proration_applied_webhook.json
{
	"id": "b3252825-bb48-4a5e-8c99-69ea8e4db0d9",
	"group_id": "5a7f4ef3-3d82-4606-9b27-ff50ad2789f3",
	"webhook_id": "ea3455f8-5b1d-46f0-b08d-a9ce459c8a84",
	"event_type": "proration.applied",
	"data": {
		"id": "0f1c5e64-6b41-4a35-9a4e-2f5f0b7d1a90",
		"customer_id": "8c2f0d51-7b13-4a2e-9f60-1d4c8b7a5e39",
		"subscription_id": "eef1b240-6e4d-42f7-93ea-873d165aa696",
		"plan_id": "6f8df983-62a1-4d36-85fd-2e37114fa694",
		"trigger": "amount_change",
		"behavior": "create_prorations",
		"status": "applied",
		"change_date": "2026-04-14T00:00:00Z",
		"billing_period_start": "2026-04-11T00:00:00Z",
		"billing_period_end": "2026-04-18T00:00:00Z",
		"days_remaining": 4,
		"days_in_period": 7,
		"old_amount": 20000,
		"new_amount": 30000,
		"credit_amount": 11429,
		"charge_amount": 17143,
		"net_amount": 5714,
		"currency": "USD",
		"applied_transaction_id": "c05861f0-6384-414d-b837-0ed71cefbbe5",
		"created_at": "2026-04-14T09:12:44.512331Z"
	},
	"created_at": "2026-04-21T00:00:00Z"
}
proration_voided_webhook.json
{
	"id": "b3252825-bb48-4a5e-8c99-69ea8e4db0d9",
	"group_id": "5a7f4ef3-3d82-4606-9b27-ff50ad2789f3",
	"webhook_id": "ea3455f8-5b1d-46f0-b08d-a9ce459c8a84",
	"event_type": "proration.voided",
	"data": {
		"id": "0f1c5e64-6b41-4a35-9a4e-2f5f0b7d1a90",
		"customer_id": "8c2f0d51-7b13-4a2e-9f60-1d4c8b7a5e39",
		"subscription_id": "eef1b240-6e4d-42f7-93ea-873d165aa696",
		"plan_id": "6f8df983-62a1-4d36-85fd-2e37114fa694",
		"trigger": "amount_change",
		"behavior": "create_prorations",
		"status": "voided",
		"change_date": "2026-04-14T00:00:00Z",
		"billing_period_start": "2026-04-11T00:00:00Z",
		"billing_period_end": "2026-04-18T00:00:00Z",
		"days_remaining": 4,
		"days_in_period": 7,
		"old_amount": 20000,
		"new_amount": 30000,
		"credit_amount": 11429,
		"charge_amount": 17143,
		"net_amount": 5714,
		"currency": "USD",
		"created_at": "2026-04-14T09:12:44.512331Z"
	},
	"created_at": "2026-04-16T00:00:00Z"
}

Signature verification​

Signature value will be passed in the X-Signature header, it is hex encoded for the better text readability.

The request is signed with an RSA Private key and can be verified with the RSA Public key. The RSA Public key can be found inside the Hub, but also available through the API in the public_key field.

webhook_receiver.go
package main

import (
	"crypto"
	"crypto/rsa"
	"crypto/sha256"
	"crypto/x509"
	"encoding/hex"
	"encoding/pem"
	"io"
	"log/slog"
	"net/http"
)

// copiedPublicKey is the public key from the Hub
const copiedPublicKey = `-----BEGIN RSA PUBLIC KEY-----
<replace this with your key>
-----END RSA PUBLIC KEY-----
`

func main() {
	srv := http.NewServeMux()
	srv.HandleFunc("POST /receive-webhook", func(w http.ResponseWriter, r *http.Request) {
		rawBody, err := io.ReadAll(r.Body)
		if err != nil {
			http.Error(w, err.Error(), http.StatusBadRequest)
			return
		}
		defer r.Body.Close()

		signatureHex := r.Header.Get("X-Signature")
		signature, err := hex.DecodeString(signatureHex)
		if err != nil {
			http.Error(w, err.Error(), http.StatusBadRequest)
			return
		}

		pubParsedBlock, _ := pem.Decode([]byte(copiedPublicKey))
		publicKey, err := x509.ParsePKCS1PublicKey(pubParsedBlock.Bytes)
		if err != nil {
			http.Error(w, err.Error(), http.StatusBadRequest)
			return
		}

		hashedBody := sha256.Sum256(rawBody)

		if err := rsa.VerifyPKCS1v15(publicKey, crypto.SHA256, hashedBody[:], signature); err != nil {
			slog.Error("invalid webhook signature")
			http.Error(w, err.Error(), http.StatusBadRequest)
			return
		}

		w.WriteHeader(http.StatusOK)
	})

	slog.Info("starting server on 8080")
	if err := http.ListenAndServe(":8080", srv); err != nil {
		panic(err)
	}
}

Retry Schedule​

We retry up to 30 times, with an increasing delay after each failed attempt:

  • 1st retry: after 1 minute
  • 2nd retry: after 5 minutes
  • 3rd retry: after 30 minutes
  • 4th retry: after 1 hour
  • All subsequent retries: every 12 hours