# Account Mapping API
source: https://developer.mastercard.com/mastercard-send-person-to-person/documentation/api-reference/account-mapping/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 creates an account mapping on FPS by assigning an account number and sort code. Account mappings are created with or under a bank account. You provide a reference ID (`account_reference`) for the account mapping and get a system-generated token ID (`non_card_token`) in the response. You can then use the reference ID in your [Payment Transfer API](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/api-reference/payment-transfer/index.md) request (as an 'acct-ref' [Account URI](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/field-uris-codes/account-uris/index.md)).

## 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 section below, JSON example requests and responses are shown. For XML examples, see [Sample Requests and Responses](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/api-reference/account-mapping/index.md#sample-requests-and-responses). Use [HTTP Headers](https://developer.mastercard.com/mastercard-send-person-to-person/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-person-to-person/swagger/AccountMapping_Swagger_final.yaml`

## Testing {#testing}

For testing guidance, see [Testing](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/testing/index.md).

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

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

* **Format:** JSON / XML
* **HTTP Version:** 1.0 / 1.1
* **HTTP Header Parameters:** see [HTTP Headers](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/api-basics/index.md#http-headers)

Response messages also contain the content-type and content-length header parameters.

### PUT - Without non_card_token {#put---without-non_card_token}

#### Request {#request}

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

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

```JSON
{
   "account_mapping": {
      "account_reference": "ABCD123456789",
      "account_uri": "fps-acct:12345678;sortCd=123456;country=GB",
      "name_on_account": "Jane Tyler Smith",
      "account_description": "This is our main account"
   }
}
```

```XML
<account_mapping>
    <account_reference>ABCD123456789</account_reference>
    <account_uri>fps-acct:12345678;sortCd=123456;country=GB</account_uri>
    <name_on_account>Jane Tyler Smith</name_on_account>
    <account_description>This is our main account</account_description>
</account_mapping>
```

#### Response {#response}

* JSON
* XML

```JSON
{
   "account_mapping": {
      "account_reference": "ABCD123456789",
      "account_uri": "fps-acct:12345678;sortCd=123456;country=GB",
      "name_on_account": "Jane Tyler Smith",
      "non_card_token": "non-card-token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvNXQ",
      "status": "SUCCESS",
      "status_reason": "SUCCESS",
      "account_description": "This is our main account"
   }
}
```

```XML
<account_mapping>
    <account_reference>ABCD123456789</account_reference>
    <account_uri>fps-acct:12345678;sortCd=123456;country=GB</account_uri>
    <name_on_account>Jane Tyler Smith</name_on_account>
    <non_card_token>non-card-token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvNXQ</non_card_token>
    <status>SUCCESS</status>
    <status_reason>SUCCESS</status_reason>
    <account_description>This is our main account</account_description>
</account_mapping>
```

### PUT - With non_card_token {#put---with-non_card_token}

#### Request {#request-1}

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

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

```JSON
{
   "account_mapping": {
      "account_reference": "ABCD123456789",
      "account_uri": "iban:GB73SRLG60161351212500",
      "name_on_account": "Jane Tyler Smith",
      "reference_non_card_token": "non-card-token:020Y0lU6-YK_COfgvabGPbVe2LlIq0AK8K6p_Z1amNTIS1qD7oYyr2KlA",
      "account_description": "This is our main account"
   }
}
```

```XML
<account_mapping>
    <account_reference>ABCD123456789</account_reference>
    <account_uri>iban:GB73SRLG60161351212500</account_uri>
    <name_on_account>Jane Tyler Smith</name_on_account>
    <reference_non_card_token>non-card-token:020Y0lU6-YK_COfgvabGPbVe2LlIq0AK8K6p_Z1amNTIS1qD7oYyr2KlA</reference_non_card_token>
    <account_description>This is our main account</account_description>
</account_mapping>
```

#### Response {#response-1}

* JSON
* XML

```JSON
{
   "account_mapping": {
      "account_reference": "ABCD123456789",
      "account_uri": "iban:GB73SRLG60161351212500",
      "name_on_account": "Jane Tyler Smith",
      "non_card_token": "non-card-token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvNXQ",
      "status": "SUCCESS",
      "status_reason": "SUCCESS",
      "reference_non_card_token": "non-card-token:020Y0lU6-YK_COfgvabGPbVe2LlIq0AK8K6p_Z1amNTIS1qD7oYyr2KlA",
      "account_description": "This is our main account"
   }
}
```

```XML
<account_mapping>
    <account_reference>ABCD123456789</account_reference>
    <account_uri>iban:GB73SRLG60161351212500</account_uri>
    <name_on_account>Jane Tyler Smith</name_on_account>
    <non_card_token>non-card-token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvNXQ</non_card_token>
    <status>SUCCESS</status>
    <status_reason>SUCCESS</status_reason>
    <reference_non_card_token>non-card-token:020Y0lU6-YK_COfgvabGPbVe2LlIq0AK8K6p_Z1amNTIS1qD7oYyr2KlA</reference_non_card_token>
    <account_description>This is our main account</account_description>
</account_mapping>
```

