> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thebridgesolutions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Callback Events

> Understanding Bridge Payment Gateway callback events and webhook responses

# Callback Events

The Bridge WooCommerce plugin processes various callback events to update order statuses and handle transaction responses.

## Payment Status Updates

### Success Response

```json theme={null}
{
  "event": "payment.success",
  "data": {
    "reference": "ORDER-123456",
    "amount": "100.00",
    "currency": "GHS",
    "status": "successful"
  }
}
```

* Order status updated to "Processing"
* Customer receives confirmation email
* Stock levels updated

### Failed Response

```json theme={null}
{
  "event": "payment.failed",
  "data": {
    "reference": "ORDER-123456",
    "reason": "insufficient_funds"
  }
}
```

* Order status updated to "Failed"
* Customer redirected to retry payment
* Original stock levels maintained

### Pending Response

```json theme={null}
{
  "event": "payment.pending",
  "data": {
    "reference": "ORDER-123456",
    "status": "pending"
  }
}
```

* Order status remains "Pending Payment"
* Temporary hold on stock
* Automatic status check after 15 minutes

## Transaction Verification

The plugin automatically verifies transactions using:

1. Webhook notifications
2. Transaction reference matching
3. Amount verification
4. Signature validation

## Error Handling

All callback events are logged when debug mode is enabled:

* Transaction ID
* Event type
* Response data
* Error messages

Access logs via WooCommerce > Status > Logs

## Security

Callbacks are secured through:

* IP whitelisting
* Signature verification
* HTTPS encryption
* Request validation

## Testing Callbacks

Use test mode to simulate:

* Successful payments
* Failed transactions
* Pending states
* Error scenarios

For technical support, contact [support@thebridgesolutions.com](mailto:support@thebridgesolutions.com)
