# Account Updater API

### [Sandbox environment](https://docs.forter.com/account-updater-api#sandbox-environment) Sandbox environment

While integrating with Forter, you should use our sandbox environment which is free for use, and only requires your credentials.

**Base URL** (Sandbox Environment): https://pci-tokenization-sandbox.checkouttools.com/v1/

OpenAPI Schema is available [here.](https://pci-tokenization-sandbox.checkouttools.com/documentation/json "here.")

### [POST /v1/account-updater/card/update](https://docs.forter.com/account-updater-api#post-v1account-updatercardupdate) POST /v1/account-updater/card/update

Receive card details and return updated card details from the card network.  
**Warning**: Both request and response contain PCI data!

```javascript
const response = await axios.post('https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/card/update', {
    cardNumber: "4444555566660006",
    expirationMonth: 12,
    expirationYear: 2025,
    cardHolderName: "John Doe",
}, {
    headers: { authorization: `Basic ${btoa(`${site_id}:${site_secret}`)}` }
});
```

### [POST /v1/account-updater/token/update](https://docs.forter.com/account-updater-api#post-v1account-updatertokenupdate) POST /v1/account-updater/token/update

Receive Forter token or token alias and update the underlying card details in the Forter Vault.

```javascript
const response = await axios.post('https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/update', {
    token: "ftr1d8a56cfa6b3745a39e4a42d5ab1048c8",
}, {
    headers: { authorization: `Basic ${btoa(`${site_id}:${site_secret}`)}` }
});
```

### [POST /v1/account-updater/token/enroll](https://docs.forter.com/account-updater-api#post-v1account-updatertokenenroll) POST /v1/account-updater/token/enroll

Receive Forter token or token alias and enroll the token for continuous updates. This means Forter transparently keeps the underlying card details refreshed at the background for you.

```javascript
const response = await axios.post('https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/enroll', {
    token: "ftr1d8a56cfa6b3745a39e4a42d5ab1048c8",
}, {
    headers: { authorization: `Basic ${btoa(`${site_id}:${site_secret}`)}` }
});
```
