Retrieve a full account number
In this tutorial, you’ll learn how to retrieve payment network information for a consented account using the J.P. Morgan Business Direct Connect API. By the end of this tutorial, you’ll know how to:
- Send a request to retrieve the payment networks supported for an account.
- Interpret the bank identifier, account identifier, identifier type, and payment network type returned in the response.
Before you begin
To use this capability, you will need to have:
- Complete onboarding and obtain client credentials.
- Complete the consent flow and obtain a valid access token.
Send a request
To retrieve the payment networks supported for a consented account, send a GET request to the /accounts/{accountId}/payment-networks endpoint.
- Replace
{accountId}with the accountId returned by the/accountsoperation for the account you want to query. - Include a valid access token as described in the integration guide.
- Include the required
x-fapi-interaction-idheader. Provide its value as an Internet Engineering Task Force Request for Comments 4122 universally unique identifier (UUID). - The API specification also defines optional Financial Data Exchange (FDX) headers for the actor type, client public key, data provider identifier, and data recipient identifier. Refer to the integration guide and API specification to determine which optional headers apply to your configuration.
Request and response details
A successful response returns a paymentNetworks array containing the payment networks supported for the account. Each payment-network entry may include:
bankId: The bank identifier used by the payment network.bankIdType: The format or type of the bank identifier.identifier: The number used to identify the account within the payment network.identifierType: Indicates whether identifier is anACCOUNT_NUMBER or TOKENIZED_ACCOUNT_NUMBER.type: The payment network type.
Check identifierType before using the value in identifier:
- When
identifierTypeisACCOUNT_NUMBER,identifiercontains the account number. - When
identifierTypeisTOKENIZED_ACCOUNT_NUMBER,identifiercontains a tokenized account number.
Protect sensitive account identifiers
An unmasked account number is sensitive data. When the response contains an unmasked ACCOUNT_NUMBER identifier, exchange it only when the response data is encrypted.
You can provide the optional FDX-API-Client-Public-Key header with a public key that the data provider can use to encrypt account numbers and other sensitive response properties. Refer to the applicable Financial Data Exchange message-encryption requirements and your integration guidance for implementation details.
For details on required and optional parameters, error codes, response formats, and request/response examples, refer to the API specification.