Checking access…

Skip to main content
Audience: CCG Platform Engineers

Configure Webhooks

Register or update a merchant's webhook subscription in wallet-merchant-service. Webhooks are a separate resource from the merchant settings object described in Onboard a Merchant.

Choose your task: Register a subscription Β· Update a subscription Β· Check fields and authentication Β· Choose events

Use the service's Swagger UI

Port-forward to wallet-merchant-service and use its Swagger UI for POST /merchants/webhook or PATCH /merchants/webhook. Check the current request schema, required fields, and response before submitting. The field and event lists below help you prepare; Swagger is the source of truth for the payload you send. For merchant-facing delivery and payload guidance, see Webhook Configuration.

Before you begin​

Confirm the merchant ID or IDs, the delivery destination, the Event Grid topic, the events the merchant wants, and the delivery authentication method. If you are updating a subscription, also identify its webhook id and record its current configuration before changing it.

Register a subscription​

  1. Open POST /merchants/webhook in the wallet-merchant-service Swagger UI and review the request schema.
  2. Enter the merchant IDs, topic, event list, and authentication configuration. Add a delivery URL and custom headers when applicable. Use the field reference, authentication options, and event list to prepare your choices.
  3. Submit through Swagger. Check the response status and retain the subscription details and any returned x509EncodedPublicKey needed for the chosen authentication method.
  4. Verify delivery in a non-production environment before relying on the subscription.

Update a subscription​

  1. Identify the existing webhook id and save its current configuration so you can compare the result and recover from an unintended change.
  2. Open PATCH /merchants/webhook in the service's Swagger UI. Check the current update schema; it includes the webhook id alongside the registration fields.
  3. Change only the intended destination, events, or authentication settings as permitted by the current schema, then submit through Swagger.
  4. Check the response and verify delivery, especially for newly added events or a changed destination.

Registration field reference​

Use this as a preparation checklist. Confirm field types and validation in Swagger at the time of the change.

FieldWhat to check
merchantIdsRequired, non-empty set of merchant UUIDs. One subscription can cover multiple merchants.
urlOptional in the request schema. When set, use a valid, publicly reachable HTTPS endpoint controlled by the merchant.
topicRequired Event Grid topic.
eventsToListenRequired, non-empty list of webhook event types; see Choose events.
authenticationConfigRequired delivery authentication configuration; see Choose delivery authentication.
customConfigOptional additional delivery headers under headers. Confirm their names and values with the merchant.

Choose delivery authentication​

authenticationConfig.type defaults to CCG_ACCESS_TOKEN if omitted. Two types are supported:

TypeConfig neededNotes
CCG_ACCESS_TOKENNoneCCG signs/authenticates the delivery itself
OAUTH2_CLIENT_CREDENTIALoAuth2ConfigCCG fetches a token from the merchant's token endpoint before each delivery

oAuth2Config fields (only when type is OAUTH2_CLIENT_CREDENTIAL):

FieldRequiredNotes
tokenUrlNoMust be a valid URL if set
clientIdYes
clientSecretYesMasked in logs β€” never logged in plaintext
scopeNo
useAuthorizationHeaderNo

keyPairsConfig (base64EncodedPublicKey / base64EncodedPrivateKey) is also available on authenticationConfig for key-pair-based verification β€” check with the platform team before using this instead of the two types above; it's less common.

Choose events​

eventsToListen accepts any of:

CategoryEvents
PaymentPAYMENT_SUCCEEDED, PAYMENT_FAILED, PAYMENT_AUTHORIZED, PAYMENT_CANCELED, PAYMENT_ACCEPTED, PAYMENT_PARTIALLY_SUCCEEDED
Payment MethodPAYMENT_METHOD_CREATED, PAYMENT_METHOD_UPDATED, PAYMENT_METHOD_DELETED, PAYMENT_METHOD_REPLACED
RefundREFUND_SUCCESS, REFUND_FAILED, REFUND_PENDING, REFUND_PARTIAL_SUCCESS
DisputeDISPUTE_INITIATED, DISPUTE_FUNDS_WITHDRAWN, DISPUTE_WON, DISPUTE_CLOSED
caution

The enum also contains PAYMENT_SUCCEDED (missing an "E") as a historical duplicate of PAYMENT_SUCCEEDED. Always use PAYMENT_SUCCEEDED β€” the misspelled value is not the one internal payment/refund/dispute events actually map to.

Verify the configuration​

Check the returned subscription status and confirm that the merchant IDs, destination, authentication, and event list match the intended configuration. In a non-production environment, trigger a representative subscribed event and confirm that the merchant endpoint receives it. If delivery fails, compare the saved subscription with the Swagger response and use Webhook Configuration for delivery guidance.