menu

Create a Virtual Account

TxB APIs allow Clients to create and modify new virtual accounts, which act as subledgers underneath an existing (virtual-enabled) commercial deposit account. Clients can use this flexible ledger tool to better track and allocate money movement without the latency and manual work usually involved in opening commercial deposit accounts via a graphical interface. Virtual accounts can be assigned to individual customers, suppliers, deals, or anything else Clients might want to track at a granular level.

For additional context on the account and service types we provide, read more here.

Step by Step Guide

Step 1 - Retrieve a list of existing accounts / products

In order to create a virtual account, you must link it with a parentAccount when opening. Virtual accounts are bound to and inherit the currency, branchCountry and ownershipAndControl details from the parentAccount.

So, the first step is to retrieve all of your existing products and their account numbers. These include deposit accounts (physical and virtual), financing accounts and payments only accounts.

GET /v2/products returns:

{
    "productList": [
        {
            "productType": "DEPOSIT_ACCOUNT",
            "relatedEntities": [
                {
                    "entityId": "3899CF77860848BE8D89F2F70FA2F4ED",
                    "roleType": "DEPOSITOR"
                }
            ],
            "productTypeSpecificData": {
                "depositAccountSpecificData": {
                    "accountNumber": "220000008400",
                    "accountObject": {
                        "linkUrl": "https://api.test.txb.gs.com/v2/accounts/220000004004"
                    },
                    "transactionData": [
                        { ... }
                    ]
                }
            }
        },
        {
            "productType": "DEPOSIT_ACCOUNT",
            "relatedEntities": [
                {
                    "entityId": "3899CF77860848BE8D89F2F70FA2F4ED",
                    "roleType": "DEPOSITOR"
                }
            ],
            "productTypeSpecificData": {
                "depositAccountSpecificData": {
                    "accountNumber": "110000008260",
                    "accountObject": {
                        "linkUrl": "https://api.test.txb.gs.com/v2/accounts/11008260"
                    },
                    "transactionData": [
                        { ... }
                    ]
                }
            }
        }
    ]
}

Step 2 - Identify the physical account under which you'll create the virtual account

Once you have your product list response (from step 1), get the account types by looking at each account detail.

GET /v2/accounts/220000008400 returns:

{
    "type": "PHYSICAL_DEPOSIT",		//Identifies account type
    "accountStatus": "ACTIVE",
    "accountCurrency": "USD",		// All linked virtual accounts will inherit this
    "rate": null,
    "branchCountry": "US",			// All linked virtual accounts will inherit this
    "administrative": { 
        "openDate": "2022-03-15T15:49:24.845Z",
        "accountName": "My First Account",
        "accountNickname": "Main USD Account"
        ...
    }
    ...
}

Repeat this step for each of your products to identify accounts with the desired attributes.

{
    "type": "PHYSICAL_DEPOSIT",		
    "accountStatus": "ACTIVE",
    "accountCurrency": "GBP",		// All linked virtual accounts will inherit this
    "rate": null,
    "branchCountry": "US",		
    "administrative": { 
        "openDate": "2022-03-19T19:49:24.845Z",
        "accountName": "My Second Account",
        "accountNickname": "Main GBP Account"
        ...
    }
    ...
}

Step 3 - Select which virtual account to activate

Now that you have your list of parentAccounts, you retrieve a pre-reserved set of account numbers. Couple things to note:

  • Your query can be filtered by branchCountry as a query parameter
  • Accounts with branchCountry = US will return 12 digit account numbers, without any IBANs or Bank Identifiers
  • Accounts with branchCountry = GB will return account numbers, IBANs and Bank Identifiers. This is important because in the UK, accountNumbers are not unique. But accountNumbers + sort codes are unique

GET /v2/accounts/reserved returns:

