Webhook Event
Sweuze sends webhook events to your configured endpoint when payment status changes occur. All events follow the same envelope structure with a type field that determines the event category.
Event Categories
Payment Intent Events - Lifecycle of a payment intent:
payment_intent.initiated- Intent created (first event)payment_intent.requires_action- Customer action needed (redirect or display requisites)payment_intent.processing- Provider is processing the paymentpayment_intent.succeeded- Payment complete (fulfill order)payment_intent.failed- Intent failed (e.g. provider error, customer rejection)payment_intent.canceled- Payment canceled/expired
Payment Events - Transaction processing:
payment.pending- Pending confirmationpayment.processing- Provider processingpayment.succeeded- Payment capturedpayment.failed- Payment failed
Webhook Security
All webhook requests include authentication via the X-Signature header:
Format: t=timestamp,v1=current_signature,v0=old_signature
Verification:
signed_payload = timestamp + "." + request_body
expected_sig = HMAC-SHA256(signed_payload, webhook_secret)
# Compare with v1 (constant-time comparison)
if expected_sig == v1: accept
# During rotation, also check v0
if expected_sig == v0: accept
# Validate timestamp (reject if > 5 minutes old)
if abs(now - timestamp) > 300: reject
See implementation examples in the guides.
- datarequired
Event-specific data. Structure depends on the event type (discriminated by
type).- typeDiscriminatorType: stringrequired
Event type
- amountType: string
Pattern: ^\d+\.\d{8}$requiredPayment amount as a decimal string with eight decimal places
- currencyType: stringrequired
Three-letter ISO 4217 currency code
- customerType: string
Id requiredCustomer identifier from your system
- idType: stringFormat: uuidrequired
Payment intent identifier
- merchantType: stringFormat: uuid
Id requiredAssociated merchant ID
- merchantType: string
Reference requiredYour order/transaction reference
- paymentType: string
Method Id requiredPayment method identifier
- statusType: stringenumrequired
Status of the payment intent. Matches the second segment of
type(e.g.succeededforpayment_intent.succeeded).values- initiated
- requires
_action - processing
- succeeded
- failed
- canceled
- actionnullable
- paymentType: stringFormat: uuid nullable
Id Associated payment ID (null until payment is created)
- Type: stringFormat: uuididrequired
Unique webhook notification identifier (use for idempotency)
- Type: stringFormat: date-timeoccurred
At requiredISO 8601 timestamp with milliseconds when the event occurred
- Type: stringenumtyperequired
Event type that determines the structure of the
datafieldvalues- payment
_intent .initiated - payment
_intent .requires _action - payment
_intent .processing - payment
_intent .succeeded - payment
_intent .canceled
- Type: stringversionrequired
API version used for this webhook payload
- 200
Webhook received successfully
- 202
Webhook accepted for processing
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"type": "payment_intent.succeeded",
"version": "2026.1.0",
"occurredAt": "2025-11-18T15:30:00.000+00:00",
"data": {
"type": "payment_intent.succeeded",
"id": "948688ed-451f-49e3-8084-b23f3ee32aa2",
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"merchantId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"merchantReference": "ORDER-12345",
"paymentMethodId": "mbway-eupago",
"customerId": "cust_abc123",
"amount": "50.00000000",
"currency": "EUR",
"status": "succeeded",
"action": null
}
}