POST

Connect Account


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

This endpoint is used to connect a merchant's Payment Service Provider (PSP) account to a Wix site.

Wix calls this endpoint when a merchant chooses to connect a PSP in the Wix dashboard. The PSP must verify the merchant's credentials and ensure that the merchant has an operational PSP account. Learn more about implementing this endpoint.

You cannot try out this endpoint because it has to be implemented by a payment plugin and can have an arbitrary URL. So please ignore the Authorization and POST sections below, as well as the Try It Out button.

Body Params
credentialsMap <string, string>Requiredformat map

Merchant credentials for a PSP account. The PSP specifies the keys for this object in the app dashboard. The merchant is prompted to enter these credentials when they connect their PSP account to their Wix site.


countrystringformat COUNTRY

Country where the merchant provides their services, in ISO 3166-1 alpha-2 format.


currencystringformat CURRENCY

Code for the merchant's preferred currency.


modestring

Connection mode. Identifies whether a request is live or for testing purposes.


wixMerchantIdstringRequired

Wix merchant ID.

Response Object
credentialsMap <string, string>format map

Merchant credentials that Wix will use when sending the merchant's payment and refund requests.


accountIdstring

Merchant account ID. The PSP must not change this value over the lifetime of the merchant's account.


accountNamestring

Merchant account name.


reasonCodeintegerformat int32

Wix reason code indicating a type of failed request.


errorCodestring

PSP-specific error code.


errorMessagestring

PSP-specific error message.


modestringdeprecated

This field is ignored. Do not send it.

Request
cURL
curl -X POST https://psp.example.com/connect \ -H 'Content-Type: application/json' \ -H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \ -d '{ "credentials": { "client_id": "MerchantClientId", "client_secret": "MerchantClientSecret" }, "country": "US", "currency": "USD", "mode": "live", "wixMerchantId": "000000-0000-0000-0000-000000000000" }'
Response
JSON
{ "credentials": { "client_id": "MerchantClientId", "client_secret": "MerchantClientSecret" }, "accountId": "999999-9999-9999-9999-999999999999", "accountName": "jane.brown@example.com" }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?