{
    "reservedAccountNumbers": [
        {
            "accountNumber": "80001319",
            "iban": "GB74GSLD04296280001319",   // only applicable for non-US accounts
            "bankIdentifier": {                 // only applicable for non-US accounts
                "bic": "GSLDGB20",
                "routingInfo": {                //Required to open branchCountry = GB accounts				        
                    "code": "GBDSC",
                    "value": "042962"
                }
            },
            "externalPaymentIds": null
        },
        {
            "accountNumber": "800400123987",
            "iban": null,
            "externalPaymentIds": null
        },
        {
            "accountNumber": "800400333444",
            "iban": null,
            "externalPaymentIds": null
        },
        ...
    ]
    "hasMore": false
}

Step 4 - Create a virtual account

You can now send the request to open a virtual account using the reserved accountNumber (from Step 3) and the parentAccountNumber of your physical account (from Step 2).

POST /v2/accounts/virtual with this payload:

{
    "virtualAccountRequest": {
        "requestId": "VIAOpeningUSD",
        "administrative": {
            "accountName": "ClientVIAUSD",
            "accountNickname": "USD VIA",
            "depositorType": "WHOLESALE",
            "accountPurposes": [
                "COMMERCIAL_PAYMENTS"
            ]
        },
        "accountIdentifiers": {
            "accountNumber": "800400123987" // The account number from your reserved list
        },
        "ownershipAndControl": {
            "thirdPartyIndicator": false, 
            
            // This value is true if the virtual account will be used by a 3rd party
            
            "depositorEntityId": "F196FF3DAAAF4E939296CCB7808F6E74",
            "relatedPersons": [
                {
                    "contactType": "AUTHORIZED_PERSON",
                    "personId": "person_contact^519397AA4FFF4C3B93E4EC6429ED1E1B"
                }
            ]
        },
        "typeSpecificInfo": {
            "virtualAccountInfo": {
                "parentAccountNumber": "220000008400" 
                
                // Identifies the physical account your virtual is linked to
            }
        }
    }
}

Repeat this step for each of the virtual account currencies you wish to open. Remember to use a new requestId and reserved account number in each request.

POST /v2/accounts/virtual with this payload:

{
    "virtualAccountRequest": {
        "requestId": "VIAOpeningGBP",
        "administrative": {
            "accountName": "ClientVIAGBP",
            "accountNickname": "USD GBP",
            "depositorType": "WHOLESALE",
            "accountPurposes": [
                "COMMERCIAL_PAYMENTS"
            ]
        },
        "accountIdentifiers": {
            "accountNumber": "800400333444" // the account number from your reserved list
        },
        "ownershipAndControl": {
            "thirdPartyIndicator": false,
            "depositorEntityId": "F196FF3DAAAF4E939296CCB7808F6E74",
            "relatedPersons": [
                {
                    "contactType": "AUTHORIZED_PERSON",
                    "personId": "person_contact^519397AA4FFF4C3B93E4EC6429ED1E1B"
                }
            ]
        },
        "typeSpecificInfo": {
            "virtualAccountInfo": {
                "parentAccountNumber": "110000008260" 
            }
        }
    }
}

Step 5 - Monitor the status of account creation

Using the query parameter of requestType you're able to check both CREATE and UPDATE requests.

GET /v2/accounts/requests/VIAOpeningUSD?requestType=CREATE returns:

{
    "accountNumber": "800400123987",
    "status": "COMPLETED"
}

Step 6 - Verify that account object is now created

Once your account status is COMPLETED, you can now retrieve the details of the account you created. Note that your accounts will contain some attributes which were inherited from the parentAccount.

GET /v1/accounts/223122343243 returns:

{
    "type": "VIRTUAL",
    "accountStatus": "ACTIVE",
    "accountCurrency": "USD", 
    "rate": null,
    "branchCountry": "US", 
    "admistrative": {
        "openDate": "2022-03-15T15:49:24.845Z",
        "accountName": "ClientVIAUSD",
        "accountNickname": "USD VIA",
    ...
    },
    "otherInfo": {
        "transactionData": [
            {
                "linkUrl": "https://api.test.txb.gs.com/v2/reports/transactionReports?referenceNumber=220000004004&businessDate=2022-03-25&limit=15&offset=0" //this will retrieve the latest transactions on the account 
            }
        ]
    }
}

