getConfig( )

Retrieves the configuration of your payment provider plugin.


Set your payment provider configuration in the return of the getConfig() function. Wix calls this function when you publish your site. Changes to the configuration don't take effect until you publish your site.

The object returned by getConfig() includes the information about your plugin that displays in your site's Connect, Accept Payments, and Checkout pages.

Where to find getConfig()

When you add the Payment Provider service plugin, a folder is automatically added to your site. Use the <my-plugin-name>-config.js file in the folder to set the default configuration for your implementation of the custom plugin.

For more information on setting your configuration, see Tutorial: Payment Provider Service Plugin.


function getConfig(): Promise<PaymentProviderConfigResponse>

getConfig Parameters

This function does not take any parameters.


Fulfilled - The configuration settings.

Return Type:


Required. Name of the payment service provider.

This name is displayed on your site's dashboard when selecting payment providers to connect to.


Required. Payment methods supported by this provider.

Each payment method is a key:value pair where the key is the name of the payment method. Currently, only "hostedPage" is supported for this key. The value of this key is an object that includes title, billingAddressMandatoryFields, and logos.


Required. Credentials to connect an account for the payment provider.

These fields are displayed on the Connect page in your site's dashboard.

Was this helpful?

Example of a configuration file

Copy Code
1// Place this code in the <my-plugin-name>-config.js file
2// in the 'payment-provider' folder of the
3// Service Plugins section on your site.
5export function getConfig() {
6 return {
7 title: 'Banana Payments',
8 paymentMethods: [{
9 hostedPage: {
10 title: 'Banana Payments',
11 billingAddressMandatoryFields: ['CITY'],
12 logos: {
13 white: {
14 svg: '',
15 png: ''
16 },
17 colored: {
18 svg: '',
19 png: ''
20 }
21 }
22 }
23 }],
24 credentialsFields: [{
25 simpleField: {
26 name: 'clientId',
27 label: 'API id'
28 }
29 },
30 {
31 simpleField: {
32 name: 'clientSecret',
33 label: 'API secret'
34 }
35 }]
36 };