Once a merchant has accepted the OAuth scope, an access & refresh token is
generated for the merchant. If the MCA refresh token has been stored, an API
request can be made using accounts.link with an
AccountsLinkRequest object. The action should be "request".
Conversely, an API request then can be made immediately after using the
subaccount's token, with an AccountsLinkRequest object. The action type should
be "approved". This enables a streamlined account linking workflow for
your merchants joining your platform.
Perform a Three-Way Account Link
Assume you have the following example accounts:
Account
Purpose
111111111
MCA Account
2222222
Other Subaccount
3333333
New Onboarding Account
The account.link resource for LINK REQUEST would have the following for
its parameters:
Parameter
Value
merchantID
111111111
accountID
2222222
And the AccountLinkRequest body would have the following properties:
Property
Value
linkType
eCommercePlatform
linkedAccountId
3333333
action
request
Conversely, the account.link resource for LINK APPROVE would have the
following for its parameters:
Parameter
Value
merchantID
3333333
accountID
3333333
And the AccountLinkRequest body would have the following properties:
[null,null,["Last updated 2024-09-03 UTC."],[[["The `accounts.link` API enables streamlined account linking for merchants joining your platform."],["A three-way account link involves an MCA account, a subaccount, and a new onboarding account."],["To initiate a link request, use the MCA account's OAuth token and set the action to \"request\"."],["To approve a link request, use the subaccount's OAuth token, set the action to \"approve\", and provide an external account identifier."],["The `accounts.link` resource requires specific parameters and an `AccountLinkRequest` body with relevant properties for both request and approval actions."]]],["A three-way account link involves using the `accounts.link` API. First, a request is made from the MCA account (e.g., 111111111) to link a subaccount (e.g., 2222222) to a new onboarding account (e.g., 3333333), with the `action` set to \"**request**\". Then, using the subaccount's token, another API request is made to approve the link, setting `action` to \"**approve**\". This specifies the `linkedAccountId`, along with services and external identifier.\n"]]