Step 7 - View associated account transactions

Once your account status is COMPLETED, you can now retrieve the details of the account you created. Your accounts should be setup with the specified attributes and inherited other from the parentAccount.payments.

POST v2/reports/transactionReports?referenceNumber=800400123987&businessDate=20222-03-25

{
    "asOfDateTime": "2022-03-25T15:48:42.279Z",
    "references": {
        "referenceNumber": "800400123987",
        "referenceName": "ClientVIAUSD",
        "referenceBank": {},
        "referenceType": "DEPOSITACCOUNT",
        "jurisdiction": "US",
        "currency": "USD",
        "isvirtual": true,
        "virtualAccountDetails": {}
    },
    "balances": [
        {
            "balanceType": "LEDGER",
            "startOfDayBalance": 0,
            "currentBalance": 0
        }
        ...
    ],
    "transactions": [
        {}
    ],
    "hasMore": false
}

Banking as a Service

Clients building an 'embedded banking' solution with TxB (read more) will perform an additional step when opening new virtual accounts on behalf of your end users. Prior to opening a virtual account, you must first create a record of eligibility for your end user. This end user record contains the data TxB needs to confirm eligibility and manage Know Your Customer requirements and other obligations. Learn more by getting in touch.


This site is for informational purposes only and does not constitute an offer to sell, or the solicitation of an offer to buy, any security. The Goldman Sachs Marquee® platform is for institutional and professional clients only. Some of the services and products described on this site may not be available in certain jurisdictions or to certain types of client. Please contact your Goldman Sachs sales representative with any questions. Nothing on this site constitutes an offer, or an invitation to make an offer from Goldman Sachs to purchase or sell a product. This site is given for purely indicative purposes and does not create any contractual relationship between you and Goldman Sachs. Any market information contained on the site (including but not limited to pricing levels) is based on data available to Goldman Sachs at a given moment and may change from time to time. There is no representation that any transaction can or could have been effected on such terms or at such prices. Please see https://www.goldmansachs.com/disclaimer/sec-div-disclaimers-for-electronic-comms.html for additional information. © 2023 Goldman Sachs. All rights reserved.
Transaction Banking services are offered by Goldman Sachs Bank USA (“GS Bank”). GS Bank is a New York State chartered bank, a member of the Federal Reserve System and a Member FDIC. © 2023 Goldman Sachs. All rights reserved.
Not all products and functionality mentioned on this website are currently available through our API platform.
All loans and deposit products are provided by Goldman Sachs Bank USA, Salt Lake City Branch. Member FDIC.
Brokerage and investment advisory services offered by our investment products are provided by Goldman Sachs & Co. LLC (`‘GS&CO.`’), which is an SEC registered broker-dealer and investment adviser, and member FINRA/SIPC. Research our firm at FINRA's BrokerCheck. Custody and clearing services are provided by Apex Clearing Corporation, a registered broker-dealer and member FINRA/SIPC. Please consider your objectives before investing. A diversified portfolio does not ensure a profit or protect against a loss. Past performance does not guarantee future results. Investment outcomes and projections are forward-looking statements and hypothetical in nature. Neither this website nor any of its contents shall constitute an offer, solicitation, or advice to buy or sell securities in any jurisdictions where GS&Co. is not registered. Any information provided prior to opening an investment account is on the basis that it will not constitute investment advice and that GS&Co. is not a fiduciary to any person by reason of providing such information. For more information about our investment offerings, visit our Full Disclosures.
Investment products are: NOT FDIC INSURED ∙ NOT A DEPOSIT OR OTHER OBLIGATION OF, OR GUARANTEED BY, GOLDMAN SACHS BANK USA ∙ SUBJECT TO INVESTMENT RISKS, INCLUDING POSSIBLE LOSS OF THE PRINCIPAL AMOUNT INVESTED