Accounts receivable payment sync fails between Odoo cloud and payment gateway

We’re experiencing critical payment synchronization failures between our Odoo 15 Enterprise cloud instance and our payment gateway (Stripe). Customer payments are being processed successfully on the payment gateway side, but the payment confirmations are not syncing back to Odoo accounts receivable module.

The webhook integration was working flawlessly for the past 6 months, but started failing intermittently about 10 days ago. Now approximately 30-40% of payments aren’t being recorded in Odoo, causing major reconciliation issues and customer service problems when customers call about invoices that should be marked as paid.

Webhook error from Stripe logs:

Webhook delivery failed:
URL: https://our-instance.odoo.com/payment/stripe/webhook
Status: 500 Internal Server Error
Attempts: 3/3
Payload: {
  "type": "payment_intent.succeeded",
  "data": {
    "object": {
      "id": "pi_3Nxyz123",
      "amount": 150000,
      "currency": "usd",
      "metadata": {"invoice_id": "INV/2025/0847"}
    }
  }
}

Our finance team is having to manually reconcile hundreds of payments each week. Need urgent help to restore automatic payment sync functionality.

This could be a rate limiting issue on your cloud instance. If you’re processing a high volume of payments, the webhook requests might be hitting your instance’s rate limit, causing some to fail with 500 errors. Cloud deployments have request rate limits to ensure fair resource usage across tenants. Check with your cloud provider about your current rate limits and whether you’re hitting them during peak payment processing times. You might need to upgrade to a plan with higher rate limits.

This is likely a webhook signature verification issue. Payment gateways like Stripe send a signature header with each webhook request to verify authenticity. If your Odoo instance’s webhook secret key got changed or corrupted somehow, the webhook processing will fail with a 500 error because it can’t verify the request is legitimate. Go to your payment provider configuration in Odoo and verify that the webhook signing secret matches what’s configured in your Stripe dashboard. You might need to regenerate the webhook secret on both sides.

Check your cloud instance’s webhook processing logs. In Odoo 15, webhook failures are usually logged in the payment transaction records. Go to Accounting > Customers > Payments and look for failed transactions. Click on them to see the detailed error message. This will tell you exactly why the webhook processing is failing - it could be a data validation error, missing configuration, or database constraint violation that’s causing the 500 error.

Thank you payment_systems_architect! We found that our payment journal configuration had been changed during a recent module update - the journal’s payment account was reset to a default value instead of our configured receivables account. After fixing the journal configuration and adding the improved error logging, the webhooks are processing successfully again. We also used the Stripe event history to reprocess the failed payments from the past 10 days. All caught up now!

I’ve seen this happen when the payment provider module gets updated but the webhook payload structure changes slightly. Odoo 15 expects specific field names and data types in the webhook payload. If Stripe updated their webhook payload format and added or renamed fields, the Odoo webhook handler might be failing to parse it correctly. You should check if there’s an updated version of the Stripe payment provider module available for Odoo 15 that handles the new payload format.

I’ve encountered this exact issue with Odoo 15 cloud and Stripe integration. The problem is usually related to how the webhook handler processes the payment intent metadata and matches it to invoices in accounts receivable. When the webhook fails with a 500 error, it’s typically because of one of these issues:

  1. The invoice referenced in the metadata doesn’t exist or is in an invalid state
  2. The payment journal configuration is missing or incorrect
  3. The customer account has validation issues that prevent payment posting

Here’s how to diagnose and fix it:

First, enable debug logging for webhook processing. Add this to your cloud instance configuration:

# In your payment provider module
import logging
_logger = logging.getLogger(__name__)

class PaymentTransactionStripe(models.Model):
    _inherit = 'payment.transaction'

    @api.model
    def _handle_webhook_notification(self, data):
        _logger.info('Webhook received: %s', data)
        try:
            # Validate invoice exists and is in correct state
            invoice_ref = data.get('metadata', {}).get('invoice_id')
            if invoice_ref:
                invoice = self.env['account.move'].search([
                    ('name', '=', invoice_ref),
                    ('state', '=', 'posted')
                ], limit=1)

                if not invoice:
                    _logger.error('Invoice not found or not posted: %s', invoice_ref)
                    return {'status': 'error', 'message': 'Invoice not found'}

            # Verify payment journal is configured
            provider = self.env['payment.provider'].search([('code', '=', 'stripe')], limit=1)
            if not provider.journal_id:
                _logger.error('Payment journal not configured for Stripe provider')
                return {'status': 'error', 'message': 'Journal not configured'}

            # Process the payment
            tx = super()._handle_webhook_notification(data)

            # Explicitly commit to ensure payment is recorded
            self.env.cr.commit()

            _logger.info('Payment processed successfully: %s', tx.reference)
            return {'status': 'success'}

        except Exception as e:
            _logger.error('Webhook processing failed: %s', str(e), exc_info=True)
            self.env.cr.rollback()
            raise

The key issues to check:

  1. Verify your payment journal configuration: Go to Accounting > Configuration > Journals and ensure your payment journal (usually named “Stripe” or “Online Payments”) is properly configured with the correct account settings.

  2. Check invoice states: The webhook handler expects invoices to be in ‘posted’ state. If invoices are still in draft or have been cancelled, the webhook will fail.

  3. Validate customer accounts: Ensure all customer records have valid receivable accounts configured. Missing or incorrect account configurations will cause payment posting to fail.

  4. Test webhook manually: Use Stripe’s webhook testing tool in their dashboard to send a test webhook and check the detailed error response from Odoo.

For the immediate issue with 30-40% of payments failing, you should also implement a reconciliation script that can process the failed webhooks manually. Stripe keeps webhook event history for 30 days, so you can retrieve the failed events and reprocess them once you’ve fixed the underlying issue.

The 500 error suggests something changed on the Odoo side that’s breaking the webhook processing. Check if there were any recent updates or module installations on your cloud instance around 10 days ago. Also verify that the webhook endpoint URL hasn’t changed - sometimes cloud providers update their routing configuration which can break existing webhook URLs.