> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # ConnectWixPaymentsAccount # Package: wixPaymentsProvider # Namespace: WixPaymentsAccountService # Method link: https://dev.wix.com/docs/api-reference/business-management/payments/wix-payments-provider/wix-payments-account/connect-wix-payments-account.md ## Permission Scopes: Connect Wix Payments Account: SCOPE.PAYMENTS.CONNECT-WIX-PAYMENTS-ACCOUNT ## Introduction Connects a Wix Payments account to the site. The call fails if: - The site's location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction.md)) is outside the USA. - A Wix Payments account is already connected to the site. - You don't specify `{"tosAccepted": true}`. The connected Wix Payments account has the following limitations, which site owners can manage in their dashboard: - By default, customers can only pay via credit card, Apple Pay, or Google Pay. - To receive payments, site owners must complete onboarding to their Wix Payments account in the site's dashboard. --- ## REST API ### Schema ``` Method: connectWixPaymentsAccount Description: Connects a Wix Payments account to the site. The call fails if: - The site's location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction.md)) is outside the USA. - A Wix Payments account is already connected to the site. - You don't specify `{"tosAccepted": true}`. The connected Wix Payments account has the following limitations, which site owners can manage in their dashboard: - By default, customers can only pay via credit card, Apple Pay, or Google Pay. - To receive payments, site owners must complete onboarding to their Wix Payments account in the site's dashboard. URL: https://www.wixapis.com/payments/v1/wix-payments-account/connect Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: account, account.firstName, account.lastName, account.tosAccepted Method parameters: param name: account | type: WixPaymentsAccount | description: An account that enables a Wix site to process customer payments. | required: true - name: firstName | type: string | description: First name of the Wix Payments account owner. | required: true - name: lastName | type: string | description: Last name of the Wix Payments account owner. | required: true - name: termsOfServiceAcceptance | type: TermsOfServiceAcceptance | description: - name: ip | type: string | description: - name: email | type: string | description: email of the Wix Payments account owner. - name: productDescription | type: string | description: Brief summary of the types of products and services offered for sale through the Wix Payments account. For example, "Sportswear and sport accessories". - name: country | type: string | description: Country code. - name: softDescriptor | type: string | description: - name: businessUrl | type: string | description: Return type: ConnectWixPaymentsAccountResponse - name: account | type: WixPaymentsAccount | description: Connected Wix Payments account. - name: id | type: string | description: GUID of the Wix Payments account. - name: firstName | type: string | description: First name of the Wix Payments account owner. - name: lastName | type: string | description: Last name of the Wix Payments account owner. - name: termsOfServiceAcceptance | type: TermsOfServiceAcceptance | description: - name: ip | type: string | description: - name: email | type: string | description: email of the Wix Payments account owner. - name: productDescription | type: string | description: Brief summary of the types of products and services offered for sale through the Wix Payments account. For example, "Sportswear and sport accessories". - name: country | type: string | description: Country code. - name: softDescriptor | type: string | description: - name: businessUrl | type: string | description: ``` ### Examples ### Connect a Wix Payments account to the site. ```curl curl -X POST \ 'https://www.wixapis.com/payments/v1/wix-payments-account/connect' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "account": { "firstName": "Hiwet", "lastName": "Neftalem", "tosAccepted": true, "productDescription": "Sportswear and sport accessories" } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.wixPaymentsProvider.WixPaymentsAccountService.connectWixPaymentsAccount(account) Description: Connects a Wix Payments account to the site. The call fails if: - The site's location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction.md)) is outside the USA. - A Wix Payments account is already connected to the site. - You don't specify `{"tosAccepted": true}`. The connected Wix Payments account has the following limitations, which site owners can manage in their dashboard: - By default, customers can only pay via credit card, Apple Pay, or Google Pay. - To receive payments, site owners must complete onboarding to their Wix Payments account in the site's dashboard. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: account, account.firstName, account.lastName, account.tosAccepted Method parameters: param name: account | type: WixPaymentsAccount | description: An account that enables a Wix site to process customer payments. | required: true - name: firstName | type: string | description: First name of the Wix Payments account owner. | required: true - name: lastName | type: string | description: Last name of the Wix Payments account owner. | required: true - name: termsOfServiceAcceptance | type: TermsOfServiceAcceptance | description: - name: ip | type: string | description: - name: email | type: string | description: email of the Wix Payments account owner. - name: productDescription | type: string | description: Brief summary of the types of products and services offered for sale through the Wix Payments account. For example, "Sportswear and sport accessories". - name: country | type: string | description: Country code. - name: softDescriptor | type: string | description: - name: businessUrl | type: string | description: Return type: PROMISE - name: account | type: WixPaymentsAccount | description: Connected Wix Payments account. - name: _id | type: string | description: GUID of the Wix Payments account. - name: firstName | type: string | description: First name of the Wix Payments account owner. - name: lastName | type: string | description: Last name of the Wix Payments account owner. - name: termsOfServiceAcceptance | type: TermsOfServiceAcceptance | description: - name: ip | type: string | description: - name: email | type: string | description: email of the Wix Payments account owner. - name: productDescription | type: string | description: Brief summary of the types of products and services offered for sale through the Wix Payments account. For example, "Sportswear and sport accessories". - name: country | type: string | description: Country code. - name: softDescriptor | type: string | description: - name: businessUrl | type: string | description: ``` ### Examples ### connectWixPaymentsAccount ```javascript import { wixPaymentsAccount } from '@wix/payments'; async function connectWixPaymentsAccount(account) { const response = await wixPaymentsAccount.connectWixPaymentsAccount(account); }; ``` ### connectWixPaymentsAccount (with elevated permissions) ```javascript import { wixPaymentsAccount } from '@wix/payments'; import { auth } from '@wix/essentials'; async function myConnectWixPaymentsAccountMethod(account) { const elevatedConnectWixPaymentsAccount = auth.elevate(wixPaymentsAccount.connectWixPaymentsAccount); const response = await elevatedConnectWixPaymentsAccount(account); } ``` ### connectWixPaymentsAccount (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { wixPaymentsAccount } from '@wix/payments'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { wixPaymentsAccount }, // Include the auth strategy and host as relevant }); async function connectWixPaymentsAccount(account) { const response = await myWixClient.wixPaymentsAccount.connectWixPaymentsAccount(account); }; ``` ---