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
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β
- Open
POST /merchants/webhookin thewallet-merchant-serviceSwagger UI and review the request schema. - 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.
- Submit through Swagger. Check the response
statusand retain the subscription details and any returnedx509EncodedPublicKeyneeded for the chosen authentication method. - Verify delivery in a non-production environment before relying on the subscription.
Update a subscriptionβ
- Identify the existing webhook
idand save its current configuration so you can compare the result and recover from an unintended change. - Open
PATCH /merchants/webhookin the service's Swagger UI. Check the current update schema; it includes the webhookidalongside the registration fields. - Change only the intended destination, events, or authentication settings as permitted by the current schema, then submit through Swagger.
- 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.
| Field | What to check |
|---|---|
merchantIds | Required, non-empty set of merchant UUIDs. One subscription can cover multiple merchants. |
url | Optional in the request schema. When set, use a valid, publicly reachable HTTPS endpoint controlled by the merchant. |
topic | Required Event Grid topic. |
eventsToListen | Required, non-empty list of webhook event types; see Choose events. |
authenticationConfig | Required delivery authentication configuration; see Choose delivery authentication. |
customConfig | Optional 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:
| Type | Config needed | Notes |
|---|---|---|
CCG_ACCESS_TOKEN | None | CCG signs/authenticates the delivery itself |
OAUTH2_CLIENT_CREDENTIAL | oAuth2Config | CCG fetches a token from the merchant's token endpoint before each delivery |
oAuth2Config fields (only when type is OAUTH2_CLIENT_CREDENTIAL):
| Field | Required | Notes |
|---|---|---|
tokenUrl | No | Must be a valid URL if set |
clientId | Yes | |
clientSecret | Yes | Masked in logs β never logged in plaintext |
scope | No | |
useAuthorizationHeader | No |
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:
| Category | Events |
|---|---|
| Payment | PAYMENT_SUCCEEDED, PAYMENT_FAILED, PAYMENT_AUTHORIZED, PAYMENT_CANCELED, PAYMENT_ACCEPTED, PAYMENT_PARTIALLY_SUCCEEDED |
| Payment Method | PAYMENT_METHOD_CREATED, PAYMENT_METHOD_UPDATED, PAYMENT_METHOD_DELETED, PAYMENT_METHOD_REPLACED |
| Refund | REFUND_SUCCESS, REFUND_FAILED, REFUND_PENDING, REFUND_PARTIAL_SUCCESS |
| Dispute | DISPUTE_INITIATED, DISPUTE_FUNDS_WITHDRAWN, DISPUTE_WON, DISPUTE_CLOSED |
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.
Related Documentationβ
- Webhook Configuration β merchant-facing event catalog and payload shapes
- Onboard a Merchant (How-to)