# Account Balance API
source: https://developer.mastercard.com/mastercard-send-disbursements/documentation/api-reference/account-balance/index.md

Note: We have hidden this page from the main documentation set because we are no longer promoting this API.

Unless you are already using this API, please do **not** start coding for it.

This API retrieves customer account balances for a specific account (using the `non_card_token`), or accounts for the participant, on FPS. Account balances can be retrieved only at bank account level and not at the U.K. Faster Payments addressable account number level.

## Environment Domains {#environment-domains}

* MTF
* Production

```MTF
https://sandbox.api.mastercard.com/send
```

```Production
https://api.mastercard.com/send
```

To form the full endpoint URL, combine the appropriate domain portion (shown above) with the path portion shown by the OpenAPI specification (see below).

## API {#api}

This API supports JSON and XML requests. In the expandable sections below, JSON example responses are shown. For XML examples, see [Sample Requests and Responses](https://developer.mastercard.com/mastercard-send-disbursements/documentation/api-reference/account-balance/index.md#sample-requests-and-responses). Use [HTTP Headers](https://developer.mastercard.com/mastercard-send-disbursements/documentation/api-basics/index.md#http-headers) to determine the response format. We recommend you log the Correlation ID (correlation-id) response header value for tracking purposes. When seeking support, providing the relevant Correlation ID may help resolve your inquiry more quickly.

The `partnerId` portion of the URL makes the request unique to a specific Originating Institution or Transaction Initiator. Use the Partner Reference ID you receive when you [register for the Mastercard Send program](https://developer.mastercard.com/mastercard-send/documentation/send-eligibility/).
Note: We updated the API specification to OpenAPI 3.0.3 in September 2022, adjusting the server base URLs, paths, and some definition names to better meet API standards. The API and its endpoints did not change. However, if you previously generated an API client using an earlier version of this specification and then regenerate the client or classes from this newer version, you might need to adjust your code.
API Specification: `https://static.developer.mastercard.com/content/mastercard-send-disbursements/swagger/AccountBalance_swagger_final.yaml`

## Testing {#testing}

You can use the following values for testing the Account Balance API.

|   Account Number   |                        Simulated Response                         |
|--------------------|-------------------------------------------------------------------|
| Any Account Number | Returns the account balance with the amount of 11223344 in Credit |

## Sample Requests and Responses {#sample-requests-and-responses}

This section presents example API messages for each type of API call.

### GET - Retrieve Account Balance for Specific Account {#get---retrieve-account-balance-for-specific-account}

#### Request {#request}

**MTF URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}/non-card-tokens/{non_card_token}/account-balance](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D/non-card-tokens/%7Bnon_card_token%7D/account-balance)  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}/non-card-tokens/{non_card_token}/account-balance](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D/non-card-tokens/%7Bnon_card_token%7D/account-balance)

No body

#### Response {#response}

* JSON
* XML

```JSON
{
   "account_balances": {
      "account_balance": {
         "account_description": "This is our main account",
         "balance": {
            "amount": "1000",
            "currency": "GBP",
            "state": "IN_CREDIT"
         },
         "balance_timestamp": "2018-05-18T10:19:22Z",
         "created_date": "2017-06-05T11:47:80Z",
         "non_card_token": "non_card_token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvNXQ"
      }
   }
}
```

```XML
<account_balances>
    <account_balance>
        <account_description>This is our main account</account_description>
        <balance>
            <amount>1000</amount>
            <currency>GBP</currency>
            <state>IN_CREDIT</state>
        </balance>
        <balance_timestamp>2018-05-18T10:19:22Z</balance_timestamp>
        <created_date>2017-06-05T11:47:80Z</created_date>
        <non_card_token>non_card_token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvNXQ</non_card_token>
    </account_balance>
</account_balances>
```

### GET - Retrieve Account Balances for Specific Partner {#get---retrieve-account-balances-for-specific-partner}

#### Request {#request-1}

**MTF URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}/account-balances](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D/account-balances)  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}/account-balances](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D/account-balances)

No body

#### Response {#response-1}

* JSON
* XML

```JSON
{
   "account-balances": [
      {
         "account_description": "This is our main account",
         "balance": {
            "amount": "1000",
            "currency": "GBP",
            "state": "IN_CREDIT"
         },
         "balance_timestamp": "2012-05-18T10:19:22Z",
         "created_date": "2012-06-05T11:47:51Z",
         "non_card_token": "non_card_token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvNXQ"
      },
      {
         "account_description": "This is one of the account",
         "balance": {
            "amount": "13000",
            "currency": "GBP",
            "state": "IN_CREDIT"
         },
         "balance_timestamp": "2013-05-18T10:19:22Z",
         "created_date": "2013-06-05T11:47:44Z",
         "non_card_token": "non_card_token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvabc"
      },
      {
         "account_description": "This is one of the account",
         "balance": {
            "amount": "5000",
            "currency": "GBP",
            "state": "IN_CREDIT"
         },
         "balance_timestamp": "2014-05-18T10:19:22Z",
         "created_date": "2014-06-05T11:47:36Z",
         "non_card_token": "non_card_token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvdef"
      }
   ]
}
```

```XML
<account-balances>
    <account_balance>
        <account_description>This is our main account</account_description>
        <balance>
            <amount>1000</amount>
            <currency>GBP</currency>
            <state>IN_CREDIT</state>
        </balance>
        <balance_timestamp>2012-05-18T10:19:22Z</balance_timestamp>
        <created_date>2012-06-05T11:47:51Z</created_date>
        <non_card_token>non_card_token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvNXQ</non_card_token>
    </account_balance>
    <account_balance>
        <account_description>This is one of the account</account_description>
        <balance>
            <amount>13000</amount>
            <currency>GBP</currency>
            <state>IN_CREDIT</state>
        </balance>
        <balance_timestamp>2013-05-18T10:19:22Z</balance_timestamp>
        <created_date>2013-06-05T11:47:44Z</created_date>
        <non_card_token>non_card_token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvabc</non_card_token>
    </account_balance>
    <account_balance>
        <account_description>This is one of the account</account_description>
        <balance>
            <amount>5000</amount>
            <currency>GBP</currency>
            <state>IN_CREDIT</state>
        </balance>
        <balance_timestamp>2014-05-18T10:19:22Z</balance_timestamp>
        <created_date>2014-06-05T11:47:36Z</created_date>
        <non_card_token>non_card_token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvdef</non_card_token>
    </account_balance>
</account-balances>
```

