PayPal Notifications

PayPal Notifications

BR-DGE sends notifications to your server for key PayPal payment events. This allows you to keep your system in sync with the outcome of transactions without having to poll the API.


Supported Event Types

EventTrigger
checkout.order.completedA PayPal order has been completed
checkout.order.approvedA customer has approved a PayPal order
payment.capture.completedA payment capture was successful
payment.capture.deniedA payment capture was denied
payment.capture.refundedA payment was refunded
payment.capture.reversedA payment was reversed
payment.authorization.createdA payment authorization was created
payment.authorization.voidedA payment authorization was voided

Notification Structure

All BR-DGE PayPal notifications follow this structure:

{
  "type": "payment",
  "id": "...",
  "merchantAccountId": "...",
  "code": "1000",
  "status": "...",
  "message": {
    "webhookEvent": "payment.capture.completed"
  },
  "psp": {
    "name": "PayPal-Direct",
    "transactionId": "..."
  },
  "hashCode": "..."
}

Key Fields

FieldDescription
typeAlways payment for PayPal notifications
idBR-DGE notification identifier
merchantAccountIdYour BR-DGE merchant account ID
codeBR-DGE response code (e.g. 1000 for success)
statusThe current payment status
message.webhookEventThe specific PayPal event that triggered this notification
psp.nameAlways PayPal-Direct
psp.transactionIdPayPal's transaction reference
hashCodeUsed to authenticate the notification

Authentication

BR-DGE PayPal notifications use the standard BR-DGE notification authentication method. You should validate the notification body on every incoming request before updating your order or payment state.

Refer to the BR-DGE Notification Authentication guide for full implementation details.

🚧

Always Validate Notifications

Never update payment or order state based on an unauthenticated notification. Always verify the notification first to confirm the request originated from BR-DGE.