Wix PSP Plugin: submitEvent Not Updating Order Status from Pending to Paid

Hello Wix Community,

I’m developing a Wix Payment Service Provider (PSP) Service Plugin and facing an issue similar to the forum discussion: 3rd Party Payment Gateway Integration Nightmare. I’d appreciate any insights or suggestions.

Setup:

  • PSP plugin is configured and enabled in the Wix backend.

  • createTransaction returns a pluginTransactionId and redirectUrl to an external Next.js payment page.

  • Payment flow works: the customer is redirected, completes the payment, and the order is created in the Wix dashboard.

Issue:

  • After payment completion, the order is created in Pending status.

  • wixPaymentProviderBackend.submitEvent() is called but does not update the order to Paid.

Details:

  • submitEvent is called with:

    • wixTransactionId: Correct transaction ID (e.g., 4060ce0e-5d83-4d33-9bf8-c9b08bedab91)

    • pluginTransactionId: Format {paymentHash}|{currency} (e.g., 2c58e4d…|USD)

    • reasonCode: 5009 (Payment captured)

  • submitEvent returns an empty object {} (consistent with the BTCPayServer plugin, which works).

  • Logs confirm: “Successfully submitted event to Wix,” but the order status remains Pending.

What We’ve Tried:

  • Adding delays before calling submitEvent to account for potential timing issues.

  • Implementing retry logic with progressive delays.

  • Verifying the order exists in the Wix dashboard before submitting the event.

Questions:

  1. Why might submitEvent return successfully but fail to update the order status?

  2. Could this be related to a timing issue with the external redirect flow?

  3. Are there additional requirements for the transaction object or webhook setup that we might be missing?

Relevant Logs (Sensitive Data Obscured):

INFO 13:48:28.733 [Jamesco Webhook] Received webhook payload: {
“amountSat”: 10,
“externalId”: “4060ce0e-5d83-4d33-9bf8-c9b08bedab91”,
“paymentHash”: “2c58e4d…da”,
“type”: “incoming_payment”,
“wixTransactionId”: “4060ce0e-5d83-4d33-9bf8-c9b08bedab91”,
“status”: “paid”,
“payment_status”: “paid”,
“invoice_status”: “paid”,
“paid”: true,
“is_paid”: true,
“payment_hash”: “2c58e4d…da”,
“charge_currency”: “USD”,
“fiatCurrency”: “USD”,
“currency”: “USD”
}

INFO 13:48:28.736 [Jamesco Webhook] Query params: {
“wixTransactionId”: “4060ce0e-5d83-4d33-9bf8-c9b08bedab91”,
“currency”: “USD”
}

INFO 13:48:28.738 [Jamesco Webhook] Processing webhook for transaction: 4060ce0e-5d83-4d33-9bf8-c9b08bedab91

INFO 13:48:28.740 [Jamesco Webhook] Submitting event to Wix: {
“wixTransactionId”: “4060ce0e-5d83-4d33-9bf8-c9b08bedab91”,
“pluginTransactionId”: “2c58e4d…da|USD”,
“reasonCode”: 5009
}

INFO 13:48:28.934 [Jamesco Webhook] submitEvent result: {}

INFO 13:48:28.938 [Jamesco Webhook] Successfully submitted event to Wix for transaction: 4060ce0e-5d83-4d33-9bf8-c9b08bedab91
1 Like

Hi, thanks for flagging this issue.

We have recently received similar reports from other users, so I recommend filing a ticket so we can understand if they are related.

If you haven’t already, file a support ticket with the same information as this post using the following link: Contact Wix

1 Like

Yes i opened ticket 26149543

2 Likes

Hello, all i just wanted to share i was able to fix my order / payment unpaid issue

What solved the issue:
The fix was: InvoiceSettled should not have a reasonCode. Wix requires the final InvoiceSettled event without reasonCode to mark the order as paid. The combination of:
Sending 4 sequential webhook events (instead of one with a loop)
Setting reasonCode: 5009 only for the first 3 events
Sending InvoiceSettled without reasonCode (the final event that marks it as paid)
Ignoring legacy webhooks to prevent duplicates

I hope this helps! :slightly_smiling_face:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.