Payment Provider Service Plugin - "Some fields have invalid or missing information" error on connectAccount()

Hello everyone,

I’m implementing a custom Payment Provider Service Plugin to integrate Nuvei/Paymentez Ecuador with my Wix site. When I try to connect the payment provider from the dashboard (Settings > Accept Payments > Connect), I get this generic error:

“Some fields have invalid or missing information” Request ID: 1761845531.72810923514743138307

The Problem

  • My connectAccount() function executes successfully (confirmed in logs)

  • The function returns the exact structure specified in the documentation

  • Logs show all required fields are present: credentials, accountId, accountName

  • Error provides no information about which field is invalid or missing

  • Function is called 3-4 times (seems like Wix validation retries)

What I’ve Tried

  1. Simplified config to bare minimum (no logos, no optional fields)

  2. Made accountId deterministic using MD5 hash

  3. Removed async from connectAccount()

  4. Tested with different credential field types (dropdown vs simpleField)

  5. Recreated the plugin from scratch with a different name

  6. Tested in multiple browsers

  7. Verified Business Info is complete and site has Business plan with “Accept Payments” enabled

My Code

nuvei-ecuador-config.js:

javascript

export function getConfig() {
  return {
    title: 'Nuvei Ecuador',
    
    paymentMethods: [{
      hostedPage: {
        title: 'Nuvei Ecuador'
      }
    }],
    
    credentialsFields: [
      {
        simpleField: {
          name: 'server_app_code',
          label: 'Server App Code'
        }
      },
      {
        simpleField: {
          name: 'server_app_key',
          label: 'Server App Key'
        }
      },
      {
        simpleField: {
          name: 'client_app_code',
          label: 'Client App Code'
        }
      },
      {
        simpleField: {
          name: 'client_app_key',
          label: 'Client App Key'
        }
      },
      {
        simpleField: {
          name: 'environment',
          label: 'Environment (stg or prod)'
        }
      }
    ]
  };
}

nuvei-ecuador.js (connectAccount function):

javascript

export function connectAccount(options, context) {
  console.log('connectAccount initiated');
  
  const credentials = options.credentials;
  
  if (!credentials || !credentials.server_app_code || !credentials.server_app_key) {
    return {
      reasonCode: 2001,
      errorCode: 'MISSING_CREDENTIALS',
      errorMessage: 'Please provide all required credentials'
    };
  }
  
  const accountId = generateAccountId(credentials);
  const accountName = 'Nuvei Ecuador';
  
  console.log('Generated accountId:', accountId);
  console.log('Account name:', accountName);
  
  return {
    credentials: credentials,
    accountId: accountId,
    accountName: accountName
  };
}
```

### Logs Output

The logs show successful execution:
```
connectAccount initiated
Generated accountId: nuvei_0641f41b01be89f7
Account name: Nuvei Ecuador

But then Wix shows: “Some fields have invalid or missing information”

Questions

  1. Is there any undocumented validation that connectAccount() must pass?

  2. Are there specific format requirements for accountId or accountName?

  3. Could this be related to the credential field names or structure?

  4. Is there a way to get more detailed error information from Wix?

Has anyone encountered this issue before? Any suggestions would be greatly appreciated!