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:
-
Why might submitEvent return successfully but fail to update the order status?
-
Could this be related to a timing issue with the external redirect flow?
-
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