> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yapily.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AMEX

## Links

* [Developer Console](https://developer.americanexpress.com/)

## Scopes

* Account Information 🔒

**Preconditions**:

* American Express requires manual registration for each application with [Amex for Developers](https://developer.americanexpress.com/)
* Production access requires Active eIDAS Certificates.

***

| Name                     | Yapily Institution ID | Countries                                       | DCR Supported? |
| ------------------------ | --------------------- | ----------------------------------------------- | -------------- |
| American Express UK      | `amex-ob_uk`          | United Kingdom                                  | NO             |
| American Express Europe  | `amex-ob_eu`          | Norway, France, Sweden, Finland                 | NO             |
| American Express Sandbox | `amex-ob-sandbox`     | United Kingdom, Norway, France, Sweden, Finland | NO             |

**Consents**

* Multiple consents are not supported
* Amex deem each main Card to be an Account and require separate consents; this means they must be consented under separate consent journeys.
* Additional/Supplemental Cards cannot be separately consented; they are consented by the main Account holder.
* You may only have one active consent per Account and `Client ID`.
* A consent is valid for a single Account only (holders with multiple Accounts should consent each Account separately).
* If a consent is lost the Account holder must login to Amex Online and remove the Partner link.
* The access privileges for consents are fixed as Accounts, Balances and Transactions (by Amex); any access scopes provided to Yapily will be ignored.

***

**Transactions**

* By default, Amex returns the last 90 days transactions for an account.
* To obtain transactions made outside the last 90 days, a `from` and `before` date must be passed as parameters.
* If only a `from` date is passed, the `before` date will default to today's date.
* If only a `before` date is passed, the Amex default of last 90 days transactions will be returned.

## Live Environment

**Step 1: Upload the eIDAS signing and transport certificates into V2 services**

**Request**

```shell theme={null}
curl --location --request POST 'https://api.yapily.com/certificates/keys/' \
--header 'Authorization: Basic YOUR_APPLICATION_CREDENTIALS_AS_BASIC_AUTH' \
--header 'Content-Type: application/json' \
--data-raw '[{
   "pem": "$YOUR_PUBLIC_KEY_AS_PEM",
   "key": "$YOUR_PRIVATE_KEY",
   "kid" : "$CERT_KID",
   "name" : "$CERTIFICATE_NAME"
}]'
```

**Response**

```json theme={null}
{
"id": "d16f87d3-4222-4173-b8b9-44aeccacae7d",
....
}
```

Save the id and remember for which kind of key it corresponds:
e.g. `SIGNING_KEY_UUID = d16f87d3-4222-4173-b8b9-44aeccacae7d`

Once you have done it for the signing key, do the same request for your transport key.

***

### Step 2: Call the MANUAL registration endpoint

The final step is to call the Manual registration endpoint with the certificate UUIDs and the `clientId` and `clientSecret` obtained from the Amex Onboarding process (see Notes below):

Please use **amex-ob\_uk or amex-ob\_eu** as institution id based on the desired country.

**Request**

Go to Manual register V2 endpoint.

```shell theme={null}
curl --location --request POST 'https://api.yapily.com/institutions/amex-ob_uk/manual/register' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_APPLICATION_CREDENTIALS_AS_BASIC_AUTH' \
     --data-raw '{
            "signingKeyID": "$SIGNING_KEY_UUID",
            "transportKeyID": "$TRANSPORT_KEY_UUID"
            "apiTypes": [ "AISP", "PISP" ],
            "clientId": "$CLIENT_ID_FROM_AMEX_ONBOARDING",
            "clientSecret": "$CLIENT_SECRET_FROM_AMEX_ONBOARDING"
     }'
```

**Response**

```json theme={null}
{
   "id": "a0460a91-4b4c-422a-bbe6-bebe0b92e308"
}
```

Note the above ID, this will be the clientId which can be further used to Get, Modify, Delete registrations with Yapily

## Sandbox Environment

Same steps as Live Environment, please use **amex-ob-sandbox** as institution id.

**Notes:**

* Sign up for access at [Create an Account](https://developer.americanexpress.com/register); Group emails are not accepted.
* Make records of your signup details; these cannot be accessed or edited once entered (they can be modified by support ticket at a 7 - 14 day turnaround).
* Support is by web form [Contact Us](https://developer.americanexpress.com/support).
* Request access to `Account Financials European Union (EU)` for Open Banking; FCA registration details are required.
* Model and API are proprietary with sparse information.
* Sandbox and QA are granted immediately.
* Production access requires a further request fulfilled by email exchange and takes 14 days typically.
* Amex will email for Production Callback URL, Signing and Transport certificates; once again be careful to record this interaction as these cannot be accessed or edited other than by support request.
* Access Keys are provided in \[Amex for Developers -> My Keys -> Credentials] ([https://developer.americanexpress.com/apps/dashboard](https://developer.americanexpress.com/apps/dashboard)) once approved.
* The Sandbox environment is actually the American Express QA environment and has similar functionality to Production.

## Support

If you require technical support with certificate management, please contact [Support](/resources/support).
